Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PrivateKey

ECDSA (secp256k1) private key.

Hierarchy

  • PrivateKey

Index

Constructors

constructor

Properties

Private key

key: Buffer

Methods

createPublic

  • createPublic(prefix?: undefined | string): PublicKey
  • Derive the public key for this private key.

    Parameters

    • Optional prefix: undefined | string

    Returns PublicKey

inspect

  • inspect(): string
  • Used by utils.inspect and console.log in node.js. Does not show the full key to get the full encoded key you need to explicitly call toString.

    Returns string

sign

toString

  • toString(): string
  • Return a WIF-encoded representation of the key.

    Returns string

Static from

  • Convenience to create a new instance from WIF string or buffer.

    Parameters

    • value: string | Buffer

    Returns PrivateKey

Static fromLogin

  • Create key from username and password.

    Parameters

    • username: string
    • password: string
    • Default value role: KeyRole = "active"

    Returns PrivateKey

Static fromSeed

Static fromString

Generated using TypeDoc