okx / js-wallet-sdk

Multi-chain typescript signature sdk, supports bitcoin, ethereum, aptos, cosmos, etc.
MIT License
175 stars 53 forks source link

How can I know the balance of the wallets? #97

Closed hasolancer closed 4 months ago

hasolancer commented 4 months ago

Can you help me with this?

const { TrxWallet } = require("@okxweb3/coin-tron");
let wallet = new TrxWallet()
const params = {
    privateKey: '****'
};
const addr = await wallet.getNewAddress(params); 

wallet.getBalance(addr.address) ?

https://developers.tron.network/v4.0/reference/getbalance

yanminmin commented 4 months ago

The sdk does not support this feature.