initializeImmutableOwner static method

TransactionInstruction initializeImmutableOwner({
  1. required Pubkey account,
})

Initialize the Immutable Owner extension for the given token account.

Fails if the account has already been initialized, so must be called before initializeAccount.

No-ops in this version of the program, but is included for compatibility with the Associated Token Account program.

Keys:

  • [w] account The account to initialize.

Implementation

static TransactionInstruction initializeImmutableOwner({
  required final Pubkey account,
}) {
  //  0. `[w]` The account to initialize.
  final List<AccountMeta> keys = [
    AccountMeta.writable(account),
  ];

  return _instance.createTransactionIntruction(
    TokenInstruction.initializeImmutableOwner,
    keys: keys,
  );
}