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
rpcEvmJsonRpcClientConcrete JSON-RPC client used for chain data and broadcast.
privateKeyReadOnlySpan<byte>A 32-byte secp256k1 key whose owner must clear its source buffer.
optionsEvmTransactionSenderOptionsExpected address and transaction ceilings.
Properties
Address
Derived lowercase gas-payer address.
public string Address { get; }
Property Value
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
requestEvmTransactionRequestExpected contract call encoded in the artifact.
preparedEvmPreparedTransactionPreviously persisted transaction hash and signed bytes.
cancellationTokenCancellationTokenCancels validation or rebroadcast.
Returns
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
requestEvmTransactionRequestExact contract call to sign.
onPreparedFunc<EvmPreparedTransaction, CancellationToken, Task>Durable, secret-safe persistence callback.
cancellationTokenCancellationTokenCancels preparation, persistence, or broadcast.
Returns
SendAsync(EvmTransactionRequest, CancellationToken)
Signs and submits one transaction.
public Task<string> SendAsync(EvmTransactionRequest request, CancellationToken cancellationToken = default)
Parameters
requestEvmTransactionRequestcancellationTokenCancellationToken
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.