Wallet details

Wallet Instance

This API call retrieves wallet instance information by passing the parameters such as wallet ID and Chain Name. Use the following code:

let walletInstance = await liminalJs
.Coin(CoinsEnum.ltc)
.Wallets()
.Get({ walletId: 296 });
let walletInstance: Wallet = await liminalJs
.Coin(CoinsEnum.ltc)
.Wallets()
.Get({ walletId: 296 });

Note: walletId is a mandatory field.

Full Example

import { CoinsEnum, LiminalJs } from "@lmnl/liminaljs";

const main = async () => {
    try {
        let liminalJs = new LiminalJs();
        await liminalJs
            .Authenticate({
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
            })
            .AuthenticateWithAccessToken();
      
        // Get Wallet Instance
        let walletInstance = await liminalJs
            .Coin(CoinsEnum.ltc)
            .Wallets()
            .Get({ walletId: 296 });
    }
    catch (ex) {
        throw ex;
    }
};

main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));
import { CoinsEnum, LiminalJs, Wallet } from "@lmnl/liminaljs"

const main = async (): Promise<void> => {
    try {
        let liminalJs = new LiminalJs();
        await liminalJs
            .Authenticate({
                clientId: "YOUR_CLIENT_ID",
                clientSecret: "YOUR_CLIENT_SECRET"
            })
            .AuthenticateWithAccessToken();

        // Get Wallet Instance
        let walletInstance: Wallet = await liminalJs
            .Coin(CoinsEnum.ltc)
            .Wallets()
            .Get({ walletId: 296 });
    }
    catch (ex) {
        throw ex;
    }
}

main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));

*Full Example of List of Wallet Data.**

List of Sub Tokens

If you want to view the list of subtoken (ERC20) then use the following code snippet. Include data for all subtokens
// Get Wallet Instance
let walletInstance = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.Get({ walletId: 132, allTokens: true });

// Get Wallet Data
let walletData = await walletInstance.GetWallet();

// Get Wallet Object Data
console.log("Wallet Data : =>", JSON.stringify(walletData.Data));
// Get Wallet Instance
let walletInstance = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.Get({ walletId: 132, allTokens:true });

// Get Wallet Data
let walletData = await walletInstance.GetWallet();

// Get Wallet Object Data
console.log("Wallet Data : =>", JSON.stringify(walletData.Data));

Parameters:

ParamsData TypeDescription
allTokensbooleanInclude data for all subtokens.
Chain/CoinCoinsEnumParent Chain
btcCoinEnum.btcUTXO
bchCoinEnum.bchUTXO
ltcCoinEnum.ltcUTXO
dogeCoinEnum.dogeUTXO
ethCoinEnum.ethEVM
polygon-maticCoinEnum.maticEVM

Did this page help you?