MCPcopy Create free account
hub / github.com/NoteProtocol/NoteWallet / walletBalance

Method walletBalance

src/urchain.ts:109–119  ·  view source on GitHub ↗
(scriptHashs: string[])

Source from the content-addressed store, hash-verified

107
108 // Calculate wallet balance using multiple scriptHashes
109 async walletBalance(scriptHashs: string[]): Promise<IBalance> {
110 const balance = await this._post("wallet-balance", {
111 scriptHashs,
112 });
113 return {
114 ...balance,
115 confirmed: BigInt(balance.confirmed),
116 unconfirmed: BigInt(balance.unconfirmed),
117 total: BigInt(balance.confirmed) + BigInt(balance.unconfirmed),
118 };
119 }
120
121 // Get balance for a specific Token
122 tokenBalance(scriptHash: string, tick: string): Promise<IBalance> {

Callers 1

fetchWalletBalaceFunction · 0.80

Calls 1

_postMethod · 0.95

Tested by

no test coverage detected