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

Method tokenBalance

src/urchain.ts:122–134  ·  view source on GitHub ↗
(scriptHash: string, tick: string)

Source from the content-addressed store, hash-verified

120
121 // Get balance for a specific Token
122 tokenBalance(scriptHash: string, tick: string): Promise<IBalance> {
123 return this._post("token-balance", {
124 scriptHash,
125 tick,
126 }).then((balance) => {
127 return {
128 ...balance,
129 confirmed: BigInt(balance.confirmed),
130 unconfirmed: BigInt(balance.unconfirmed),
131 total: BigInt(balance.confirmed) + BigInt(balance.unconfirmed),
132 };
133 });
134 }
135
136 // Get list of tokens for a specific scriptHash
137 async tokenList(scriptHash: string): Promise<IToken[]> {

Callers

nothing calls this directly

Calls 1

_postMethod · 0.95

Tested by

no test coverage detected