Interface IAsymmetricKey

Common interface for asymetric keys (ed25519, secp256k1). To provdie all minimal and common functions

Hierarchy

  • IAsymmetricKey

Methods

  • Create the public-key from a specific private key

    Parameters

    • privateKey: Hex
    • Optional compressed: boolean

    Returns Promise<Uint8Array>

  • Generate a random private key

    Returns Promise<Uint8Array>

    a random array value

  • Returns the given key (either private or public) in PEM format

    Parameters

    • key: Uint8Array
    • isPrivate: boolean

    Returns string

  • Tweat the public key by adding the private key

    Parameters

    • publicKey: Hex
    • tweak: Hex
    • Optional compressed: boolean

    Returns Promise<Uint8Array>

Generated using TypeDoc