AccountNonSignerMeta

type AccountNonSignerMeta<TAddress> = 
  | ReadonlyAccount<TAddress>
| WritableAccount<TAddress>;

Represents an AccountMeta whose role is guaranteed not to be a signer role.

This is the counterpart of the AccountSignerMeta type from @solana/signers, which narrows the role to the two signer roles. Use this type when an account meta must only describe the mutability of an account — e.g. when overriding the writable flag of a non-signer account in a generated program client.

Type Parameters

Type ParameterDefault typeDescription
TAddress extends stringstringSupply a string literal to define an account having a particular address.

Example

import { address } from '@solana/addresses';
import { AccountNonSignerMeta, AccountRole } from '@solana/instructions';
 
const meta: AccountNonSignerMeta = {
    address: address('mpngsFd4tmbUfzDYJayjKZwZcaR7aWb2793J6grLsGu'),
    role: AccountRole.READONLY,
};

See

AccountMeta

On this page