Table of Contents

Class PrevArkTxProvider

Namespace
NArk.Arkade.Emulator
Assembly
NArk.Arkade.dll

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

transport IClientTransport
virtualTxStorage IVirtualTxStorage
blockchain IBitcoinBlockchain
logger ILogger<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

txids IReadOnlyCollection<uint256>

Transaction ids to resolve; duplicates are collapsed.

network Network

Network to parse the fetched transactions against.

cancellationToken CancellationToken

Cancellation 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.