Skip to content

generatePrivateKeySigner

Generates a new private key and creates a LocalAccountSigner for a PrivateKeyAccount.

Import

import { LocalAccountSigner } from "@aa-sdk/core";

Usage

import { LocalAccountSigner } from "@aa-sdk/core";
 
const signer = LocalAccountSigner.generatePrivateKeySigner();

Returns

LocalAccountSigner<PrivateKeyAccount> A LocalAccountSigner instance initialized with the generated private key account