getTxOsByAddress method
Future<TxoAddressResponse>
getTxOsByAddress({
- required LockAddress address,
- double? confidence,
- CallOptions? options,
//////////////////////////
Transaction Ouputs (TxOs)
Returns a TxoAddressResponse object for the transaction outputs found at the given addresses
and confidence
.
address
is a LockAddress representing the addresses to retrieve transaction outputs for
confidence
is a double representing the confidence factor of the transaction outputs to retrieve.
options
is a CallOptions
object that can be used to set additional options for the RPC request.
Throws an Exception if an error occurs during the RPC request.
Implementation
/// Returns a [TxoAddressResponse] object for the transaction outputs found at the given [addresses] and [confidence].
///
/// [address] is a [LockAddress] representing the addresses to retrieve transaction outputs for
///
/// [confidence] is a [double] representing the confidence factor of the transaction outputs to retrieve.
///
/// [options] is a [CallOptions] object that can be used to set additional options for the RPC request.
///
/// Throws an [Exception] if an error occurs during the RPC request.
Future<TxoAddressResponse> getTxOsByAddress({
required LockAddress address,
double? confidence,
CallOptions? options,
}) async {
final QueryByAddressRequest request = QueryByAddressRequest(
address: address,
confidenceFactor: getConfidenceFactorFromDouble(confidence),
);
final TxoAddressResponse response = await genusTransactionStub.getTxosByAddress(
request,
options: options,
);
return response;
}