Hierarchy

  • PrivateKey

Properties

data: Bytes
type: KeyType

Methods

  • Derive the shared secret between this private key and given public key.

    Throws

    If the key type isn't R1 or K1.

    Parameters

    Returns Checksum512

  • Sign message digest using this key.

    Throws

    If the key type isn't R1 or K1.

    Parameters

    Returns Signature

  • Sign message using this key.

    Throws

    If the key type isn't R1 or K1.

    Parameters

    Returns Signature

  • Returns string

  • Get the corresponding public key.

    Throws

    If the key type isn't R1 or K1.

    Returns PublicKey

  • Return the key in Antelope/EOSIO PVT__ format.

    Returns string

  • Return WIF representation of this private key

    Throws

    If the key type isn't K1.

    Returns string

  • Create PrivateKey object from a string representation. Accepts WIF (5...) and Antelope/EOSIO (PVT_...) style private keys.

    Parameters

    • string: string
    • Optional ignoreChecksumError: boolean

    Returns PrivateKey

  • Generate new PrivateKey.

    Throws

    If a secure random source isn't available.

    Parameters

    • type: string

    Returns PrivateKey