Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 576 Bytes

File metadata and controls

26 lines (18 loc) · 576 Bytes

Key Signer

Private key-based signer instance

new KeySigner

Creates a new instance of the private-key KeySigner

Parameters

  • privateKey Uint8Array the raw Secp256k1 private key
  • publicKey Uint8Array the raw Secp256k1 public key
  • addressPrefix string the address prefix

Usage

// Generate the public / private key from somewhere
const {publicKey, privateKey} = await generateKeyPair(
    entropyToMnemonic(generateEntropy()),
    index ? index : 0
);

new KeySigner(privateKey, publicKey);
// new Secp256k1 key signer created