Skip to content

@lelantos-org/sdk / advanced / PrivateKeySigner

Class: PrivateKeySigner ​

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:5

Local-account signer for Node (tests, scripts, relayer).

Implements ​

Constructors ​

Constructor ​

ts
new PrivateKeySigner(
   privateKey, 
   rpcUrl, 
   chainId
): PrivateKeySigner;

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:9

Parameters ​

ParameterType
privateKey`0x${string}`
rpcUrlstring
chainIdbigint

Returns ​

PrivateKeySigner

Properties ​

chainId ​

ts
readonly chainId: bigint;

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:6

Chain id pinned at construction, so EIP-712 builders do not query the RPC.

Implementation of ​

EthSigner.chainId

Methods ​

getAddress() ​

ts
getAddress(): Promise<EvmAddress>;

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:10

Returns ​

Promise<EvmAddress>

Implementation of ​

EthSigner.getAddress


sendTransaction() ​

ts
sendTransaction(args): Promise<Hex32>;

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:12

Submit a raw EVM transaction. Returns the broadcast hash.

Parameters ​

ParameterType
args{ data?: `0x${string}`; to: EvmAddress; value?: bigint; }
args.data?`0x${string}`
args.toEvmAddress
args.value?bigint

Returns ​

Promise<Hex32>

Implementation of ​

EthSigner.sendTransaction


signTypedData() ​

ts
signTypedData(
   domain, 
   types, 
   primaryType, 
   message
): Promise<string>;

Defined in: @lelantos-org/sdk/dist/chain/signer/private-key.d.ts:11

Sign EIP-712 typed-data. Returns 0x-prefixed 65-byte hex.

Parameters ​

ParameterType
domainTypedDataDomain
typesRecord<string, TypedDataParameter[]>
primaryTypestring
messageRecord<string, unknown>

Returns ​

Promise<string>

Implementation of ​

EthSigner.signTypedData