thawAccount static method
Thaw a Frozen account using the Mint's freeze_authority (if set).
Keys:
- Single owner
[writable]
The account to freeze.[]
The token mint.[signer]
The mint freeze authority.
- Multisignature owner
[writable]
The account to freeze.[]
The token mint.[]
The mint's multisignature freeze authority.- ..3+M
[signer]
M signer accounts.
Implementation
static TransactionInstruction thawAccount({
required final Pubkey account,
required final Pubkey mint,
required final Pubkey authority,
final List<Pubkey> signers = const [],
}) {
// * Single owner
// 0. `[w]` The account to fress.
// 1. `[w]` The token mint.
// 2. `[s]` The mint freeze authority.
//
// * Multisignature owner
// 0. `[w]` The account to freeze.
// 1. `[w]` The token mint.
// 2. `[]` The mint's multisignature freeze authority.
// 3. `[s]` ..3+M, M signer accounts.
final List<AccountMeta> keys = [
AccountMeta.writable(account),
AccountMeta.writable(mint),
AccountMeta(authority, isSigner: signers.isEmpty),
for (final Pubkey signer in signers)
AccountMeta.signer(signer),
];
return _instance.createTransactionIntruction(
TokenInstruction.freezeAccount,
keys: keys,
);
}