edeXa Web3 Wallet Integration
edeXa Wallet allows users to securely interact with the edeXa Blockchain, managing their EDX tokens, performing transactions, and interacting with decentralized applications (dApps). Through the integration of Web3Auth's open-source SDKs, the wallet provides high-performance, scalable, and customizable Web3 functionalities.
Key Features
EDX Token Management: Send, receive, and manage EDX tokens within the wallet.
Seamless Integration: Secure login and interaction with blockchain-based applications using Web3Auth’s non-custodial authentication.
User Authentication: Secure login and interaction with blockchain-based applications.
Cross-Chain Interactions: Manage and interact with assets across multiple chains supported by edeXa's native bridge.
Secure Transactions: Built-in encryption and signing capabilities to ensure secure transactions for both testnet and mainnet environments.
Open Source: Web3Auth SDKs and integration tools are open-source, allowing for customization and community-driven development.
Prerequisites
Before starting the integration, make sure you have:
edeXa Wallet UI available: edeXa Wallet
Web3Auth SDK installed and configured in your project.
Access to edeXa Mainnet and Testnet endpoints.
Familiarity with Ethereum-compatible Web3 tools (Solidity, EVM).
Installation & Setup
1. Install Web3Auth SDK
To integrate edeXa Wallet in your project, you will first need to install the Web3Auth SDK. You can install it via npm:
npm install @web3auth/modal
2. Configure the Wallet Provider
Once the SDK is installed, you can configure the wallet provider. Here’s an example of how you can do it:
import { Web3Auth } from "@web3auth/modal";
const web3auth = new Web3Auth({
clientId: "YOUR_WEB3AUTH_CLIENT_ID", // Obtain from Web3Auth Dashboard
chainConfig: {
chainNamespace: "eip155",
chainId: "0x27dc4", // edeXa Mainnet Chain ID (hex format)
rpcTarget: "https://mainnet.edexa.network/rpc", // edeXa Mainnet RPC
},
uiConfig: {
appName: "edeXa Wallet",
theme: "dark",
},
});
// Connect the wallet
await web3auth.initModal();
await web3auth.connect();
This will set up the connection to the edeXa Wallet and allow you to authenticate and interact with the blockchain via Web3Auth’s Web3 interface.
Wallet Features
Sending EDX Tokens
To send EDX tokens from the wallet, you can use the following example:
const transaction = {
from: 'sender_address',
to: 'receiver_address',
value: 'amount_in_wei',
};
provider.request({
method: "eth_sendTransaction",
params: [transaction],
})
.then(response => {
console.log("Transaction Successful", response);
})
.catch(error => {
console.error("Transaction Failed", error);
});
This method will trigger a transaction where the sender_address sends tokens to receiver_address. The wallet will automatically handle the signing and confirmation.
Managing Account Balance
To check the balance of a wallet:
provider.request({
method: "eth_getBalance",
params: ["user_address", "latest"],
})
.then(balance => {
console.log("Current Balance:", balance);
})
.catch(error => {
console.error("Error Fetching Balance", error);
});
Cross-Chain Interactions
The edeXa Wallet integrates seamlessly with edeXa's Cross-Chain Bridge for asset transfers. If you are using the wallet for cross-chain transactions, you can call the following APIs to move assets between different blockchains:
crossChainTransfer({
fromChain: 'Ethereum',
toChain: 'Polygon',
amount: '1000000000000000000', // amount in wei
token: 'EDX',
})
.then(response => {
console.log('Cross-chain Transfer Successful', response);
})
.catch(error => {
console.error('Error in Cross-chain Transfer', error);
});
Transaction Fees
The edeXa Wallet operates with a gas fee structure, typical to EVM-based networks. The fees can vary depending on network congestion, but are generally lower than traditional Ethereum transactions. For the most current gas fees, you can check the edeXa Gas Tracker.
Developer Resources
For more advanced integration options and to explore the full capabilities of edeXa Wallet and Web3Auth SDKs, refer to the following resources:
GitHub Repos: edeXa Token Repository
edeXa Explorer: edeXa Mainnet Explorer
Web3Auth Docs: Web3Auth Documentation
FAQs
How can I customize the edeXa Wallet?
The wallet is open-source and built using Web3Auth SDKs. Developers are welcome to customize the user interface and extend the wallet’s functionality by modifying the source code.
Is there a fee to use the wallet?
There are no fees to use the edeXa Wallet itself. However, normal network gas fees apply when sending transactions on the edeXa blockchain.
What networks are supported by the wallet?
The wallet supports edeXa Mainnet, Testnet, and any cross-chain assets that are supported through the edeXa Bridge.
Last updated