(address: string)
| 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); |
no test coverage detected