Represents the public key of a multi-agent account.

The public keys of each individual agent can be any type of public key supported by Aptos. Since AIP-55 Aptos supports Legacy and Unified authentication keys.

Hierarchy (view full)

Constructors

  • Parameters

    • args: {
          publicKeys: PublicKey[];
          signaturesRequired: number;
      }
      • publicKeys: PublicKey[]
      • signaturesRequired: number

    Returns MultiKey

Properties

publicKeys: AnyPublicKey[]

List of any public keys

signaturesRequired: number

The minimum number of valid signatures required, for the number of public keys specified

Methods

  • Serializes a Serializable value to its BCS representation. This function is the Typescript SDK equivalent of bcs::to_bytes in Move.

    Returns Uint8Array

    the BCS representation of the Serializable instance as a byte buffer

  • Helper function to get a value's BCS-serialized bytes as a Hex instance.

    Returns Hex

    a Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array

  • Create a bitmap that holds the mapping from the original public keys to the signatures passed in

    Parameters

    • args: {
          bits: number[];
      }
      • bits: number[]

        array of the index mapping to the matching public keys

    Returns Uint8Array

    Uint8array bit map

  • Get the index of the provided public key.

    Parameters

    • publicKey: PublicKey

      array of the index mapping to the matching public keys

    Returns number

    the corresponding index of the publicKey, if it exists

  • Parameters

    Returns void

  • Get the public key as a hex string with a 0x prefix e.g. 0x123456...

    Returns string

  • Get the raw public key bytes

    Returns Uint8Array

  • Verifies that the private key associated with this public key signed the message with the given signature.

    Parameters

    Returns boolean

  • Parameters

    Returns MultiKey