Kit
Interfaces

AccountSignerMeta

An extension of the AccountMeta type that allows us to store TransactionSigners inside it.

Note that, because this type represents a signer, it must use one the following two roles:

  • AccountRole.READONLY_SIGNER
  • AccountRole.WRITABLE_SIGNER

Example

import { AccountRole } from '@solana/instructions';
import { generateKeyPairSigner, AccountSignerMeta } from '@solana/signers';
 
const signer = await generateKeyPairSigner();
const account: AccountSignerMeta = {
    address: signer.address,
    role: AccountRole.READONLY_SIGNER,
    signer,
};

Extends

  • AccountMeta<TAddress>

Type Parameters

Type ParameterDefault typeDescription
TAddress extends stringstringSupply a string literal to define an account having a particular address.
TSigner extends TransactionSigner<TAddress>TransactionSigner<TAddress>Optionally provide a narrower type for the TransactionSigner to use within the account meta.

Properties

PropertyModifierTypeOverridesInherited from
addressreadonlyAddress<TAddress>-AccountMeta.address
rolereadonlyWRITABLE_SIGNER | READONLY_SIGNERAccountMeta.role-
signerreadonlyTSigner--

On this page