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

Method fetch

src/btc/btc-wallet.ts:230–237  ·  view source on GitHub ↗
(address: string)

Source from the content-addressed store, hash-verified

228 }
229
230 async fetch(address: string) {
231 const {scriptHash} = mapAddressToScriptHash(address, this.config.network);
232 await this.urchain.refresh(scriptHash);
233 const balance = await this.urchain.balance(scriptHash);
234 const utxos = await this.urchain.utxos([scriptHash]);
235
236 return {balance, utxos};
237 }
238
239 async balance(address: string) {
240 const {scriptHash} = mapAddressToScriptHash(address, this.config.network);

Callers 1

processCommandMethod · 0.80

Calls 4

mapAddressToScriptHashFunction · 0.90
utxosMethod · 0.80
refreshMethod · 0.45
balanceMethod · 0.45

Tested by

no test coverage detected