streamTxOsByAssetLabel method
Stream<TxoResponse>
streamTxOsByAssetLabel({
- required AssetLabel assetLabel,
- double? confidence,
- CallOptions? options,
Streams a TxoResponse object for the transaction outputs found at the given assetLabel
and confidence
.
assetLabel
is an AssetLabel representing the asset label 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
Stream<TxoResponse> streamTxOsByAssetLabel({
required AssetLabel assetLabel,
double? confidence,
CallOptions? options,
}) async* {
final QueryByAssetLabelRequest request = QueryByAssetLabelRequest(
assetLabel: assetLabel,
confidenceFactor: getConfidenceFactorFromDouble(confidence),
);
final Stream<TxoResponse> stream = genusTransactionStub.getTxosByAssetLabel(
request,
options: options,
);
await for (final TxoResponse response in stream) {
yield response;
}
}