Class for wrapping SigningKey that is used for signature creation and public key derivation.

Hierarchy

  • PrivateKey

Methods

  • Sign the given message using the wallet's _signingKey function.

    Returns

    a signature of this private key over the given message

    Parameters

    • messageBytes: Uint8Array

    Returns Promise<Uint8Array>

  • Sign the given message using the edcsa sign_deterministic function.

    Returns

    a signature of this private key over the given message

    Parameters

    • messageBytes: Buffer

    Returns Promise<Uint8Array>

  • Sign the given message using the wallet's _signingKey function.

    Returns

    a signature of this private key over the given message

    Parameters

    • messageHashedBytes: Buffer

    Returns Promise<Uint8Array>

  • Sign the given message using the edcsa sign_deterministic function.

    Returns

    a signature of this private key over the given message

    Parameters

    • messageHashedBytes: Buffer

    Returns Promise<Uint8Array>

  • Return the Router address associated with this private key.

    Returns

    Returns string

  • Return the PublicKey associated with this private key.

    Returns

    a Public key that can be used to verify the signatures made with this PrivateKey

    Returns PublicKey

  • Create a PrivateKey instance from a given mnemonic phrase and a HD derivation path. If path is not given, default to Band's HD prefix 494 and all other indexes being zeroes.

    Returns

    Initialized PrivateKey object

    Parameters

    • words: string

      the mnemonic phrase

    • path: undefined | string = DEFAULT_DERIVATION_PATH

      the HD path that follows the BIP32 standard (optional)

    Returns PrivateKey

  • Create a PrivateKey instance from a given private key and a HD derivation path. If path is not given, default to Band's HD prefix 494 and all other indexes being zeroes.

    Returns

    Initialized PrivateKey object

    Parameters

    • privateKey: string

      the private key

    Returns PrivateKey

Generated using TypeDoc