A Secp256k1 public key

Hierarchy (view full)

Constructors

  • Create a new Secp256k1PublicKey object

    Parameters

    • value: PublicKeyInitData

      secp256k1 public key as buffer or base-64 encoded string

    Returns Secp256k1PublicKey

Properties

SIZE: number = SECP256K1_PUBLIC_KEY_SIZE

Methods

  • Checks if two Secp256k1 public keys are equal

    Parameters

    Returns boolean

  • Return the Sui address associated with this Secp256k1 public key

    Returns number

  • Return the base-64 representation of the public key

    Returns string

  • Return the byte array representation of the Secp256k1 public key

    Returns Uint8Array

  • Returns never

  • Return the Sui address associated with this Ed25519 public key

    Returns string

  • Returns the bytes representation of the public key prefixed with the signature scheme flag

    Returns Uint8Array

  • Return the Sui representation of the public key encoded in base-64. A Sui public key is formed by the concatenation of the scheme flag with the raw bytes of the public key

    Returns string

  • Verifies that the signature is valid for for the provided message

    Parameters

    • message: Uint8Array
    • signature: string | Uint8Array

    Returns Promise<boolean>

  • Verifies that the public key is associated with the provided address

    Parameters

    • address: string

    Returns boolean

  • Verifies that the signature is valid for for the provided PersonalMessage

    Parameters

    • message: Uint8Array
    • signature: string | Uint8Array

    Returns Promise<boolean>

  • Verifies that the signature is valid for for the provided Transaction

    Parameters

    • transaction: Uint8Array
    • signature: string | Uint8Array

    Returns Promise<boolean>

  • Parameters

    • bytes: Uint8Array
    • signature: string | Uint8Array
    • intent: IntentScope

    Returns Promise<boolean>