Class ArkadeEmulatorSpendSubmitter
ISpendSubmitHandler that routes covenant (arkade-bound) offchain spends through the emulator co-signing service instead of arkd directly. The emulator validates each input's ArkadeScript, adds its co-signature, forwards the set to arkd and finalizes — so once it returns, the spend is fully submitted.
public sealed class ArkadeEmulatorSpendSubmitter : ISpendSubmitHandler
- Inheritance
-
ArkadeEmulatorSpendSubmitter
- Implements
- Inherited Members
Remarks
Engages only when at least one input is arkade-bound
(RequiresEmulatorCoSigning(IEnumerable<ArkCoin>)); every other spend
falls through to the unchanged arkd cooperative flow. The Arkade transaction and checkpoints
carry participant signatures only when their leaves require them; signerless covenant paths
carry their condition witnesses. This handler adds the prevarktx annotation the
emulator requires on every input plus the emulator round-trip.
Constructors
ArkadeEmulatorSpendSubmitter(IEmulatorProvider, IPrevArkTxProvider, ILogger<ArkadeEmulatorSpendSubmitter>?)
ISpendSubmitHandler that routes covenant (arkade-bound) offchain spends through the emulator co-signing service instead of arkd directly. The emulator validates each input's ArkadeScript, adds its co-signature, forwards the set to arkd and finalizes — so once it returns, the spend is fully submitted.
public ArkadeEmulatorSpendSubmitter(IEmulatorProvider emulator, IPrevArkTxProvider prevArkTxProvider, ILogger<ArkadeEmulatorSpendSubmitter>? logger = null)
Parameters
emulatorIEmulatorProviderprevArkTxProviderIPrevArkTxProviderloggerILogger<ArkadeEmulatorSpendSubmitter>
Remarks
Engages only when at least one input is arkade-bound
(RequiresEmulatorCoSigning(IEnumerable<ArkCoin>)); every other spend
falls through to the unchanged arkd cooperative flow. The Arkade transaction and checkpoints
carry participant signatures only when their leaves require them; signerless covenant paths
carry their condition witnesses. This handler adds the prevarktx annotation the
emulator requires on every input plus the emulator round-trip.
Methods
ShouldHandle(IReadOnlyCollection<ArkCoin>)
Cheap check: does this handler own submission for this spend?
public 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.
public 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.