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

Method balance

src/urchain.ts:95–106  ·  view source on GitHub ↗
(scriptHash: string)

Source from the content-addressed store, hash-verified

93 }
94
95 balance(scriptHash: string): Promise<IBalance> {
96 return this._post("balance", {
97 scriptHash,
98 }).then((balance) => {
99 return {
100 ...balance,
101 confirmed: BigInt(balance.confirmed),
102 unconfirmed: BigInt(balance.unconfirmed),
103 total: BigInt(balance.confirmed) + BigInt(balance.unconfirmed),
104 };
105 });
106 }
107
108 // Calculate wallet balance using multiple scriptHashes
109 async walletBalance(scriptHashs: string[]): Promise<IBalance> {

Callers 1

getBalanceFunction · 0.45

Calls 1

_postMethod · 0.95

Tested by

no test coverage detected