Interface ISpendSubmitHandler
Plug-point that lets a higher layer (e.g. NArk.Arkade) take over the
submission of an offchain Ark transaction, without NArk.Core depending
on that layer. Used for covenant spends, where the emulator co-signing service
— not arkd directly — is the submission endpoint (it co-signs and fronts arkd).
public interface ISpendSubmitHandler
Remarks
ShouldHandle(IReadOnlyCollection<ArkCoin>) is a cheap per-spend gate (typically "is any input
arkade-bound?"). When it returns true, TransactionHelpers user-signs
the checkpoint inputs and hands the fully user-signed Arkade transaction + checkpoints to
SubmitAsync(IReadOnlyCollection<ArkCoin>, PSBT, IReadOnlyList<PSBT>, CancellationToken), which owns the rest (co-sign + submit + finalize); the
normal arkd cooperative submit is skipped. When no registered handler engages,
the spend follows the unchanged arkd flow.
Methods
ShouldHandle(IReadOnlyCollection<ArkCoin>)
Cheap check: does this handler own submission for this spend?
bool ShouldHandle(IReadOnlyCollection<ArkCoin> coins)
Parameters
coinsIReadOnlyCollection<ArkCoin>
Returns
SubmitAsync(IReadOnlyCollection<ArkCoin>, PSBT, IReadOnlyList<PSBT>, CancellationToken)
Fully submit the spend: co-sign, forward to arkd and finalize. Called only
when ShouldHandle(IReadOnlyCollection<ArkCoin>) returned true. The Arkade transaction and every
checkpoint already carry the wallet's own signatures.
Task SubmitAsync(IReadOnlyCollection<ArkCoin> coins, PSBT arkTx, IReadOnlyList<PSBT> checkpoints, CancellationToken cancellationToken)
Parameters
coinsIReadOnlyCollection<ArkCoin>The spend inputs, in transaction-input order.
arkTxPSBTThe user-signed ark transaction.
checkpointsIReadOnlyList<PSBT>The user-signed checkpoint transactions.
cancellationTokenCancellationTokenCancellation token.