{"version":3,"sources":["../../src/generated/accounts/mint.ts","../../src/generated/accounts/multisig.ts","../../src/generated/types/accountState.ts","../../src/generated/types/authorityType.ts","../../src/generated/accounts/token.ts","../../src/generated/programs/associatedToken.ts","../../src/generated/programs/token.ts","../../src/generated/errors/associatedToken.ts","../../src/generated/errors/token.ts","../../src/generated/shared/index.ts","../../src/generated/instructions/amountToUiAmount.ts","../../src/generated/instructions/approve.ts","../../src/generated/instructions/approveChecked.ts","../../src/generated/instructions/burn.ts","../../src/generated/instructions/burnChecked.ts","../../src/generated/instructions/closeAccount.ts","../../src/generated/pdas/associatedToken.ts","../../src/generated/instructions/createAssociatedToken.ts","../../src/generated/instructions/createAssociatedTokenIdempotent.ts","../../src/generated/instructions/freezeAccount.ts","../../src/generated/instructions/getAccountDataSize.ts","../../src/generated/instructions/initializeAccount.ts","../../src/generated/instructions/initializeAccount2.ts","../../src/generated/instructions/initializeAccount3.ts","../../src/generated/instructions/initializeImmutableOwner.ts","../../src/generated/instructions/initializeMint.ts","../../src/generated/instructions/initializeMint2.ts","../../src/generated/instructions/initializeMultisig.ts","../../src/generated/instructions/initializeMultisig2.ts","../../src/generated/instructions/mintTo.ts","../../src/generated/instructions/mintToChecked.ts","../../src/generated/instructions/recoverNestedAssociatedToken.ts","../../src/generated/instructions/revoke.ts","../../src/generated/instructions/setAuthority.ts","../../src/generated/instructions/syncNative.ts","../../src/generated/instructions/thawAccount.ts","../../src/generated/instructions/transfer.ts","../../src/generated/instructions/transferChecked.ts","../../src/generated/instructions/uiAmountToAmount.ts","../../node_modules/.pnpm/@solana-program+system@0.9.0_@solana+kit@5.0.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.5.3_ws@8.17.0_/node_modules/@solana-program/system/src/generated/programs/system.ts","../../node_modules/.pnpm/@solana-program+system@0.9.0_@solana+kit@5.0.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.5.3_ws@8.17.0_/node_modules/@solana-program/system/src/generated/errors/system.ts","../../node_modules/.pnpm/@solana-program+system@0.9.0_@solana+kit@5.0.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.5.3_ws@8.17.0_/node_modules/@solana-program/system/src/generated/shared/index.ts","../../node_modules/.pnpm/@solana-program+system@0.9.0_@solana+kit@5.0.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.5.3_ws@8.17.0_/node_modules/@solana-program/system/src/generated/instructions/createAccount.ts","../../src/createMint.ts","../../src/mintToATA.ts","../../src/transferToATA.ts"],"names":["getStructEncoder","getU8Encoder","getBooleanEncoder","getAddressEncoder","getStructDecoder","getU8Decoder","getBooleanDecoder","getAddressDecoder","combineCodec","decodeAccount","assertAccountExists","fetchEncodedAccount","assertAccountsExist","fetchEncodedAccounts","AccountState","AuthorityType","getEnumEncoder","getEnumDecoder","getU64Encoder","getOptionEncoder","getU32Encoder","getU64Decoder","getOptionDecoder","getU32Decoder","AssociatedTokenInstruction","TokenAccount","TokenInstruction","containsBytes","isProgramError","kitIsTransactionSigner","transformEncoder","AccountRole","none","expectAddress","getAccountMetaFactory","isTransactionSigner","upgradeRoleToSigner","sequentialInstructionPlan"],"mappings":";;;AA6EO,SAAS,cAA6C,GAAA;AAC3D,EAAA,OAAO,gBAAiB,CAAA;AAAA,IACtB;AAAA,MACE,eAAA;AAAA,MACA,gBAAA,CAAiB,mBAAqB,EAAA;AAAA,QACpC,QAAQ,aAAc,EAAA;AAAA,QACtB,SAAW,EAAA,QAAA;AAAA,OACZ,CAAA;AAAA,KACH;AAAA,IACA,CAAC,QAAU,EAAA,aAAA,EAAe,CAAA;AAAA,IAC1B,CAAC,UAAY,EAAA,YAAA,EAAc,CAAA;AAAA,IAC3B,CAAC,eAAiB,EAAA,iBAAA,EAAmB,CAAA;AAAA,IACrC;AAAA,MACE,iBAAA;AAAA,MACA,gBAAA,CAAiB,mBAAqB,EAAA;AAAA,QACpC,QAAQ,aAAc,EAAA;AAAA,QACtB,SAAW,EAAA,QAAA;AAAA,OACZ,CAAA;AAAA,KACH;AAAA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AAA,QACZ,eAAe,MAAQ,EAAA,aAAA;AAAA,QACvB,cAAc,MAAQ,EAAA,YAAA;AAAA,OACxB;AAAA,MACA;AAAA,QACE,gBAAgB,MAAQ,EAAA,sBAAA;AAAA,OAC1B;AAAA,KACF;AAAA,IACA,6BAAA;AAAA,MACE;AAAA,QACE,QAAQ,KAAM,CAAA,MAAA;AAAA,QACd,MAAM,KAAM,CAAA,IAAA;AAAA,QACZ,aAAa,KAAM,CAAA,WAAA;AAAA,QACnB,WAAW,KAAM,CAAA,SAAA;AAAA,QACjB,QAAQ,KAAM,CAAA,MAAA;AAAA,QACd,UAAU,KAAM,CAAA,QAAA;AAAA,QAChB,cAAc,KAAM,CAAA,YAAA;AAAA,OACtB;AAAA,MACA;AAAA,QACE,gBAAgB,MAAQ,EAAA,YAAA;AAAA,OAC1B;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AACH,CAAA;AAOA,eAAsB,oCAAA,CACpB,OACA,MAC0B,EAAA;AAC1B,EAAA,MAAM,CAAC,UAAU,CAAI,GAAA,MAAM,sBAAuB,CAAA;AAAA,IAChD,OAAO,KAAM,CAAA,SAAA;AAAA,IACb,YAAA,EAAc,QAAQ,YAAgB,IAAA,qBAAA;AAAA,IACtC,MAAM,KAAM,CAAA,IAAA;AAAA,GACb,CAAA,CAAA;AACD,EAAO,OAAA,+BAAA;AAAA,IACL;AAAA,MACE,GAAG,KAAA;AAAA,MACH,WAAa,EAAA,UAAA;AAAA,KACf;AAAA,IACA,MAAA;AAAA,GACF,CAAA;AACF","file":"index.mjs","sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n} from '@solana/kit';\n\nexport type Mint = {\n /**\n * Optional authority used to mint new tokens. The mint authority may only\n * be provided during mint creation. If no mint authority is present\n * then the mint has a fixed supply and no further tokens may be minted.\n */\n mintAuthority: Option
;\n /** Total supply of tokens. */\n supply: bigint;\n /** Number of base 10 digits to the right of the decimal place. */\n decimals: number;\n /** Is `true` if this structure has been initialized. */\n isInitialized: boolean;\n /** Optional authority to freeze token accounts. */\n freezeAuthority: Option
;\n};\n\nexport type MintArgs = {\n /**\n * Optional authority used to mint new tokens. The mint authority may only\n * be provided during mint creation. If no mint authority is present\n * then the mint has a fixed supply and no further tokens may be minted.\n */\n mintAuthority: OptionOrNullable
;\n /** Total supply of tokens. */\n supply: number | bigint;\n /** Number of base 10 digits to the right of the decimal place. */\n decimals: number;\n /** Is `true` if this structure has been initialized. */\n isInitialized: boolean;\n /** Optional authority to freeze token accounts. */\n freezeAuthority: OptionOrNullable
;\n};\n\nexport function getMintEncoder(): FixedSizeEncoder {\n return getStructEncoder([\n [\n 'mintAuthority',\n getOptionEncoder(getAddressEncoder(), {\n prefix: getU32Encoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['supply', getU64Encoder()],\n ['decimals', getU8Encoder()],\n ['isInitialized', getBooleanEncoder()],\n [\n 'freezeAuthority',\n getOptionEncoder(getAddressEncoder(), {\n prefix: getU32Encoder(),\n noneValue: 'zeroes',\n }),\n ],\n ]);\n}\n\nexport function getMintDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n [\n 'mintAuthority',\n getOptionDecoder(getAddressDecoder(), {\n prefix: getU32Decoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['supply', getU64Decoder()],\n ['decimals', getU8Decoder()],\n ['isInitialized', getBooleanDecoder()],\n [\n 'freezeAuthority',\n getOptionDecoder(getAddressDecoder(), {\n prefix: getU32Decoder(),\n noneValue: 'zeroes',\n }),\n ],\n ]);\n}\n\nexport function getMintCodec(): FixedSizeCodec {\n return combineCodec(getMintEncoder(), getMintDecoder());\n}\n\nexport function decodeMint(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeMint(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeMint(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n): Account | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getMintDecoder()\n );\n}\n\nexport async function fetchMint(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeMint(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeMint(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeMint(maybeAccount);\n}\n\nexport async function fetchAllMint(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeMint(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeMint(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeMint(maybeAccount));\n}\n\nexport function getMintSize(): number {\n return 82;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n} from '@solana/kit';\n\nexport type Multisig = {\n /** Number of signers required. */\n m: number;\n /** Number of valid signers. */\n n: number;\n /** Is `true` if this structure has been initialized. */\n isInitialized: boolean;\n /** Signer public keys. */\n signers: Array
;\n};\n\nexport type MultisigArgs = Multisig;\n\nexport function getMultisigEncoder(): FixedSizeEncoder {\n return getStructEncoder([\n ['m', getU8Encoder()],\n ['n', getU8Encoder()],\n ['isInitialized', getBooleanEncoder()],\n ['signers', getArrayEncoder(getAddressEncoder(), { size: 11 })],\n ]);\n}\n\nexport function getMultisigDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['m', getU8Decoder()],\n ['n', getU8Decoder()],\n ['isInitialized', getBooleanDecoder()],\n ['signers', getArrayDecoder(getAddressDecoder(), { size: 11 })],\n ]);\n}\n\nexport function getMultisigCodec(): FixedSizeCodec {\n return combineCodec(getMultisigEncoder(), getMultisigDecoder());\n}\n\nexport function decodeMultisig(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeMultisig(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeMultisig(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n): Account | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getMultisigDecoder()\n );\n}\n\nexport async function fetchMultisig(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeMultisig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeMultisig(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeMultisig(maybeAccount);\n}\n\nexport async function fetchAllMultisig(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeMultisig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeMultisig(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeMultisig(maybeAccount));\n}\n\nexport function getMultisigSize(): number {\n return 355;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum AccountState {\n Uninitialized,\n Initialized,\n Frozen,\n}\n\nexport type AccountStateArgs = AccountState;\n\nexport function getAccountStateEncoder(): FixedSizeEncoder {\n return getEnumEncoder(AccountState);\n}\n\nexport function getAccountStateDecoder(): FixedSizeDecoder {\n return getEnumDecoder(AccountState);\n}\n\nexport function getAccountStateCodec(): FixedSizeCodec<\n AccountStateArgs,\n AccountState\n> {\n return combineCodec(getAccountStateEncoder(), getAccountStateDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum AuthorityType {\n MintTokens,\n FreezeAccount,\n AccountOwner,\n CloseAccount,\n}\n\nexport type AuthorityTypeArgs = AuthorityType;\n\nexport function getAuthorityTypeEncoder(): FixedSizeEncoder {\n return getEnumEncoder(AuthorityType);\n}\n\nexport function getAuthorityTypeDecoder(): FixedSizeDecoder {\n return getEnumDecoder(AuthorityType);\n}\n\nexport function getAuthorityTypeCodec(): FixedSizeCodec<\n AuthorityTypeArgs,\n AuthorityType\n> {\n return combineCodec(getAuthorityTypeEncoder(), getAuthorityTypeDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n getAddressDecoder,\n getAddressEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n} from '@solana/kit';\nimport {\n getAccountStateDecoder,\n getAccountStateEncoder,\n type AccountState,\n type AccountStateArgs,\n} from '../types';\n\nexport type Token = {\n /** The mint associated with this account. */\n mint: Address;\n /** The owner of this account. */\n owner: Address;\n /** The amount of tokens this account holds. */\n amount: bigint;\n /**\n * If `delegate` is `Some` then `delegated_amount` represents\n * the amount authorized by the delegate.\n */\n delegate: Option
;\n /** The account's state. */\n state: AccountState;\n /**\n * If is_native.is_some, this is a native token, and the value logs the\n * rent-exempt reserve. An Account is required to be rent-exempt, so\n * the value is used by the Processor to ensure that wrapped SOL\n * accounts do not drop below this threshold.\n */\n isNative: Option;\n /** The amount delegated. */\n delegatedAmount: bigint;\n /** Optional authority to close the account. */\n closeAuthority: Option
;\n};\n\nexport type TokenArgs = {\n /** The mint associated with this account. */\n mint: Address;\n /** The owner of this account. */\n owner: Address;\n /** The amount of tokens this account holds. */\n amount: number | bigint;\n /**\n * If `delegate` is `Some` then `delegated_amount` represents\n * the amount authorized by the delegate.\n */\n delegate: OptionOrNullable
;\n /** The account's state. */\n state: AccountStateArgs;\n /**\n * If is_native.is_some, this is a native token, and the value logs the\n * rent-exempt reserve. An Account is required to be rent-exempt, so\n * the value is used by the Processor to ensure that wrapped SOL\n * accounts do not drop below this threshold.\n */\n isNative: OptionOrNullable;\n /** The amount delegated. */\n delegatedAmount: number | bigint;\n /** Optional authority to close the account. */\n closeAuthority: OptionOrNullable
;\n};\n\nexport function getTokenEncoder(): FixedSizeEncoder {\n return getStructEncoder([\n ['mint', getAddressEncoder()],\n ['owner', getAddressEncoder()],\n ['amount', getU64Encoder()],\n [\n 'delegate',\n getOptionEncoder(getAddressEncoder(), {\n prefix: getU32Encoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['state', getAccountStateEncoder()],\n [\n 'isNative',\n getOptionEncoder(getU64Encoder(), {\n prefix: getU32Encoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['delegatedAmount', getU64Encoder()],\n [\n 'closeAuthority',\n getOptionEncoder(getAddressEncoder(), {\n prefix: getU32Encoder(),\n noneValue: 'zeroes',\n }),\n ],\n ]);\n}\n\nexport function getTokenDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['mint', getAddressDecoder()],\n ['owner', getAddressDecoder()],\n ['amount', getU64Decoder()],\n [\n 'delegate',\n getOptionDecoder(getAddressDecoder(), {\n prefix: getU32Decoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['state', getAccountStateDecoder()],\n [\n 'isNative',\n getOptionDecoder(getU64Decoder(), {\n prefix: getU32Decoder(),\n noneValue: 'zeroes',\n }),\n ],\n ['delegatedAmount', getU64Decoder()],\n [\n 'closeAuthority',\n getOptionDecoder(getAddressDecoder(), {\n prefix: getU32Decoder(),\n noneValue: 'zeroes',\n }),\n ],\n ]);\n}\n\nexport function getTokenCodec(): FixedSizeCodec {\n return combineCodec(getTokenEncoder(), getTokenDecoder());\n}\n\nexport function decodeToken(\n encodedAccount: EncodedAccount\n): Account;\nexport function decodeToken(\n encodedAccount: MaybeEncodedAccount\n): MaybeAccount;\nexport function decodeToken(\n encodedAccount: EncodedAccount | MaybeEncodedAccount\n): Account | MaybeAccount {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount,\n getTokenDecoder()\n );\n}\n\nexport async function fetchToken(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchMaybeToken(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeToken(\n rpc: Parameters[0],\n address: Address,\n config?: FetchAccountConfig\n): Promise> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeToken(maybeAccount);\n}\n\nexport async function fetchAllToken(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchAllMaybeToken(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeToken(\n rpc: Parameters[0],\n addresses: Array
,\n config?: FetchAccountsConfig\n): Promise[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeToken(maybeAccount));\n}\n\nexport function getTokenSize(): number {\n return 165;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n containsBytes,\n getU8Encoder,\n type Address,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n type ParsedCreateAssociatedTokenIdempotentInstruction,\n type ParsedCreateAssociatedTokenInstruction,\n type ParsedRecoverNestedAssociatedTokenInstruction,\n} from '../instructions';\n\nexport const ASSOCIATED_TOKEN_PROGRAM_ADDRESS =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\nexport enum AssociatedTokenInstruction {\n CreateAssociatedToken,\n CreateAssociatedTokenIdempotent,\n RecoverNestedAssociatedToken,\n}\n\nexport function identifyAssociatedTokenInstruction(\n instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): AssociatedTokenInstruction {\n const data = 'data' in instruction ? instruction.data : instruction;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return AssociatedTokenInstruction.CreateAssociatedToken;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return AssociatedTokenInstruction.CreateAssociatedTokenIdempotent;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return AssociatedTokenInstruction.RecoverNestedAssociatedToken;\n }\n throw new Error(\n 'The provided instruction could not be identified as a associatedToken instruction.'\n );\n}\n\nexport type ParsedAssociatedTokenInstruction<\n TProgram extends string = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n> =\n | ({\n instructionType: AssociatedTokenInstruction.CreateAssociatedToken;\n } & ParsedCreateAssociatedTokenInstruction)\n | ({\n instructionType: AssociatedTokenInstruction.CreateAssociatedTokenIdempotent;\n } & ParsedCreateAssociatedTokenIdempotentInstruction)\n | ({\n instructionType: AssociatedTokenInstruction.RecoverNestedAssociatedToken;\n } & ParsedRecoverNestedAssociatedTokenInstruction);\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n containsBytes,\n getU8Encoder,\n type Address,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n type ParsedAmountToUiAmountInstruction,\n type ParsedApproveCheckedInstruction,\n type ParsedApproveInstruction,\n type ParsedBurnCheckedInstruction,\n type ParsedBurnInstruction,\n type ParsedCloseAccountInstruction,\n type ParsedFreezeAccountInstruction,\n type ParsedGetAccountDataSizeInstruction,\n type ParsedInitializeAccount2Instruction,\n type ParsedInitializeAccount3Instruction,\n type ParsedInitializeAccountInstruction,\n type ParsedInitializeImmutableOwnerInstruction,\n type ParsedInitializeMint2Instruction,\n type ParsedInitializeMintInstruction,\n type ParsedInitializeMultisig2Instruction,\n type ParsedInitializeMultisigInstruction,\n type ParsedMintToCheckedInstruction,\n type ParsedMintToInstruction,\n type ParsedRevokeInstruction,\n type ParsedSetAuthorityInstruction,\n type ParsedSyncNativeInstruction,\n type ParsedThawAccountInstruction,\n type ParsedTransferCheckedInstruction,\n type ParsedTransferInstruction,\n type ParsedUiAmountToAmountInstruction,\n} from '../instructions';\n\nexport const TOKEN_PROGRAM_ADDRESS =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n\nexport enum TokenAccount {\n Mint,\n Token,\n Multisig,\n}\n\nexport function identifyTokenAccount(\n account: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): TokenAccount {\n const data = 'data' in account ? account.data : account;\n if (data.length === 82) {\n return TokenAccount.Mint;\n }\n if (data.length === 165) {\n return TokenAccount.Token;\n }\n if (data.length === 355) {\n return TokenAccount.Multisig;\n }\n throw new Error(\n 'The provided account could not be identified as a token account.'\n );\n}\n\nexport enum TokenInstruction {\n InitializeMint,\n InitializeAccount,\n InitializeMultisig,\n Transfer,\n Approve,\n Revoke,\n SetAuthority,\n MintTo,\n Burn,\n CloseAccount,\n FreezeAccount,\n ThawAccount,\n TransferChecked,\n ApproveChecked,\n MintToChecked,\n BurnChecked,\n InitializeAccount2,\n SyncNative,\n InitializeAccount3,\n InitializeMultisig2,\n InitializeMint2,\n GetAccountDataSize,\n InitializeImmutableOwner,\n AmountToUiAmount,\n UiAmountToAmount,\n}\n\nexport function identifyTokenInstruction(\n instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): TokenInstruction {\n const data = 'data' in instruction ? instruction.data : instruction;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) {\n return TokenInstruction.InitializeMint;\n }\n if (containsBytes(data, getU8Encoder().encode(1), 0)) {\n return TokenInstruction.InitializeAccount;\n }\n if (containsBytes(data, getU8Encoder().encode(2), 0)) {\n return TokenInstruction.InitializeMultisig;\n }\n if (containsBytes(data, getU8Encoder().encode(3), 0)) {\n return TokenInstruction.Transfer;\n }\n if (containsBytes(data, getU8Encoder().encode(4), 0)) {\n return TokenInstruction.Approve;\n }\n if (containsBytes(data, getU8Encoder().encode(5), 0)) {\n return TokenInstruction.Revoke;\n }\n if (containsBytes(data, getU8Encoder().encode(6), 0)) {\n return TokenInstruction.SetAuthority;\n }\n if (containsBytes(data, getU8Encoder().encode(7), 0)) {\n return TokenInstruction.MintTo;\n }\n if (containsBytes(data, getU8Encoder().encode(8), 0)) {\n return TokenInstruction.Burn;\n }\n if (containsBytes(data, getU8Encoder().encode(9), 0)) {\n return TokenInstruction.CloseAccount;\n }\n if (containsBytes(data, getU8Encoder().encode(10), 0)) {\n return TokenInstruction.FreezeAccount;\n }\n if (containsBytes(data, getU8Encoder().encode(11), 0)) {\n return TokenInstruction.ThawAccount;\n }\n if (containsBytes(data, getU8Encoder().encode(12), 0)) {\n return TokenInstruction.TransferChecked;\n }\n if (containsBytes(data, getU8Encoder().encode(13), 0)) {\n return TokenInstruction.ApproveChecked;\n }\n if (containsBytes(data, getU8Encoder().encode(14), 0)) {\n return TokenInstruction.MintToChecked;\n }\n if (containsBytes(data, getU8Encoder().encode(15), 0)) {\n return TokenInstruction.BurnChecked;\n }\n if (containsBytes(data, getU8Encoder().encode(16), 0)) {\n return TokenInstruction.InitializeAccount2;\n }\n if (containsBytes(data, getU8Encoder().encode(17), 0)) {\n return TokenInstruction.SyncNative;\n }\n if (containsBytes(data, getU8Encoder().encode(18), 0)) {\n return TokenInstruction.InitializeAccount3;\n }\n if (containsBytes(data, getU8Encoder().encode(19), 0)) {\n return TokenInstruction.InitializeMultisig2;\n }\n if (containsBytes(data, getU8Encoder().encode(20), 0)) {\n return TokenInstruction.InitializeMint2;\n }\n if (containsBytes(data, getU8Encoder().encode(21), 0)) {\n return TokenInstruction.GetAccountDataSize;\n }\n if (containsBytes(data, getU8Encoder().encode(22), 0)) {\n return TokenInstruction.InitializeImmutableOwner;\n }\n if (containsBytes(data, getU8Encoder().encode(23), 0)) {\n return TokenInstruction.AmountToUiAmount;\n }\n if (containsBytes(data, getU8Encoder().encode(24), 0)) {\n return TokenInstruction.UiAmountToAmount;\n }\n throw new Error(\n 'The provided instruction could not be identified as a token instruction.'\n );\n}\n\nexport type ParsedTokenInstruction<\n TProgram extends string = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n> =\n | ({\n instructionType: TokenInstruction.InitializeMint;\n } & ParsedInitializeMintInstruction)\n | ({\n instructionType: TokenInstruction.InitializeAccount;\n } & ParsedInitializeAccountInstruction)\n | ({\n instructionType: TokenInstruction.InitializeMultisig;\n } & ParsedInitializeMultisigInstruction)\n | ({\n instructionType: TokenInstruction.Transfer;\n } & ParsedTransferInstruction)\n | ({\n instructionType: TokenInstruction.Approve;\n } & ParsedApproveInstruction)\n | ({\n instructionType: TokenInstruction.Revoke;\n } & ParsedRevokeInstruction)\n | ({\n instructionType: TokenInstruction.SetAuthority;\n } & ParsedSetAuthorityInstruction)\n | ({\n instructionType: TokenInstruction.MintTo;\n } & ParsedMintToInstruction)\n | ({\n instructionType: TokenInstruction.Burn;\n } & ParsedBurnInstruction)\n | ({\n instructionType: TokenInstruction.CloseAccount;\n } & ParsedCloseAccountInstruction)\n | ({\n instructionType: TokenInstruction.FreezeAccount;\n } & ParsedFreezeAccountInstruction)\n | ({\n instructionType: TokenInstruction.ThawAccount;\n } & ParsedThawAccountInstruction)\n | ({\n instructionType: TokenInstruction.TransferChecked;\n } & ParsedTransferCheckedInstruction)\n | ({\n instructionType: TokenInstruction.ApproveChecked;\n } & ParsedApproveCheckedInstruction)\n | ({\n instructionType: TokenInstruction.MintToChecked;\n } & ParsedMintToCheckedInstruction)\n | ({\n instructionType: TokenInstruction.BurnChecked;\n } & ParsedBurnCheckedInstruction)\n | ({\n instructionType: TokenInstruction.InitializeAccount2;\n } & ParsedInitializeAccount2Instruction)\n | ({\n instructionType: TokenInstruction.SyncNative;\n } & ParsedSyncNativeInstruction)\n | ({\n instructionType: TokenInstruction.InitializeAccount3;\n } & ParsedInitializeAccount3Instruction)\n | ({\n instructionType: TokenInstruction.InitializeMultisig2;\n } & ParsedInitializeMultisig2Instruction)\n | ({\n instructionType: TokenInstruction.InitializeMint2;\n } & ParsedInitializeMint2Instruction)\n | ({\n instructionType: TokenInstruction.GetAccountDataSize;\n } & ParsedGetAccountDataSizeInstruction)\n | ({\n instructionType: TokenInstruction.InitializeImmutableOwner;\n } & ParsedInitializeImmutableOwnerInstruction)\n | ({\n instructionType: TokenInstruction.AmountToUiAmount;\n } & ParsedAmountToUiAmountInstruction)\n | ({\n instructionType: TokenInstruction.UiAmountToAmount;\n } & ParsedUiAmountToAmountInstruction);\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n isProgramError,\n type Address,\n type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n type SolanaError,\n} from '@solana/kit';\nimport { ASSOCIATED_TOKEN_PROGRAM_ADDRESS } from '../programs';\n\n/** InvalidOwner: Associated token account owner does not match address derivation */\nexport const ASSOCIATED_TOKEN_ERROR__INVALID_OWNER = 0x0; // 0\n\nexport type AssociatedTokenError = typeof ASSOCIATED_TOKEN_ERROR__INVALID_OWNER;\n\nlet associatedTokenErrorMessages:\n | Record\n | undefined;\nif (process.env.NODE_ENV !== 'production') {\n associatedTokenErrorMessages = {\n [ASSOCIATED_TOKEN_ERROR__INVALID_OWNER]: `Associated token account owner does not match address derivation`,\n };\n}\n\nexport function getAssociatedTokenErrorMessage(\n code: AssociatedTokenError\n): string {\n if (process.env.NODE_ENV !== 'production') {\n return (\n associatedTokenErrorMessages as Record\n )[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isAssociatedTokenError<\n TProgramErrorCode extends AssociatedTokenError,\n>(\n error: unknown,\n transactionMessage: {\n instructions: Record;\n },\n code?: TProgramErrorCode\n): error is SolanaError &\n Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError(\n error,\n transactionMessage,\n ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n code\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n isProgramError,\n type Address,\n type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n type SolanaError,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\n\n/** NotRentExempt: Lamport balance below rent-exempt threshold */\nexport const TOKEN_ERROR__NOT_RENT_EXEMPT = 0x0; // 0\n/** InsufficientFunds: Insufficient funds */\nexport const TOKEN_ERROR__INSUFFICIENT_FUNDS = 0x1; // 1\n/** InvalidMint: Invalid Mint */\nexport const TOKEN_ERROR__INVALID_MINT = 0x2; // 2\n/** MintMismatch: Account not associated with this Mint */\nexport const TOKEN_ERROR__MINT_MISMATCH = 0x3; // 3\n/** OwnerMismatch: Owner does not match */\nexport const TOKEN_ERROR__OWNER_MISMATCH = 0x4; // 4\n/** FixedSupply: Fixed supply */\nexport const TOKEN_ERROR__FIXED_SUPPLY = 0x5; // 5\n/** AlreadyInUse: Already in use */\nexport const TOKEN_ERROR__ALREADY_IN_USE = 0x6; // 6\n/** InvalidNumberOfProvidedSigners: Invalid number of provided signers */\nexport const TOKEN_ERROR__INVALID_NUMBER_OF_PROVIDED_SIGNERS = 0x7; // 7\n/** InvalidNumberOfRequiredSigners: Invalid number of required signers */\nexport const TOKEN_ERROR__INVALID_NUMBER_OF_REQUIRED_SIGNERS = 0x8; // 8\n/** UninitializedState: State is unititialized */\nexport const TOKEN_ERROR__UNINITIALIZED_STATE = 0x9; // 9\n/** NativeNotSupported: Instruction does not support native tokens */\nexport const TOKEN_ERROR__NATIVE_NOT_SUPPORTED = 0xa; // 10\n/** NonNativeHasBalance: Non-native account can only be closed if its balance is zero */\nexport const TOKEN_ERROR__NON_NATIVE_HAS_BALANCE = 0xb; // 11\n/** InvalidInstruction: Invalid instruction */\nexport const TOKEN_ERROR__INVALID_INSTRUCTION = 0xc; // 12\n/** InvalidState: State is invalid for requested operation */\nexport const TOKEN_ERROR__INVALID_STATE = 0xd; // 13\n/** Overflow: Operation overflowed */\nexport const TOKEN_ERROR__OVERFLOW = 0xe; // 14\n/** AuthorityTypeNotSupported: Account does not support specified authority type */\nexport const TOKEN_ERROR__AUTHORITY_TYPE_NOT_SUPPORTED = 0xf; // 15\n/** MintCannotFreeze: This token mint cannot freeze accounts */\nexport const TOKEN_ERROR__MINT_CANNOT_FREEZE = 0x10; // 16\n/** AccountFrozen: Account is frozen */\nexport const TOKEN_ERROR__ACCOUNT_FROZEN = 0x11; // 17\n/** MintDecimalsMismatch: The provided decimals value different from the Mint decimals */\nexport const TOKEN_ERROR__MINT_DECIMALS_MISMATCH = 0x12; // 18\n/** NonNativeNotSupported: Instruction does not support non-native tokens */\nexport const TOKEN_ERROR__NON_NATIVE_NOT_SUPPORTED = 0x13; // 19\n\nexport type TokenError =\n | typeof TOKEN_ERROR__ACCOUNT_FROZEN\n | typeof TOKEN_ERROR__ALREADY_IN_USE\n | typeof TOKEN_ERROR__AUTHORITY_TYPE_NOT_SUPPORTED\n | typeof TOKEN_ERROR__FIXED_SUPPLY\n | typeof TOKEN_ERROR__INSUFFICIENT_FUNDS\n | typeof TOKEN_ERROR__INVALID_INSTRUCTION\n | typeof TOKEN_ERROR__INVALID_MINT\n | typeof TOKEN_ERROR__INVALID_NUMBER_OF_PROVIDED_SIGNERS\n | typeof TOKEN_ERROR__INVALID_NUMBER_OF_REQUIRED_SIGNERS\n | typeof TOKEN_ERROR__INVALID_STATE\n | typeof TOKEN_ERROR__MINT_CANNOT_FREEZE\n | typeof TOKEN_ERROR__MINT_DECIMALS_MISMATCH\n | typeof TOKEN_ERROR__MINT_MISMATCH\n | typeof TOKEN_ERROR__NATIVE_NOT_SUPPORTED\n | typeof TOKEN_ERROR__NON_NATIVE_HAS_BALANCE\n | typeof TOKEN_ERROR__NON_NATIVE_NOT_SUPPORTED\n | typeof TOKEN_ERROR__NOT_RENT_EXEMPT\n | typeof TOKEN_ERROR__OVERFLOW\n | typeof TOKEN_ERROR__OWNER_MISMATCH\n | typeof TOKEN_ERROR__UNINITIALIZED_STATE;\n\nlet tokenErrorMessages: Record | undefined;\nif (process.env.NODE_ENV !== 'production') {\n tokenErrorMessages = {\n [TOKEN_ERROR__ACCOUNT_FROZEN]: `Account is frozen`,\n [TOKEN_ERROR__ALREADY_IN_USE]: `Already in use`,\n [TOKEN_ERROR__AUTHORITY_TYPE_NOT_SUPPORTED]: `Account does not support specified authority type`,\n [TOKEN_ERROR__FIXED_SUPPLY]: `Fixed supply`,\n [TOKEN_ERROR__INSUFFICIENT_FUNDS]: `Insufficient funds`,\n [TOKEN_ERROR__INVALID_INSTRUCTION]: `Invalid instruction`,\n [TOKEN_ERROR__INVALID_MINT]: `Invalid Mint`,\n [TOKEN_ERROR__INVALID_NUMBER_OF_PROVIDED_SIGNERS]: `Invalid number of provided signers`,\n [TOKEN_ERROR__INVALID_NUMBER_OF_REQUIRED_SIGNERS]: `Invalid number of required signers`,\n [TOKEN_ERROR__INVALID_STATE]: `State is invalid for requested operation`,\n [TOKEN_ERROR__MINT_CANNOT_FREEZE]: `This token mint cannot freeze accounts`,\n [TOKEN_ERROR__MINT_DECIMALS_MISMATCH]: `The provided decimals value different from the Mint decimals`,\n [TOKEN_ERROR__MINT_MISMATCH]: `Account not associated with this Mint`,\n [TOKEN_ERROR__NATIVE_NOT_SUPPORTED]: `Instruction does not support native tokens`,\n [TOKEN_ERROR__NON_NATIVE_HAS_BALANCE]: `Non-native account can only be closed if its balance is zero`,\n [TOKEN_ERROR__NON_NATIVE_NOT_SUPPORTED]: `Instruction does not support non-native tokens`,\n [TOKEN_ERROR__NOT_RENT_EXEMPT]: `Lamport balance below rent-exempt threshold`,\n [TOKEN_ERROR__OVERFLOW]: `Operation overflowed`,\n [TOKEN_ERROR__OWNER_MISMATCH]: `Owner does not match`,\n [TOKEN_ERROR__UNINITIALIZED_STATE]: `State is unititialized`,\n };\n}\n\nexport function getTokenErrorMessage(code: TokenError): string {\n if (process.env.NODE_ENV !== 'production') {\n return (tokenErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isTokenError(\n error: unknown,\n transactionMessage: {\n instructions: Record;\n },\n code?: TProgramErrorCode\n): error is SolanaError &\n Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError(\n error,\n transactionMessage,\n TOKEN_PROGRAM_ADDRESS,\n code\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as kitIsTransactionSigner,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/kit';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value === null || value === undefined) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0] as Address;\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type InstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): AccountMeta | AccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n kitIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const AMOUNT_TO_UI_AMOUNT_DISCRIMINATOR = 23;\n\nexport function getAmountToUiAmountDiscriminatorBytes() {\n return getU8Encoder().encode(AMOUNT_TO_UI_AMOUNT_DISCRIMINATOR);\n}\n\nexport type AmountToUiAmountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AmountToUiAmountInstructionData = {\n discriminator: number;\n /** The amount of tokens to reformat. */\n amount: bigint;\n};\n\nexport type AmountToUiAmountInstructionDataArgs = {\n /** The amount of tokens to reformat. */\n amount: number | bigint;\n};\n\nexport function getAmountToUiAmountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: AMOUNT_TO_UI_AMOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getAmountToUiAmountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getAmountToUiAmountInstructionDataCodec(): FixedSizeCodec<\n AmountToUiAmountInstructionDataArgs,\n AmountToUiAmountInstructionData\n> {\n return combineCodec(\n getAmountToUiAmountInstructionDataEncoder(),\n getAmountToUiAmountInstructionDataDecoder()\n );\n}\n\nexport type AmountToUiAmountInput = {\n /** The mint to calculate for. */\n mint: Address;\n amount: AmountToUiAmountInstructionDataArgs['amount'];\n};\n\nexport function getAmountToUiAmountInstruction<\n TAccountMint extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: AmountToUiAmountInput,\n config?: { programAddress?: TProgramAddress }\n): AmountToUiAmountInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.mint)],\n data: getAmountToUiAmountInstructionDataEncoder().encode(\n args as AmountToUiAmountInstructionDataArgs\n ),\n programAddress,\n } as AmountToUiAmountInstruction);\n}\n\nexport type ParsedAmountToUiAmountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint to calculate for. */\n mint: TAccountMetas[0];\n };\n data: AmountToUiAmountInstructionData;\n};\n\nexport function parseAmountToUiAmountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedAmountToUiAmountInstruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { mint: getNextAccount() },\n data: getAmountToUiAmountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const APPROVE_DISCRIMINATOR = 4;\n\nexport function getApproveDiscriminatorBytes() {\n return getU8Encoder().encode(APPROVE_DISCRIMINATOR);\n}\n\nexport type ApproveInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountSource extends string | AccountMeta = string,\n TAccountDelegate extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount\n : TAccountSource,\n TAccountDelegate extends string\n ? ReadonlyAccount\n : TAccountDelegate,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ApproveInstructionData = {\n discriminator: number;\n /** The amount of tokens the delegate is approved for. */\n amount: bigint;\n};\n\nexport type ApproveInstructionDataArgs = {\n /** The amount of tokens the delegate is approved for. */\n amount: number | bigint;\n};\n\nexport function getApproveInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: APPROVE_DISCRIMINATOR })\n );\n}\n\nexport function getApproveInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getApproveInstructionDataCodec(): FixedSizeCodec<\n ApproveInstructionDataArgs,\n ApproveInstructionData\n> {\n return combineCodec(\n getApproveInstructionDataEncoder(),\n getApproveInstructionDataDecoder()\n );\n}\n\nexport type ApproveInput<\n TAccountSource extends string = string,\n TAccountDelegate extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The source account. */\n source: Address;\n /** The delegate. */\n delegate: Address;\n /** The source account owner or its multisignature account. */\n owner: Address | TransactionSigner;\n amount: ApproveInstructionDataArgs['amount'];\n multiSigners?: Array;\n};\n\nexport function getApproveInstruction<\n TAccountSource extends string,\n TAccountDelegate extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: ApproveInput,\n config?: { programAddress?: TProgramAddress }\n): ApproveInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountDelegate,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n delegate: { value: input.delegate ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.delegate),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getApproveInstructionDataEncoder().encode(\n args as ApproveInstructionDataArgs\n ),\n programAddress,\n } as ApproveInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountDelegate,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedApproveInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The source account. */\n source: TAccountMetas[0];\n /** The delegate. */\n delegate: TAccountMetas[1];\n /** The source account owner or its multisignature account. */\n owner: TAccountMetas[2];\n };\n data: ApproveInstructionData;\n};\n\nexport function parseApproveInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedApproveInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n delegate: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getApproveInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const APPROVE_CHECKED_DISCRIMINATOR = 13;\n\nexport function getApproveCheckedDiscriminatorBytes() {\n return getU8Encoder().encode(APPROVE_CHECKED_DISCRIMINATOR);\n}\n\nexport type ApproveCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountSource extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountDelegate extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount\n : TAccountSource,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountDelegate extends string\n ? ReadonlyAccount\n : TAccountDelegate,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ApproveCheckedInstructionData = {\n discriminator: number;\n /** The amount of tokens the delegate is approved for. */\n amount: bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport type ApproveCheckedInstructionDataArgs = {\n /** The amount of tokens the delegate is approved for. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport function getApproveCheckedInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ['decimals', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: APPROVE_CHECKED_DISCRIMINATOR })\n );\n}\n\nexport function getApproveCheckedInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ['decimals', getU8Decoder()],\n ]);\n}\n\nexport function getApproveCheckedInstructionDataCodec(): FixedSizeCodec<\n ApproveCheckedInstructionDataArgs,\n ApproveCheckedInstructionData\n> {\n return combineCodec(\n getApproveCheckedInstructionDataEncoder(),\n getApproveCheckedInstructionDataDecoder()\n );\n}\n\nexport type ApproveCheckedInput<\n TAccountSource extends string = string,\n TAccountMint extends string = string,\n TAccountDelegate extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The source account. */\n source: Address;\n /** The token mint. */\n mint: Address;\n /** The delegate. */\n delegate: Address;\n /** The source account owner or its multisignature account. */\n owner: Address | TransactionSigner;\n amount: ApproveCheckedInstructionDataArgs['amount'];\n decimals: ApproveCheckedInstructionDataArgs['decimals'];\n multiSigners?: Array;\n};\n\nexport function getApproveCheckedInstruction<\n TAccountSource extends string,\n TAccountMint extends string,\n TAccountDelegate extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: ApproveCheckedInput<\n TAccountSource,\n TAccountMint,\n TAccountDelegate,\n TAccountOwner\n >,\n config?: { programAddress?: TProgramAddress }\n): ApproveCheckedInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountMint,\n TAccountDelegate,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n delegate: { value: input.delegate ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.delegate),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getApproveCheckedInstructionDataEncoder().encode(\n args as ApproveCheckedInstructionDataArgs\n ),\n programAddress,\n } as ApproveCheckedInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountMint,\n TAccountDelegate,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedApproveCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The source account. */\n source: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The delegate. */\n delegate: TAccountMetas[2];\n /** The source account owner or its multisignature account. */\n owner: TAccountMetas[3];\n };\n data: ApproveCheckedInstructionData;\n};\n\nexport function parseApproveCheckedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedApproveCheckedInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n mint: getNextAccount(),\n delegate: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getApproveCheckedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const BURN_DISCRIMINATOR = 8;\n\nexport function getBurnDiscriminatorBytes() {\n return getU8Encoder().encode(BURN_DISCRIMINATOR);\n}\n\nexport type BurnInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n TAccountAuthority extends string\n ? ReadonlyAccount\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type BurnInstructionData = {\n /** The amount of tokens to burn. */\n discriminator: number;\n amount: bigint;\n};\n\nexport type BurnInstructionDataArgs = { amount: number | bigint };\n\nexport function getBurnInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: BURN_DISCRIMINATOR })\n );\n}\n\nexport function getBurnInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getBurnInstructionDataCodec(): FixedSizeCodec<\n BurnInstructionDataArgs,\n BurnInstructionData\n> {\n return combineCodec(\n getBurnInstructionDataEncoder(),\n getBurnInstructionDataDecoder()\n );\n}\n\nexport type BurnInput<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The account to burn from. */\n account: Address;\n /** The token mint. */\n mint: Address;\n /** The account's owner/delegate or its multisignature account. */\n authority: Address | TransactionSigner;\n amount: BurnInstructionDataArgs['amount'];\n multiSigners?: Array;\n};\n\nexport function getBurnInstruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: BurnInput,\n config?: { programAddress?: TProgramAddress }\n): BurnInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getBurnInstructionDataEncoder().encode(\n args as BurnInstructionDataArgs\n ),\n programAddress,\n } as BurnInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n >);\n}\n\nexport type ParsedBurnInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to burn from. */\n account: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The account's owner/delegate or its multisignature account. */\n authority: TAccountMetas[2];\n };\n data: BurnInstructionData;\n};\n\nexport function parseBurnInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedBurnInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getBurnInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const BURN_CHECKED_DISCRIMINATOR = 15;\n\nexport function getBurnCheckedDiscriminatorBytes() {\n return getU8Encoder().encode(BURN_CHECKED_DISCRIMINATOR);\n}\n\nexport type BurnCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n TAccountAuthority extends string\n ? ReadonlyAccount\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type BurnCheckedInstructionData = {\n discriminator: number;\n /** The amount of tokens to burn. */\n amount: bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport type BurnCheckedInstructionDataArgs = {\n /** The amount of tokens to burn. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport function getBurnCheckedInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ['decimals', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: BURN_CHECKED_DISCRIMINATOR })\n );\n}\n\nexport function getBurnCheckedInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ['decimals', getU8Decoder()],\n ]);\n}\n\nexport function getBurnCheckedInstructionDataCodec(): FixedSizeCodec<\n BurnCheckedInstructionDataArgs,\n BurnCheckedInstructionData\n> {\n return combineCodec(\n getBurnCheckedInstructionDataEncoder(),\n getBurnCheckedInstructionDataDecoder()\n );\n}\n\nexport type BurnCheckedInput<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The account to burn from. */\n account: Address;\n /** The token mint. */\n mint: Address;\n /** The account's owner/delegate or its multisignature account. */\n authority: Address | TransactionSigner;\n amount: BurnCheckedInstructionDataArgs['amount'];\n decimals: BurnCheckedInstructionDataArgs['decimals'];\n multiSigners?: Array;\n};\n\nexport function getBurnCheckedInstruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: BurnCheckedInput,\n config?: { programAddress?: TProgramAddress }\n): BurnCheckedInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getBurnCheckedInstructionDataEncoder().encode(\n args as BurnCheckedInstructionDataArgs\n ),\n programAddress,\n } as BurnCheckedInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n >);\n}\n\nexport type ParsedBurnCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to burn from. */\n account: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The account's owner/delegate or its multisignature account. */\n authority: TAccountMetas[2];\n };\n data: BurnCheckedInstructionData;\n};\n\nexport function parseBurnCheckedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedBurnCheckedInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getBurnCheckedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const CLOSE_ACCOUNT_DISCRIMINATOR = 9;\n\nexport function getCloseAccountDiscriminatorBytes() {\n return getU8Encoder().encode(CLOSE_ACCOUNT_DISCRIMINATOR);\n}\n\nexport type CloseAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountDestination extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountDestination extends string\n ? WritableAccount\n : TAccountDestination,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CloseAccountInstructionData = { discriminator: number };\n\nexport type CloseAccountInstructionDataArgs = {};\n\nexport function getCloseAccountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: CLOSE_ACCOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getCloseAccountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getCloseAccountInstructionDataCodec(): FixedSizeCodec<\n CloseAccountInstructionDataArgs,\n CloseAccountInstructionData\n> {\n return combineCodec(\n getCloseAccountInstructionDataEncoder(),\n getCloseAccountInstructionDataDecoder()\n );\n}\n\nexport type CloseAccountInput<\n TAccountAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The account to close. */\n account: Address;\n /** The destination account. */\n destination: Address;\n /** The account's owner or its multisignature account. */\n owner: Address | TransactionSigner;\n multiSigners?: Array;\n};\n\nexport function getCloseAccountInstruction<\n TAccountAccount extends string,\n TAccountDestination extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: CloseAccountInput,\n config?: { programAddress?: TProgramAddress }\n): CloseAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountDestination,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n destination: { value: input.destination ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getCloseAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as CloseAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountDestination,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedCloseAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to close. */\n account: TAccountMetas[0];\n /** The destination account. */\n destination: TAccountMetas[1];\n /** The account's owner or its multisignature account. */\n owner: TAccountMetas[2];\n };\n data: CloseAccountInstructionData;\n};\n\nexport function parseCloseAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedCloseAccountInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n destination: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getCloseAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n type Address,\n type ProgramDerivedAddress,\n} from '@solana/kit';\n\nexport type AssociatedTokenSeeds = {\n /** The wallet address of the associated token account. */\n owner: Address;\n /** The address of the token program to use. */\n tokenProgram: Address;\n /** The mint address of the associated token account. */\n mint: Address;\n};\n\nexport async function findAssociatedTokenPda(\n seeds: AssociatedTokenSeeds,\n config: { programAddress?: Address | undefined } = {}\n): Promise {\n const {\n programAddress = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n } = config;\n return await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getAddressEncoder().encode(seeds.owner),\n getAddressEncoder().encode(seeds.tokenProgram),\n getAddressEncoder().encode(seeds.mint),\n ],\n });\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { findAssociatedTokenPda } from '../pdas';\nimport { ASSOCIATED_TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_ASSOCIATED_TOKEN_DISCRIMINATOR = 0;\n\nexport function getCreateAssociatedTokenDiscriminatorBytes() {\n return getU8Encoder().encode(CREATE_ASSOCIATED_TOKEN_DISCRIMINATOR);\n}\n\nexport type CreateAssociatedTokenInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta = string,\n TAccountAta extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta = '11111111111111111111111111111111',\n TAccountTokenProgram extends\n | string\n | AccountMeta = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount &\n AccountSignerMeta\n : TAccountPayer,\n TAccountAta extends string ? WritableAccount : TAccountAta,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountTokenProgram extends string\n ? ReadonlyAccount\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAssociatedTokenInstructionData = { discriminator: number };\n\nexport type CreateAssociatedTokenInstructionDataArgs = {};\n\nexport function getCreateAssociatedTokenInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({\n ...value,\n discriminator: CREATE_ASSOCIATED_TOKEN_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateAssociatedTokenInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getCreateAssociatedTokenInstructionDataCodec(): FixedSizeCodec<\n CreateAssociatedTokenInstructionDataArgs,\n CreateAssociatedTokenInstructionData\n> {\n return combineCodec(\n getCreateAssociatedTokenInstructionDataEncoder(),\n getCreateAssociatedTokenInstructionDataDecoder()\n );\n}\n\nexport type CreateAssociatedTokenAsyncInput<\n TAccountPayer extends string = string,\n TAccountAta extends string = string,\n TAccountOwner extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** Associated token account address to be created. */\n ata?: Address;\n /** Wallet address for the new associated token account. */\n owner: Address;\n /** The token mint for the new associated token account. */\n mint: Address;\n /** System program. */\n systemProgram?: Address;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport async function getCreateAssociatedTokenInstructionAsync<\n TAccountPayer extends string,\n TAccountAta extends string,\n TAccountOwner extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: CreateAssociatedTokenAsyncInput<\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateAssociatedTokenInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n ata: { value: input.ata ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n if (!accounts.ata.value) {\n accounts.ata.value = await findAssociatedTokenPda({\n owner: expectAddress(accounts.owner.value),\n tokenProgram: expectAddress(accounts.tokenProgram.value),\n mint: expectAddress(accounts.mint.value),\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.ata),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getCreateAssociatedTokenInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateAssociatedTokenInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >);\n}\n\nexport type CreateAssociatedTokenInput<\n TAccountPayer extends string = string,\n TAccountAta extends string = string,\n TAccountOwner extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** Associated token account address to be created. */\n ata: Address;\n /** Wallet address for the new associated token account. */\n owner: Address;\n /** The token mint for the new associated token account. */\n mint: Address;\n /** System program. */\n systemProgram?: Address;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport function getCreateAssociatedTokenInstruction<\n TAccountPayer extends string,\n TAccountAta extends string,\n TAccountOwner extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: CreateAssociatedTokenInput<\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateAssociatedTokenInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n ata: { value: input.ata ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.ata),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getCreateAssociatedTokenInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateAssociatedTokenInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedCreateAssociatedTokenInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** Funding account (must be a system account). */\n payer: TAccountMetas[0];\n /** Associated token account address to be created. */\n ata: TAccountMetas[1];\n /** Wallet address for the new associated token account. */\n owner: TAccountMetas[2];\n /** The token mint for the new associated token account. */\n mint: TAccountMetas[3];\n /** System program. */\n systemProgram: TAccountMetas[4];\n /** SPL Token program. */\n tokenProgram: TAccountMetas[5];\n };\n data: CreateAssociatedTokenInstructionData;\n};\n\nexport function parseCreateAssociatedTokenInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedCreateAssociatedTokenInstruction {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n ata: getNextAccount(),\n owner: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getCreateAssociatedTokenInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { findAssociatedTokenPda } from '../pdas';\nimport { ASSOCIATED_TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR = 1;\n\nexport function getCreateAssociatedTokenIdempotentDiscriminatorBytes() {\n return getU8Encoder().encode(\n CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR\n );\n}\n\nexport type CreateAssociatedTokenIdempotentInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta = string,\n TAccountAta extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta = '11111111111111111111111111111111',\n TAccountTokenProgram extends\n | string\n | AccountMeta = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount &\n AccountSignerMeta\n : TAccountPayer,\n TAccountAta extends string ? WritableAccount : TAccountAta,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount\n : TAccountSystemProgram,\n TAccountTokenProgram extends string\n ? ReadonlyAccount\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAssociatedTokenIdempotentInstructionData = {\n discriminator: number;\n};\n\nexport type CreateAssociatedTokenIdempotentInstructionDataArgs = {};\n\nexport function getCreateAssociatedTokenIdempotentInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({\n ...value,\n discriminator: CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateAssociatedTokenIdempotentInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getCreateAssociatedTokenIdempotentInstructionDataCodec(): FixedSizeCodec<\n CreateAssociatedTokenIdempotentInstructionDataArgs,\n CreateAssociatedTokenIdempotentInstructionData\n> {\n return combineCodec(\n getCreateAssociatedTokenIdempotentInstructionDataEncoder(),\n getCreateAssociatedTokenIdempotentInstructionDataDecoder()\n );\n}\n\nexport type CreateAssociatedTokenIdempotentAsyncInput<\n TAccountPayer extends string = string,\n TAccountAta extends string = string,\n TAccountOwner extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** Associated token account address to be created. */\n ata?: Address;\n /** Wallet address for the new associated token account. */\n owner: Address;\n /** The token mint for the new associated token account. */\n mint: Address;\n /** System program. */\n systemProgram?: Address;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport async function getCreateAssociatedTokenIdempotentInstructionAsync<\n TAccountPayer extends string,\n TAccountAta extends string,\n TAccountOwner extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: CreateAssociatedTokenIdempotentAsyncInput<\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateAssociatedTokenIdempotentInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n ata: { value: input.ata ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n if (!accounts.ata.value) {\n accounts.ata.value = await findAssociatedTokenPda({\n owner: expectAddress(accounts.owner.value),\n tokenProgram: expectAddress(accounts.tokenProgram.value),\n mint: expectAddress(accounts.mint.value),\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.ata),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateAssociatedTokenIdempotentInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >);\n}\n\nexport type CreateAssociatedTokenIdempotentInput<\n TAccountPayer extends string = string,\n TAccountAta extends string = string,\n TAccountOwner extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** Associated token account address to be created. */\n ata: Address;\n /** Wallet address for the new associated token account. */\n owner: Address;\n /** The token mint for the new associated token account. */\n mint: Address;\n /** System program. */\n systemProgram?: Address;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport function getCreateAssociatedTokenIdempotentInstruction<\n TAccountPayer extends string,\n TAccountAta extends string,\n TAccountOwner extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: CreateAssociatedTokenIdempotentInput<\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateAssociatedTokenIdempotentInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n ata: { value: input.ata ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.ata),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateAssociatedTokenIdempotentInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAta,\n TAccountOwner,\n TAccountMint,\n TAccountSystemProgram,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedCreateAssociatedTokenIdempotentInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** Funding account (must be a system account). */\n payer: TAccountMetas[0];\n /** Associated token account address to be created. */\n ata: TAccountMetas[1];\n /** Wallet address for the new associated token account. */\n owner: TAccountMetas[2];\n /** The token mint for the new associated token account. */\n mint: TAccountMetas[3];\n /** System program. */\n systemProgram: TAccountMetas[4];\n /** SPL Token program. */\n tokenProgram: TAccountMetas[5];\n };\n data: CreateAssociatedTokenIdempotentInstructionData;\n};\n\nexport function parseCreateAssociatedTokenIdempotentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedCreateAssociatedTokenIdempotentInstruction {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n ata: getNextAccount(),\n owner: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getCreateAssociatedTokenIdempotentInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const FREEZE_ACCOUNT_DISCRIMINATOR = 10;\n\nexport function getFreezeAccountDiscriminatorBytes() {\n return getU8Encoder().encode(FREEZE_ACCOUNT_DISCRIMINATOR);\n}\n\nexport type FreezeAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type FreezeAccountInstructionData = { discriminator: number };\n\nexport type FreezeAccountInstructionDataArgs = {};\n\nexport function getFreezeAccountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: FREEZE_ACCOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getFreezeAccountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getFreezeAccountInstructionDataCodec(): FixedSizeCodec<\n FreezeAccountInstructionDataArgs,\n FreezeAccountInstructionData\n> {\n return combineCodec(\n getFreezeAccountInstructionDataEncoder(),\n getFreezeAccountInstructionDataDecoder()\n );\n}\n\nexport type FreezeAccountInput<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The account to freeze. */\n account: Address;\n /** The token mint. */\n mint: Address;\n /** The mint freeze authority or its multisignature account. */\n owner: Address | TransactionSigner;\n multiSigners?: Array;\n};\n\nexport function getFreezeAccountInstruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: FreezeAccountInput,\n config?: { programAddress?: TProgramAddress }\n): FreezeAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getFreezeAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as FreezeAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedFreezeAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to freeze. */\n account: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The mint freeze authority or its multisignature account. */\n owner: TAccountMetas[2];\n };\n data: FreezeAccountInstructionData;\n};\n\nexport function parseFreezeAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedFreezeAccountInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getFreezeAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const GET_ACCOUNT_DATA_SIZE_DISCRIMINATOR = 21;\n\nexport function getGetAccountDataSizeDiscriminatorBytes() {\n return getU8Encoder().encode(GET_ACCOUNT_DATA_SIZE_DISCRIMINATOR);\n}\n\nexport type GetAccountDataSizeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type GetAccountDataSizeInstructionData = { discriminator: number };\n\nexport type GetAccountDataSizeInstructionDataArgs = {};\n\nexport function getGetAccountDataSizeInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({\n ...value,\n discriminator: GET_ACCOUNT_DATA_SIZE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getGetAccountDataSizeInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getGetAccountDataSizeInstructionDataCodec(): FixedSizeCodec<\n GetAccountDataSizeInstructionDataArgs,\n GetAccountDataSizeInstructionData\n> {\n return combineCodec(\n getGetAccountDataSizeInstructionDataEncoder(),\n getGetAccountDataSizeInstructionDataDecoder()\n );\n}\n\nexport type GetAccountDataSizeInput = {\n /** The mint to calculate for. */\n mint: Address;\n};\n\nexport function getGetAccountDataSizeInstruction<\n TAccountMint extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: GetAccountDataSizeInput,\n config?: { programAddress?: TProgramAddress }\n): GetAccountDataSizeInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.mint)],\n data: getGetAccountDataSizeInstructionDataEncoder().encode({}),\n programAddress,\n } as GetAccountDataSizeInstruction);\n}\n\nexport type ParsedGetAccountDataSizeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint to calculate for. */\n mint: TAccountMetas[0];\n };\n data: GetAccountDataSizeInstructionData;\n};\n\nexport function parseGetAccountDataSizeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedGetAccountDataSizeInstruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { mint: getNextAccount() },\n data: getGetAccountDataSizeInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_ACCOUNT_DISCRIMINATOR = 1;\n\nexport function getInitializeAccountDiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_ACCOUNT_DISCRIMINATOR);\n}\n\nexport type InitializeAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TAccountRent extends\n | string\n | AccountMeta = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n TAccountRent extends string\n ? ReadonlyAccount\n : TAccountRent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeAccountInstructionData = { discriminator: number };\n\nexport type InitializeAccountInstructionDataArgs = {};\n\nexport function getInitializeAccountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: INITIALIZE_ACCOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getInitializeAccountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getInitializeAccountInstructionDataCodec(): FixedSizeCodec<\n InitializeAccountInstructionDataArgs,\n InitializeAccountInstructionData\n> {\n return combineCodec(\n getInitializeAccountInstructionDataEncoder(),\n getInitializeAccountInstructionDataDecoder()\n );\n}\n\nexport type InitializeAccountInput<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountOwner extends string = string,\n TAccountRent extends string = string,\n> = {\n /** The account to initialize. */\n account: Address;\n /** The mint this account will be associated with. */\n mint: Address;\n /** The new account's owner/multisignature. */\n owner: Address;\n /** Rent sysvar. */\n rent?: Address;\n};\n\nexport function getInitializeAccountInstruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountOwner extends string,\n TAccountRent extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeAccountInput<\n TAccountAccount,\n TAccountMint,\n TAccountOwner,\n TAccountRent\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n TAccountOwner,\n TAccountRent\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: false },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.rent),\n ],\n data: getInitializeAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n TAccountOwner,\n TAccountRent\n >);\n}\n\nexport type ParsedInitializeAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to initialize. */\n account: TAccountMetas[0];\n /** The mint this account will be associated with. */\n mint: TAccountMetas[1];\n /** The new account's owner/multisignature. */\n owner: TAccountMetas[2];\n /** Rent sysvar. */\n rent: TAccountMetas[3];\n };\n data: InitializeAccountInstructionData;\n};\n\nexport function parseInitializeAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeAccountInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n owner: getNextAccount(),\n rent: getNextAccount(),\n },\n data: getInitializeAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_ACCOUNT2_DISCRIMINATOR = 16;\n\nexport function getInitializeAccount2DiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_ACCOUNT2_DISCRIMINATOR);\n}\n\nexport type InitializeAccount2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountRent extends\n | string\n | AccountMeta = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountRent extends string\n ? ReadonlyAccount\n : TAccountRent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeAccount2InstructionData = {\n discriminator: number;\n /** The new account's owner/multisignature. */\n owner: Address;\n};\n\nexport type InitializeAccount2InstructionDataArgs = {\n /** The new account's owner/multisignature. */\n owner: Address;\n};\n\nexport function getInitializeAccount2InstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['owner', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: INITIALIZE_ACCOUNT2_DISCRIMINATOR })\n );\n}\n\nexport function getInitializeAccount2InstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['owner', getAddressDecoder()],\n ]);\n}\n\nexport function getInitializeAccount2InstructionDataCodec(): FixedSizeCodec<\n InitializeAccount2InstructionDataArgs,\n InitializeAccount2InstructionData\n> {\n return combineCodec(\n getInitializeAccount2InstructionDataEncoder(),\n getInitializeAccount2InstructionDataDecoder()\n );\n}\n\nexport type InitializeAccount2Input<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountRent extends string = string,\n> = {\n /** The account to initialize. */\n account: Address;\n /** The mint this account will be associated with. */\n mint: Address;\n /** Rent sysvar. */\n rent?: Address;\n owner: InitializeAccount2InstructionDataArgs['owner'];\n};\n\nexport function getInitializeAccount2Instruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountRent extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeAccount2Input,\n config?: { programAddress?: TProgramAddress }\n): InitializeAccount2Instruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n TAccountRent\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.rent),\n ],\n data: getInitializeAccount2InstructionDataEncoder().encode(\n args as InitializeAccount2InstructionDataArgs\n ),\n programAddress,\n } as InitializeAccount2Instruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n TAccountRent\n >);\n}\n\nexport type ParsedInitializeAccount2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to initialize. */\n account: TAccountMetas[0];\n /** The mint this account will be associated with. */\n mint: TAccountMetas[1];\n /** Rent sysvar. */\n rent: TAccountMetas[2];\n };\n data: InitializeAccount2InstructionData;\n};\n\nexport function parseInitializeAccount2Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeAccount2Instruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n rent: getNextAccount(),\n },\n data: getInitializeAccount2InstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_ACCOUNT3_DISCRIMINATOR = 18;\n\nexport function getInitializeAccount3DiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_ACCOUNT3_DISCRIMINATOR);\n}\n\nexport type InitializeAccount3Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeAccount3InstructionData = {\n discriminator: number;\n /** The new account's owner/multisignature. */\n owner: Address;\n};\n\nexport type InitializeAccount3InstructionDataArgs = {\n /** The new account's owner/multisignature. */\n owner: Address;\n};\n\nexport function getInitializeAccount3InstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['owner', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: INITIALIZE_ACCOUNT3_DISCRIMINATOR })\n );\n}\n\nexport function getInitializeAccount3InstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['owner', getAddressDecoder()],\n ]);\n}\n\nexport function getInitializeAccount3InstructionDataCodec(): FixedSizeCodec<\n InitializeAccount3InstructionDataArgs,\n InitializeAccount3InstructionData\n> {\n return combineCodec(\n getInitializeAccount3InstructionDataEncoder(),\n getInitializeAccount3InstructionDataDecoder()\n );\n}\n\nexport type InitializeAccount3Input<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n> = {\n /** The account to initialize. */\n account: Address;\n /** The mint this account will be associated with. */\n mint: Address;\n owner: InitializeAccount3InstructionDataArgs['owner'];\n};\n\nexport function getInitializeAccount3Instruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeAccount3Input,\n config?: { programAddress?: TProgramAddress }\n): InitializeAccount3Instruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.account), getAccountMeta(accounts.mint)],\n data: getInitializeAccount3InstructionDataEncoder().encode(\n args as InitializeAccount3InstructionDataArgs\n ),\n programAddress,\n } as InitializeAccount3Instruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint\n >);\n}\n\nexport type ParsedInitializeAccount3Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to initialize. */\n account: TAccountMetas[0];\n /** The mint this account will be associated with. */\n mint: TAccountMetas[1];\n };\n data: InitializeAccount3InstructionData;\n};\n\nexport function parseInitializeAccount3Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeAccount3Instruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { account: getNextAccount(), mint: getNextAccount() },\n data: getInitializeAccount3InstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_IMMUTABLE_OWNER_DISCRIMINATOR = 22;\n\nexport function getInitializeImmutableOwnerDiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_IMMUTABLE_OWNER_DISCRIMINATOR);\n}\n\nexport type InitializeImmutableOwnerInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeImmutableOwnerInstructionData = { discriminator: number };\n\nexport type InitializeImmutableOwnerInstructionDataArgs = {};\n\nexport function getInitializeImmutableOwnerInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_IMMUTABLE_OWNER_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeImmutableOwnerInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getInitializeImmutableOwnerInstructionDataCodec(): FixedSizeCodec<\n InitializeImmutableOwnerInstructionDataArgs,\n InitializeImmutableOwnerInstructionData\n> {\n return combineCodec(\n getInitializeImmutableOwnerInstructionDataEncoder(),\n getInitializeImmutableOwnerInstructionDataDecoder()\n );\n}\n\nexport type InitializeImmutableOwnerInput<\n TAccountAccount extends string = string,\n> = {\n /** The account to initialize. */\n account: Address;\n};\n\nexport function getInitializeImmutableOwnerInstruction<\n TAccountAccount extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeImmutableOwnerInput,\n config?: { programAddress?: TProgramAddress }\n): InitializeImmutableOwnerInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.account)],\n data: getInitializeImmutableOwnerInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeImmutableOwnerInstruction);\n}\n\nexport type ParsedInitializeImmutableOwnerInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to initialize. */\n account: TAccountMetas[0];\n };\n data: InitializeImmutableOwnerInstructionData;\n};\n\nexport function parseInitializeImmutableOwnerInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeImmutableOwnerInstruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { account: getNextAccount() },\n data: getInitializeImmutableOwnerInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n none,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_MINT_DISCRIMINATOR = 0;\n\nexport function getInitializeMintDiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_MINT_DISCRIMINATOR);\n}\n\nexport type InitializeMintInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TAccountRent extends\n | string\n | AccountMeta = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n TAccountRent extends string\n ? ReadonlyAccount\n : TAccountRent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeMintInstructionData = {\n discriminator: number;\n /** Number of decimals in token account amounts. */\n decimals: number;\n /** Minting authority. */\n mintAuthority: Address;\n /** Optional authority that can freeze token accounts. */\n freezeAuthority: Option
;\n};\n\nexport type InitializeMintInstructionDataArgs = {\n /** Number of decimals in token account amounts. */\n decimals: number;\n /** Minting authority. */\n mintAuthority: Address;\n /** Optional authority that can freeze token accounts. */\n freezeAuthority?: OptionOrNullable
;\n};\n\nexport function getInitializeMintInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['decimals', getU8Encoder()],\n ['mintAuthority', getAddressEncoder()],\n ['freezeAuthority', getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_MINT_DISCRIMINATOR,\n freezeAuthority: value.freezeAuthority ?? none(),\n })\n );\n}\n\nexport function getInitializeMintInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['decimals', getU8Decoder()],\n ['mintAuthority', getAddressDecoder()],\n ['freezeAuthority', getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getInitializeMintInstructionDataCodec(): Codec<\n InitializeMintInstructionDataArgs,\n InitializeMintInstructionData\n> {\n return combineCodec(\n getInitializeMintInstructionDataEncoder(),\n getInitializeMintInstructionDataDecoder()\n );\n}\n\nexport type InitializeMintInput<\n TAccountMint extends string = string,\n TAccountRent extends string = string,\n> = {\n /** Token mint account. */\n mint: Address;\n /** Rent sysvar. */\n rent?: Address;\n decimals: InitializeMintInstructionDataArgs['decimals'];\n mintAuthority: InitializeMintInstructionDataArgs['mintAuthority'];\n freezeAuthority?: InitializeMintInstructionDataArgs['freezeAuthority'];\n};\n\nexport function getInitializeMintInstruction<\n TAccountMint extends string,\n TAccountRent extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeMintInput,\n config?: { programAddress?: TProgramAddress }\n): InitializeMintInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: true },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.mint), getAccountMeta(accounts.rent)],\n data: getInitializeMintInstructionDataEncoder().encode(\n args as InitializeMintInstructionDataArgs\n ),\n programAddress,\n } as InitializeMintInstruction);\n}\n\nexport type ParsedInitializeMintInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** Token mint account. */\n mint: TAccountMetas[0];\n /** Rent sysvar. */\n rent: TAccountMetas[1];\n };\n data: InitializeMintInstructionData;\n};\n\nexport function parseInitializeMintInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeMintInstruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { mint: getNextAccount(), rent: getNextAccount() },\n data: getInitializeMintInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n none,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_MINT2_DISCRIMINATOR = 20;\n\nexport function getInitializeMint2DiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_MINT2_DISCRIMINATOR);\n}\n\nexport type InitializeMint2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeMint2InstructionData = {\n discriminator: number;\n /** Number of base 10 digits to the right of the decimal place. */\n decimals: number;\n /** The authority/multisignature to mint tokens. */\n mintAuthority: Address;\n /** The optional freeze authority/multisignature of the mint. */\n freezeAuthority: Option
;\n};\n\nexport type InitializeMint2InstructionDataArgs = {\n /** Number of base 10 digits to the right of the decimal place. */\n decimals: number;\n /** The authority/multisignature to mint tokens. */\n mintAuthority: Address;\n /** The optional freeze authority/multisignature of the mint. */\n freezeAuthority?: OptionOrNullable
;\n};\n\nexport function getInitializeMint2InstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['decimals', getU8Encoder()],\n ['mintAuthority', getAddressEncoder()],\n ['freezeAuthority', getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_MINT2_DISCRIMINATOR,\n freezeAuthority: value.freezeAuthority ?? none(),\n })\n );\n}\n\nexport function getInitializeMint2InstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['decimals', getU8Decoder()],\n ['mintAuthority', getAddressDecoder()],\n ['freezeAuthority', getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getInitializeMint2InstructionDataCodec(): Codec<\n InitializeMint2InstructionDataArgs,\n InitializeMint2InstructionData\n> {\n return combineCodec(\n getInitializeMint2InstructionDataEncoder(),\n getInitializeMint2InstructionDataDecoder()\n );\n}\n\nexport type InitializeMint2Input = {\n /** The mint to initialize. */\n mint: Address;\n decimals: InitializeMint2InstructionDataArgs['decimals'];\n mintAuthority: InitializeMint2InstructionDataArgs['mintAuthority'];\n freezeAuthority?: InitializeMint2InstructionDataArgs['freezeAuthority'];\n};\n\nexport function getInitializeMint2Instruction<\n TAccountMint extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeMint2Input,\n config?: { programAddress?: TProgramAddress }\n): InitializeMint2Instruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.mint)],\n data: getInitializeMint2InstructionDataEncoder().encode(\n args as InitializeMint2InstructionDataArgs\n ),\n programAddress,\n } as InitializeMint2Instruction);\n}\n\nexport type ParsedInitializeMint2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint to initialize. */\n mint: TAccountMetas[0];\n };\n data: InitializeMint2InstructionData;\n};\n\nexport function parseInitializeMint2Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeMint2Instruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { mint: getNextAccount() },\n data: getInitializeMint2InstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_MULTISIG_DISCRIMINATOR = 2;\n\nexport function getInitializeMultisigDiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_MULTISIG_DISCRIMINATOR);\n}\n\nexport type InitializeMultisigInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMultisig extends string | AccountMeta = string,\n TAccountRent extends\n | string\n | AccountMeta = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMultisig extends string\n ? WritableAccount\n : TAccountMultisig,\n TAccountRent extends string\n ? ReadonlyAccount\n : TAccountRent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeMultisigInstructionData = {\n discriminator: number;\n /** The number of signers (M) required to validate this multisignature account. */\n m: number;\n};\n\nexport type InitializeMultisigInstructionDataArgs = {\n /** The number of signers (M) required to validate this multisignature account. */\n m: number;\n};\n\nexport function getInitializeMultisigInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['m', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: INITIALIZE_MULTISIG_DISCRIMINATOR })\n );\n}\n\nexport function getInitializeMultisigInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['m', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeMultisigInstructionDataCodec(): FixedSizeCodec<\n InitializeMultisigInstructionDataArgs,\n InitializeMultisigInstructionData\n> {\n return combineCodec(\n getInitializeMultisigInstructionDataEncoder(),\n getInitializeMultisigInstructionDataDecoder()\n );\n}\n\nexport type InitializeMultisigInput<\n TAccountMultisig extends string = string,\n TAccountRent extends string = string,\n> = {\n /** The multisignature account to initialize. */\n multisig: Address;\n /** Rent sysvar. */\n rent?: Address;\n m: InitializeMultisigInstructionDataArgs['m'];\n signers: Array
;\n};\n\nexport function getInitializeMultisigInstruction<\n TAccountMultisig extends string,\n TAccountRent extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeMultisigInput,\n config?: { programAddress?: TProgramAddress }\n): InitializeMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountRent\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n multisig: { value: input.multisig ?? null, isWritable: true },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = args.signers.map((address) => ({\n address,\n role: AccountRole.READONLY,\n }));\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.multisig),\n getAccountMeta(accounts.rent),\n ...remainingAccounts,\n ],\n data: getInitializeMultisigInstructionDataEncoder().encode(\n args as InitializeMultisigInstructionDataArgs\n ),\n programAddress,\n } as InitializeMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountRent\n >);\n}\n\nexport type ParsedInitializeMultisigInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The multisignature account to initialize. */\n multisig: TAccountMetas[0];\n /** Rent sysvar. */\n rent: TAccountMetas[1];\n };\n data: InitializeMultisigInstructionData;\n};\n\nexport function parseInitializeMultisigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeMultisigInstruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { multisig: getNextAccount(), rent: getNextAccount() },\n data: getInitializeMultisigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const INITIALIZE_MULTISIG2_DISCRIMINATOR = 19;\n\nexport function getInitializeMultisig2DiscriminatorBytes() {\n return getU8Encoder().encode(INITIALIZE_MULTISIG2_DISCRIMINATOR);\n}\n\nexport type InitializeMultisig2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMultisig extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMultisig extends string\n ? WritableAccount\n : TAccountMultisig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeMultisig2InstructionData = {\n discriminator: number;\n /** The number of signers (M) required to validate this multisignature account. */\n m: number;\n};\n\nexport type InitializeMultisig2InstructionDataArgs = {\n /** The number of signers (M) required to validate this multisignature account. */\n m: number;\n};\n\nexport function getInitializeMultisig2InstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['m', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: INITIALIZE_MULTISIG2_DISCRIMINATOR })\n );\n}\n\nexport function getInitializeMultisig2InstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['m', getU8Decoder()],\n ]);\n}\n\nexport function getInitializeMultisig2InstructionDataCodec(): FixedSizeCodec<\n InitializeMultisig2InstructionDataArgs,\n InitializeMultisig2InstructionData\n> {\n return combineCodec(\n getInitializeMultisig2InstructionDataEncoder(),\n getInitializeMultisig2InstructionDataDecoder()\n );\n}\n\nexport type InitializeMultisig2Input =\n {\n /** The multisignature account to initialize. */\n multisig: Address;\n m: InitializeMultisig2InstructionDataArgs['m'];\n signers: Array
;\n };\n\nexport function getInitializeMultisig2Instruction<\n TAccountMultisig extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: InitializeMultisig2Input,\n config?: { programAddress?: TProgramAddress }\n): InitializeMultisig2Instruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n multisig: { value: input.multisig ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = args.signers.map((address) => ({\n address,\n role: AccountRole.READONLY,\n }));\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.multisig), ...remainingAccounts],\n data: getInitializeMultisig2InstructionDataEncoder().encode(\n args as InitializeMultisig2InstructionDataArgs\n ),\n programAddress,\n } as InitializeMultisig2Instruction);\n}\n\nexport type ParsedInitializeMultisig2Instruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The multisignature account to initialize. */\n multisig: TAccountMetas[0];\n };\n data: InitializeMultisig2InstructionData;\n};\n\nexport function parseInitializeMultisig2Instruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedInitializeMultisig2Instruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { multisig: getNextAccount() },\n data: getInitializeMultisig2InstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const MINT_TO_DISCRIMINATOR = 7;\n\nexport function getMintToDiscriminatorBytes() {\n return getU8Encoder().encode(MINT_TO_DISCRIMINATOR);\n}\n\nexport type MintToInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TAccountToken extends string | AccountMeta = string,\n TAccountMintAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n TAccountToken extends string\n ? WritableAccount\n : TAccountToken,\n TAccountMintAuthority extends string\n ? ReadonlyAccount\n : TAccountMintAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MintToInstructionData = {\n discriminator: number;\n /** The amount of new tokens to mint. */\n amount: bigint;\n};\n\nexport type MintToInstructionDataArgs = {\n /** The amount of new tokens to mint. */\n amount: number | bigint;\n};\n\nexport function getMintToInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: MINT_TO_DISCRIMINATOR })\n );\n}\n\nexport function getMintToInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getMintToInstructionDataCodec(): FixedSizeCodec<\n MintToInstructionDataArgs,\n MintToInstructionData\n> {\n return combineCodec(\n getMintToInstructionDataEncoder(),\n getMintToInstructionDataDecoder()\n );\n}\n\nexport type MintToInput<\n TAccountMint extends string = string,\n TAccountToken extends string = string,\n TAccountMintAuthority extends string = string,\n> = {\n /** The mint account. */\n mint: Address;\n /** The account to mint tokens to. */\n token: Address;\n /** The mint's minting authority or its multisignature account. */\n mintAuthority:\n | Address\n | TransactionSigner;\n amount: MintToInstructionDataArgs['amount'];\n multiSigners?: Array;\n};\n\nexport function getMintToInstruction<\n TAccountMint extends string,\n TAccountToken extends string,\n TAccountMintAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: MintToInput,\n config?: { programAddress?: TProgramAddress }\n): MintToInstruction<\n TProgramAddress,\n TAccountMint,\n TAccountToken,\n (typeof input)['mintAuthority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountMintAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: true },\n token: { value: input.token ?? null, isWritable: true },\n mintAuthority: { value: input.mintAuthority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.token),\n getAccountMeta(accounts.mintAuthority),\n ...remainingAccounts,\n ],\n data: getMintToInstructionDataEncoder().encode(\n args as MintToInstructionDataArgs\n ),\n programAddress,\n } as MintToInstruction<\n TProgramAddress,\n TAccountMint,\n TAccountToken,\n (typeof input)['mintAuthority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountMintAuthority\n >);\n}\n\nexport type ParsedMintToInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint account. */\n mint: TAccountMetas[0];\n /** The account to mint tokens to. */\n token: TAccountMetas[1];\n /** The mint's minting authority or its multisignature account. */\n mintAuthority: TAccountMetas[2];\n };\n data: MintToInstructionData;\n};\n\nexport function parseMintToInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedMintToInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n mint: getNextAccount(),\n token: getNextAccount(),\n mintAuthority: getNextAccount(),\n },\n data: getMintToInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const MINT_TO_CHECKED_DISCRIMINATOR = 14;\n\nexport function getMintToCheckedDiscriminatorBytes() {\n return getU8Encoder().encode(MINT_TO_CHECKED_DISCRIMINATOR);\n}\n\nexport type MintToCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TAccountToken extends string | AccountMeta = string,\n TAccountMintAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? WritableAccount\n : TAccountMint,\n TAccountToken extends string\n ? WritableAccount\n : TAccountToken,\n TAccountMintAuthority extends string\n ? ReadonlyAccount\n : TAccountMintAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MintToCheckedInstructionData = {\n discriminator: number;\n /** The amount of new tokens to mint. */\n amount: bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport type MintToCheckedInstructionDataArgs = {\n /** The amount of new tokens to mint. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport function getMintToCheckedInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ['decimals', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: MINT_TO_CHECKED_DISCRIMINATOR })\n );\n}\n\nexport function getMintToCheckedInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ['decimals', getU8Decoder()],\n ]);\n}\n\nexport function getMintToCheckedInstructionDataCodec(): FixedSizeCodec<\n MintToCheckedInstructionDataArgs,\n MintToCheckedInstructionData\n> {\n return combineCodec(\n getMintToCheckedInstructionDataEncoder(),\n getMintToCheckedInstructionDataDecoder()\n );\n}\n\nexport type MintToCheckedInput<\n TAccountMint extends string = string,\n TAccountToken extends string = string,\n TAccountMintAuthority extends string = string,\n> = {\n /** The mint. */\n mint: Address;\n /** The account to mint tokens to. */\n token: Address;\n /** The mint's minting authority or its multisignature account. */\n mintAuthority:\n | Address\n | TransactionSigner;\n amount: MintToCheckedInstructionDataArgs['amount'];\n decimals: MintToCheckedInstructionDataArgs['decimals'];\n multiSigners?: Array;\n};\n\nexport function getMintToCheckedInstruction<\n TAccountMint extends string,\n TAccountToken extends string,\n TAccountMintAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: MintToCheckedInput,\n config?: { programAddress?: TProgramAddress }\n): MintToCheckedInstruction<\n TProgramAddress,\n TAccountMint,\n TAccountToken,\n (typeof input)['mintAuthority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountMintAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: true },\n token: { value: input.token ?? null, isWritable: true },\n mintAuthority: { value: input.mintAuthority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.token),\n getAccountMeta(accounts.mintAuthority),\n ...remainingAccounts,\n ],\n data: getMintToCheckedInstructionDataEncoder().encode(\n args as MintToCheckedInstructionDataArgs\n ),\n programAddress,\n } as MintToCheckedInstruction<\n TProgramAddress,\n TAccountMint,\n TAccountToken,\n (typeof input)['mintAuthority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountMintAuthority\n >);\n}\n\nexport type ParsedMintToCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint. */\n mint: TAccountMetas[0];\n /** The account to mint tokens to. */\n token: TAccountMetas[1];\n /** The mint's minting authority or its multisignature account. */\n mintAuthority: TAccountMetas[2];\n };\n data: MintToCheckedInstructionData;\n};\n\nexport function parseMintToCheckedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedMintToCheckedInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n mint: getNextAccount(),\n token: getNextAccount(),\n mintAuthority: getNextAccount(),\n },\n data: getMintToCheckedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { findAssociatedTokenPda } from '../pdas';\nimport { ASSOCIATED_TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const RECOVER_NESTED_ASSOCIATED_TOKEN_DISCRIMINATOR = 2;\n\nexport function getRecoverNestedAssociatedTokenDiscriminatorBytes() {\n return getU8Encoder().encode(RECOVER_NESTED_ASSOCIATED_TOKEN_DISCRIMINATOR);\n}\n\nexport type RecoverNestedAssociatedTokenInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountNestedAssociatedAccountAddress extends\n | string\n | AccountMeta = string,\n TAccountNestedTokenMintAddress extends string | AccountMeta = string,\n TAccountDestinationAssociatedAccountAddress extends\n | string\n | AccountMeta = string,\n TAccountOwnerAssociatedAccountAddress extends\n | string\n | AccountMeta = string,\n TAccountOwnerTokenMintAddress extends string | AccountMeta = string,\n TAccountWalletAddress extends string | AccountMeta = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountNestedAssociatedAccountAddress extends string\n ? WritableAccount\n : TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress extends string\n ? ReadonlyAccount\n : TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress extends string\n ? WritableAccount\n : TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress extends string\n ? ReadonlyAccount\n : TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress extends string\n ? ReadonlyAccount\n : TAccountOwnerTokenMintAddress,\n TAccountWalletAddress extends string\n ? WritableSignerAccount &\n AccountSignerMeta\n : TAccountWalletAddress,\n TAccountTokenProgram extends string\n ? ReadonlyAccount\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RecoverNestedAssociatedTokenInstructionData = {\n discriminator: number;\n};\n\nexport type RecoverNestedAssociatedTokenInstructionDataArgs = {};\n\nexport function getRecoverNestedAssociatedTokenInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({\n ...value,\n discriminator: RECOVER_NESTED_ASSOCIATED_TOKEN_DISCRIMINATOR,\n })\n );\n}\n\nexport function getRecoverNestedAssociatedTokenInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getRecoverNestedAssociatedTokenInstructionDataCodec(): FixedSizeCodec<\n RecoverNestedAssociatedTokenInstructionDataArgs,\n RecoverNestedAssociatedTokenInstructionData\n> {\n return combineCodec(\n getRecoverNestedAssociatedTokenInstructionDataEncoder(),\n getRecoverNestedAssociatedTokenInstructionDataDecoder()\n );\n}\n\nexport type RecoverNestedAssociatedTokenAsyncInput<\n TAccountNestedAssociatedAccountAddress extends string = string,\n TAccountNestedTokenMintAddress extends string = string,\n TAccountDestinationAssociatedAccountAddress extends string = string,\n TAccountOwnerAssociatedAccountAddress extends string = string,\n TAccountOwnerTokenMintAddress extends string = string,\n TAccountWalletAddress extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Nested associated token account, must be owned by `ownerAssociatedAccountAddress`. */\n nestedAssociatedAccountAddress?: Address;\n /** Token mint for the nested associated token account. */\n nestedTokenMintAddress: Address;\n /** Wallet's associated token account. */\n destinationAssociatedAccountAddress?: Address;\n /** Owner associated token account address, must be owned by `walletAddress`. */\n ownerAssociatedAccountAddress?: Address;\n /** Token mint for the owner associated token account. */\n ownerTokenMintAddress: Address;\n /** Wallet address for the owner associated token account. */\n walletAddress: TransactionSigner;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport async function getRecoverNestedAssociatedTokenInstructionAsync<\n TAccountNestedAssociatedAccountAddress extends string,\n TAccountNestedTokenMintAddress extends string,\n TAccountDestinationAssociatedAccountAddress extends string,\n TAccountOwnerAssociatedAccountAddress extends string,\n TAccountOwnerTokenMintAddress extends string,\n TAccountWalletAddress extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: RecoverNestedAssociatedTokenAsyncInput<\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n RecoverNestedAssociatedTokenInstruction<\n TProgramAddress,\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nestedAssociatedAccountAddress: {\n value: input.nestedAssociatedAccountAddress ?? null,\n isWritable: true,\n },\n nestedTokenMintAddress: {\n value: input.nestedTokenMintAddress ?? null,\n isWritable: false,\n },\n destinationAssociatedAccountAddress: {\n value: input.destinationAssociatedAccountAddress ?? null,\n isWritable: true,\n },\n ownerAssociatedAccountAddress: {\n value: input.ownerAssociatedAccountAddress ?? null,\n isWritable: false,\n },\n ownerTokenMintAddress: {\n value: input.ownerTokenMintAddress ?? null,\n isWritable: false,\n },\n walletAddress: { value: input.walletAddress ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n if (!accounts.ownerAssociatedAccountAddress.value) {\n accounts.ownerAssociatedAccountAddress.value = await findAssociatedTokenPda(\n {\n owner: expectAddress(accounts.walletAddress.value),\n tokenProgram: expectAddress(accounts.tokenProgram.value),\n mint: expectAddress(accounts.ownerTokenMintAddress.value),\n }\n );\n }\n if (!accounts.nestedAssociatedAccountAddress.value) {\n accounts.nestedAssociatedAccountAddress.value =\n await findAssociatedTokenPda({\n owner: expectAddress(accounts.ownerAssociatedAccountAddress.value),\n tokenProgram: expectAddress(accounts.tokenProgram.value),\n mint: expectAddress(accounts.nestedTokenMintAddress.value),\n });\n }\n if (!accounts.destinationAssociatedAccountAddress.value) {\n accounts.destinationAssociatedAccountAddress.value =\n await findAssociatedTokenPda({\n owner: expectAddress(accounts.walletAddress.value),\n tokenProgram: expectAddress(accounts.tokenProgram.value),\n mint: expectAddress(accounts.nestedTokenMintAddress.value),\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.nestedAssociatedAccountAddress),\n getAccountMeta(accounts.nestedTokenMintAddress),\n getAccountMeta(accounts.destinationAssociatedAccountAddress),\n getAccountMeta(accounts.ownerAssociatedAccountAddress),\n getAccountMeta(accounts.ownerTokenMintAddress),\n getAccountMeta(accounts.walletAddress),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getRecoverNestedAssociatedTokenInstructionDataEncoder().encode({}),\n programAddress,\n } as RecoverNestedAssociatedTokenInstruction<\n TProgramAddress,\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n >);\n}\n\nexport type RecoverNestedAssociatedTokenInput<\n TAccountNestedAssociatedAccountAddress extends string = string,\n TAccountNestedTokenMintAddress extends string = string,\n TAccountDestinationAssociatedAccountAddress extends string = string,\n TAccountOwnerAssociatedAccountAddress extends string = string,\n TAccountOwnerTokenMintAddress extends string = string,\n TAccountWalletAddress extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n /** Nested associated token account, must be owned by `ownerAssociatedAccountAddress`. */\n nestedAssociatedAccountAddress: Address;\n /** Token mint for the nested associated token account. */\n nestedTokenMintAddress: Address;\n /** Wallet's associated token account. */\n destinationAssociatedAccountAddress: Address;\n /** Owner associated token account address, must be owned by `walletAddress`. */\n ownerAssociatedAccountAddress: Address;\n /** Token mint for the owner associated token account. */\n ownerTokenMintAddress: Address;\n /** Wallet address for the owner associated token account. */\n walletAddress: TransactionSigner;\n /** SPL Token program. */\n tokenProgram?: Address;\n};\n\nexport function getRecoverNestedAssociatedTokenInstruction<\n TAccountNestedAssociatedAccountAddress extends string,\n TAccountNestedTokenMintAddress extends string,\n TAccountDestinationAssociatedAccountAddress extends string,\n TAccountOwnerAssociatedAccountAddress extends string,\n TAccountOwnerTokenMintAddress extends string,\n TAccountWalletAddress extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n>(\n input: RecoverNestedAssociatedTokenInput<\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): RecoverNestedAssociatedTokenInstruction<\n TProgramAddress,\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n nestedAssociatedAccountAddress: {\n value: input.nestedAssociatedAccountAddress ?? null,\n isWritable: true,\n },\n nestedTokenMintAddress: {\n value: input.nestedTokenMintAddress ?? null,\n isWritable: false,\n },\n destinationAssociatedAccountAddress: {\n value: input.destinationAssociatedAccountAddress ?? null,\n isWritable: true,\n },\n ownerAssociatedAccountAddress: {\n value: input.ownerAssociatedAccountAddress ?? null,\n isWritable: false,\n },\n ownerTokenMintAddress: {\n value: input.ownerTokenMintAddress ?? null,\n isWritable: false,\n },\n walletAddress: { value: input.walletAddress ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.nestedAssociatedAccountAddress),\n getAccountMeta(accounts.nestedTokenMintAddress),\n getAccountMeta(accounts.destinationAssociatedAccountAddress),\n getAccountMeta(accounts.ownerAssociatedAccountAddress),\n getAccountMeta(accounts.ownerTokenMintAddress),\n getAccountMeta(accounts.walletAddress),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getRecoverNestedAssociatedTokenInstructionDataEncoder().encode({}),\n programAddress,\n } as RecoverNestedAssociatedTokenInstruction<\n TProgramAddress,\n TAccountNestedAssociatedAccountAddress,\n TAccountNestedTokenMintAddress,\n TAccountDestinationAssociatedAccountAddress,\n TAccountOwnerAssociatedAccountAddress,\n TAccountOwnerTokenMintAddress,\n TAccountWalletAddress,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedRecoverNestedAssociatedTokenInstruction<\n TProgram extends string = typeof ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** Nested associated token account, must be owned by `ownerAssociatedAccountAddress`. */\n nestedAssociatedAccountAddress: TAccountMetas[0];\n /** Token mint for the nested associated token account. */\n nestedTokenMintAddress: TAccountMetas[1];\n /** Wallet's associated token account. */\n destinationAssociatedAccountAddress: TAccountMetas[2];\n /** Owner associated token account address, must be owned by `walletAddress`. */\n ownerAssociatedAccountAddress: TAccountMetas[3];\n /** Token mint for the owner associated token account. */\n ownerTokenMintAddress: TAccountMetas[4];\n /** Wallet address for the owner associated token account. */\n walletAddress: TAccountMetas[5];\n /** SPL Token program. */\n tokenProgram: TAccountMetas[6];\n };\n data: RecoverNestedAssociatedTokenInstructionData;\n};\n\nexport function parseRecoverNestedAssociatedTokenInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedRecoverNestedAssociatedTokenInstruction {\n if (instruction.accounts.length < 7) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n nestedAssociatedAccountAddress: getNextAccount(),\n nestedTokenMintAddress: getNextAccount(),\n destinationAssociatedAccountAddress: getNextAccount(),\n ownerAssociatedAccountAddress: getNextAccount(),\n ownerTokenMintAddress: getNextAccount(),\n walletAddress: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getRecoverNestedAssociatedTokenInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const REVOKE_DISCRIMINATOR = 5;\n\nexport function getRevokeDiscriminatorBytes() {\n return getU8Encoder().encode(REVOKE_DISCRIMINATOR);\n}\n\nexport type RevokeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountSource extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount\n : TAccountSource,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RevokeInstructionData = { discriminator: number };\n\nexport type RevokeInstructionDataArgs = {};\n\nexport function getRevokeInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: REVOKE_DISCRIMINATOR })\n );\n}\n\nexport function getRevokeInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getRevokeInstructionDataCodec(): FixedSizeCodec<\n RevokeInstructionDataArgs,\n RevokeInstructionData\n> {\n return combineCodec(\n getRevokeInstructionDataEncoder(),\n getRevokeInstructionDataDecoder()\n );\n}\n\nexport type RevokeInput<\n TAccountSource extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The source account. */\n source: Address;\n /** The source account owner or its multisignature. */\n owner: Address | TransactionSigner;\n multiSigners?: Array;\n};\n\nexport function getRevokeInstruction<\n TAccountSource extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: RevokeInput,\n config?: { programAddress?: TProgramAddress }\n): RevokeInstruction<\n TProgramAddress,\n TAccountSource,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getRevokeInstructionDataEncoder().encode({}),\n programAddress,\n } as RevokeInstruction<\n TProgramAddress,\n TAccountSource,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedRevokeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The source account. */\n source: TAccountMetas[0];\n /** The source account owner or its multisignature. */\n owner: TAccountMetas[1];\n };\n data: RevokeInstructionData;\n};\n\nexport function parseRevokeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedRevokeInstruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { source: getNextAccount(), owner: getNextAccount() },\n data: getRevokeInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getAuthorityTypeDecoder,\n getAuthorityTypeEncoder,\n type AuthorityType,\n type AuthorityTypeArgs,\n} from '../types';\n\nexport const SET_AUTHORITY_DISCRIMINATOR = 6;\n\nexport function getSetAuthorityDiscriminatorBytes() {\n return getU8Encoder().encode(SET_AUTHORITY_DISCRIMINATOR);\n}\n\nexport type SetAuthorityInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountOwned extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountOwned extends string\n ? WritableAccount\n : TAccountOwned,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SetAuthorityInstructionData = {\n discriminator: number;\n /** The type of authority to update. */\n authorityType: AuthorityType;\n /** The new authority */\n newAuthority: Option
;\n};\n\nexport type SetAuthorityInstructionDataArgs = {\n /** The type of authority to update. */\n authorityType: AuthorityTypeArgs;\n /** The new authority */\n newAuthority: OptionOrNullable
;\n};\n\nexport function getSetAuthorityInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['authorityType', getAuthorityTypeEncoder()],\n ['newAuthority', getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({ ...value, discriminator: SET_AUTHORITY_DISCRIMINATOR })\n );\n}\n\nexport function getSetAuthorityInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['authorityType', getAuthorityTypeDecoder()],\n ['newAuthority', getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getSetAuthorityInstructionDataCodec(): Codec<\n SetAuthorityInstructionDataArgs,\n SetAuthorityInstructionData\n> {\n return combineCodec(\n getSetAuthorityInstructionDataEncoder(),\n getSetAuthorityInstructionDataDecoder()\n );\n}\n\nexport type SetAuthorityInput<\n TAccountOwned extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The mint or account to change the authority of. */\n owned: Address;\n /** The current authority or the multisignature account of the mint or account to update. */\n owner: Address | TransactionSigner;\n authorityType: SetAuthorityInstructionDataArgs['authorityType'];\n newAuthority: SetAuthorityInstructionDataArgs['newAuthority'];\n multiSigners?: Array;\n};\n\nexport function getSetAuthorityInstruction<\n TAccountOwned extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: SetAuthorityInput,\n config?: { programAddress?: TProgramAddress }\n): SetAuthorityInstruction<\n TProgramAddress,\n TAccountOwned,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n owned: { value: input.owned ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.owned),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getSetAuthorityInstructionDataEncoder().encode(\n args as SetAuthorityInstructionDataArgs\n ),\n programAddress,\n } as SetAuthorityInstruction<\n TProgramAddress,\n TAccountOwned,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedSetAuthorityInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint or account to change the authority of. */\n owned: TAccountMetas[0];\n /** The current authority or the multisignature account of the mint or account to update. */\n owner: TAccountMetas[1];\n };\n data: SetAuthorityInstructionData;\n};\n\nexport function parseSetAuthorityInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedSetAuthorityInstruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { owned: getNextAccount(), owner: getNextAccount() },\n data: getSetAuthorityInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const SYNC_NATIVE_DISCRIMINATOR = 17;\n\nexport function getSyncNativeDiscriminatorBytes() {\n return getU8Encoder().encode(SYNC_NATIVE_DISCRIMINATOR);\n}\n\nexport type SyncNativeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SyncNativeInstructionData = { discriminator: number };\n\nexport type SyncNativeInstructionDataArgs = {};\n\nexport function getSyncNativeInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: SYNC_NATIVE_DISCRIMINATOR })\n );\n}\n\nexport function getSyncNativeInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getSyncNativeInstructionDataCodec(): FixedSizeCodec<\n SyncNativeInstructionDataArgs,\n SyncNativeInstructionData\n> {\n return combineCodec(\n getSyncNativeInstructionDataEncoder(),\n getSyncNativeInstructionDataDecoder()\n );\n}\n\nexport type SyncNativeInput = {\n /** The native token account to sync with its underlying lamports. */\n account: Address;\n};\n\nexport function getSyncNativeInstruction<\n TAccountAccount extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: SyncNativeInput,\n config?: { programAddress?: TProgramAddress }\n): SyncNativeInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.account)],\n data: getSyncNativeInstructionDataEncoder().encode({}),\n programAddress,\n } as SyncNativeInstruction);\n}\n\nexport type ParsedSyncNativeInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The native token account to sync with its underlying lamports. */\n account: TAccountMetas[0];\n };\n data: SyncNativeInstructionData;\n};\n\nexport function parseSyncNativeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedSyncNativeInstruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { account: getNextAccount() },\n data: getSyncNativeInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const THAW_ACCOUNT_DISCRIMINATOR = 11;\n\nexport function getThawAccountDiscriminatorBytes() {\n return getU8Encoder().encode(THAW_ACCOUNT_DISCRIMINATOR);\n}\n\nexport type ThawAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountAccount extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountOwner extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountAccount extends string\n ? WritableAccount\n : TAccountAccount,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountOwner extends string\n ? ReadonlyAccount\n : TAccountOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ThawAccountInstructionData = { discriminator: number };\n\nexport type ThawAccountInstructionDataArgs = {};\n\nexport function getThawAccountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([['discriminator', getU8Encoder()]]),\n (value) => ({ ...value, discriminator: THAW_ACCOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getThawAccountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([['discriminator', getU8Decoder()]]);\n}\n\nexport function getThawAccountInstructionDataCodec(): FixedSizeCodec<\n ThawAccountInstructionDataArgs,\n ThawAccountInstructionData\n> {\n return combineCodec(\n getThawAccountInstructionDataEncoder(),\n getThawAccountInstructionDataDecoder()\n );\n}\n\nexport type ThawAccountInput<\n TAccountAccount extends string = string,\n TAccountMint extends string = string,\n TAccountOwner extends string = string,\n> = {\n /** The account to thaw. */\n account: Address;\n /** The token mint. */\n mint: Address;\n /** The mint freeze authority or its multisignature account. */\n owner: Address | TransactionSigner;\n multiSigners?: Array;\n};\n\nexport function getThawAccountInstruction<\n TAccountAccount extends string,\n TAccountMint extends string,\n TAccountOwner extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: ThawAccountInput,\n config?: { programAddress?: TProgramAddress }\n): ThawAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n account: { value: input.account ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.account),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.owner),\n ...remainingAccounts,\n ],\n data: getThawAccountInstructionDataEncoder().encode({}),\n programAddress,\n } as ThawAccountInstruction<\n TProgramAddress,\n TAccountAccount,\n TAccountMint,\n (typeof input)['owner'] extends TransactionSigner\n ? ReadonlySignerAccount & AccountSignerMeta\n : TAccountOwner\n >);\n}\n\nexport type ParsedThawAccountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The account to thaw. */\n account: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The mint freeze authority or its multisignature account. */\n owner: TAccountMetas[2];\n };\n data: ThawAccountInstructionData;\n};\n\nexport function parseThawAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedThawAccountInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n account: getNextAccount(),\n mint: getNextAccount(),\n owner: getNextAccount(),\n },\n data: getThawAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const TRANSFER_DISCRIMINATOR = 3;\n\nexport function getTransferDiscriminatorBytes() {\n return getU8Encoder().encode(TRANSFER_DISCRIMINATOR);\n}\n\nexport type TransferInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountSource extends string | AccountMeta = string,\n TAccountDestination extends string | AccountMeta = string,\n TAccountAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount\n : TAccountDestination,\n TAccountAuthority extends string\n ? ReadonlyAccount\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransferInstructionData = {\n discriminator: number;\n /** The amount of tokens to transfer. */\n amount: bigint;\n};\n\nexport type TransferInstructionDataArgs = {\n /** The amount of tokens to transfer. */\n amount: number | bigint;\n};\n\nexport function getTransferInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: TRANSFER_DISCRIMINATOR })\n );\n}\n\nexport function getTransferInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getTransferInstructionDataCodec(): FixedSizeCodec<\n TransferInstructionDataArgs,\n TransferInstructionData\n> {\n return combineCodec(\n getTransferInstructionDataEncoder(),\n getTransferInstructionDataDecoder()\n );\n}\n\nexport type TransferInput<\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The source account. */\n source: Address;\n /** The destination account. */\n destination: Address;\n /** The source account's owner/delegate or its multisignature account. */\n authority: Address | TransactionSigner;\n amount: TransferInstructionDataArgs['amount'];\n multiSigners?: Array;\n};\n\nexport function getTransferInstruction<\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: TransferInput,\n config?: { programAddress?: TProgramAddress }\n): TransferInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountDestination,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getTransferInstructionDataEncoder().encode(\n args as TransferInstructionDataArgs\n ),\n programAddress,\n } as TransferInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountDestination,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n >);\n}\n\nexport type ParsedTransferInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The source account. */\n source: TAccountMetas[0];\n /** The destination account. */\n destination: TAccountMetas[1];\n /** The source account's owner/delegate or its multisignature account. */\n authority: TAccountMetas[2];\n };\n data: TransferInstructionData;\n};\n\nexport function parseTransferInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedTransferInstruction {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n destination: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getTransferInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const TRANSFER_CHECKED_DISCRIMINATOR = 12;\n\nexport function getTransferCheckedDiscriminatorBytes() {\n return getU8Encoder().encode(TRANSFER_CHECKED_DISCRIMINATOR);\n}\n\nexport type TransferCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountSource extends string | AccountMeta = string,\n TAccountMint extends string | AccountMeta = string,\n TAccountDestination extends string | AccountMeta = string,\n TAccountAuthority extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountSource extends string\n ? WritableAccount\n : TAccountSource,\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n TAccountDestination extends string\n ? WritableAccount\n : TAccountDestination,\n TAccountAuthority extends string\n ? ReadonlyAccount\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransferCheckedInstructionData = {\n discriminator: number;\n /** The amount of tokens to transfer. */\n amount: bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport type TransferCheckedInstructionDataArgs = {\n /** The amount of tokens to transfer. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n};\n\nexport function getTransferCheckedInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['amount', getU64Encoder()],\n ['decimals', getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR })\n );\n}\n\nexport function getTransferCheckedInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['amount', getU64Decoder()],\n ['decimals', getU8Decoder()],\n ]);\n}\n\nexport function getTransferCheckedInstructionDataCodec(): FixedSizeCodec<\n TransferCheckedInstructionDataArgs,\n TransferCheckedInstructionData\n> {\n return combineCodec(\n getTransferCheckedInstructionDataEncoder(),\n getTransferCheckedInstructionDataDecoder()\n );\n}\n\nexport type TransferCheckedInput<\n TAccountSource extends string = string,\n TAccountMint extends string = string,\n TAccountDestination extends string = string,\n TAccountAuthority extends string = string,\n> = {\n /** The source account. */\n source: Address;\n /** The token mint. */\n mint: Address;\n /** The destination account. */\n destination: Address;\n /** The source account's owner/delegate or its multisignature account. */\n authority: Address | TransactionSigner;\n amount: TransferCheckedInstructionDataArgs['amount'];\n decimals: TransferCheckedInstructionDataArgs['decimals'];\n multiSigners?: Array;\n};\n\nexport function getTransferCheckedInstruction<\n TAccountSource extends string,\n TAccountMint extends string,\n TAccountDestination extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: TransferCheckedInput<\n TAccountSource,\n TAccountMint,\n TAccountDestination,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): TransferCheckedInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountMint,\n TAccountDestination,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n source: { value: input.source ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: false },\n destination: { value: input.destination ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(\n (signer) => ({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n })\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getTransferCheckedInstructionDataEncoder().encode(\n args as TransferCheckedInstructionDataArgs\n ),\n programAddress,\n } as TransferCheckedInstruction<\n TProgramAddress,\n TAccountSource,\n TAccountMint,\n TAccountDestination,\n (typeof input)['authority'] extends TransactionSigner\n ? ReadonlySignerAccount &\n AccountSignerMeta\n : TAccountAuthority\n >);\n}\n\nexport type ParsedTransferCheckedInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The source account. */\n source: TAccountMetas[0];\n /** The token mint. */\n mint: TAccountMetas[1];\n /** The destination account. */\n destination: TAccountMetas[2];\n /** The source account's owner/delegate or its multisignature account. */\n authority: TAccountMetas[3];\n };\n data: TransferCheckedInstructionData;\n};\n\nexport function parseTransferCheckedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedTransferCheckedInstruction {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n source: getNextAccount(),\n mint: getNextAccount(),\n destination: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getTransferCheckedInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport { TOKEN_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR = 24;\n\nexport function getUiAmountToAmountDiscriminatorBytes() {\n return getU8Encoder().encode(UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR);\n}\n\nexport type UiAmountToAmountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMint extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountMint extends string\n ? ReadonlyAccount\n : TAccountMint,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UiAmountToAmountInstructionData = {\n discriminator: number;\n /** The ui_amount of tokens to reformat. */\n uiAmount: string;\n};\n\nexport type UiAmountToAmountInstructionDataArgs = {\n /** The ui_amount of tokens to reformat. */\n uiAmount: string;\n};\n\nexport function getUiAmountToAmountInstructionDataEncoder(): Encoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU8Encoder()],\n ['uiAmount', getUtf8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getUiAmountToAmountInstructionDataDecoder(): Decoder {\n return getStructDecoder([\n ['discriminator', getU8Decoder()],\n ['uiAmount', getUtf8Decoder()],\n ]);\n}\n\nexport function getUiAmountToAmountInstructionDataCodec(): Codec<\n UiAmountToAmountInstructionDataArgs,\n UiAmountToAmountInstructionData\n> {\n return combineCodec(\n getUiAmountToAmountInstructionDataEncoder(),\n getUiAmountToAmountInstructionDataDecoder()\n );\n}\n\nexport type UiAmountToAmountInput = {\n /** The mint to calculate for. */\n mint: Address;\n uiAmount: UiAmountToAmountInstructionDataArgs['uiAmount'];\n};\n\nexport function getUiAmountToAmountInstruction<\n TAccountMint extends string,\n TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS,\n>(\n input: UiAmountToAmountInput,\n config?: { programAddress?: TProgramAddress }\n): UiAmountToAmountInstruction {\n // Program address.\n const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n mint: { value: input.mint ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n return Object.freeze({\n accounts: [getAccountMeta(accounts.mint)],\n data: getUiAmountToAmountInstructionDataEncoder().encode(\n args as UiAmountToAmountInstructionDataArgs\n ),\n programAddress,\n } as UiAmountToAmountInstruction);\n}\n\nexport type ParsedUiAmountToAmountInstruction<\n TProgram extends string = typeof TOKEN_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n /** The mint to calculate for. */\n mint: TAccountMetas[0];\n };\n data: UiAmountToAmountInstructionData;\n};\n\nexport function parseUiAmountToAmountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedUiAmountToAmountInstruction {\n if (instruction.accounts.length < 1) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { mint: getNextAccount() },\n data: getUiAmountToAmountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n containsBytes,\n getU32Encoder,\n type Address,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n type ParsedAdvanceNonceAccountInstruction,\n type ParsedAllocateInstruction,\n type ParsedAllocateWithSeedInstruction,\n type ParsedAssignInstruction,\n type ParsedAssignWithSeedInstruction,\n type ParsedAuthorizeNonceAccountInstruction,\n type ParsedCreateAccountInstruction,\n type ParsedCreateAccountWithSeedInstruction,\n type ParsedInitializeNonceAccountInstruction,\n type ParsedTransferSolInstruction,\n type ParsedTransferSolWithSeedInstruction,\n type ParsedUpgradeNonceAccountInstruction,\n type ParsedWithdrawNonceAccountInstruction,\n} from '../instructions';\n\nexport const SYSTEM_PROGRAM_ADDRESS =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\nexport enum SystemAccount {\n Nonce,\n}\n\nexport enum SystemInstruction {\n CreateAccount,\n Assign,\n TransferSol,\n CreateAccountWithSeed,\n AdvanceNonceAccount,\n WithdrawNonceAccount,\n InitializeNonceAccount,\n AuthorizeNonceAccount,\n Allocate,\n AllocateWithSeed,\n AssignWithSeed,\n TransferSolWithSeed,\n UpgradeNonceAccount,\n}\n\nexport function identifySystemInstruction(\n instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): SystemInstruction {\n const data = 'data' in instruction ? instruction.data : instruction;\n if (containsBytes(data, getU32Encoder().encode(0), 0)) {\n return SystemInstruction.CreateAccount;\n }\n if (containsBytes(data, getU32Encoder().encode(1), 0)) {\n return SystemInstruction.Assign;\n }\n if (containsBytes(data, getU32Encoder().encode(2), 0)) {\n return SystemInstruction.TransferSol;\n }\n if (containsBytes(data, getU32Encoder().encode(3), 0)) {\n return SystemInstruction.CreateAccountWithSeed;\n }\n if (containsBytes(data, getU32Encoder().encode(4), 0)) {\n return SystemInstruction.AdvanceNonceAccount;\n }\n if (containsBytes(data, getU32Encoder().encode(5), 0)) {\n return SystemInstruction.WithdrawNonceAccount;\n }\n if (containsBytes(data, getU32Encoder().encode(6), 0)) {\n return SystemInstruction.InitializeNonceAccount;\n }\n if (containsBytes(data, getU32Encoder().encode(7), 0)) {\n return SystemInstruction.AuthorizeNonceAccount;\n }\n if (containsBytes(data, getU32Encoder().encode(8), 0)) {\n return SystemInstruction.Allocate;\n }\n if (containsBytes(data, getU32Encoder().encode(9), 0)) {\n return SystemInstruction.AllocateWithSeed;\n }\n if (containsBytes(data, getU32Encoder().encode(10), 0)) {\n return SystemInstruction.AssignWithSeed;\n }\n if (containsBytes(data, getU32Encoder().encode(11), 0)) {\n return SystemInstruction.TransferSolWithSeed;\n }\n if (containsBytes(data, getU32Encoder().encode(12), 0)) {\n return SystemInstruction.UpgradeNonceAccount;\n }\n throw new Error(\n 'The provided instruction could not be identified as a system instruction.'\n );\n}\n\nexport type ParsedSystemInstruction<\n TProgram extends string = '11111111111111111111111111111111',\n> =\n | ({\n instructionType: SystemInstruction.CreateAccount;\n } & ParsedCreateAccountInstruction)\n | ({\n instructionType: SystemInstruction.Assign;\n } & ParsedAssignInstruction)\n | ({\n instructionType: SystemInstruction.TransferSol;\n } & ParsedTransferSolInstruction)\n | ({\n instructionType: SystemInstruction.CreateAccountWithSeed;\n } & ParsedCreateAccountWithSeedInstruction)\n | ({\n instructionType: SystemInstruction.AdvanceNonceAccount;\n } & ParsedAdvanceNonceAccountInstruction)\n | ({\n instructionType: SystemInstruction.WithdrawNonceAccount;\n } & ParsedWithdrawNonceAccountInstruction)\n | ({\n instructionType: SystemInstruction.InitializeNonceAccount;\n } & ParsedInitializeNonceAccountInstruction)\n | ({\n instructionType: SystemInstruction.AuthorizeNonceAccount;\n } & ParsedAuthorizeNonceAccountInstruction)\n | ({\n instructionType: SystemInstruction.Allocate;\n } & ParsedAllocateInstruction)\n | ({\n instructionType: SystemInstruction.AllocateWithSeed;\n } & ParsedAllocateWithSeedInstruction)\n | ({\n instructionType: SystemInstruction.AssignWithSeed;\n } & ParsedAssignWithSeedInstruction)\n | ({\n instructionType: SystemInstruction.TransferSolWithSeed;\n } & ParsedTransferSolWithSeedInstruction)\n | ({\n instructionType: SystemInstruction.UpgradeNonceAccount;\n } & ParsedUpgradeNonceAccountInstruction);\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n isProgramError,\n type Address,\n type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n type SolanaError,\n} from '@solana/kit';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\n\n/** AccountAlreadyInUse: an account with the same address already exists */\nexport const SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE = 0x0; // 0\n/** ResultWithNegativeLamports: account does not have enough SOL to perform the operation */\nexport const SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS = 0x1; // 1\n/** InvalidProgramId: cannot assign account to this program id */\nexport const SYSTEM_ERROR__INVALID_PROGRAM_ID = 0x2; // 2\n/** InvalidAccountDataLength: cannot allocate account data of this length */\nexport const SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH = 0x3; // 3\n/** MaxSeedLengthExceeded: length of requested seed is too long */\nexport const SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED = 0x4; // 4\n/** AddressWithSeedMismatch: provided address does not match addressed derived from seed */\nexport const SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH = 0x5; // 5\n/** NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar */\nexport const SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES = 0x6; // 6\n/** NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes */\nexport const SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED = 0x7; // 7\n/** NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce */\nexport const SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE = 0x8; // 8\n\nexport type SystemError =\n | typeof SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE\n | typeof SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH\n | typeof SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH\n | typeof SYSTEM_ERROR__INVALID_PROGRAM_ID\n | typeof SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED\n | typeof SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED\n | typeof SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES\n | typeof SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE\n | typeof SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS;\n\nlet systemErrorMessages: Record | undefined;\nif (process.env.NODE_ENV !== 'production') {\n systemErrorMessages = {\n [SYSTEM_ERROR__ACCOUNT_ALREADY_IN_USE]: `an account with the same address already exists`,\n [SYSTEM_ERROR__ADDRESS_WITH_SEED_MISMATCH]: `provided address does not match addressed derived from seed`,\n [SYSTEM_ERROR__INVALID_ACCOUNT_DATA_LENGTH]: `cannot allocate account data of this length`,\n [SYSTEM_ERROR__INVALID_PROGRAM_ID]: `cannot assign account to this program id`,\n [SYSTEM_ERROR__MAX_SEED_LENGTH_EXCEEDED]: `length of requested seed is too long`,\n [SYSTEM_ERROR__NONCE_BLOCKHASH_NOT_EXPIRED]: `stored nonce is still in recent_blockhashes`,\n [SYSTEM_ERROR__NONCE_NO_RECENT_BLOCKHASHES]: `advancing stored nonce requires a populated RecentBlockhashes sysvar`,\n [SYSTEM_ERROR__NONCE_UNEXPECTED_BLOCKHASH_VALUE]: `specified nonce does not match stored nonce`,\n [SYSTEM_ERROR__RESULT_WITH_NEGATIVE_LAMPORTS]: `account does not have enough SOL to perform the operation`,\n };\n}\n\nexport function getSystemErrorMessage(code: SystemError): string {\n if (process.env.NODE_ENV !== 'production') {\n return (systemErrorMessages as Record)[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isSystemError(\n error: unknown,\n transactionMessage: {\n instructions: Record;\n },\n code?: TProgramErrorCode\n): error is SolanaError &\n Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError(\n error,\n transactionMessage,\n SYSTEM_PROGRAM_ADDRESS,\n code\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as kitIsTransactionSigner,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type ProgramDerivedAddress,\n type TransactionSigner,\n upgradeRoleToSigner,\n} from '@solana/kit';\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome(value: T | null | undefined): T {\n if (value === null || value === undefined) {\n throw new Error('Expected a value but received null or undefined.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): Address {\n if (!value) {\n throw new Error('Expected a Address.');\n }\n if (typeof value === 'object' && 'address' in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0] as Address;\n }\n return value as Address;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): ProgramDerivedAddress {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error('Expected a ProgramDerivedAddress.');\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null\n | undefined\n): TransactionSigner {\n if (!value || !isTransactionSigner(value)) {\n throw new Error('Expected a TransactionSigner.');\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null =\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type InstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: 'omitted' | 'programId'\n) {\n return (\n account: ResolvedAccount\n ): AccountMeta | AccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === 'omitted') return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner(\n value:\n | Address\n | ProgramDerivedAddress\n | TransactionSigner\n): value is TransactionSigner {\n return (\n !!value &&\n typeof value === 'object' &&\n 'address' in value &&\n kitIsTransactionSigner(value)\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n BASE_ACCOUNT_SIZE,\n combineCodec,\n getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { SYSTEM_PROGRAM_ADDRESS } from '../programs';\nimport {\n getAccountMetaFactory,\n type InstructionWithByteDelta,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_ACCOUNT_DISCRIMINATOR = 0;\n\nexport function getCreateAccountDiscriminatorBytes() {\n return getU32Encoder().encode(CREATE_ACCOUNT_DISCRIMINATOR);\n}\n\nexport type CreateAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta = string,\n TAccountNewAccount extends string | AccountMeta = string,\n TRemainingAccounts extends readonly AccountMeta[] = [],\n> = Instruction &\n InstructionWithData &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount &\n AccountSignerMeta\n : TAccountPayer,\n TAccountNewAccount extends string\n ? WritableSignerAccount &\n AccountSignerMeta\n : TAccountNewAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAccountInstructionData = {\n discriminator: number;\n lamports: bigint;\n space: bigint;\n programAddress: Address;\n};\n\nexport type CreateAccountInstructionDataArgs = {\n lamports: number | bigint;\n space: number | bigint;\n programAddress: Address;\n};\n\nexport function getCreateAccountInstructionDataEncoder(): FixedSizeEncoder {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', getU32Encoder()],\n ['lamports', getU64Encoder()],\n ['space', getU64Encoder()],\n ['programAddress', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR })\n );\n}\n\nexport function getCreateAccountInstructionDataDecoder(): FixedSizeDecoder {\n return getStructDecoder([\n ['discriminator', getU32Decoder()],\n ['lamports', getU64Decoder()],\n ['space', getU64Decoder()],\n ['programAddress', getAddressDecoder()],\n ]);\n}\n\nexport function getCreateAccountInstructionDataCodec(): FixedSizeCodec<\n CreateAccountInstructionDataArgs,\n CreateAccountInstructionData\n> {\n return combineCodec(\n getCreateAccountInstructionDataEncoder(),\n getCreateAccountInstructionDataDecoder()\n );\n}\n\nexport type CreateAccountInput<\n TAccountPayer extends string = string,\n TAccountNewAccount extends string = string,\n> = {\n payer: TransactionSigner;\n newAccount: TransactionSigner;\n lamports: CreateAccountInstructionDataArgs['lamports'];\n space: CreateAccountInstructionDataArgs['space'];\n programAddress: CreateAccountInstructionDataArgs['programAddress'];\n};\n\nexport function getCreateAccountInstruction<\n TAccountPayer extends string,\n TAccountNewAccount extends string,\n TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS,\n>(\n input: CreateAccountInput,\n config?: { programAddress?: TProgramAddress }\n): CreateAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountNewAccount\n> &\n InstructionWithByteDelta {\n // Program address.\n const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n newAccount: { value: input.newAccount ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Bytes created or reallocated by the instruction.\n const byteDelta: number = [Number(args.space) + BASE_ACCOUNT_SIZE].reduce(\n (a, b) => a + b,\n 0\n );\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.newAccount),\n ],\n byteDelta,\n data: getCreateAccountInstructionDataEncoder().encode(\n args as CreateAccountInstructionDataArgs\n ),\n programAddress,\n } as CreateAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountNewAccount\n > &\n InstructionWithByteDelta);\n}\n\nexport type ParsedCreateAccountInstruction<\n TProgram extends string = typeof SYSTEM_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address;\n accounts: {\n payer: TAccountMetas[0];\n newAccount: TAccountMetas[1];\n };\n data: CreateAccountInstructionData;\n};\n\nexport function parseCreateAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction &\n InstructionWithAccounts &\n InstructionWithData\n): ParsedCreateAccountInstruction {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error('Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { payer: getNextAccount(), newAccount: getNextAccount() },\n data: getCreateAccountInstructionDataDecoder().decode(instruction.data),\n };\n}\n","import { getCreateAccountInstruction } from '@solana-program/system';\nimport {\n Address,\n InstructionPlan,\n OptionOrNullable,\n sequentialInstructionPlan,\n TransactionSigner,\n} from '@solana/kit';\nimport {\n getInitializeMint2Instruction,\n getMintSize,\n TOKEN_PROGRAM_ADDRESS,\n} from './generated';\n\n// RPC `getMinimumBalanceForRentExemption` for 82 bytes, which is token mint size\n// Hardcoded to avoid requiring an RPC request each time\nconst MINIMUM_BALANCE_FOR_MINT = 1461600;\n\nexport type CreateMintInstructionPlanInput = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** New mint account to create. */\n newMint: TransactionSigner;\n /** Number of base 10 digits to the right of the decimal place. */\n decimals: number;\n /** The authority/multisignature to mint tokens. */\n mintAuthority: Address;\n /** The optional freeze authority/multisignature of the mint. */\n freezeAuthority?: OptionOrNullable
;\n /**\n * Optional override for the amount of Lamports to fund the mint account with.\n * @default 1461600\n * */\n mintAccountLamports?: number;\n};\n\ntype CreateMintInstructionPlanConfig = {\n systemProgram?: Address;\n tokenProgram?: Address;\n};\n\nexport function getCreateMintInstructionPlan(\n input: CreateMintInstructionPlanInput,\n config?: CreateMintInstructionPlanConfig\n): InstructionPlan {\n return sequentialInstructionPlan([\n getCreateAccountInstruction(\n {\n payer: input.payer,\n newAccount: input.newMint,\n lamports: input.mintAccountLamports ?? MINIMUM_BALANCE_FOR_MINT,\n space: getMintSize(),\n programAddress: config?.tokenProgram ?? TOKEN_PROGRAM_ADDRESS,\n },\n {\n programAddress: config?.systemProgram,\n }\n ),\n getInitializeMint2Instruction(\n {\n mint: input.newMint.address,\n decimals: input.decimals,\n mintAuthority: input.mintAuthority,\n freezeAuthority: input.freezeAuthority,\n },\n {\n programAddress: config?.tokenProgram,\n }\n ),\n ]);\n}\n","import {\n InstructionPlan,\n sequentialInstructionPlan,\n Address,\n TransactionSigner,\n} from '@solana/kit';\nimport {\n findAssociatedTokenPda,\n getCreateAssociatedTokenIdempotentInstruction,\n getMintToCheckedInstruction,\n TOKEN_PROGRAM_ADDRESS,\n} from './generated';\n\ntype MintToATAInstructionPlanInput = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** Associated token account address to mint to.\n * Will be created if it does not already exist.\n * Note: Use {@link getMintToATAInstructionPlanAsync} instead to derive this automatically.\n * Note: Use {@link findAssociatedTokenPda} to derive the associated token account address.\n */\n ata: Address;\n /** Wallet address for the associated token account. */\n owner: Address;\n /** The token mint for the associated token account. */\n mint: Address;\n /** The mint's minting authority or its multisignature account. */\n mintAuthority: Address | TransactionSigner;\n /** The amount of new tokens to mint. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n multiSigners?: Array;\n};\n\ntype MintToATAInstructionPlanConfig = {\n systemProgram?: Address;\n tokenProgram?: Address;\n associatedTokenProgram?: Address;\n};\n\nexport function getMintToATAInstructionPlan(\n input: MintToATAInstructionPlanInput,\n config?: MintToATAInstructionPlanConfig\n): InstructionPlan {\n return sequentialInstructionPlan([\n getCreateAssociatedTokenIdempotentInstruction(\n {\n payer: input.payer,\n ata: input.ata,\n owner: input.owner,\n mint: input.mint,\n systemProgram: config?.systemProgram,\n tokenProgram: config?.tokenProgram,\n },\n {\n programAddress: config?.associatedTokenProgram,\n }\n ),\n // mint to this token account\n getMintToCheckedInstruction(\n {\n mint: input.mint,\n token: input.ata,\n mintAuthority: input.mintAuthority,\n amount: input.amount,\n decimals: input.decimals,\n multiSigners: input.multiSigners,\n },\n {\n programAddress: config?.tokenProgram,\n }\n ),\n ]);\n}\n\ntype MintToATAInstructionPlanAsyncInput = Omit<\n MintToATAInstructionPlanInput,\n 'ata'\n>;\n\nexport async function getMintToATAInstructionPlanAsync(\n input: MintToATAInstructionPlanAsyncInput,\n config?: MintToATAInstructionPlanConfig\n): Promise {\n const [ataAddress] = await findAssociatedTokenPda({\n owner: input.owner,\n tokenProgram: config?.tokenProgram ?? TOKEN_PROGRAM_ADDRESS,\n mint: input.mint,\n });\n return getMintToATAInstructionPlan(\n {\n ...input,\n ata: ataAddress,\n },\n config\n );\n}\n","import {\n InstructionPlan,\n sequentialInstructionPlan,\n Address,\n TransactionSigner,\n} from '@solana/kit';\nimport {\n findAssociatedTokenPda,\n getCreateAssociatedTokenIdempotentInstruction,\n getTransferCheckedInstruction,\n TOKEN_PROGRAM_ADDRESS,\n} from './generated';\n\ntype TransferToATAInstructionPlanInput = {\n /** Funding account (must be a system account). */\n payer: TransactionSigner;\n /** The token mint to transfer. */\n mint: Address;\n /** The source account for the transfer. */\n source: Address;\n /** The source account's owner/delegate or its multisignature account. */\n authority: Address | TransactionSigner;\n /** Associated token account address to transfer to.\n * Will be created if it does not already exist.\n * Note: Use {@link getTransferToATAInstructionPlanAsync} instead to derive this automatically.\n * Note: Use {@link findAssociatedTokenPda} to derive the associated token account address.\n */\n destination: Address;\n /** Wallet address for the destination. */\n recipient: Address;\n /** The amount of tokens to transfer. */\n amount: number | bigint;\n /** Expected number of base 10 digits to the right of the decimal place. */\n decimals: number;\n multiSigners?: Array;\n};\n\ntype TransferToATAInstructionPlanConfig = {\n systemProgram?: Address;\n tokenProgram?: Address;\n associatedTokenProgram?: Address;\n};\n\nexport function getTransferToATAInstructionPlan(\n input: TransferToATAInstructionPlanInput,\n config?: TransferToATAInstructionPlanConfig\n): InstructionPlan {\n return sequentialInstructionPlan([\n getCreateAssociatedTokenIdempotentInstruction(\n {\n payer: input.payer,\n ata: input.destination,\n owner: input.recipient,\n mint: input.mint,\n systemProgram: config?.systemProgram,\n tokenProgram: config?.tokenProgram,\n },\n {\n programAddress: config?.associatedTokenProgram,\n }\n ),\n getTransferCheckedInstruction(\n {\n source: input.source,\n mint: input.mint,\n destination: input.destination,\n authority: input.authority,\n amount: input.amount,\n decimals: input.decimals,\n multiSigners: input.multiSigners,\n },\n {\n programAddress: config?.tokenProgram,\n }\n ),\n ]);\n}\n\ntype TransferToATAInstructionPlanAsyncInput = Omit<\n TransferToATAInstructionPlanInput,\n 'destination'\n>;\n\nexport async function getTransferToATAInstructionPlanAsync(\n input: TransferToATAInstructionPlanAsyncInput,\n config?: TransferToATAInstructionPlanConfig\n): Promise {\n const [ataAddress] = await findAssociatedTokenPda({\n owner: input.recipient,\n tokenProgram: config?.tokenProgram ?? TOKEN_PROGRAM_ADDRESS,\n mint: input.mint,\n });\n return getTransferToATAInstructionPlan(\n {\n ...input,\n destination: ataAddress,\n },\n config\n );\n}\n"]}