Class PrevArkTxProvider
Default IPrevArkTxProvider: serves previous Arkade transactions from the
local virtual-tx store when present, then arkd's indexer (GetVirtualTxs), and
finally — when a blockchain backend is supplied — from chain.
public sealed class PrevArkTxProvider : IPrevArkTxProvider
- Inheritance
-
PrevArkTxProvider
- Implements
- Inherited Members
Remarks
Storage-first matters because the store already holds the branch of every VTXO the wallet has received, so a spend usually costs no extra indexer round-trip.
The on-chain step covers the parents the indexer cannot serve: a boarding UTXO, a
commitment transaction, or an unrolled coin re-entering from chain. Offchain Arkade
spends never need it (every input is a VTXO with a virtual parent), but intent proofs
routinely register boarding inputs, so wire blockchain whenever
intent proofs go through the emulator.
Constructors
PrevArkTxProvider(IClientTransport, IVirtualTxStorage?, IBitcoinBlockchain?, ILogger<PrevArkTxProvider>?)
Default IPrevArkTxProvider: serves previous Arkade transactions from the
local virtual-tx store when present, then arkd's indexer (GetVirtualTxs), and
finally — when a blockchain backend is supplied — from chain.
public PrevArkTxProvider(IClientTransport transport, IVirtualTxStorage? virtualTxStorage = null, IBitcoinBlockchain? blockchain = null, ILogger<PrevArkTxProvider>? logger = null)
Parameters
transportIClientTransportvirtualTxStorageIVirtualTxStorageblockchainIBitcoinBlockchainloggerILogger<PrevArkTxProvider>
Remarks
Storage-first matters because the store already holds the branch of every VTXO the wallet has received, so a spend usually costs no extra indexer round-trip.
The on-chain step covers the parents the indexer cannot serve: a boarding UTXO, a
commitment transaction, or an unrolled coin re-entering from chain. Offchain Arkade
spends never need it (every input is a VTXO with a virtual parent), but intent proofs
routinely register boarding inputs, so wire blockchain whenever
intent proofs go through the emulator.
Methods
ResolveAsync(IReadOnlyCollection<uint256>, Network, CancellationToken)
Resolves the raw transactions for the given txids.
public Task<IReadOnlyDictionary<uint256, Transaction>> ResolveAsync(IReadOnlyCollection<uint256> txids, Network network, CancellationToken cancellationToken = default)
Parameters
txidsIReadOnlyCollection<uint256>Transaction ids to resolve; duplicates are collapsed.
networkNetworkNetwork to parse the fetched transactions against.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyDictionary<uint256, Transaction>>
The transactions that could be resolved, keyed by txid. Txids that could not be resolved are simply absent — callers decide whether a miss is fatal.