Signer implementation for the MultiKey authentication scheme.

This accounts to use a M of N signing scheme. M and N are specified in the MultiKey It signs messages via the array of M number of Accounts that individually correspond to a public key in the MultiKey.

Note: Generating a signer instance does not create the account on-chain.

Implements

Constructors

Properties

accountAddress: AccountAddress

Account address associated with the account

publicKey: MultiKey

Public key associated with the account

signaturesBitmap: Uint8Array
signerIndicies: number[]

An array of indicies where for signer[i], signerIndicies[i] is the index of the corresponding public key in publicKey.publicKeys. Used to derive the right public key to use for verification.

signers: Account[]

The signers used to sign messages. These signers should correspond to public keys in the MultiKeyAccount's public key. The number of signers should be equal or greater than this.publicKey.signaturesRequired

signingScheme: SigningScheme

Signing scheme used to sign transactions

Methods

  • Waits for any proofs on any KeylessAccount signers to be fetched. If the proof is fetched a syncronously, call this to ensure signing with the KeylessAccount does not fail as the proof must be ready.

    Returns Promise<void>

  • Static constructor for MultiKeyAccount

    Parameters

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

        the N public keys of the MultiKeyAccount

      • signaturesRequired: number

        the number of signatures required

      • signers: Account[]

        an array of M signers that will be used to sign the transaction

    Returns MultiKeyAccount

    MultiKeyAccount