Interface IVtxoStorage
- Namespace
- NArk.Abstractions.VTXOs
- Assembly
- NArk.Abstractions.dll
Persistence for VTXOs; also drives the active-script subscription via IActiveScriptsProvider.
public interface IVtxoStorage : IActiveScriptsProvider
- Inherited Members
Methods
GetVtxos(IReadOnlyCollection<string>?, IReadOnlyCollection<OutPoint>?, string[]?, bool, string?, int?, int?, CancellationToken)
Query VTXOs with explicit filter parameters. Adding new parameters will cause compile errors for implementors, ensuring they handle new filters.
Task<IReadOnlyCollection<ArkVtxo>> GetVtxos(IReadOnlyCollection<string>? scripts = null, IReadOnlyCollection<OutPoint>? outpoints = null, string[]? walletIds = null, bool includeSpent = false, string? searchText = null, int? skip = null, int? take = null, CancellationToken cancellationToken = default)
Parameters
scriptsIReadOnlyCollection<string>Filter by script hex strings. If null, no script filter applied.
outpointsIReadOnlyCollection<OutPoint>Filter by specific outpoints. If null, no outpoint filter applied.
walletIdsstring[]Filter by wallet IDs (requires join with contracts). If null, no wallet filter.
includeSpentboolInclude spent VTXOs. Default: false (unspent only).
searchTextstringSearch text for TransactionId or Script. If null, no text search.
skipint?Number of records to skip (for pagination). If null, no skip.
takeint?Number of records to take (for pagination). If null, no limit.
cancellationTokenCancellationTokenCancellation token.
Returns
UpsertVtxo(ArkVtxo, CancellationToken)
Inserts or updates a VTXO. Returns true when a new record was created.
Task<bool> UpsertVtxo(ArkVtxo vtxo, CancellationToken cancellationToken = default)
Parameters
vtxoArkVtxocancellationTokenCancellationToken
Returns
Events
VtxosChanged
Raised when a VTXO is inserted or updated.
event EventHandler<ArkVtxo>? VtxosChanged