near-api-js - v7.0.4
    Preparing search index...

    PublicKey representation that has type and bytes of the key.

    Hierarchy

    • Enum
      • PublicKey
    Index

    Constructors

    Properties

    ed25519Key?: ED25519PublicKey
    enum: string
    secp256k1Key?: SECP256K1PublicKey

    Accessors

    • get keyPair(): ED25519PublicKey | SECP256K1PublicKey | undefined

      Returns ED25519PublicKey | SECP256K1PublicKey | undefined

    Methods

    • Returns a string representation of the public key.

      Returns string

      The string representation of the public key.

    • Verifies a message signature using the public key.

      Parameters

      • message: Uint8Array

        The message to be verified.

      • signature: Uint8Array

        The signature to be verified.

      Returns boolean

      true if the signature is valid, otherwise false.

    • Creates a PublicKey instance from an encoded key string.

      Parameters

      • encodedKey: string

        The encoded key string.

      Returns PublicKey

      The PublicKey instance created from the encoded key string.