(scriptHash: string)
| 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[]> { |
no test coverage detected