Table of Contents

Interface IPrevArkTxProvider

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

Resolves raw Arkade transactions by txid, so a spend can attach them to its PSBT inputs as prevarktx ark fields before the emulator sees it.

public interface IPrevArkTxProvider

Remarks

Emulator v0.0.7 (validate checkpoints and prevouts) requires the field on every input of a submitted Arkade transaction or intent proof — unconditionally, not only on the inputs whose ArkadeScript introspects a previous output. A submission missing it is rejected with missing prevout tx for input N.

Only the previous transaction's outputs are read by the emulator (it checks txid, reconciles value + scriptPubKey against the declared witness utxo, and exposes the outputs to introspection opcodes). An unsigned copy therefore resolves correctly — a txid is witness-excluded — which is why PrevArkTxProvider can serve the PSBT's global transaction without waiting for signatures to propagate.

Methods

ResolveAsync(IReadOnlyCollection<uint256>, Network, CancellationToken)

Resolves the raw transactions for the given txids.

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.