@did-btc1/key-pair
    Preparing search index...

    Interface IPublicKey

    Interface for the PublicKey class. IPublicKey

    interface IPublicKey {
        bytes: Bytes;
        hex: Hex;
        multibase: string;
        parity: number;
        prefix: Bytes;
        uncompressed: Bytes;
        x: Bytes;
        y: Bytes;
        decode(): Bytes;
        encode(): string;
        equals(other: PublicKey): boolean;
        json(): PublicKeyJSON;
    }

    Implemented by

    Index

    Properties

    bytes: Bytes

    Compressed public key getter.

    hex: Hex

    Public key hex string getter.

    multibase: string

    Public key multibase getter.

    The public key as a base58btc multibase string.

    parity: number

    Public key parity getter.

    prefix: Bytes

    Public key multibase prefix getter.

    uncompressed: Bytes

    Uncompressed public key getter.

    x: Bytes

    Public key x-coordinate getter.

    y: Bytes

    Public key y-coordinate getter.

    Methods

    • Decode the base58btc multibase string to the compressed public key prefixed with 0x02.

      Returns Bytes

      The public key as a 33-byte compressed public key with header.

    • Encode the PublicKey as an x-only base58btc multibase public key.

      Returns string

      The public key formatted a base58btc multibase string.

    • Public key equality check. Checks if this public key is equal to other public key.

      Parameters

      Returns boolean

      True if the public keys are equal.

    • JSON representation of a PublicKey object.

      Returns PublicKeyJSON

      The PublicKey as a JSON object.