MCPcopy Index your code
hub / github.com/NoteProtocol/NoteWallet / tokenList

Method tokenList

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

Source from the content-addressed store, hash-verified

135
136 // Get list of tokens for a specific scriptHash
137 async tokenList(scriptHash: string): Promise<IToken[]> {
138 const list = await this._post("token-list", {
139 scriptHash,
140 });
141 return list.map((token) => {
142 token.confirmed = BigInt(token.confirmed);
143 token.unconfirmed = BigInt(token.unconfirmed);
144 token.total = BigInt(token.confirmed) + BigInt(token.unconfirmed);
145 return token;
146 });
147 }
148
149 // Get available UTXOs using scriptHash and required amount
150 async utxos(scriptHashs: string[], _satoshis?: bigint): Promise<IUtxo[]> {

Callers 2

tokenListFunction · 0.45
processCommandMethod · 0.45

Calls 1

_postMethod · 0.95

Tested by

no test coverage detected