Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PublicKey

ECDSA (secp256k1) public key.

Hierarchy

  • PublicKey

Index

Constructors

Properties

Methods

Constructors

constructor

  • new PublicKey(key: Buffer, prefix?: string): PublicKey
  • Parameters

    • key: Buffer
    • Default value prefix: string = DEFAULT_ADDRESS_PREFIX

    Returns PublicKey

Properties

key

key: Buffer

prefix

prefix: string

Methods

inspect

  • inspect(): string
  • Used by utils.inspect and console.log in node.js.

    Returns string

toJSON

  • toJSON(): string
  • Return JSON representation of this key, same as toString().

    Returns string

toString

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

    Returns string

verify

  • verify(message: Buffer, signature: Signature): boolean
  • Verify a 32-byte signature.

    Parameters

    • message: Buffer

      32-byte message to verify.

    • signature: Signature

      Signature to verify.

    Returns boolean

Static from

Static fromString

  • Create a new instance from a WIF-encoded key.

    Parameters

    • wif: string

    Returns PublicKey

Generated using TypeDoc