TokenInstruction.thawAccount constructor

TokenInstruction.thawAccount({
  1. required Ed25519HDPublicKey account,
  2. required Ed25519HDPublicKey mint,
  3. required Ed25519HDPublicKey freezeAuthority,
  4. List<Ed25519HDPublicKey> signers = const <Ed25519HDPublicKey>[],
})

Thaw a Frozen account using the mint's freezeAuthority.

Implementation

factory TokenInstruction.thawAccount({
  required Ed25519HDPublicKey account,
  required Ed25519HDPublicKey mint,
  required Ed25519HDPublicKey freezeAuthority,
  List<Ed25519HDPublicKey> signers = const <Ed25519HDPublicKey>[],
}) =>
    TokenInstruction._(
      accounts: [
        AccountMeta.writeable(pubKey: account, isSigner: false),
        AccountMeta.writeable(pubKey: mint, isSigner: false),
        AccountMeta.writeable(
          pubKey: freezeAuthority,
          isSigner: signers.isEmpty,
        ),
        ...signers.map(
          (pubKey) => AccountMeta.readonly(pubKey: pubKey, isSigner: true),
        ),
      ],
      data: TokenProgram.thawAccountInstructionIndex,
    );