Class Secp256k1PrivateKey

A Secp256k1 ecdsa private key

Hierarchy

Implements

Constructors

Properties

key: Hex

The private key bytes

LENGTH: number = 32

Length of Secp256k1 ecdsa private key

Methods

  • Serializes a Serializable value to its BCS representation. This function is the Typescript SDK equivalent of bcs::to_bytes in Move.

    Returns Uint8Array

    the BCS representation of the Serializable instance as a byte buffer

  • Helper function to get a value's BCS-serialized bytes as a Hex instance.

    Returns Hex

    a Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array

  • Get the private key as a hex string with the 0x prefix.

    Returns string

    string representation of the private key

  • A private inner function so we can separate from the main fromDerivationPath() method to add tests to verify we create the keys correctly.

    Parameters

    • path: string

      the BIP44 path

    • seed: Uint8Array

      the seed phrase created by the mnemonics

    Returns Secp256k1PrivateKey

    The generated key

Generated using TypeDoc