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

Method tokenutxos

src/urchain.ts:158–168  ·  view source on GitHub ↗
(scriptHashs: string[], tick: string, amount?: bigint)

Source from the content-addressed store, hash-verified

156
157 // Get available Token UTXOs using scriptHash and required amount
158 async tokenutxos(scriptHashs: string[], tick: string, amount?: bigint) {
159 const utxos = await this._post("token-utxos", {
160 scriptHashs,
161 tick,
162 ...(typeof amount !== "undefined" ? {amount: amount} : {}),
163 });
164 return utxos.map((utxo) => {
165 utxo.amount = BigInt(utxo.amount);
166 return utxo;
167 });
168 }
169
170 // Reset unconfirmed transactions
171 async refresh(scriptHash: string): Promise<{

Callers 2

getTokenUtxosFunction · 0.80
sendTokenCommonFunction · 0.80

Calls 1

_postMethod · 0.95

Tested by

no test coverage detected