Table of Contents

Class EvmSwapChainClient

Namespace
NArk.ArkadeIntents.Evm
Assembly
NArk.ArkadeIntents.dll

Proves an ERC20Swap lock and submits and verifies its permissionless claim.

public sealed class EvmSwapChainClient
Inheritance
EvmSwapChainClient
Inherited Members

Constructors

EvmSwapChainClient(IEvmSwapRpc, IEvmTransactionSender, EvmSendPolicy, TimeProvider?)

Creates a client over host-provided read and signing seams.

public EvmSwapChainClient(IEvmSwapRpc rpc, IEvmTransactionSender sender, EvmSendPolicy policy, TimeProvider? timeProvider = null)

Parameters

rpc IEvmSwapRpc

Read-only chain adapter.

sender IEvmTransactionSender

Host-controlled signer and broadcaster.

policy EvmSendPolicy

Configured chain and proof facts.

timeProvider TimeProvider

Clock used for block-age proof.

Methods

ClaimForAsync(Erc20SwapValues, byte[], Func<EvmPreparedTransaction, CancellationToken, Task>?, long?, CancellationToken)

Claims while also rechecking the Arkade refund margin at execution time.

public Task<EvmClaimResult> ClaimForAsync(Erc20SwapValues values, byte[] preimage, Func<EvmPreparedTransaction, CancellationToken, Task>? onPrepared, long? arkadeRefundLocktime, CancellationToken cancellationToken = default)

Parameters

values Erc20SwapValues

Validated six-field swap tuple.

preimage byte[]

The 32-byte swap preimage.

onPrepared Func<EvmPreparedTransaction, CancellationToken, Task>

Must durably save the full signed transaction before returning.

arkadeRefundLocktime long?

Absolute Arkade refund time, when composing both legs.

cancellationToken CancellationToken

Cancels proof, preparation, persistence, broadcast, or verification.

Returns

Task<EvmClaimResult>

Verified transaction-local delivery.

ClaimForAsync(Erc20SwapValues, byte[], Func<EvmPreparedTransaction, CancellationToken, Task>?, CancellationToken)

Claims while durably journaling the signed transaction before broadcast.

public Task<EvmClaimResult> ClaimForAsync(Erc20SwapValues values, byte[] preimage, Func<EvmPreparedTransaction, CancellationToken, Task>? onPrepared, CancellationToken cancellationToken = default)

Parameters

values Erc20SwapValues

Validated six-field swap tuple.

preimage byte[]

The 32-byte swap preimage.

onPrepared Func<EvmPreparedTransaction, CancellationToken, Task>

Must durably save the full signed transaction before returning.

cancellationToken CancellationToken

Cancels proof, preparation, persistence, broadcast, or verification.

Returns

Task<EvmClaimResult>

Verified transaction-local delivery.

ClaimForAsync(Erc20SwapValues, byte[], CancellationToken)

Claims after proving the lock, then verifies receipt, events, and consumed state.

public Task<EvmClaimResult> ClaimForAsync(Erc20SwapValues values, byte[] preimage, CancellationToken cancellationToken = default)

Parameters

values Erc20SwapValues

Validated six-field swap tuple.

preimage byte[]

The 32-byte swap preimage.

cancellationToken CancellationToken

Cancels reads or submission.

Returns

Task<EvmClaimResult>

Verified transaction-local delivery.

ProveLockAsync(Erc20SwapValues, CancellationToken)

Requires swaps(key) at tip and the configured depth probe.

public Task<EvmLockProof> ProveLockAsync(Erc20SwapValues values, CancellationToken cancellationToken = default)

Parameters

values Erc20SwapValues

Validated six-field swap tuple.

cancellationToken CancellationToken

Cancels chain reads.

Returns

Task<EvmLockProof>

Public lock proof coordinates.

ResumeClaimAsync(EvmPreparedTransaction, Erc20SwapValues, byte[], long?, CancellationToken)

Verifies a prepared claim, or safely rebroadcasts its exact bytes while both windows remain open.

public Task<EvmClaimResult> ResumeClaimAsync(EvmPreparedTransaction prepared, Erc20SwapValues values, byte[] preimage, long? arkadeRefundLocktime, CancellationToken cancellationToken = default)

Parameters

prepared EvmPreparedTransaction

Previously persisted transaction hash and signed bytes.

values Erc20SwapValues

Validated six-field swap tuple.

preimage byte[]

The 32-byte swap preimage.

arkadeRefundLocktime long?

Absolute Arkade refund time, when composing both legs.

cancellationToken CancellationToken

Cancels receipt lookup, safety checks, rebroadcast, or verification.

Returns

Task<EvmClaimResult>

Verified transaction-local delivery.

Remarks

Receipt verification deliberately precedes current deadline checks: a transaction mined before or at a deadline is still authoritative after the host restarts. Only a receipt timeout permits rebroadcast, and then only after rechecking both the EVM claim window and Arkade refund margin.

VerifyClaimAsync(string, Erc20SwapValues, byte[], CancellationToken)

Resumes receipt verification for a previously journaled claim transaction.

public Task<EvmClaimResult> VerifyClaimAsync(string transactionHash, Erc20SwapValues values, byte[] preimage, CancellationToken cancellationToken = default)

Parameters

transactionHash string
values Erc20SwapValues
preimage byte[]
cancellationToken CancellationToken

Returns

Task<EvmClaimResult>