@aptos-labs/ts-sdk - v5.1.4
    Preparing search index...

    Class Secp256r1PrivateKey

    Represents a Secp256r1 ECDSA private key, providing functionality to create, sign messages, derive public keys, and serialize/deserialize the key.

    Hierarchy (View Summary)

    Index

    Implementation - Serialization

    LENGTH: number = 32

    Length of Secp256r1 ecdsa private key

    • Serializes the data into a byte array using the provided serializer. This function is essential for converting data into a format suitable for transmission or storage.

      Parameters

      • serializer: Serializer

        The serializer instance used to convert the data.

      Returns void

    • Get the private key as a string representation.

      Returns string

      string representation of the private key

    Methods

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

      Returns string

      string representation of the private key.

    Properties

    AIP80_PREFIXES: { ed25519: string; secp256k1: string; secp256r1: string } = ...

    The AIP-80 compliant prefixes for each private key type. Append this to a private key's hex representation to get an AIP-80 compliant string.

    Read about AIP-80