@did-btc1/keypair
    Preparing search index...

    Interface IPublicKey

    Interface for the PublicKey class. IPublicKey

    interface IPublicKey {
        compressed: Bytes;
        hex: Hex;
        multibase: MultibaseObject;
        parity: number;
        uncompressed: Bytes;
        x: Bytes;
        y: Bytes;
        decode(): Bytes;
        encode(): string;
        equals(other: PublicKey): boolean;
        json(): PublicKeyObject;
    }
    Index

    Properties

    compressed: Bytes

    Compressed public key getter.

    hex: Hex

    PublicKey hex string getter.

    multibase: MultibaseObject

    PublicKey multibase getter.

    The public key as MultibaseObject as a address string, key and prefix bytes.

    parity: number

    PublicKey parity getter.

    uncompressed: Bytes

    Uncompressed public key getter.

    x: Bytes

    PublicKey x-coordinate getter.

    y: Bytes

    PublicKey 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.

    • PublicKey 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 PublicKeyObject

      The PublicKey as a JSON object.