ResolvedInstructionAccount

type ResolvedInstructionAccount<TAddress, TValue> = object;

Represents a resolved account input for an instruction.

During instruction building, account inputs are resolved to this type which captures the account value alongside the signer and writable flags declared by the program's IDL. The value can be any InstructionAccountInput, any InstructionSignerInput, or null for optional accounts.

The optional isSigner flag describes whether the IDL requires the account to sign the transaction — with 'either' meaning the account may or may not be a signer, in which case providing a TransactionSigner value is what marks it as one. Omitting the flag — e.g. in program clients generated before its introduction — is equivalent to setting it to 'either'.

Example

const mintAccount: ResolvedInstructionAccount = {
  value: mintAddress,
  isSigner: false,
  isWritable: true,
};

Type Parameters

Type ParameterDefault typeDescription
TAddress extends stringstringThe address type, defaults to string.
TValue extends | InstructionAccountInput<TAddress> | InstructionSignerInput<TAddress> | null| InstructionAccountInput<TAddress> | InstructionSignerInput<TAddress> | nullThe type of the resolved value.

Properties

isSigner?

optional isSigner?: boolean | "either";

isWritable

isWritable: boolean;

value

value: TValue;

On this page