Usage
Installation, quick start, and usage examples for @tetherto/wdk-wallet-tron
Installation
npm install @tetherto/wdk-wallet-tronQuick Start
Importing from @tetherto/wdk-wallet-tron
@tetherto/wdk-wallet-tronCreating a New Wallet
import WalletManagerTron, { WalletAccountTron, WalletAccountReadOnlyTron } from '@tetherto/wdk-wallet-tron'
// Use a BIP-39 seed phrase (replace with your own secure phrase)
const seedPhrase = 'your twelve word seed phrase here' // Replace with actual seed generation
// Create wallet manager with Tron RPC provider
const wallet = new WalletManagerTron(seedPhrase, {
provider: 'https://api.trongrid.io' // or any other Tron RPC provider
})
// Get a full access account
const account = await wallet.getAccount(0)
// Convert to a read-only account
const readOnlyAccount = await account.toReadOnlyAccount()
