Skip to main content

Function: generateRandomPrivateKey()

function generateRandomPrivateKey(): 0x${string}

Generate a new private key.

Returns

0x${string}

The new private key

Example

const privateKey = generatePrivateKey();

Defined

@nilfoundation/niljs/src/signers/privateKey.ts:12