JavaScript
Use Adena Wallet SDK with JavaScript
The Adena Wallet SDK provides the necessary tools to integrate the Adena Wallet into JavaScript-based applications, enabling interactions with both the Adena Wallet and TM2 Wallet for signing transactions, managing accounts, and more.
For full documentation and source code, visit the Adena Wallet SDK Repository
Install the SDK
To add the Adena Wallet SDK to your project, you can use either npm or yarn.
Using npm:
Using yarn:
Quick Start
Get started with the Adena Wallet SDK by following this simple guide.
Import the SDK
Start by importing the SDK into your project.
Connect to a Wallet
Connect to a user's wallet to begin interacting with it.
Fetch Account Details
Once the wallet is connected, you can retrieve details about the user's account.
Advanced Features
The Adena Wallet SDK supports a wide range of functionalities beyond connecting wallets and fetching account details. Here are some additional key features you can implement.
Sign a Transaction
To sign a transaction using the connected wallet:
Send a Transaction
After signing, you can send the transaction:
Disconnect from a Wallet
To disconnect the currently connected wallet:
Error Handling and Debugging
Use console.error
to capture detailed logs for any issues encountered during interactions with the SDK. Ensure you handle promise rejections to avoid unexpected application crashes.
For example:
Last updated