Table of Contents

Class EvmLocalTransactionSender

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

Serializes nonce allocation and locally signs EIP-1559 transactions.

public sealed class EvmLocalTransactionSender : IEvmDurableTransactionSender, IEvmTransactionSender
Inheritance
EvmLocalTransactionSender
Implements
Inherited Members

Remarks

Nonce allocation is serialized by gas-payer address within this process. Assign each key to one process unless the deployment supplies an external nonce coordinator. The sender retains signing key material but exposes neither the raw key nor a serialized representation.

Constructors

EvmLocalTransactionSender(EvmJsonRpcClient, ReadOnlySpan<byte>, EvmTransactionSenderOptions)

Creates a sender and clears its temporary copy of the supplied key.

public EvmLocalTransactionSender(EvmJsonRpcClient rpc, ReadOnlySpan<byte> privateKey, EvmTransactionSenderOptions options)

Parameters

rpc EvmJsonRpcClient

Concrete JSON-RPC client used for chain data and broadcast.

privateKey ReadOnlySpan<byte>

A 32-byte secp256k1 key whose owner must clear its source buffer.

options EvmTransactionSenderOptions

Expected address and transaction ceilings.

Properties

Address

Derived lowercase gas-payer address.

public string Address { get; }

Property Value

string

Methods

ResumeAsync(EvmTransactionRequest, EvmPreparedTransaction, CancellationToken)

Validates and rebroadcasts the exact prepared bytes after an uncertain submission.

public Task<string> ResumeAsync(EvmTransactionRequest request, EvmPreparedTransaction prepared, CancellationToken cancellationToken = default)

Parameters

request EvmTransactionRequest

Expected contract call encoded in the artifact.

prepared EvmPreparedTransaction

Previously persisted transaction hash and signed bytes.

cancellationToken CancellationToken

Cancels validation or rebroadcast.

Returns

Task<string>

The original deterministic transaction hash.

SendAsync(EvmTransactionRequest, Func<EvmPreparedTransaction, CancellationToken, Task>, CancellationToken)

Signs one transaction and invokes onPrepared before the signed bytes can reach the node. Broadcasting starts only after the callback durably stores the full artifact.

public Task<string> SendAsync(EvmTransactionRequest request, Func<EvmPreparedTransaction, CancellationToken, Task> onPrepared, CancellationToken cancellationToken = default)

Parameters

request EvmTransactionRequest

Exact contract call to sign.

onPrepared Func<EvmPreparedTransaction, CancellationToken, Task>

Durable, secret-safe persistence callback.

cancellationToken CancellationToken

Cancels preparation, persistence, or broadcast.

Returns

Task<string>

The deterministic transaction hash.

SendAsync(EvmTransactionRequest, CancellationToken)

Signs and submits one transaction.

public Task<string> SendAsync(EvmTransactionRequest request, CancellationToken cancellationToken = default)

Parameters

request EvmTransactionRequest
cancellationToken CancellationToken

Returns

Task<string>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.