UtxoProvider
@opcat-labs/scrypt-ts-opcat v1.0.4
@opcat-labs/scrypt-ts-opcat / UtxoProvider
Interface: UtxoProvider
Defined in: packages/scrypt-ts-opcat/src/providers/utxoProvider.ts:23
a Provider used to query UTXO related to the address
Methods
addNewUTXO()
addNewUTXO(
utxo):void
Defined in: packages/scrypt-ts-opcat/src/providers/utxoProvider.ts:42
Add a UTXO to the provider
Parameters
utxo
Returns
void
getUtxos()
getUtxos(
address,options?):Promise\<ExtUtxo[]>
Defined in: packages/scrypt-ts-opcat/src/providers/utxoProvider.ts:30
Get a list of the UTXOs.
Parameters
address
string
The address of the returned UTXOs belongs to.
options?
The optional query conditions, see details in UtxoQueryOptions.
Returns
Promise\<ExtUtxo[]>
A promise which resolves to a list of UTXO for the query options.
markSpent()
markSpent(
txId,vout):void
Defined in: packages/scrypt-ts-opcat/src/providers/utxoProvider.ts:36
Mark an outpoint as spent
Parameters
txId
string
vout
number
Returns
void