An Ed25519 Keypair used for signing transactions.

Hierarchy (view full)

Constructors

Methods

  • The Bech32 secret key string for this Ed25519 keypair

    Returns string

  • Return the signature for the provided data using Ed25519.

    Parameters

    • data: Uint8Array

    Returns Promise<Uint8Array>

  • Signs provided personal message by calling signWithIntent() with a PersonalMessage provided as intent scope

    Parameters

    • bytes: Uint8Array

    Returns Promise<{
        bytes: string;
        signature: string;
    }>

  • Signs provided transaction by calling signWithIntent() with a TransactionData provided as intent scope

    Parameters

    • bytes: Uint8Array

    Returns Promise<SignatureWithBytes>

  • Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing, it ensures that a signed message is tied to a specific purpose and domain separator is provided

    Parameters

    Returns Promise<SignatureWithBytes>

  • Returns string

  • Derive Ed25519 keypair from mnemonics and path. The mnemonics must be normalized and validated against the english wordlist.

    If path is none, it will default to m/44'/784'/0'/0'/0', otherwise the path must be compliant to SLIP-0010 in form m/44'/784'/{account_index}'/{change_index}'/{address_index}'.

    Parameters

    • mnemonics: string
    • Optionalpath: string

    Returns Ed25519Keypair

  • Derive Ed25519 keypair from mnemonicSeed and path.

    If path is none, it will default to m/44'/784'/0'/0'/0', otherwise the path must be compliant to SLIP-0010 in form m/44'/784'/{account_index}'/{change_index}'/{address_index}'.

    Parameters

    • seedHex: string
    • Optionalpath: string

    Returns Ed25519Keypair

  • Create a Ed25519 keypair from a raw secret key byte array, also known as seed. This is NOT the private scalar which is result of hashing and bit clamping of the raw secret key.

    Parameters

    • secretKey: Uint8Array

      secret key byte array

    • Optionaloptions: {
          skipValidation?: boolean;
      }
      • OptionalskipValidation?: boolean

    Returns Ed25519Keypair

    error if the provided secret key is invalid and validation is not skipped.

  • Generate a new random Ed25519 keypair

    Returns Ed25519Keypair