List All Wallets
Get List of All Wallets
This API call retrieves a list of wallet object information by the Chain Name. This can be used to determine the wallet's balance or to identify the keys used to sign with the wallet.
let walletList = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.WalletList();
console.log("List of Wallet: =>", JSON.stringify(walletList));
let walletList: WalletsWrapper[] = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.WalletList();
console.log("List of Wallet: =>", JSON.stringify(walletList));
You will get the following response from the WalletList method. It is JSON representation Only. You will get the WalletWrapper object where all the below properties are contained.
[
{
"id":"133",
"label":"Trade",
"approvalsRequired":3,
"balanceString":"3.00000498",
"spendableBalanceString":"3.00000498",
"coin":"BTC",
"chain":"BTC",
"deleted":false,
"m":2,
"n":4
}
]
Full Example
import { CoinsEnum,LiminalEnvironment, LiminalJs,WalletsWrapper } from "@lmnl/liminaljs";
const main = async () => {
try {
// Instance of Liminal Js
let liminalJs = new LiminalJs(LiminalEnvironment.test);
await liminalJs
.Authenticate({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
})
.AuthenticateWithAccessToken();
// Get Wallet Instance
let walletList: WalletsWrapper[] = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.WalletList();
console.log("List of Wallet: =>", JSON.stringify(walletList));
}
catch (ex) {
throw ex;
}
};
main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));
import { CoinsEnum,LiminalEnvironment, LiminalJs, Wallet, WalletWrapper } from "@lmnl/liminaljs"
const main = async (): Promise<void> => {
try {
// Instance of Liminal Js
let liminalJs = new LiminalJs(LiminalEnvironment.test);
await liminalJs
.Authenticate({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
})
.AuthenticateWithAccessToken();
// Get Wallet Instance
let walletList: WalletsWrapper[] = await liminalJs
.Coin(CoinsEnum.eth)
.Wallets()
.WalletList();
console.log("List of Wallet: =>", JSON.stringify(walletList));
}
catch (ex) {
throw ex;
}
}
main().then((resolve) => console.log("Complete")).catch((error) => console.log(error));
Updated 4 days ago
Did this page help you?