Table of Contents

Class ArkadeCashService

Namespace
NArk.Core.Services
Assembly
NArk.Core.dll

Claims ArkadeCash bearer instruments.

public class ArkadeCashService
Inheritance
ArkadeCashService
Inherited Members

Remarks

The claim is deliberately thin: nothing is persisted. No contract is imported and the note's key never reaches wallet storage — it signs one offchain transaction per VTXO, in memory, straight to the destination address. That is what makes a note claimable at all: importing its contract would only register a script to watch, since the wallet holds no key matching the note's descriptor and so could never sign for it.

Not importing also means the claim does not care whether the Arkade server has rotated its signer since the note was funded. The note is spent under the key it was issued against, which the operator keeps co-signing until that key's deprecation cutoff passes.

Constructors

ArkadeCashService(IClientTransport, ISafetyService, IIntentStorage, IVirtualTxStorage?, IEnumerable<ISpendSubmitHandler>?, ILogger<ArkadeCashService>?)

Claims ArkadeCash bearer instruments.

public ArkadeCashService(IClientTransport transport, ISafetyService safetyService, IIntentStorage intentStorage, IVirtualTxStorage? virtualTxStorage = null, IEnumerable<ISpendSubmitHandler>? submitHandlers = null, ILogger<ArkadeCashService>? logger = null)

Parameters

transport IClientTransport
safetyService ISafetyService
intentStorage IIntentStorage
virtualTxStorage IVirtualTxStorage
submitHandlers IEnumerable<ISpendSubmitHandler>
logger ILogger<ArkadeCashService>

Remarks

The claim is deliberately thin: nothing is persisted. No contract is imported and the note's key never reaches wallet storage — it signs one offchain transaction per VTXO, in memory, straight to the destination address. That is what makes a note claimable at all: importing its contract would only register a script to watch, since the wallet holds no key matching the note's descriptor and so could never sign for it.

Not importing also means the claim does not care whether the Arkade server has rotated its signer since the note was funded. The note is spent under the key it was issued against, which the operator keeps co-signing until that key's deprecation cutoff passes.

Methods

ClaimAsync(ArkadeCash, ArkAddress, CancellationToken)

Sweeps every spendable VTXO at the note's address to destination, and reports the rest.

public Task<ArkadeCashClaimResult> ClaimAsync(ArkadeCash cash, ArkAddress destination, CancellationToken cancellationToken = default)

Parameters

cash ArkadeCash

The note to claim. Not disposed — the caller owns it.

destination ArkAddress

Where the swept funds are sent. Normally the claiming wallet's own address.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ArkadeCashClaimResult>

The swept total and a per-VTXO report of anything left behind.

Remarks

One transaction per VTXO, so a single stale or rejected input dents only its own sweep instead of sinking the whole claim. A VTXO that cannot be swept is never fatal: it comes back in Unclaimed with a reason.