@pina-rs/amm 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +27 -2
  2. package/dist/index.cjs +1257 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1752 -0
  5. package/dist/index.d.ts +1752 -0
  6. package/dist/index.js +1078 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +57 -8
  9. package/src/generated/accounts/ammConfig.ts +197 -0
  10. package/src/generated/accounts/index.ts +10 -0
  11. package/src/generated/accounts/pool.ts +218 -0
  12. package/src/generated/errors/index.ts +9 -0
  13. package/src/generated/errors/pinaAmm.ts +64 -0
  14. package/src/generated/events/feesCollected.ts +64 -0
  15. package/src/generated/events/index.ts +13 -0
  16. package/src/generated/events/liquidityChanged.ts +72 -0
  17. package/src/generated/events/logs.ts +372 -0
  18. package/src/generated/events/poolCreated.ts +80 -0
  19. package/src/generated/events/swapped.ts +100 -0
  20. package/src/generated/index.ts +14 -0
  21. package/src/generated/instructions/collectCreatorFees.ts +119 -0
  22. package/src/generated/instructions/collectProtocolFees.ts +123 -0
  23. package/src/generated/instructions/createConfig.ts +142 -0
  24. package/src/generated/instructions/createPool.ts +291 -0
  25. package/src/generated/instructions/deposit.ts +139 -0
  26. package/src/generated/instructions/index.ts +19 -0
  27. package/src/generated/instructions/migrate.ts +155 -0
  28. package/src/generated/instructions/setPoolCreator.ts +90 -0
  29. package/src/generated/instructions/swapExactIn.ts +119 -0
  30. package/src/generated/instructions/swapExactOut.ts +119 -0
  31. package/src/generated/instructions/updateConfig.ts +105 -0
  32. package/src/generated/instructions/withdraw.ts +139 -0
  33. package/src/generated/pdas/ammConfig.ts +18 -0
  34. package/src/generated/pdas/index.ts +12 -0
  35. package/src/generated/pdas/pool.ts +20 -0
  36. package/src/generated/pdas/poolLpMint.ts +18 -0
  37. package/src/generated/pdas/poolVault.ts +19 -0
  38. package/src/generated/pinaPodCodecs.ts +232 -0
  39. package/src/generated/programs/index.ts +9 -0
  40. package/src/generated/programs/pinaAmm.ts +115 -0
  41. package/src/index.ts +11 -0
  42. package/CHANGELOG.md +0 -5
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/generated/pinaPodCodecs.ts","../src/generated/pdas/ammConfig.ts","../src/generated/pdas/pool.ts","../src/generated/pdas/poolLpMint.ts","../src/generated/pdas/poolVault.ts","../src/generated/accounts/ammConfig.ts","../src/generated/accounts/pool.ts","../src/generated/instructions/migrate.ts","../src/generated/instructions/collectCreatorFees.ts","../src/generated/instructions/collectProtocolFees.ts","../src/generated/instructions/createConfig.ts","../src/generated/instructions/createPool.ts","../src/generated/instructions/deposit.ts","../src/generated/instructions/setPoolCreator.ts","../src/generated/instructions/swapExactIn.ts","../src/generated/instructions/swapExactOut.ts","../src/generated/instructions/updateConfig.ts","../src/generated/instructions/withdraw.ts","../src/generated/programs/pinaAmm.ts","../src/generated/errors/pinaAmm.ts","../src/generated/events/poolCreated.ts","../src/generated/events/swapped.ts","../src/generated/events/liquidityChanged.ts","../src/generated/events/feesCollected.ts","../src/generated/events/logs.ts"],"names":["transformDecoder","getProgramDerivedAddress","getUtf8Encoder","getU16Encoder","getAddressEncoder","getU8Encoder","transformEncoder","getStructEncoder","getU32Encoder","getStructDecoder","getU8Decoder","getAddressDecoder","getU32Decoder","getU16Decoder","combineCodec","decodeAccount","assertAccountExists","fetchEncodedAccount","assertAccountsExist","fetchEncodedAccounts","getU64Encoder","getU64Decoder","getAccountMetaFactory","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","getAddressFromResolvedInstructionAccount","PinaAmmAccount","containsBytes","SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT","PinaAmmEvent","PinaAmmInstruction","SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION","assertIsInstructionWithAccounts","SOLAN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AA;AACnD,IAAA,IAAI,mBAAmB,IAAA,EAAM;AAC5B,MAAA,MAAM,IAAI,WAAW,cAAc,CAAA;AAAA,IACpC;AAAA,EACD;AACA,EAAA,OAAO,UAAA;AACR","file":"index.cjs","sourcesContent":["/**\n * Runtime validation for Pina's PinaPod wire types.\n *\n * This file is generated by `pina generate`. The stock Codama codecs\n * intentionally permit truncation and permissive decoding, whereas Pina's\n * on-chain PinaPod views reject those non-canonical representations.\n */\n\nimport {\n\ttype Decoder,\n\ttype Encoder,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\taddDecoderSizePrefix,\n\tcreateDecoder,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetBytesDecoder,\n\tgetU8Decoder,\n\ttransformDecoder,\n\ttransformEncoder,\n} from \"@solana/kit\";\n\ntype Integer = bigint | number;\ntype PinaPodCollection = { readonly length: number };\n\nfunction assertPinaPodString(value: string, capacity: number): void {\n\tconst bytes = new TextEncoder().encode(value);\n\tif (bytes.length > capacity) {\n\t\tthrow new RangeError(\n\t\t\t`PinaPod string needs ${bytes.length} UTF-8 bytes but its capacity is ${capacity}`,\n\t\t);\n\t}\n\tif (new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes) !== value) {\n\t\tthrow new TypeError(\"PinaPod strings must contain valid Unicode scalar values\");\n\t}\n}\n\n/** Rejects an oversized collection before its item encoder runs. */\nexport function getPinaPodBoundedArrayEncoder<TFrom extends PinaPodCollection>(\n\tencoder: Encoder<TFrom>,\n\tcapacity: number,\n): Encoder<TFrom> {\n\treturn transformEncoder(encoder, (value) => {\n\t\tif (value.length > capacity) {\n\t\t\tthrow new RangeError(\n\t\t\t\t`PinaPod collection has ${value.length} items but its capacity is ${capacity}`,\n\t\t\t);\n\t\t}\n\t\treturn value;\n\t});\n}\n\n/** Rejects a decoded collection that exceeds its schema capacity. */\nexport function getPinaPodBoundedArrayDecoder<\n\tTTo extends PinaPodCollection,\n\tTCount extends Integer,\n>(\n\tdecoder: Decoder<TTo>,\n\tcountDecoder: Decoder<TCount>,\n\tcapacity: number,\n): Decoder<TTo> {\n\treturn createDecoder({\n\t\t...decoder,\n\t\tread: (bytes, offset) => {\n\t\t\t// Security: Codama's array decoder skips its size decoder at end-of-input.\n\t\t\t// Read the shared header count first so an empty tail cannot hide a nonzero count.\n\t\t\tcountDecoder.read(bytes, offset);\n\t\t\tconst [value, newOffset] = decoder.read(bytes, offset);\n\t\t\tif (value.length > capacity) {\n\t\t\t\tthrow new RangeError(\n\t\t\t\t\t`PinaPod collection has ${value.length} items but its capacity is ${capacity}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn [value, newOffset];\n\t\t},\n\t});\n}\n\n/** Rejects an oversized count before the array decoder allocates or reads items. */\nexport function getPinaPodBoundedCountDecoder<TDecoded extends Integer>(\n\tdecoder: Decoder<TDecoded>,\n\tcapacity: number,\n): Decoder<TDecoded> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tif (BigInt(value) > BigInt(capacity)) {\n\t\t\tthrow new RangeError(\n\t\t\t\t`PinaPod collection count ${value} exceeds its capacity ${capacity}`,\n\t\t\t);\n\t\t}\n\t\treturn value;\n\t});\n}\n\n/** Enforces a string's UTF-8 byte capacity before its encoder runs. */\nexport function getPinaPodBoundedStringEncoder(\n\tencoder: Encoder<string>,\n\tcapacity: number,\n): Encoder<string> {\n\treturn transformEncoder(encoder, (value) => {\n\t\tassertPinaPodString(value, capacity);\n\t\treturn value;\n\t});\n}\n\n/** Defensively rechecks a decoded string's UTF-8 byte capacity. */\nexport function getPinaPodBoundedStringDecoder(\n\tdecoder: Decoder<string>,\n\tcapacity: number,\n): Decoder<string> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tassertPinaPodString(value, capacity);\n\t\treturn value;\n\t});\n}\n\n/** Decodes variable-size UTF-8 strictly instead of replacing malformed input. */\nexport function getPinaPodUtf8Decoder(): Decoder<string> {\n\treturn transformDecoder(getBytesDecoder(), (value) =>\n\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(value)\n\t);\n}\n\n/** Pads valid values but rejects values that would otherwise be truncated. */\nexport function fixPinaPodEncoderSize<TFrom, TSize extends number>(\n\tencoder: Encoder<TFrom>,\n\tfixedBytes: TSize,\n): FixedSizeEncoder<TFrom, TSize> {\n\tconst checkedEncoder = transformEncoder(encoder, (value: TFrom) => {\n\t\tconst encodedSize = \"fixedSize\" in encoder\n\t\t\t? encoder.fixedSize\n\t\t\t: encoder.getSizeFromValue(value);\n\t\tif (encodedSize > fixedBytes) {\n\t\t\tthrow new RangeError(\n\t\t\t\t`PinaPod value needs ${encodedSize} bytes but its capacity is ${fixedBytes}`,\n\t\t\t);\n\t\t}\n\t\treturn value;\n\t});\n\n\treturn fixEncoderSize(checkedEncoder, fixedBytes);\n}\n\n/** Decodes UTF-8 strictly and preserves embedded NUL characters. */\nexport function getPinaPodStringDecoder<TSize extends number>(\n\tprefix: FixedSizeDecoder<bigint> | FixedSizeDecoder<number>,\n\tfixedBytes: TSize,\n): FixedSizeDecoder<string, TSize> {\n\tconst bytes = addDecoderSizePrefix(getBytesDecoder(), prefix);\n\treturn transformDecoder(fixDecoderSize(bytes, fixedBytes), (value) =>\n\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(value)\n\t);\n}\n\n/** Accepts only PinaPod's canonical boolean encodings. */\nexport function getPinaPodBooleanDecoder(): FixedSizeDecoder<boolean, 1> {\n\treturn transformDecoder(getU8Decoder(), (value) => {\n\t\tif (value !== 0 && value !== 1) {\n\t\t\tthrow new RangeError(`invalid PinaPod boolean: ${value}`);\n\t\t}\n\t\treturn value === 1;\n\t});\n}\n\n/** Accepts only PinaPod's `None` and `Some` option tags. */\nexport function getPinaPodOptionTagDecoder<\n\tTDecoded extends Integer,\n\tTSize extends number,\n>(\n\tdecoder: FixedSizeDecoder<TDecoded, TSize>,\n): FixedSizeDecoder<TDecoded, TSize> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tif (BigInt(value) !== 0n && BigInt(value) !== 1n) {\n\t\t\tthrow new RangeError(`invalid PinaPod option tag: ${value}`);\n\t\t}\n\t\treturn value;\n\t});\n}\n\n/** Rejects data for a different account or instruction before decoding it. */\nexport function getPinaPodDiscriminatorDecoder<\n\tTDecoded extends Integer,\n\tTSize extends number,\n>(\n\texpected: Integer,\n\tdecoder: FixedSizeDecoder<TDecoded, TSize>,\n): FixedSizeDecoder<TDecoded, TSize> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tif (BigInt(value) !== BigInt(expected)) {\n\t\t\tthrow new RangeError(\n\t\t\t\t`invalid discriminator: expected ${expected}, received ${value}`,\n\t\t\t);\n\t\t}\n\t\treturn value;\n\t});\n}\n\n/** Rejects account or instruction data from another migration version. */\nexport function getPinaPodMigrationVersionDecoder<\n\tTDecoded extends Integer,\n\tTSize extends number,\n>(\n\texpected: Integer,\n\tdecoder: FixedSizeDecoder<TDecoded, TSize>,\n): FixedSizeDecoder<TDecoded, TSize> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tif (BigInt(value) !== BigInt(expected)) {\n\t\t\tconst hint =\n\t\t\t\tBigInt(value) < BigInt(expected)\n\t\t\t\t\t? \"the data predates this client; migrate it by sending a transaction to the program, or decode it with a client generated from an older IDL\"\n\t\t\t\t\t: \"the data was written by a newer program; upgrade this client\";\n\t\t\tthrow new RangeError(\n\t\t\t\t`migration version mismatch: expected ${expected}, received ${value} (${hint})`,\n\t\t\t);\n\t\t}\n\t\treturn value;\n\t});\n}\n\n/** Rejects numeric enum representations not declared by the native schema. */\nexport function getPinaPodEnumDecoder<TValue extends number, TSize extends number>(\n\tdecoder: FixedSizeDecoder<TValue, TSize>,\n\tvalidValues: readonly TValue[],\n): FixedSizeDecoder<TValue, TSize> {\n\treturn transformDecoder(decoder, (value) => {\n\t\tif (!validValues.includes(value)) {\n\t\t\tthrow new RangeError(`invalid PinaPod enum discriminant: ${value}`);\n\t\t}\n\t\treturn value;\n\t});\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 { getProgramDerivedAddress, getU16Encoder, getUtf8Encoder, type Address, type ProgramDerivedAddress } from '@solana/kit';\n\nexport type AmmConfigSeeds = {\nindex: number;\n};\n\nexport async function findAmmConfigPda(seeds: AmmConfigSeeds, config: { programAddress?: Address | undefined } = {}): Promise<ProgramDerivedAddress> {\n const { programAddress = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV' as Address<'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'> } = config;\n return await getProgramDerivedAddress({ programAddress, seeds: [getUtf8Encoder().encode(\"amm_config\"), getU16Encoder().encode(seeds.index)]});\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 { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, type Address, type ProgramDerivedAddress } from '@solana/kit';\n\nexport type PoolSeeds = {\nammConfig: Address;\nmint0: Address;\nmint1: Address;\n};\n\nexport async function findPoolPda(seeds: PoolSeeds, config: { programAddress?: Address | undefined } = {}): Promise<ProgramDerivedAddress> {\n const { programAddress = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV' as Address<'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'> } = config;\n return await getProgramDerivedAddress({ programAddress, seeds: [getUtf8Encoder().encode(\"pool\"), getAddressEncoder().encode(seeds.ammConfig), getAddressEncoder().encode(seeds.mint0), getAddressEncoder().encode(seeds.mint1)]});\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 { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, type Address, type ProgramDerivedAddress } from '@solana/kit';\n\nexport type PoolLpMintSeeds = {\npool: Address;\n};\n\nexport async function findPoolLpMintPda(seeds: PoolLpMintSeeds, config: { programAddress?: Address | undefined } = {}): Promise<ProgramDerivedAddress> {\n const { programAddress = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV' as Address<'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'> } = config;\n return await getProgramDerivedAddress({ programAddress, seeds: [getUtf8Encoder().encode(\"pool_lp_mint\"), getAddressEncoder().encode(seeds.pool)]});\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 { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, type Address, type ProgramDerivedAddress } from '@solana/kit';\n\nexport type PoolVaultSeeds = {\npool: Address;\nmint: Address;\n};\n\nexport async function findPoolVaultPda(seeds: PoolVaultSeeds, config: { programAddress?: Address | undefined } = {}): Promise<ProgramDerivedAddress> {\n const { programAddress = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV' as Address<'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'> } = config;\n return await getProgramDerivedAddress({ programAddress, seeds: [getUtf8Encoder().encode(\"pool_vault\"), getAddressEncoder().encode(seeds.pool), getAddressEncoder().encode(seeds.mint)]});\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';\nimport { findAmmConfigPda, type AmmConfigSeeds } from '../pdas';\n\nexport const AMM_CONFIG_DISCRIMINATOR = 1;\n\nexport function getAmmConfigDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(AMM_CONFIG_DISCRIMINATOR); }\n\nexport const AMM_CONFIG_DISCRIMINATOR2 = 0;\n\nexport function getAmmConfigDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(AMM_CONFIG_DISCRIMINATOR2); }\n\n/**\n * A fee tier, created by the program's upgrade authority.\n *\n * Pools snapshot `trade_fee_rate`, `protocol_fee_rate`, and\n * `creator_fee_rate` when they are created; later updates only affect new\n * pools. `pool_creator_authority` is fixed for the life of the tier.\n */\nexport type AmmConfig = { discriminator: number; migrationVersion: number; \n/**\n * Signer that may update this tier and collect protocol fees from every\n * pool created under it.\n */\nauthority: Address; \n/**\n * When not the default address, the only signer allowed to create pools\n * under this tier. The default address leaves pool creation open to\n * anyone.\n */\npoolCreatorAuthority: Address; \n/**\n * Fee charged on every swap, in parts per million of the fee base. The\n * LPs keep everything the protocol does not take.\n */\ntradeFeeRate: number; \n/**\n * Share of the trade fee paid to the protocol, in parts per million of\n * the trade fee.\n */\nprotocolFeeRate: number; \n/**\n * Additional fee paid to the pool's creator, in parts per million of the\n * fee base.\n */\ncreatorFeeRate: number; \n/** Tier index used as the PDA seed. */\nindex: number; \n/** Canonical bump of this tier's PDA. */\nbump: number; };\n\nexport type AmmConfigArgs = { \n/**\n * Signer that may update this tier and collect protocol fees from every\n * pool created under it.\n */\nauthority: Address; \n/**\n * When not the default address, the only signer allowed to create pools\n * under this tier. The default address leaves pool creation open to\n * anyone.\n */\npoolCreatorAuthority: Address; \n/**\n * Fee charged on every swap, in parts per million of the fee base. The\n * LPs keep everything the protocol does not take.\n */\ntradeFeeRate: number; \n/**\n * Share of the trade fee paid to the protocol, in parts per million of\n * the trade fee.\n */\nprotocolFeeRate: number; \n/**\n * Additional fee paid to the pool's creator, in parts per million of the\n * fee base.\n */\ncreatorFeeRate: number; \n/** Tier index used as the PDA seed. */\nindex: number; \n/** Canonical bump of this tier's PDA. */\nbump: number; };\n\n/** Gets the encoder for {@link AmmConfigArgs} account data. */\nexport function getAmmConfigEncoder(): FixedSizeEncoder<AmmConfigArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['authority', getAddressEncoder()], ['poolCreatorAuthority', getAddressEncoder()], ['tradeFeeRate', getU32Encoder()], ['protocolFeeRate', getU32Encoder()], ['creatorFeeRate', getU32Encoder()], ['index', getU16Encoder()], ['bump', getU8Encoder()]]), (value) => ({ ...value, discriminator: 1, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link AmmConfig} account data. */\nexport function getAmmConfigDecoder(): FixedSizeDecoder<AmmConfig> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(AMM_CONFIG_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['authority', getAddressDecoder()], ['poolCreatorAuthority', getAddressDecoder()], ['tradeFeeRate', getU32Decoder()], ['protocolFeeRate', getU32Decoder()], ['creatorFeeRate', getU32Decoder()], ['index', getU16Decoder()], ['bump', getU8Decoder()]]);\n}\n\n/** Gets the codec for {@link AmmConfig} account data. */\nexport function getAmmConfigCodec(): FixedSizeCodec<AmmConfigArgs, AmmConfig> {\n return combineCodec(getAmmConfigEncoder(), getAmmConfigDecoder());\n}\n\nexport function decodeAmmConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<AmmConfig, TAddress>;\nexport function decodeAmmConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<AmmConfig, TAddress>;\nexport function decodeAmmConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>): Account<AmmConfig, TAddress> | MaybeAccount<AmmConfig, TAddress> {\n return decodeAccount(encodedAccount as MaybeEncodedAccount<TAddress>, getAmmConfigDecoder());\n}\n\nexport async function fetchAmmConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AmmConfig, TAddress>> {\n const maybeAccount = await fetchMaybeAmmConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAmmConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AmmConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAmmConfig(maybeAccount);\n}\n\nexport async function fetchAllAmmConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AmmConfig>[]> {\n const maybeAccounts = await fetchAllMaybeAmmConfig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAmmConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AmmConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeAmmConfig(maybeAccount));\n}\n\nexport async function fetchAmmConfigFromSeeds(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n seeds: AmmConfigSeeds,\n config: FetchAccountConfig & { programAddress?: Address } = {},\n): Promise<Account<AmmConfig>> {\n const maybeAccount = await fetchMaybeAmmConfigFromSeeds(rpc, seeds, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAmmConfigFromSeeds(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n seeds: AmmConfigSeeds,\n config: FetchAccountConfig & { programAddress?: Address } = {},\n): Promise<MaybeAccount<AmmConfig>> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findAmmConfigPda(seeds, { programAddress });\n return await fetchMaybeAmmConfig(rpc, address, fetchConfig);\n}\n\n/** The account schema version this client was generated from. */\nexport const AMM_CONFIG_MIGRATION_VERSION = 0;\n\n/**\n * Cheap envelope check for a fetched `AmmConfig` account: `true` only when the\n * bytes name this account's discriminator and a migration version older than\n * this client's schema. Those are exactly the accounts\n * {@link getMigrateInstruction} can bring current; every other mismatch is\n * reported by the decoder when the account is decoded.\n *\n * ```ts\n * const account = await fetchEncodedAccount(rpc, address);\n * if (account.exists && ammConfigNeedsMigration(account.data)) {\n * \t// Migrate first, then retry the instruction that failed.\n * \tawait send(getMigrateInstruction({ ammConfig: address, payer }));\n * }\n * ```\n */\nexport function ammConfigNeedsMigration(data: ReadonlyUint8Array): boolean {\n\tif (data.length < 2) {\n\t\treturn false;\n\t}\n\tif (data[0] !== 1) {\n\t\treturn false;\n\t}\n\treturn data[1]! < 0;\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';\nimport { findPoolPda, type PoolSeeds } from '../pdas';\n\nexport const POOL_DISCRIMINATOR = 2;\n\nexport function getPoolDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(POOL_DISCRIMINATOR); }\n\nexport const POOL_DISCRIMINATOR2 = 0;\n\nexport function getPoolDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(POOL_DISCRIMINATOR2); }\n\n/**\n * A constant-product pool for one token pair under one fee tier.\n *\n * `mint_0` is always the byte-wise smaller mint address, so every pair has\n * exactly one canonical pool per tier.\n */\nexport type Pool = { discriminator: number; migrationVersion: number; \n/** Fee tier this pool was created under. */\nammConfig: Address; \n/** Recipient of this pool's creator fees. */\ncreator: Address; \n/** Smaller mint of the pair. */\nmint0: Address; \n/** Larger mint of the pair. */\nmint1: Address; \n/** Pool-owned token account holding token 0. */\nvault0: Address; \n/** Pool-owned token account holding token 1. */\nvault1: Address; \n/** LP mint whose mint authority is this pool. */\nlpMint: Address; \n/**\n * Economic LP supply, including `MINIMUM_LIQUIDITY` and any LP burned\n * outside the program. Only deposits and withdrawals change it, so LP\n * burned directly through the token program stays locked forever.\n */\nlpSupply: bigint; \n/** Accrued, unpaid protocol fees held in vault 0. */\nprotocolFees0: bigint; \n/** Accrued, unpaid protocol fees held in vault 1. */\nprotocolFees1: bigint; \n/** Accrued, unpaid creator fees held in vault 0. */\ncreatorFees0: bigint; \n/** Accrued, unpaid creator fees held in vault 1. */\ncreatorFees1: bigint; \n/** Trade fee rate snapshotted from the tier, in parts per million. */\ntradeFeeRate: number; \n/**\n * Protocol share of the trade fee snapshotted from the tier, in parts per\n * million.\n */\nprotocolFeeRate: number; \n/** Creator fee rate snapshotted from the tier, in parts per million. */\ncreatorFeeRate: number; \n/** `CreatorFeeMode` wire value. */\ncreatorFeeMode: number; \n/** Canonical bump of this pool's PDA. */\nbump: number; };\n\nexport type PoolArgs = { \n/** Fee tier this pool was created under. */\nammConfig: Address; \n/** Recipient of this pool's creator fees. */\ncreator: Address; \n/** Smaller mint of the pair. */\nmint0: Address; \n/** Larger mint of the pair. */\nmint1: Address; \n/** Pool-owned token account holding token 0. */\nvault0: Address; \n/** Pool-owned token account holding token 1. */\nvault1: Address; \n/** LP mint whose mint authority is this pool. */\nlpMint: Address; \n/**\n * Economic LP supply, including `MINIMUM_LIQUIDITY` and any LP burned\n * outside the program. Only deposits and withdrawals change it, so LP\n * burned directly through the token program stays locked forever.\n */\nlpSupply: number | bigint; \n/** Accrued, unpaid protocol fees held in vault 0. */\nprotocolFees0: number | bigint; \n/** Accrued, unpaid protocol fees held in vault 1. */\nprotocolFees1: number | bigint; \n/** Accrued, unpaid creator fees held in vault 0. */\ncreatorFees0: number | bigint; \n/** Accrued, unpaid creator fees held in vault 1. */\ncreatorFees1: number | bigint; \n/** Trade fee rate snapshotted from the tier, in parts per million. */\ntradeFeeRate: number; \n/**\n * Protocol share of the trade fee snapshotted from the tier, in parts per\n * million.\n */\nprotocolFeeRate: number; \n/** Creator fee rate snapshotted from the tier, in parts per million. */\ncreatorFeeRate: number; \n/** `CreatorFeeMode` wire value. */\ncreatorFeeMode: number; \n/** Canonical bump of this pool's PDA. */\nbump: number; };\n\n/** Gets the encoder for {@link PoolArgs} account data. */\nexport function getPoolEncoder(): FixedSizeEncoder<PoolArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['ammConfig', getAddressEncoder()], ['creator', getAddressEncoder()], ['mint0', getAddressEncoder()], ['mint1', getAddressEncoder()], ['vault0', getAddressEncoder()], ['vault1', getAddressEncoder()], ['lpMint', getAddressEncoder()], ['lpSupply', getU64Encoder()], ['protocolFees0', getU64Encoder()], ['protocolFees1', getU64Encoder()], ['creatorFees0', getU64Encoder()], ['creatorFees1', getU64Encoder()], ['tradeFeeRate', getU32Encoder()], ['protocolFeeRate', getU32Encoder()], ['creatorFeeRate', getU32Encoder()], ['creatorFeeMode', getU8Encoder()], ['bump', getU8Encoder()]]), (value) => ({ ...value, discriminator: 2, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link Pool} account data. */\nexport function getPoolDecoder(): FixedSizeDecoder<Pool> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(POOL_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['ammConfig', getAddressDecoder()], ['creator', getAddressDecoder()], ['mint0', getAddressDecoder()], ['mint1', getAddressDecoder()], ['vault0', getAddressDecoder()], ['vault1', getAddressDecoder()], ['lpMint', getAddressDecoder()], ['lpSupply', getU64Decoder()], ['protocolFees0', getU64Decoder()], ['protocolFees1', getU64Decoder()], ['creatorFees0', getU64Decoder()], ['creatorFees1', getU64Decoder()], ['tradeFeeRate', getU32Decoder()], ['protocolFeeRate', getU32Decoder()], ['creatorFeeRate', getU32Decoder()], ['creatorFeeMode', getU8Decoder()], ['bump', getU8Decoder()]]);\n}\n\n/** Gets the codec for {@link Pool} account data. */\nexport function getPoolCodec(): FixedSizeCodec<PoolArgs, Pool> {\n return combineCodec(getPoolEncoder(), getPoolDecoder());\n}\n\nexport function decodePool<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Pool, TAddress>;\nexport function decodePool<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Pool, TAddress>;\nexport function decodePool<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>): Account<Pool, TAddress> | MaybeAccount<Pool, TAddress> {\n return decodeAccount(encodedAccount as MaybeEncodedAccount<TAddress>, getPoolDecoder());\n}\n\nexport async function fetchPool<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<Pool, TAddress>> {\n const maybeAccount = await fetchMaybePool(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybePool<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<Pool, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodePool(maybeAccount);\n}\n\nexport async function fetchAllPool(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<Pool>[]> {\n const maybeAccounts = await fetchAllMaybePool(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybePool(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<Pool>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodePool(maybeAccount));\n}\n\nexport async function fetchPoolFromSeeds(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n seeds: PoolSeeds,\n config: FetchAccountConfig & { programAddress?: Address } = {},\n): Promise<Account<Pool>> {\n const maybeAccount = await fetchMaybePoolFromSeeds(rpc, seeds, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybePoolFromSeeds(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n seeds: PoolSeeds,\n config: FetchAccountConfig & { programAddress?: Address } = {},\n): Promise<MaybeAccount<Pool>> {\n const { programAddress, ...fetchConfig } = config;\n const [address] = await findPoolPda(seeds, { programAddress });\n return await fetchMaybePool(rpc, address, fetchConfig);\n}\n\n/** The account schema version this client was generated from. */\nexport const POOL_MIGRATION_VERSION = 0;\n\n/**\n * Cheap envelope check for a fetched `Pool` account: `true` only when the\n * bytes name this account's discriminator and a migration version older than\n * this client's schema. Those are exactly the accounts\n * {@link getMigrateInstruction} can bring current; every other mismatch is\n * reported by the decoder when the account is decoded.\n *\n * ```ts\n * const account = await fetchEncodedAccount(rpc, address);\n * if (account.exists && poolNeedsMigration(account.data)) {\n * \t// Migrate first, then retry the instruction that failed.\n * \tawait send(getMigrateInstruction({ pool: address, payer }));\n * }\n * ```\n */\nexport function poolNeedsMigration(data: ReadonlyUint8Array): boolean {\n\tif (data.length < 2) {\n\t\treturn false;\n\t}\n\tif (data[0] !== 2) {\n\t\treturn false;\n\t}\n\treturn data[1]! < 0;\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 * The framework-owned `Migrate` instruction: it runs the program's on-demand\n * account migrations on their own, so the payer authorizes exactly the\n * migration cost and the business instruction that follows sees current\n * data. The intended flow around any instruction that failed with a\n * migration version mismatch is catch -> migrate -> retry.\n */\n\nimport {\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from \"@solana/kit\";\nimport {\n\tgetAccountMetaFactory,\n\ttype ResolvedInstructionAccount,\n} from \"@solana/program-client-core\";\nimport { PINA_AMM_PROGRAM_ADDRESS } from \"../programs\";\n\n/** Discriminator reserved by Pina for the framework `Migrate` instruction. */\nexport const MIGRATE_DISCRIMINATOR = 255;\n\nexport function getMigrateDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn new Uint8Array([255]);\n}\n\nexport type MigrateInstruction<\n\tTProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountSystemProgram extends string | AccountMeta<string> = string,\n\tTAccountAmmConfig extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> =\n\t& Instruction<TProgram>\n\t& InstructionWithData<ReadonlyUint8Array>\n\t& InstructionWithAccounts<\n\t\t[\n\t\t\tTAccountPayer extends string ?\n\t\t\t\t\t& WritableSignerAccount<TAccountPayer>\n\t\t\t\t\t& AccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountAmmConfig extends string ? WritableAccount<TAccountAmmConfig>\n\t\t\t\t: TAccountAmmConfig,\n\t\t\tTAccountPool extends string ? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type MigrateInput<\n\tTAccountPayer extends string = string,\n\tTAccountSystemProgram extends string = string,\n\tTAccountAmmConfig extends string = string,\n\tTAccountPool extends string = string,\n> = {\n\tpayer?: TransactionSigner<TAccountPayer>;\n\tsystemProgram?: Address<TAccountSystemProgram>;\n\tammConfig?: Address<TAccountAmmConfig>;\n\tpool?: Address<TAccountPool>;\n};\n\n/**\n * Composes the reserved `Migrate` instruction.\n *\n * Every migratable account is optional: omitted slots are filled with the\n * program-address placeholder and trailing omitted slots are dropped, so a\n * client sends only the accounts it needs to migrate. The `payer` funds rent\n * deficits and must be a writable signer; omit it when no migration needs\n * funding. `systemProgram` defaults to the system program, the only account\n * the program accepts in that slot. The program caps the whole\n * instruction's rent transfers at a program-chosen lamport budget.\n */\nexport function getMigrateInstruction<\n\tTAccountPayer extends string = string,\n\tTAccountSystemProgram extends string = string,\n\tTAccountAmmConfig extends string = string,\n\tTAccountPool extends string = string,\n\tTProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS,\n>(\n\tinput: MigrateInput<\n\t\tTAccountPayer,\n\t\tTAccountSystemProgram,\n\t\tTAccountAmmConfig,\n\t\tTAccountPool\n\t>,\n\tconfig?: { programAddress?: TProgramAddress },\n): MigrateInstruction<\n\tTProgramAddress,\n\tTAccountPayer,\n\tTAccountSystemProgram,\n\tTAccountAmmConfig,\n\tTAccountPool\n> {\n\t// Program address.\n\tconst programAddress = config?.programAddress ??\n\t\tPINA_AMM_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tsystemProgram: { value: input.systemProgram ?? (\"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">), isWritable: false },\n\t\tammConfig: { value: input.ammConfig ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n\n\t// Migratable slots after the last provided account may be truncated: the\n\t// program treats a missing trailing slot exactly like the program-address\n\t// placeholder. The payer and system program slots are always sent.\n\tconst provided: readonly unknown[] = [input.ammConfig, input.pool];\n\tlet lastProvided = -1;\n\tfor (let index = 0; index < provided.length; index += 1) {\n\t\tif (provided[index] != null) {\n\t\t\tlastProvided = index;\n\t\t}\n\t}\n\n\treturn Object.freeze({\n\t\taccounts: [\n\t\tgetAccountMeta(\"payer\", accounts.payer),\n\t\tgetAccountMeta(\"systemProgram\", accounts.systemProgram),\n\t\tgetAccountMeta(\"ammConfig\", accounts.ammConfig),\n\t\tgetAccountMeta(\"pool\", accounts.pool),\n\t\t].slice(0, 2 + lastProvided + 1),\n\t\tdata: getMigrateDiscriminatorBytes(),\n\t\tprogramAddress,\n\t} as MigrateInstruction<\n\t\tTProgramAddress,\n\tTAccountPayer,\n\tTAccountSystemProgram,\n\tTAccountAmmConfig,\n\tTAccountPool\n\t>);\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const COLLECT_CREATOR_FEES_DISCRIMINATOR = 8;\n\nexport function getCollectCreatorFeesDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(COLLECT_CREATOR_FEES_DISCRIMINATOR); }\n\nexport type CollectCreatorFeesInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountCreator extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountRecipientToken0 extends string | AccountMeta<string> = string, TAccountRecipientToken1 extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountCreator extends string ? ReadonlySignerAccount<TAccountCreator> & AccountSignerMeta<TAccountCreator> : TAccountCreator, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountVault0 extends string ? WritableAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? WritableAccount<TAccountVault1> : TAccountVault1, TAccountRecipientToken0 extends string ? WritableAccount<TAccountRecipientToken0> : TAccountRecipientToken0, TAccountRecipientToken1 extends string ? WritableAccount<TAccountRecipientToken1> : TAccountRecipientToken1, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, ...TRemainingAccounts]>;\n\nexport type CollectCreatorFeesInstructionData = { discriminator: number; \n/** Most token 0 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount0: bigint; \n/** Most token 1 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount1: bigint; };\n\nexport type CollectCreatorFeesInstructionDataArgs = { \n/** Most token 0 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount0: number | bigint; \n/** Most token 1 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount1: number | bigint; };\n\nexport function getCollectCreatorFeesInstructionDataEncoder(): FixedSizeEncoder<CollectCreatorFeesInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['maximumAmount0', getU64Encoder()], ['maximumAmount1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 8 }));\n}\n\nexport function getCollectCreatorFeesInstructionDataDecoder(): FixedSizeDecoder<CollectCreatorFeesInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(COLLECT_CREATOR_FEES_DISCRIMINATOR, getU8Decoder())], ['maximumAmount0', getU64Decoder()], ['maximumAmount1', getU64Decoder()]]);\n}\n\nexport function getCollectCreatorFeesInstructionDataCodec(): FixedSizeCodec<CollectCreatorFeesInstructionDataArgs, CollectCreatorFeesInstructionData> {\n return combineCodec(getCollectCreatorFeesInstructionDataEncoder(), getCollectCreatorFeesInstructionDataDecoder());\n}\n\nexport type CollectCreatorFeesInput<TAccountCreator extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountRecipientToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountRecipientToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput> = {\n /** The pool's creator. */\ncreator: TAccountCreator;\n/** The pool. */\npool: TAccountPool;\n/** The pool's token 0 vault. */\nvault0: TAccountVault0;\n/** The pool's token 1 vault. */\nvault1: TAccountVault1;\n/** Token 0 account that receives the fees. */\nrecipientToken0: TAccountRecipientToken0;\n/** Token 1 account that receives the fees. */\nrecipientToken1: TAccountRecipientToken1;\n/** Token program that owns token 0. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns token 1. */\ntokenProgram1: TAccountTokenProgram1;\nmaximumAmount0: CollectCreatorFeesInstructionDataArgs[\"maximumAmount0\"];\nmaximumAmount1: CollectCreatorFeesInstructionDataArgs[\"maximumAmount1\"];\n}\n\nexport function getCollectCreatorFeesInstruction<TAccountCreator extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountRecipientToken0 extends InstructionAccountInput, TAccountRecipientToken1 extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: CollectCreatorFeesInput<TAccountCreator, TAccountPool, TAccountVault0, TAccountVault1, TAccountRecipientToken0, TAccountRecipientToken1, TAccountTokenProgram0, TAccountTokenProgram1>, config?: { programAddress?: TProgramAddress } ): CollectCreatorFeesInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountCreator, InstructionAccountInputAddress<TAccountCreator>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountRecipientToken0, InstructionAccountInputAddress<TAccountRecipientToken0>>, ResolvedInstructionAccountMeta<TAccountRecipientToken1, InstructionAccountInputAddress<TAccountRecipientToken1>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { creator: { value: input.creator ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, recipientToken0: { value: input.recipientToken0 ?? null, isSigner: false, isWritable: true }, recipientToken1: { value: input.recipientToken1 ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"creator\", accounts.creator), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"recipientToken0\", accounts.recipientToken0), getAccountMeta(\"recipientToken1\", accounts.recipientToken1), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1)], data: getCollectCreatorFeesInstructionDataEncoder().encode(args as CollectCreatorFeesInstructionDataArgs), programAddress } as CollectCreatorFeesInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountCreator, InstructionAccountInputAddress<TAccountCreator>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountRecipientToken0, InstructionAccountInputAddress<TAccountRecipientToken0>>, ResolvedInstructionAccountMeta<TAccountRecipientToken1, InstructionAccountInputAddress<TAccountRecipientToken1>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>>);\n}\n\nexport type ParsedCollectCreatorFeesInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The pool's creator. */\ncreator: TAccountMetas[0];\n/** The pool. */\npool: TAccountMetas[1];\n/** The pool's token 0 vault. */\nvault0: TAccountMetas[2];\n/** The pool's token 1 vault. */\nvault1: TAccountMetas[3];\n/** Token 0 account that receives the fees. */\nrecipientToken0: TAccountMetas[4];\n/** Token 1 account that receives the fees. */\nrecipientToken1: TAccountMetas[5];\n/** Token program that owns token 0. */\ntokenProgram0: TAccountMetas[6];\n/** Token program that owns token 1. */\ntokenProgram1: TAccountMetas[7];\n};\ndata: CollectCreatorFeesInstructionData; };\n\nexport function parseCollectCreatorFeesInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCollectCreatorFeesInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 8) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 8 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { creator: getNextAccount(), pool: getNextAccount(), vault0: getNextAccount(), vault1: getNextAccount(), recipientToken0: getNextAccount(), recipientToken1: getNextAccount(), tokenProgram0: getNextAccount(), tokenProgram1: getNextAccount() }, data: getCollectCreatorFeesInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const COLLECT_PROTOCOL_FEES_DISCRIMINATOR = 7;\n\nexport function getCollectProtocolFeesDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(COLLECT_PROTOCOL_FEES_DISCRIMINATOR); }\n\nexport type CollectProtocolFeesInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountAmmConfig extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountRecipientToken0 extends string | AccountMeta<string> = string, TAccountRecipientToken1 extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountAmmConfig extends string ? ReadonlyAccount<TAccountAmmConfig> : TAccountAmmConfig, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountVault0 extends string ? WritableAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? WritableAccount<TAccountVault1> : TAccountVault1, TAccountRecipientToken0 extends string ? WritableAccount<TAccountRecipientToken0> : TAccountRecipientToken0, TAccountRecipientToken1 extends string ? WritableAccount<TAccountRecipientToken1> : TAccountRecipientToken1, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, ...TRemainingAccounts]>;\n\nexport type CollectProtocolFeesInstructionData = { discriminator: number; \n/** Most token 0 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount0: bigint; \n/** Most token 1 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount1: bigint; };\n\nexport type CollectProtocolFeesInstructionDataArgs = { \n/** Most token 0 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount0: number | bigint; \n/** Most token 1 to collect; `u64::MAX` collects everything accrued. */\nmaximumAmount1: number | bigint; };\n\nexport function getCollectProtocolFeesInstructionDataEncoder(): FixedSizeEncoder<CollectProtocolFeesInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['maximumAmount0', getU64Encoder()], ['maximumAmount1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 7 }));\n}\n\nexport function getCollectProtocolFeesInstructionDataDecoder(): FixedSizeDecoder<CollectProtocolFeesInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(COLLECT_PROTOCOL_FEES_DISCRIMINATOR, getU8Decoder())], ['maximumAmount0', getU64Decoder()], ['maximumAmount1', getU64Decoder()]]);\n}\n\nexport function getCollectProtocolFeesInstructionDataCodec(): FixedSizeCodec<CollectProtocolFeesInstructionDataArgs, CollectProtocolFeesInstructionData> {\n return combineCodec(getCollectProtocolFeesInstructionDataEncoder(), getCollectProtocolFeesInstructionDataDecoder());\n}\n\nexport type CollectProtocolFeesInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountRecipientToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountRecipientToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput> = {\n /** The pool's fee-tier authority. */\nauthority: TAccountAuthority;\n/** The pool's fee tier. */\nammConfig: TAccountAmmConfig;\n/** The pool. */\npool: TAccountPool;\n/** The pool's token 0 vault. */\nvault0: TAccountVault0;\n/** The pool's token 1 vault. */\nvault1: TAccountVault1;\n/** Token 0 account that receives the fees. */\nrecipientToken0: TAccountRecipientToken0;\n/** Token 1 account that receives the fees. */\nrecipientToken1: TAccountRecipientToken1;\n/** Token program that owns token 0. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns token 1. */\ntokenProgram1: TAccountTokenProgram1;\nmaximumAmount0: CollectProtocolFeesInstructionDataArgs[\"maximumAmount0\"];\nmaximumAmount1: CollectProtocolFeesInstructionDataArgs[\"maximumAmount1\"];\n}\n\nexport function getCollectProtocolFeesInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountRecipientToken0 extends InstructionAccountInput, TAccountRecipientToken1 extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: CollectProtocolFeesInput<TAccountAuthority, TAccountAmmConfig, TAccountPool, TAccountVault0, TAccountVault1, TAccountRecipientToken0, TAccountRecipientToken1, TAccountTokenProgram0, TAccountTokenProgram1>, config?: { programAddress?: TProgramAddress } ): CollectProtocolFeesInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountRecipientToken0, InstructionAccountInputAddress<TAccountRecipientToken0>>, ResolvedInstructionAccountMeta<TAccountRecipientToken1, InstructionAccountInputAddress<TAccountRecipientToken1>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { authority: { value: input.authority ?? null, isSigner: true, isWritable: false }, ammConfig: { value: input.ammConfig ?? null, isSigner: false, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, recipientToken0: { value: input.recipientToken0 ?? null, isSigner: false, isWritable: true }, recipientToken1: { value: input.recipientToken1 ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"authority\", accounts.authority), getAccountMeta(\"ammConfig\", accounts.ammConfig), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"recipientToken0\", accounts.recipientToken0), getAccountMeta(\"recipientToken1\", accounts.recipientToken1), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1)], data: getCollectProtocolFeesInstructionDataEncoder().encode(args as CollectProtocolFeesInstructionDataArgs), programAddress } as CollectProtocolFeesInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountRecipientToken0, InstructionAccountInputAddress<TAccountRecipientToken0>>, ResolvedInstructionAccountMeta<TAccountRecipientToken1, InstructionAccountInputAddress<TAccountRecipientToken1>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>>);\n}\n\nexport type ParsedCollectProtocolFeesInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The pool's fee-tier authority. */\nauthority: TAccountMetas[0];\n/** The pool's fee tier. */\nammConfig: TAccountMetas[1];\n/** The pool. */\npool: TAccountMetas[2];\n/** The pool's token 0 vault. */\nvault0: TAccountMetas[3];\n/** The pool's token 1 vault. */\nvault1: TAccountMetas[4];\n/** Token 0 account that receives the fees. */\nrecipientToken0: TAccountMetas[5];\n/** Token 1 account that receives the fees. */\nrecipientToken1: TAccountMetas[6];\n/** Token program that owns token 0. */\ntokenProgram0: TAccountMetas[7];\n/** Token program that owns token 1. */\ntokenProgram1: TAccountMetas[8];\n};\ndata: CollectProtocolFeesInstructionData; };\n\nexport function parseCollectProtocolFeesInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCollectProtocolFeesInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 9 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { authority: getNextAccount(), ammConfig: getNextAccount(), pool: getNextAccount(), vault0: getNextAccount(), vault1: getNextAccount(), recipientToken0: getNextAccount(), recipientToken1: getNextAccount(), tokenProgram0: getNextAccount(), tokenProgram1: getNextAccount() }, data: getCollectProtocolFeesInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const CREATE_CONFIG_DISCRIMINATOR = 0;\n\nexport function getCreateConfigDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(CREATE_CONFIG_DISCRIMINATOR); }\n\nexport type CreateConfigInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountPayer extends string | AccountMeta<string> = string, TAccountUpgradeAuthority extends string | AccountMeta<string> = string, TAccountProgramData extends string | AccountMeta<string> = string, TAccountAmmConfig extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = \"11111111111111111111111111111111\", TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountUpgradeAuthority extends string ? ReadonlySignerAccount<TAccountUpgradeAuthority> & AccountSignerMeta<TAccountUpgradeAuthority> : TAccountUpgradeAuthority, TAccountProgramData extends string ? ReadonlyAccount<TAccountProgramData> : TAccountProgramData, TAccountAmmConfig extends string ? WritableAccount<TAccountAmmConfig> : TAccountAmmConfig, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;\n\nexport type CreateConfigInstructionData = { discriminator: number; \n/** Tier index; also the PDA seed. */\nindex: number; \n/** Swap fee in parts per million. */\ntradeFeeRate: number; \n/** Protocol share of the trade fee in parts per million. */\nprotocolFeeRate: number; \n/** Creator fee in parts per million. */\ncreatorFeeRate: number; \n/** Signer that may update the tier and collect its protocol fees. */\nauthority: Address; \n/**\n * The only signer allowed to create pools in this tier, or the default\n * address to let anyone create pools.\n */\npoolCreatorAuthority: Address; };\n\nexport type CreateConfigInstructionDataArgs = { \n/** Tier index; also the PDA seed. */\nindex: number; \n/** Swap fee in parts per million. */\ntradeFeeRate: number; \n/** Protocol share of the trade fee in parts per million. */\nprotocolFeeRate: number; \n/** Creator fee in parts per million. */\ncreatorFeeRate: number; \n/** Signer that may update the tier and collect its protocol fees. */\nauthority: Address; \n/**\n * The only signer allowed to create pools in this tier, or the default\n * address to let anyone create pools.\n */\npoolCreatorAuthority: Address; };\n\nexport function getCreateConfigInstructionDataEncoder(): FixedSizeEncoder<CreateConfigInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['index', getU16Encoder()], ['tradeFeeRate', getU32Encoder()], ['protocolFeeRate', getU32Encoder()], ['creatorFeeRate', getU32Encoder()], ['authority', getAddressEncoder()], ['poolCreatorAuthority', getAddressEncoder()]]), (value) => ({ ...value, discriminator: 0 }));\n}\n\nexport function getCreateConfigInstructionDataDecoder(): FixedSizeDecoder<CreateConfigInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(CREATE_CONFIG_DISCRIMINATOR, getU8Decoder())], ['index', getU16Decoder()], ['tradeFeeRate', getU32Decoder()], ['protocolFeeRate', getU32Decoder()], ['creatorFeeRate', getU32Decoder()], ['authority', getAddressDecoder()], ['poolCreatorAuthority', getAddressDecoder()]]);\n}\n\nexport function getCreateConfigInstructionDataCodec(): FixedSizeCodec<CreateConfigInstructionDataArgs, CreateConfigInstructionData> {\n return combineCodec(getCreateConfigInstructionDataEncoder(), getCreateConfigInstructionDataDecoder());\n}\n\nexport type CreateConfigInput<TAccountPayer extends InstructionSignerInput = InstructionSignerInput, TAccountUpgradeAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountProgramData extends InstructionAccountInput = InstructionAccountInput, TAccountAmmConfig extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /** Pays the new tier's rent. */\npayer: TAccountPayer;\n/** The program's upgrade authority. */\nupgradeAuthority: TAccountUpgradeAuthority;\n/**\n * The program's program-data account, which records its upgrade\n * authority.\n */\nprogramData: TAccountProgramData;\n/** The tier PDA to create: `[b\"amm_config\", index]`. */\nammConfig: TAccountAmmConfig;\n/** The system program. */\nsystemProgram?: TAccountSystemProgram;\nindex: CreateConfigInstructionDataArgs[\"index\"];\ntradeFeeRate: CreateConfigInstructionDataArgs[\"tradeFeeRate\"];\nprotocolFeeRate: CreateConfigInstructionDataArgs[\"protocolFeeRate\"];\ncreatorFeeRate: CreateConfigInstructionDataArgs[\"creatorFeeRate\"];\nauthority: CreateConfigInstructionDataArgs[\"authority\"];\npoolCreatorAuthority: CreateConfigInstructionDataArgs[\"poolCreatorAuthority\"];\n}\n\nexport function getCreateConfigInstruction<TAccountPayer extends InstructionSignerInput, TAccountUpgradeAuthority extends InstructionSignerInput, TAccountProgramData extends InstructionAccountInput, TAccountAmmConfig extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: CreateConfigInput<TAccountPayer, TAccountUpgradeAuthority, TAccountProgramData, TAccountAmmConfig, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress } ): CreateConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountUpgradeAuthority, InstructionAccountInputAddress<TAccountUpgradeAuthority>>, ResolvedInstructionAccountMeta<TAccountProgramData, InstructionAccountInputAddress<TAccountProgramData>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { payer: { value: input.payer ?? null, isSigner: true, isWritable: true }, upgradeAuthority: { value: input.upgradeAuthority ?? null, isSigner: true, isWritable: false }, programData: { value: input.programData ?? null, isSigner: false, isWritable: false }, ammConfig: { value: input.ammConfig ?? null, isSigner: false, isWritable: true }, systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n// Resolve default values.\nif (!accounts.systemProgram.value) {\naccounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n}\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"payer\", accounts.payer), getAccountMeta(\"upgradeAuthority\", accounts.upgradeAuthority), getAccountMeta(\"programData\", accounts.programData), getAccountMeta(\"ammConfig\", accounts.ammConfig), getAccountMeta(\"systemProgram\", accounts.systemProgram)], data: getCreateConfigInstructionDataEncoder().encode(args as CreateConfigInstructionDataArgs), programAddress } as CreateConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountUpgradeAuthority, InstructionAccountInputAddress<TAccountUpgradeAuthority>>, ResolvedInstructionAccountMeta<TAccountProgramData, InstructionAccountInputAddress<TAccountProgramData>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>);\n}\n\nexport type ParsedCreateConfigInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** Pays the new tier's rent. */\npayer: TAccountMetas[0];\n/** The program's upgrade authority. */\nupgradeAuthority: TAccountMetas[1];\n/**\n * The program's program-data account, which records its upgrade\n * authority.\n */\nprogramData: TAccountMetas[2];\n/** The tier PDA to create: `[b\"amm_config\", index]`. */\nammConfig: TAccountMetas[3];\n/** The system program. */\nsystemProgram: TAccountMetas[4];\n};\ndata: CreateConfigInstructionData; };\n\nexport function parseCreateConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 5 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { payer: getNextAccount(), upgradeAuthority: getNextAccount(), programData: getNextAccount(), ammConfig: getNextAccount(), systemProgram: getNextAccount() }, data: getCreateConfigInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } from '@solana/kit';\nimport { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { findPoolPda } from '../pdas';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const CREATE_POOL_DISCRIMINATOR = 2;\n\nexport function getCreatePoolDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(CREATE_POOL_DISCRIMINATOR); }\n\nexport type CreatePoolInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountPayer extends string | AccountMeta<string> = string, TAccountDepositor extends string | AccountMeta<string> = string, TAccountPoolCreatorAuthority extends string | AccountMeta<string> = string, TAccountAmmConfig extends string | AccountMeta<string> = string, TAccountMint0 extends string | AccountMeta<string> = string, TAccountMint1 extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountDepositorToken0 extends string | AccountMeta<string> = string, TAccountDepositorToken1 extends string | AccountMeta<string> = string, TAccountLpOwner extends string | AccountMeta<string> = string, TAccountLpOwnerToken extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TAccountLpTokenProgram extends string | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\", TAccountAssociatedTokenProgram extends string | AccountMeta<string> = \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\", TAccountSystemProgram extends string | AccountMeta<string> = \"11111111111111111111111111111111\", TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountDepositor extends string ? ReadonlySignerAccount<TAccountDepositor> & AccountSignerMeta<TAccountDepositor> : TAccountDepositor, TAccountPoolCreatorAuthority extends string ? ReadonlySignerAccount<TAccountPoolCreatorAuthority> & AccountSignerMeta<TAccountPoolCreatorAuthority> : TAccountPoolCreatorAuthority, TAccountAmmConfig extends string ? ReadonlyAccount<TAccountAmmConfig> : TAccountAmmConfig, TAccountMint0 extends string ? ReadonlyAccount<TAccountMint0> : TAccountMint0, TAccountMint1 extends string ? ReadonlyAccount<TAccountMint1> : TAccountMint1, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint, TAccountVault0 extends string ? WritableAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? WritableAccount<TAccountVault1> : TAccountVault1, TAccountDepositorToken0 extends string ? WritableAccount<TAccountDepositorToken0> : TAccountDepositorToken0, TAccountDepositorToken1 extends string ? WritableAccount<TAccountDepositorToken1> : TAccountDepositorToken1, TAccountLpOwner extends string ? ReadonlyAccount<TAccountLpOwner> : TAccountLpOwner, TAccountLpOwnerToken extends string ? WritableAccount<TAccountLpOwnerToken> : TAccountLpOwnerToken, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, TAccountLpTokenProgram extends string ? ReadonlyAccount<TAccountLpTokenProgram> : TAccountLpTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;\n\nexport type CreatePoolInstructionData = { discriminator: number; \n/** Initial deposit of token 0. */\namount0: bigint; \n/** Initial deposit of token 1. */\namount1: bigint; \n/** Recipient of the pool's creator fees. */\ncreator: Address; \n/** `CreatorFeeMode` wire value. */\ncreatorFeeMode: number; };\n\nexport type CreatePoolInstructionDataArgs = { \n/** Initial deposit of token 0. */\namount0: number | bigint; \n/** Initial deposit of token 1. */\namount1: number | bigint; \n/** Recipient of the pool's creator fees. */\ncreator: Address; \n/** `CreatorFeeMode` wire value. */\ncreatorFeeMode: number; };\n\nexport function getCreatePoolInstructionDataEncoder(): FixedSizeEncoder<CreatePoolInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['amount0', getU64Encoder()], ['amount1', getU64Encoder()], ['creator', getAddressEncoder()], ['creatorFeeMode', getU8Encoder()]]), (value) => ({ ...value, discriminator: 2 }));\n}\n\nexport function getCreatePoolInstructionDataDecoder(): FixedSizeDecoder<CreatePoolInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(CREATE_POOL_DISCRIMINATOR, getU8Decoder())], ['amount0', getU64Decoder()], ['amount1', getU64Decoder()], ['creator', getAddressDecoder()], ['creatorFeeMode', getU8Decoder()]]);\n}\n\nexport function getCreatePoolInstructionDataCodec(): FixedSizeCodec<CreatePoolInstructionDataArgs, CreatePoolInstructionData> {\n return combineCodec(getCreatePoolInstructionDataEncoder(), getCreatePoolInstructionDataDecoder());\n}\n\nexport type CreatePoolAsyncInput<TAccountPayer extends InstructionSignerInput = InstructionSignerInput, TAccountDepositor extends InstructionSignerInput = InstructionSignerInput, TAccountPoolCreatorAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput = InstructionAccountInput, TAccountMint0 extends InstructionAccountInput = InstructionAccountInput, TAccountMint1 extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountLpMint extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountDepositorToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountDepositorToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpOwner extends InstructionAccountInput = InstructionAccountInput, TAccountLpOwnerToken extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /**\n * Pays rent for the pool, its vaults, its LP mint, and the LP token\n * account.\n */\npayer: TAccountPayer;\n/**\n * Owner of the token accounts the initial deposit comes from. May be the\n * same account as `payer`.\n */\ndepositor: TAccountDepositor;\n/**\n * Signer that authorizes pool creation. When the tier restricts pool\n * creation this must be its pool-creator authority; otherwise any signer\n * works, so pass the payer.\n */\npoolCreatorAuthority: TAccountPoolCreatorAuthority;\n/** The fee tier the pool is created under. */\nammConfig: TAccountAmmConfig;\n/** Token 0 mint: the byte-wise smaller mint address. */\nmint0: TAccountMint0;\n/** Token 1 mint: the byte-wise larger mint address. */\nmint1: TAccountMint1;\n/** The pool PDA to create: `[b\"pool\", amm_config, mint_0, mint_1]`. */\npool?: TAccountPool;\n/** The LP mint PDA to create: `[b\"pool_lp_mint\", pool]`. */\nlpMint: TAccountLpMint;\n/** The token 0 vault PDA to create: `[b\"pool_vault\", pool, mint_0]`. */\nvault0: TAccountVault0;\n/** The token 1 vault PDA to create: `[b\"pool_vault\", pool, mint_1]`. */\nvault1: TAccountVault1;\n/** The depositor's token 0 account. */\ndepositorToken0: TAccountDepositorToken0;\n/** The depositor's token 1 account. */\ndepositorToken1: TAccountDepositorToken1;\n/** Wallet that receives the initial LP. */\nlpOwner: TAccountLpOwner;\n/** `lp_owner`'s associated token account for the LP mint, created here. */\nlpOwnerToken: TAccountLpOwnerToken;\n/** Token program that owns `mint_0`. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns `mint_1`. */\ntokenProgram1: TAccountTokenProgram1;\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram?: TAccountLpTokenProgram;\n/** The associated token account program. */\nassociatedTokenProgram?: TAccountAssociatedTokenProgram;\n/** The system program. */\nsystemProgram?: TAccountSystemProgram;\namount0: CreatePoolInstructionDataArgs[\"amount0\"];\namount1: CreatePoolInstructionDataArgs[\"amount1\"];\ncreator: CreatePoolInstructionDataArgs[\"creator\"];\ncreatorFeeMode: CreatePoolInstructionDataArgs[\"creatorFeeMode\"];\n}\n\nexport async function getCreatePoolInstructionAsync<TAccountPayer extends InstructionSignerInput, TAccountDepositor extends InstructionSignerInput, TAccountPoolCreatorAuthority extends InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput, TAccountMint0 extends InstructionAccountInput, TAccountMint1 extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TAccountLpMint extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountDepositorToken0 extends InstructionAccountInput, TAccountDepositorToken1 extends InstructionAccountInput, TAccountLpOwner extends InstructionAccountInput, TAccountLpOwnerToken extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: CreatePoolAsyncInput<TAccountPayer, TAccountDepositor, TAccountPoolCreatorAuthority, TAccountAmmConfig, TAccountMint0, TAccountMint1, TAccountPool, TAccountLpMint, TAccountVault0, TAccountVault1, TAccountDepositorToken0, TAccountDepositorToken1, TAccountLpOwner, TAccountLpOwnerToken, TAccountTokenProgram0, TAccountTokenProgram1, TAccountLpTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress } ): Promise<CreatePoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountDepositor, InstructionAccountInputAddress<TAccountDepositor>>, ResolvedInstructionAccountMeta<TAccountPoolCreatorAuthority, InstructionAccountInputAddress<TAccountPoolCreatorAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountMint0, InstructionAccountInputAddress<TAccountMint0>>, ResolvedInstructionAccountMeta<TAccountMint1, InstructionAccountInputAddress<TAccountMint1>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountDepositorToken0, InstructionAccountInputAddress<TAccountDepositorToken0>>, ResolvedInstructionAccountMeta<TAccountDepositorToken1, InstructionAccountInputAddress<TAccountDepositorToken1>>, ResolvedInstructionAccountMeta<TAccountLpOwner, InstructionAccountInputAddress<TAccountLpOwner>>, ResolvedInstructionAccountMeta<TAccountLpOwnerToken, InstructionAccountInputAddress<TAccountLpOwnerToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { payer: { value: input.payer ?? null, isSigner: true, isWritable: true }, depositor: { value: input.depositor ?? null, isSigner: true, isWritable: false }, poolCreatorAuthority: { value: input.poolCreatorAuthority ?? null, isSigner: true, isWritable: false }, ammConfig: { value: input.ammConfig ?? null, isSigner: false, isWritable: false }, mint0: { value: input.mint0 ?? null, isSigner: false, isWritable: false }, mint1: { value: input.mint1 ?? null, isSigner: false, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, lpMint: { value: input.lpMint ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, depositorToken0: { value: input.depositorToken0 ?? null, isSigner: false, isWritable: true }, depositorToken1: { value: input.depositorToken1 ?? null, isSigner: false, isWritable: true }, lpOwner: { value: input.lpOwner ?? null, isSigner: false, isWritable: false }, lpOwnerToken: { value: input.lpOwnerToken ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false }, lpTokenProgram: { value: input.lpTokenProgram ?? null, isSigner: false, isWritable: false }, associatedTokenProgram: { value: input.associatedTokenProgram ?? null, isSigner: false, isWritable: false }, systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n// Resolve default values.\nif (!accounts.pool.value) {\naccounts.pool.value = await findPoolPda({ ammConfig: getAddressFromResolvedInstructionAccount(\"ammConfig\", accounts.ammConfig.value), mint0: getAddressFromResolvedInstructionAccount(\"mint0\", accounts.mint0.value), mint1: getAddressFromResolvedInstructionAccount(\"mint1\", accounts.mint1.value) }, { programAddress });\n}\nif (!accounts.lpTokenProgram.value) {\naccounts.lpTokenProgram.value = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n}\nif (!accounts.associatedTokenProgram.value) {\naccounts.associatedTokenProgram.value = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n}\nif (!accounts.systemProgram.value) {\naccounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n}\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"payer\", accounts.payer), getAccountMeta(\"depositor\", accounts.depositor), getAccountMeta(\"poolCreatorAuthority\", accounts.poolCreatorAuthority), getAccountMeta(\"ammConfig\", accounts.ammConfig), getAccountMeta(\"mint0\", accounts.mint0), getAccountMeta(\"mint1\", accounts.mint1), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"lpMint\", accounts.lpMint), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"depositorToken0\", accounts.depositorToken0), getAccountMeta(\"depositorToken1\", accounts.depositorToken1), getAccountMeta(\"lpOwner\", accounts.lpOwner), getAccountMeta(\"lpOwnerToken\", accounts.lpOwnerToken), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1), getAccountMeta(\"lpTokenProgram\", accounts.lpTokenProgram), getAccountMeta(\"associatedTokenProgram\", accounts.associatedTokenProgram), getAccountMeta(\"systemProgram\", accounts.systemProgram)], data: getCreatePoolInstructionDataEncoder().encode(args as CreatePoolInstructionDataArgs), programAddress } as CreatePoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountDepositor, InstructionAccountInputAddress<TAccountDepositor>>, ResolvedInstructionAccountMeta<TAccountPoolCreatorAuthority, InstructionAccountInputAddress<TAccountPoolCreatorAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountMint0, InstructionAccountInputAddress<TAccountMint0>>, ResolvedInstructionAccountMeta<TAccountMint1, InstructionAccountInputAddress<TAccountMint1>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountDepositorToken0, InstructionAccountInputAddress<TAccountDepositorToken0>>, ResolvedInstructionAccountMeta<TAccountDepositorToken1, InstructionAccountInputAddress<TAccountDepositorToken1>>, ResolvedInstructionAccountMeta<TAccountLpOwner, InstructionAccountInputAddress<TAccountLpOwner>>, ResolvedInstructionAccountMeta<TAccountLpOwnerToken, InstructionAccountInputAddress<TAccountLpOwnerToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>);\n}\n\nexport type CreatePoolInput<TAccountPayer extends InstructionSignerInput = InstructionSignerInput, TAccountDepositor extends InstructionSignerInput = InstructionSignerInput, TAccountPoolCreatorAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput = InstructionAccountInput, TAccountMint0 extends InstructionAccountInput = InstructionAccountInput, TAccountMint1 extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountLpMint extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountDepositorToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountDepositorToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpOwner extends InstructionAccountInput = InstructionAccountInput, TAccountLpOwnerToken extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /**\n * Pays rent for the pool, its vaults, its LP mint, and the LP token\n * account.\n */\npayer: TAccountPayer;\n/**\n * Owner of the token accounts the initial deposit comes from. May be the\n * same account as `payer`.\n */\ndepositor: TAccountDepositor;\n/**\n * Signer that authorizes pool creation. When the tier restricts pool\n * creation this must be its pool-creator authority; otherwise any signer\n * works, so pass the payer.\n */\npoolCreatorAuthority: TAccountPoolCreatorAuthority;\n/** The fee tier the pool is created under. */\nammConfig: TAccountAmmConfig;\n/** Token 0 mint: the byte-wise smaller mint address. */\nmint0: TAccountMint0;\n/** Token 1 mint: the byte-wise larger mint address. */\nmint1: TAccountMint1;\n/** The pool PDA to create: `[b\"pool\", amm_config, mint_0, mint_1]`. */\npool: TAccountPool;\n/** The LP mint PDA to create: `[b\"pool_lp_mint\", pool]`. */\nlpMint: TAccountLpMint;\n/** The token 0 vault PDA to create: `[b\"pool_vault\", pool, mint_0]`. */\nvault0: TAccountVault0;\n/** The token 1 vault PDA to create: `[b\"pool_vault\", pool, mint_1]`. */\nvault1: TAccountVault1;\n/** The depositor's token 0 account. */\ndepositorToken0: TAccountDepositorToken0;\n/** The depositor's token 1 account. */\ndepositorToken1: TAccountDepositorToken1;\n/** Wallet that receives the initial LP. */\nlpOwner: TAccountLpOwner;\n/** `lp_owner`'s associated token account for the LP mint, created here. */\nlpOwnerToken: TAccountLpOwnerToken;\n/** Token program that owns `mint_0`. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns `mint_1`. */\ntokenProgram1: TAccountTokenProgram1;\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram?: TAccountLpTokenProgram;\n/** The associated token account program. */\nassociatedTokenProgram?: TAccountAssociatedTokenProgram;\n/** The system program. */\nsystemProgram?: TAccountSystemProgram;\namount0: CreatePoolInstructionDataArgs[\"amount0\"];\namount1: CreatePoolInstructionDataArgs[\"amount1\"];\ncreator: CreatePoolInstructionDataArgs[\"creator\"];\ncreatorFeeMode: CreatePoolInstructionDataArgs[\"creatorFeeMode\"];\n}\n\nexport function getCreatePoolInstruction<TAccountPayer extends InstructionSignerInput, TAccountDepositor extends InstructionSignerInput, TAccountPoolCreatorAuthority extends InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput, TAccountMint0 extends InstructionAccountInput, TAccountMint1 extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TAccountLpMint extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountDepositorToken0 extends InstructionAccountInput, TAccountDepositorToken1 extends InstructionAccountInput, TAccountLpOwner extends InstructionAccountInput, TAccountLpOwnerToken extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: CreatePoolInput<TAccountPayer, TAccountDepositor, TAccountPoolCreatorAuthority, TAccountAmmConfig, TAccountMint0, TAccountMint1, TAccountPool, TAccountLpMint, TAccountVault0, TAccountVault1, TAccountDepositorToken0, TAccountDepositorToken1, TAccountLpOwner, TAccountLpOwnerToken, TAccountTokenProgram0, TAccountTokenProgram1, TAccountLpTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress } ): CreatePoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountDepositor, InstructionAccountInputAddress<TAccountDepositor>>, ResolvedInstructionAccountMeta<TAccountPoolCreatorAuthority, InstructionAccountInputAddress<TAccountPoolCreatorAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountMint0, InstructionAccountInputAddress<TAccountMint0>>, ResolvedInstructionAccountMeta<TAccountMint1, InstructionAccountInputAddress<TAccountMint1>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountDepositorToken0, InstructionAccountInputAddress<TAccountDepositorToken0>>, ResolvedInstructionAccountMeta<TAccountDepositorToken1, InstructionAccountInputAddress<TAccountDepositorToken1>>, ResolvedInstructionAccountMeta<TAccountLpOwner, InstructionAccountInputAddress<TAccountLpOwner>>, ResolvedInstructionAccountMeta<TAccountLpOwnerToken, InstructionAccountInputAddress<TAccountLpOwnerToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { payer: { value: input.payer ?? null, isSigner: true, isWritable: true }, depositor: { value: input.depositor ?? null, isSigner: true, isWritable: false }, poolCreatorAuthority: { value: input.poolCreatorAuthority ?? null, isSigner: true, isWritable: false }, ammConfig: { value: input.ammConfig ?? null, isSigner: false, isWritable: false }, mint0: { value: input.mint0 ?? null, isSigner: false, isWritable: false }, mint1: { value: input.mint1 ?? null, isSigner: false, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, lpMint: { value: input.lpMint ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, depositorToken0: { value: input.depositorToken0 ?? null, isSigner: false, isWritable: true }, depositorToken1: { value: input.depositorToken1 ?? null, isSigner: false, isWritable: true }, lpOwner: { value: input.lpOwner ?? null, isSigner: false, isWritable: false }, lpOwnerToken: { value: input.lpOwnerToken ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false }, lpTokenProgram: { value: input.lpTokenProgram ?? null, isSigner: false, isWritable: false }, associatedTokenProgram: { value: input.associatedTokenProgram ?? null, isSigner: false, isWritable: false }, systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n// Resolve default values.\nif (!accounts.lpTokenProgram.value) {\naccounts.lpTokenProgram.value = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n}\nif (!accounts.associatedTokenProgram.value) {\naccounts.associatedTokenProgram.value = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n}\nif (!accounts.systemProgram.value) {\naccounts.systemProgram.value = '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n}\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"payer\", accounts.payer), getAccountMeta(\"depositor\", accounts.depositor), getAccountMeta(\"poolCreatorAuthority\", accounts.poolCreatorAuthority), getAccountMeta(\"ammConfig\", accounts.ammConfig), getAccountMeta(\"mint0\", accounts.mint0), getAccountMeta(\"mint1\", accounts.mint1), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"lpMint\", accounts.lpMint), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"depositorToken0\", accounts.depositorToken0), getAccountMeta(\"depositorToken1\", accounts.depositorToken1), getAccountMeta(\"lpOwner\", accounts.lpOwner), getAccountMeta(\"lpOwnerToken\", accounts.lpOwnerToken), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1), getAccountMeta(\"lpTokenProgram\", accounts.lpTokenProgram), getAccountMeta(\"associatedTokenProgram\", accounts.associatedTokenProgram), getAccountMeta(\"systemProgram\", accounts.systemProgram)], data: getCreatePoolInstructionDataEncoder().encode(args as CreatePoolInstructionDataArgs), programAddress } as CreatePoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPayer, InstructionAccountInputAddress<TAccountPayer>>, ResolvedInstructionAccountMeta<TAccountDepositor, InstructionAccountInputAddress<TAccountDepositor>>, ResolvedInstructionAccountMeta<TAccountPoolCreatorAuthority, InstructionAccountInputAddress<TAccountPoolCreatorAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>, ResolvedInstructionAccountMeta<TAccountMint0, InstructionAccountInputAddress<TAccountMint0>>, ResolvedInstructionAccountMeta<TAccountMint1, InstructionAccountInputAddress<TAccountMint1>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountDepositorToken0, InstructionAccountInputAddress<TAccountDepositorToken0>>, ResolvedInstructionAccountMeta<TAccountDepositorToken1, InstructionAccountInputAddress<TAccountDepositorToken1>>, ResolvedInstructionAccountMeta<TAccountLpOwner, InstructionAccountInputAddress<TAccountLpOwner>>, ResolvedInstructionAccountMeta<TAccountLpOwnerToken, InstructionAccountInputAddress<TAccountLpOwnerToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>);\n}\n\nexport type ParsedCreatePoolInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/**\n * Pays rent for the pool, its vaults, its LP mint, and the LP token\n * account.\n */\npayer: TAccountMetas[0];\n/**\n * Owner of the token accounts the initial deposit comes from. May be the\n * same account as `payer`.\n */\ndepositor: TAccountMetas[1];\n/**\n * Signer that authorizes pool creation. When the tier restricts pool\n * creation this must be its pool-creator authority; otherwise any signer\n * works, so pass the payer.\n */\npoolCreatorAuthority: TAccountMetas[2];\n/** The fee tier the pool is created under. */\nammConfig: TAccountMetas[3];\n/** Token 0 mint: the byte-wise smaller mint address. */\nmint0: TAccountMetas[4];\n/** Token 1 mint: the byte-wise larger mint address. */\nmint1: TAccountMetas[5];\n/** The pool PDA to create: `[b\"pool\", amm_config, mint_0, mint_1]`. */\npool: TAccountMetas[6];\n/** The LP mint PDA to create: `[b\"pool_lp_mint\", pool]`. */\nlpMint: TAccountMetas[7];\n/** The token 0 vault PDA to create: `[b\"pool_vault\", pool, mint_0]`. */\nvault0: TAccountMetas[8];\n/** The token 1 vault PDA to create: `[b\"pool_vault\", pool, mint_1]`. */\nvault1: TAccountMetas[9];\n/** The depositor's token 0 account. */\ndepositorToken0: TAccountMetas[10];\n/** The depositor's token 1 account. */\ndepositorToken1: TAccountMetas[11];\n/** Wallet that receives the initial LP. */\nlpOwner: TAccountMetas[12];\n/** `lp_owner`'s associated token account for the LP mint, created here. */\nlpOwnerToken: TAccountMetas[13];\n/** Token program that owns `mint_0`. */\ntokenProgram0: TAccountMetas[14];\n/** Token program that owns `mint_1`. */\ntokenProgram1: TAccountMetas[15];\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram: TAccountMetas[16];\n/** The associated token account program. */\nassociatedTokenProgram: TAccountMetas[17];\n/** The system program. */\nsystemProgram: TAccountMetas[18];\n};\ndata: CreatePoolInstructionData; };\n\nexport function parseCreatePoolInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreatePoolInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 19) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 19 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { payer: getNextAccount(), depositor: getNextAccount(), poolCreatorAuthority: getNextAccount(), ammConfig: getNextAccount(), mint0: getNextAccount(), mint1: getNextAccount(), pool: getNextAccount(), lpMint: getNextAccount(), vault0: getNextAccount(), vault1: getNextAccount(), depositorToken0: getNextAccount(), depositorToken1: getNextAccount(), lpOwner: getNextAccount(), lpOwnerToken: getNextAccount(), tokenProgram0: getNextAccount(), tokenProgram1: getNextAccount(), lpTokenProgram: getNextAccount(), associatedTokenProgram: getNextAccount(), systemProgram: getNextAccount() }, data: getCreatePoolInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const DEPOSIT_DISCRIMINATOR = 3;\n\nexport function getDepositDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(DEPOSIT_DISCRIMINATOR); }\n\nexport type DepositInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountOwnerToken0 extends string | AccountMeta<string> = string, TAccountOwnerToken1 extends string | AccountMeta<string> = string, TAccountOwnerLpToken extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TAccountLpTokenProgram extends string | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\", TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountVault0 extends string ? WritableAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? WritableAccount<TAccountVault1> : TAccountVault1, TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint, TAccountOwnerToken0 extends string ? WritableAccount<TAccountOwnerToken0> : TAccountOwnerToken0, TAccountOwnerToken1 extends string ? WritableAccount<TAccountOwnerToken1> : TAccountOwnerToken1, TAccountOwnerLpToken extends string ? WritableAccount<TAccountOwnerLpToken> : TAccountOwnerLpToken, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, TAccountLpTokenProgram extends string ? ReadonlyAccount<TAccountLpTokenProgram> : TAccountLpTokenProgram, ...TRemainingAccounts]>;\n\nexport type DepositInstructionData = { discriminator: number; \n/** LP to mint. */\nlpAmount: bigint; \n/** Most token 0 the depositor will add. */\nmaximumAmount0: bigint; \n/** Most token 1 the depositor will add. */\nmaximumAmount1: bigint; };\n\nexport type DepositInstructionDataArgs = { \n/** LP to mint. */\nlpAmount: number | bigint; \n/** Most token 0 the depositor will add. */\nmaximumAmount0: number | bigint; \n/** Most token 1 the depositor will add. */\nmaximumAmount1: number | bigint; };\n\nexport function getDepositInstructionDataEncoder(): FixedSizeEncoder<DepositInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['lpAmount', getU64Encoder()], ['maximumAmount0', getU64Encoder()], ['maximumAmount1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 3 }));\n}\n\nexport function getDepositInstructionDataDecoder(): FixedSizeDecoder<DepositInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(DEPOSIT_DISCRIMINATOR, getU8Decoder())], ['lpAmount', getU64Decoder()], ['maximumAmount0', getU64Decoder()], ['maximumAmount1', getU64Decoder()]]);\n}\n\nexport function getDepositInstructionDataCodec(): FixedSizeCodec<DepositInstructionDataArgs, DepositInstructionData> {\n return combineCodec(getDepositInstructionDataEncoder(), getDepositInstructionDataDecoder());\n}\n\nexport type DepositInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpMint extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerLpToken extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /** The LP owner, who owns every token account below. */\nowner: TAccountOwner;\n/** The pool. */\npool: TAccountPool;\n/** The pool's token 0 vault. */\nvault0: TAccountVault0;\n/** The pool's token 1 vault. */\nvault1: TAccountVault1;\n/** The pool's LP mint. */\nlpMint: TAccountLpMint;\n/** The owner's token 0 account. */\nownerToken0: TAccountOwnerToken0;\n/** The owner's token 1 account. */\nownerToken1: TAccountOwnerToken1;\n/** The owner's LP token account. */\nownerLpToken: TAccountOwnerLpToken;\n/** Token program that owns token 0. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns token 1. */\ntokenProgram1: TAccountTokenProgram1;\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram?: TAccountLpTokenProgram;\nlpAmount: DepositInstructionDataArgs[\"lpAmount\"];\nmaximumAmount0: DepositInstructionDataArgs[\"maximumAmount0\"];\nmaximumAmount1: DepositInstructionDataArgs[\"maximumAmount1\"];\n}\n\nexport function getDepositInstruction<TAccountOwner extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountLpMint extends InstructionAccountInput, TAccountOwnerToken0 extends InstructionAccountInput, TAccountOwnerToken1 extends InstructionAccountInput, TAccountOwnerLpToken extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: DepositInput<TAccountOwner, TAccountPool, TAccountVault0, TAccountVault1, TAccountLpMint, TAccountOwnerToken0, TAccountOwnerToken1, TAccountOwnerLpToken, TAccountTokenProgram0, TAccountTokenProgram1, TAccountLpTokenProgram>, config?: { programAddress?: TProgramAddress } ): DepositInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountOwnerToken0, InstructionAccountInputAddress<TAccountOwnerToken0>>, ResolvedInstructionAccountMeta<TAccountOwnerToken1, InstructionAccountInputAddress<TAccountOwnerToken1>>, ResolvedInstructionAccountMeta<TAccountOwnerLpToken, InstructionAccountInputAddress<TAccountOwnerLpToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { owner: { value: input.owner ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, lpMint: { value: input.lpMint ?? null, isSigner: false, isWritable: true }, ownerToken0: { value: input.ownerToken0 ?? null, isSigner: false, isWritable: true }, ownerToken1: { value: input.ownerToken1 ?? null, isSigner: false, isWritable: true }, ownerLpToken: { value: input.ownerLpToken ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false }, lpTokenProgram: { value: input.lpTokenProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n// Resolve default values.\nif (!accounts.lpTokenProgram.value) {\naccounts.lpTokenProgram.value = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n}\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"owner\", accounts.owner), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"lpMint\", accounts.lpMint), getAccountMeta(\"ownerToken0\", accounts.ownerToken0), getAccountMeta(\"ownerToken1\", accounts.ownerToken1), getAccountMeta(\"ownerLpToken\", accounts.ownerLpToken), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1), getAccountMeta(\"lpTokenProgram\", accounts.lpTokenProgram)], data: getDepositInstructionDataEncoder().encode(args as DepositInstructionDataArgs), programAddress } as DepositInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountOwnerToken0, InstructionAccountInputAddress<TAccountOwnerToken0>>, ResolvedInstructionAccountMeta<TAccountOwnerToken1, InstructionAccountInputAddress<TAccountOwnerToken1>>, ResolvedInstructionAccountMeta<TAccountOwnerLpToken, InstructionAccountInputAddress<TAccountOwnerLpToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>>);\n}\n\nexport type ParsedDepositInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The LP owner, who owns every token account below. */\nowner: TAccountMetas[0];\n/** The pool. */\npool: TAccountMetas[1];\n/** The pool's token 0 vault. */\nvault0: TAccountMetas[2];\n/** The pool's token 1 vault. */\nvault1: TAccountMetas[3];\n/** The pool's LP mint. */\nlpMint: TAccountMetas[4];\n/** The owner's token 0 account. */\nownerToken0: TAccountMetas[5];\n/** The owner's token 1 account. */\nownerToken1: TAccountMetas[6];\n/** The owner's LP token account. */\nownerLpToken: TAccountMetas[7];\n/** Token program that owns token 0. */\ntokenProgram0: TAccountMetas[8];\n/** Token program that owns token 1. */\ntokenProgram1: TAccountMetas[9];\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram: TAccountMetas[10];\n};\ndata: DepositInstructionData; };\n\nexport function parseDepositInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedDepositInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 11 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { owner: getNextAccount(), pool: getNextAccount(), vault0: getNextAccount(), vault1: getNextAccount(), lpMint: getNextAccount(), ownerToken0: getNextAccount(), ownerToken1: getNextAccount(), ownerLpToken: getNextAccount(), tokenProgram0: getNextAccount(), tokenProgram1: getNextAccount(), lpTokenProgram: getNextAccount() }, data: getDepositInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const SET_POOL_CREATOR_DISCRIMINATOR = 9;\n\nexport function getSetPoolCreatorDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(SET_POOL_CREATOR_DISCRIMINATOR); }\n\nexport type SetPoolCreatorInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountCreator extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountCreator extends string ? ReadonlySignerAccount<TAccountCreator> & AccountSignerMeta<TAccountCreator> : TAccountCreator, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, ...TRemainingAccounts]>;\n\nexport type SetPoolCreatorInstructionData = { discriminator: number; \n/** New recipient of the pool's creator fees. */\nnewCreator: Address; };\n\nexport type SetPoolCreatorInstructionDataArgs = { \n/** New recipient of the pool's creator fees. */\nnewCreator: Address; };\n\nexport function getSetPoolCreatorInstructionDataEncoder(): FixedSizeEncoder<SetPoolCreatorInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['newCreator', getAddressEncoder()]]), (value) => ({ ...value, discriminator: 9 }));\n}\n\nexport function getSetPoolCreatorInstructionDataDecoder(): FixedSizeDecoder<SetPoolCreatorInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(SET_POOL_CREATOR_DISCRIMINATOR, getU8Decoder())], ['newCreator', getAddressDecoder()]]);\n}\n\nexport function getSetPoolCreatorInstructionDataCodec(): FixedSizeCodec<SetPoolCreatorInstructionDataArgs, SetPoolCreatorInstructionData> {\n return combineCodec(getSetPoolCreatorInstructionDataEncoder(), getSetPoolCreatorInstructionDataDecoder());\n}\n\nexport type SetPoolCreatorInput<TAccountCreator extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {\n /** The pool's current creator. */\ncreator: TAccountCreator;\n/** The pool. */\npool: TAccountPool;\nnewCreator: SetPoolCreatorInstructionDataArgs[\"newCreator\"];\n}\n\nexport function getSetPoolCreatorInstruction<TAccountCreator extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: SetPoolCreatorInput<TAccountCreator, TAccountPool>, config?: { programAddress?: TProgramAddress } ): SetPoolCreatorInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountCreator, InstructionAccountInputAddress<TAccountCreator>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { creator: { value: input.creator ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"creator\", accounts.creator), getAccountMeta(\"pool\", accounts.pool)], data: getSetPoolCreatorInstructionDataEncoder().encode(args as SetPoolCreatorInstructionDataArgs), programAddress } as SetPoolCreatorInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountCreator, InstructionAccountInputAddress<TAccountCreator>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>);\n}\n\nexport type ParsedSetPoolCreatorInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The pool's current creator. */\ncreator: TAccountMetas[0];\n/** The pool. */\npool: TAccountMetas[1];\n};\ndata: SetPoolCreatorInstructionData; };\n\nexport function parseSetPoolCreatorInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetPoolCreatorInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 2 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { creator: getNextAccount(), pool: getNextAccount() }, data: getSetPoolCreatorInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const SWAP_EXACT_IN_DISCRIMINATOR = 5;\n\nexport function getSwapExactInDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(SWAP_EXACT_IN_DISCRIMINATOR); }\n\nexport type SwapExactInInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountTrader extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountInputToken extends string | AccountMeta<string> = string, TAccountOutputToken extends string | AccountMeta<string> = string, TAccountInputVault extends string | AccountMeta<string> = string, TAccountOutputVault extends string | AccountMeta<string> = string, TAccountInputTokenProgram extends string | AccountMeta<string> = string, TAccountOutputTokenProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTrader extends string ? ReadonlySignerAccount<TAccountTrader> & AccountSignerMeta<TAccountTrader> : TAccountTrader, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountInputToken extends string ? WritableAccount<TAccountInputToken> : TAccountInputToken, TAccountOutputToken extends string ? WritableAccount<TAccountOutputToken> : TAccountOutputToken, TAccountInputVault extends string ? WritableAccount<TAccountInputVault> : TAccountInputVault, TAccountOutputVault extends string ? WritableAccount<TAccountOutputVault> : TAccountOutputVault, TAccountInputTokenProgram extends string ? ReadonlyAccount<TAccountInputTokenProgram> : TAccountInputTokenProgram, TAccountOutputTokenProgram extends string ? ReadonlyAccount<TAccountOutputTokenProgram> : TAccountOutputTokenProgram, ...TRemainingAccounts]>;\n\nexport type SwapExactInInstructionData = { discriminator: number; \n/** Exact input the trader sells. */\namountIn: bigint; \n/** Least output the trader will accept. */\nminimumAmountOut: bigint; };\n\nexport type SwapExactInInstructionDataArgs = { \n/** Exact input the trader sells. */\namountIn: number | bigint; \n/** Least output the trader will accept. */\nminimumAmountOut: number | bigint; };\n\nexport function getSwapExactInInstructionDataEncoder(): FixedSizeEncoder<SwapExactInInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['amountIn', getU64Encoder()], ['minimumAmountOut', getU64Encoder()]]), (value) => ({ ...value, discriminator: 5 }));\n}\n\nexport function getSwapExactInInstructionDataDecoder(): FixedSizeDecoder<SwapExactInInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(SWAP_EXACT_IN_DISCRIMINATOR, getU8Decoder())], ['amountIn', getU64Decoder()], ['minimumAmountOut', getU64Decoder()]]);\n}\n\nexport function getSwapExactInInstructionDataCodec(): FixedSizeCodec<SwapExactInInstructionDataArgs, SwapExactInInstructionData> {\n return combineCodec(getSwapExactInInstructionDataEncoder(), getSwapExactInInstructionDataDecoder());\n}\n\nexport type SwapExactInInput<TAccountTrader extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountInputToken extends InstructionAccountInput = InstructionAccountInput, TAccountOutputToken extends InstructionAccountInput = InstructionAccountInput, TAccountInputVault extends InstructionAccountInput = InstructionAccountInput, TAccountOutputVault extends InstructionAccountInput = InstructionAccountInput, TAccountInputTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountOutputTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /** The trader, who owns `input_token`. */\ntrader: TAccountTrader;\n/** The pool to trade against. */\npool: TAccountPool;\n/** The trader's account for the token being sold. */\ninputToken: TAccountInputToken;\n/** The account that receives the token being bought. */\noutputToken: TAccountOutputToken;\n/** The pool's vault for the token being sold. */\ninputVault: TAccountInputVault;\n/** The pool's vault for the token being bought. */\noutputVault: TAccountOutputVault;\n/** Token program that owns the sold token. */\ninputTokenProgram: TAccountInputTokenProgram;\n/** Token program that owns the bought token. */\noutputTokenProgram: TAccountOutputTokenProgram;\namountIn: SwapExactInInstructionDataArgs[\"amountIn\"];\nminimumAmountOut: SwapExactInInstructionDataArgs[\"minimumAmountOut\"];\n}\n\nexport function getSwapExactInInstruction<TAccountTrader extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountInputToken extends InstructionAccountInput, TAccountOutputToken extends InstructionAccountInput, TAccountInputVault extends InstructionAccountInput, TAccountOutputVault extends InstructionAccountInput, TAccountInputTokenProgram extends InstructionAccountInput, TAccountOutputTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: SwapExactInInput<TAccountTrader, TAccountPool, TAccountInputToken, TAccountOutputToken, TAccountInputVault, TAccountOutputVault, TAccountInputTokenProgram, TAccountOutputTokenProgram>, config?: { programAddress?: TProgramAddress } ): SwapExactInInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountTrader, InstructionAccountInputAddress<TAccountTrader>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountInputToken, InstructionAccountInputAddress<TAccountInputToken>>, ResolvedInstructionAccountMeta<TAccountOutputToken, InstructionAccountInputAddress<TAccountOutputToken>>, ResolvedInstructionAccountMeta<TAccountInputVault, InstructionAccountInputAddress<TAccountInputVault>>, ResolvedInstructionAccountMeta<TAccountOutputVault, InstructionAccountInputAddress<TAccountOutputVault>>, ResolvedInstructionAccountMeta<TAccountInputTokenProgram, InstructionAccountInputAddress<TAccountInputTokenProgram>>, ResolvedInstructionAccountMeta<TAccountOutputTokenProgram, InstructionAccountInputAddress<TAccountOutputTokenProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { trader: { value: input.trader ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, inputToken: { value: input.inputToken ?? null, isSigner: false, isWritable: true }, outputToken: { value: input.outputToken ?? null, isSigner: false, isWritable: true }, inputVault: { value: input.inputVault ?? null, isSigner: false, isWritable: true }, outputVault: { value: input.outputVault ?? null, isSigner: false, isWritable: true }, inputTokenProgram: { value: input.inputTokenProgram ?? null, isSigner: false, isWritable: false }, outputTokenProgram: { value: input.outputTokenProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"trader\", accounts.trader), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"inputToken\", accounts.inputToken), getAccountMeta(\"outputToken\", accounts.outputToken), getAccountMeta(\"inputVault\", accounts.inputVault), getAccountMeta(\"outputVault\", accounts.outputVault), getAccountMeta(\"inputTokenProgram\", accounts.inputTokenProgram), getAccountMeta(\"outputTokenProgram\", accounts.outputTokenProgram)], data: getSwapExactInInstructionDataEncoder().encode(args as SwapExactInInstructionDataArgs), programAddress } as SwapExactInInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountTrader, InstructionAccountInputAddress<TAccountTrader>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountInputToken, InstructionAccountInputAddress<TAccountInputToken>>, ResolvedInstructionAccountMeta<TAccountOutputToken, InstructionAccountInputAddress<TAccountOutputToken>>, ResolvedInstructionAccountMeta<TAccountInputVault, InstructionAccountInputAddress<TAccountInputVault>>, ResolvedInstructionAccountMeta<TAccountOutputVault, InstructionAccountInputAddress<TAccountOutputVault>>, ResolvedInstructionAccountMeta<TAccountInputTokenProgram, InstructionAccountInputAddress<TAccountInputTokenProgram>>, ResolvedInstructionAccountMeta<TAccountOutputTokenProgram, InstructionAccountInputAddress<TAccountOutputTokenProgram>>>);\n}\n\nexport type ParsedSwapExactInInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The trader, who owns `input_token`. */\ntrader: TAccountMetas[0];\n/** The pool to trade against. */\npool: TAccountMetas[1];\n/** The trader's account for the token being sold. */\ninputToken: TAccountMetas[2];\n/** The account that receives the token being bought. */\noutputToken: TAccountMetas[3];\n/** The pool's vault for the token being sold. */\ninputVault: TAccountMetas[4];\n/** The pool's vault for the token being bought. */\noutputVault: TAccountMetas[5];\n/** Token program that owns the sold token. */\ninputTokenProgram: TAccountMetas[6];\n/** Token program that owns the bought token. */\noutputTokenProgram: TAccountMetas[7];\n};\ndata: SwapExactInInstructionData; };\n\nexport function parseSwapExactInInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSwapExactInInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 8) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 8 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { trader: getNextAccount(), pool: getNextAccount(), inputToken: getNextAccount(), outputToken: getNextAccount(), inputVault: getNextAccount(), outputVault: getNextAccount(), inputTokenProgram: getNextAccount(), outputTokenProgram: getNextAccount() }, data: getSwapExactInInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const SWAP_EXACT_OUT_DISCRIMINATOR = 6;\n\nexport function getSwapExactOutDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(SWAP_EXACT_OUT_DISCRIMINATOR); }\n\nexport type SwapExactOutInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountTrader extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountInputToken extends string | AccountMeta<string> = string, TAccountOutputToken extends string | AccountMeta<string> = string, TAccountInputVault extends string | AccountMeta<string> = string, TAccountOutputVault extends string | AccountMeta<string> = string, TAccountInputTokenProgram extends string | AccountMeta<string> = string, TAccountOutputTokenProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountTrader extends string ? ReadonlySignerAccount<TAccountTrader> & AccountSignerMeta<TAccountTrader> : TAccountTrader, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountInputToken extends string ? WritableAccount<TAccountInputToken> : TAccountInputToken, TAccountOutputToken extends string ? WritableAccount<TAccountOutputToken> : TAccountOutputToken, TAccountInputVault extends string ? WritableAccount<TAccountInputVault> : TAccountInputVault, TAccountOutputVault extends string ? WritableAccount<TAccountOutputVault> : TAccountOutputVault, TAccountInputTokenProgram extends string ? ReadonlyAccount<TAccountInputTokenProgram> : TAccountInputTokenProgram, TAccountOutputTokenProgram extends string ? ReadonlyAccount<TAccountOutputTokenProgram> : TAccountOutputTokenProgram, ...TRemainingAccounts]>;\n\nexport type SwapExactOutInstructionData = { discriminator: number; \n/** Exact output the trader buys. */\namountOut: bigint; \n/** Most input the trader will pay. */\nmaximumAmountIn: bigint; };\n\nexport type SwapExactOutInstructionDataArgs = { \n/** Exact output the trader buys. */\namountOut: number | bigint; \n/** Most input the trader will pay. */\nmaximumAmountIn: number | bigint; };\n\nexport function getSwapExactOutInstructionDataEncoder(): FixedSizeEncoder<SwapExactOutInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['amountOut', getU64Encoder()], ['maximumAmountIn', getU64Encoder()]]), (value) => ({ ...value, discriminator: 6 }));\n}\n\nexport function getSwapExactOutInstructionDataDecoder(): FixedSizeDecoder<SwapExactOutInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(SWAP_EXACT_OUT_DISCRIMINATOR, getU8Decoder())], ['amountOut', getU64Decoder()], ['maximumAmountIn', getU64Decoder()]]);\n}\n\nexport function getSwapExactOutInstructionDataCodec(): FixedSizeCodec<SwapExactOutInstructionDataArgs, SwapExactOutInstructionData> {\n return combineCodec(getSwapExactOutInstructionDataEncoder(), getSwapExactOutInstructionDataDecoder());\n}\n\nexport type SwapExactOutInput<TAccountTrader extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountInputToken extends InstructionAccountInput = InstructionAccountInput, TAccountOutputToken extends InstructionAccountInput = InstructionAccountInput, TAccountInputVault extends InstructionAccountInput = InstructionAccountInput, TAccountOutputVault extends InstructionAccountInput = InstructionAccountInput, TAccountInputTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountOutputTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /** The trader, who owns `input_token`. */\ntrader: TAccountTrader;\n/** The pool to trade against. */\npool: TAccountPool;\n/** The trader's account for the token being sold. */\ninputToken: TAccountInputToken;\n/** The account that receives the token being bought. */\noutputToken: TAccountOutputToken;\n/** The pool's vault for the token being sold. */\ninputVault: TAccountInputVault;\n/** The pool's vault for the token being bought. */\noutputVault: TAccountOutputVault;\n/** Token program that owns the sold token. */\ninputTokenProgram: TAccountInputTokenProgram;\n/** Token program that owns the bought token. */\noutputTokenProgram: TAccountOutputTokenProgram;\namountOut: SwapExactOutInstructionDataArgs[\"amountOut\"];\nmaximumAmountIn: SwapExactOutInstructionDataArgs[\"maximumAmountIn\"];\n}\n\nexport function getSwapExactOutInstruction<TAccountTrader extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountInputToken extends InstructionAccountInput, TAccountOutputToken extends InstructionAccountInput, TAccountInputVault extends InstructionAccountInput, TAccountOutputVault extends InstructionAccountInput, TAccountInputTokenProgram extends InstructionAccountInput, TAccountOutputTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: SwapExactOutInput<TAccountTrader, TAccountPool, TAccountInputToken, TAccountOutputToken, TAccountInputVault, TAccountOutputVault, TAccountInputTokenProgram, TAccountOutputTokenProgram>, config?: { programAddress?: TProgramAddress } ): SwapExactOutInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountTrader, InstructionAccountInputAddress<TAccountTrader>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountInputToken, InstructionAccountInputAddress<TAccountInputToken>>, ResolvedInstructionAccountMeta<TAccountOutputToken, InstructionAccountInputAddress<TAccountOutputToken>>, ResolvedInstructionAccountMeta<TAccountInputVault, InstructionAccountInputAddress<TAccountInputVault>>, ResolvedInstructionAccountMeta<TAccountOutputVault, InstructionAccountInputAddress<TAccountOutputVault>>, ResolvedInstructionAccountMeta<TAccountInputTokenProgram, InstructionAccountInputAddress<TAccountInputTokenProgram>>, ResolvedInstructionAccountMeta<TAccountOutputTokenProgram, InstructionAccountInputAddress<TAccountOutputTokenProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { trader: { value: input.trader ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, inputToken: { value: input.inputToken ?? null, isSigner: false, isWritable: true }, outputToken: { value: input.outputToken ?? null, isSigner: false, isWritable: true }, inputVault: { value: input.inputVault ?? null, isSigner: false, isWritable: true }, outputVault: { value: input.outputVault ?? null, isSigner: false, isWritable: true }, inputTokenProgram: { value: input.inputTokenProgram ?? null, isSigner: false, isWritable: false }, outputTokenProgram: { value: input.outputTokenProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"trader\", accounts.trader), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"inputToken\", accounts.inputToken), getAccountMeta(\"outputToken\", accounts.outputToken), getAccountMeta(\"inputVault\", accounts.inputVault), getAccountMeta(\"outputVault\", accounts.outputVault), getAccountMeta(\"inputTokenProgram\", accounts.inputTokenProgram), getAccountMeta(\"outputTokenProgram\", accounts.outputTokenProgram)], data: getSwapExactOutInstructionDataEncoder().encode(args as SwapExactOutInstructionDataArgs), programAddress } as SwapExactOutInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountTrader, InstructionAccountInputAddress<TAccountTrader>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountInputToken, InstructionAccountInputAddress<TAccountInputToken>>, ResolvedInstructionAccountMeta<TAccountOutputToken, InstructionAccountInputAddress<TAccountOutputToken>>, ResolvedInstructionAccountMeta<TAccountInputVault, InstructionAccountInputAddress<TAccountInputVault>>, ResolvedInstructionAccountMeta<TAccountOutputVault, InstructionAccountInputAddress<TAccountOutputVault>>, ResolvedInstructionAccountMeta<TAccountInputTokenProgram, InstructionAccountInputAddress<TAccountInputTokenProgram>>, ResolvedInstructionAccountMeta<TAccountOutputTokenProgram, InstructionAccountInputAddress<TAccountOutputTokenProgram>>>);\n}\n\nexport type ParsedSwapExactOutInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The trader, who owns `input_token`. */\ntrader: TAccountMetas[0];\n/** The pool to trade against. */\npool: TAccountMetas[1];\n/** The trader's account for the token being sold. */\ninputToken: TAccountMetas[2];\n/** The account that receives the token being bought. */\noutputToken: TAccountMetas[3];\n/** The pool's vault for the token being sold. */\ninputVault: TAccountMetas[4];\n/** The pool's vault for the token being bought. */\noutputVault: TAccountMetas[5];\n/** Token program that owns the sold token. */\ninputTokenProgram: TAccountMetas[6];\n/** Token program that owns the bought token. */\noutputTokenProgram: TAccountMetas[7];\n};\ndata: SwapExactOutInstructionData; };\n\nexport function parseSwapExactOutInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSwapExactOutInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 8) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 8 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { trader: getNextAccount(), pool: getNextAccount(), inputToken: getNextAccount(), outputToken: getNextAccount(), inputVault: getNextAccount(), outputVault: getNextAccount(), inputTokenProgram: getNextAccount(), outputTokenProgram: getNextAccount() }, data: getSwapExactOutInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const UPDATE_CONFIG_DISCRIMINATOR = 1;\n\nexport function getUpdateConfigDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(UPDATE_CONFIG_DISCRIMINATOR); }\n\nexport type UpdateConfigInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountAmmConfig extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountAmmConfig extends string ? WritableAccount<TAccountAmmConfig> : TAccountAmmConfig, ...TRemainingAccounts]>;\n\nexport type UpdateConfigInstructionData = { discriminator: number; \n/** New tier authority. Pass the current authority to keep it. */\nnewAuthority: Address; \n/** Swap fee future pools snapshot, in parts per million. */\ntradeFeeRate: number; \n/** Protocol share future pools snapshot, in parts per million. */\nprotocolFeeRate: number; \n/** Creator fee future pools snapshot, in parts per million. */\ncreatorFeeRate: number; };\n\nexport type UpdateConfigInstructionDataArgs = { \n/** New tier authority. Pass the current authority to keep it. */\nnewAuthority: Address; \n/** Swap fee future pools snapshot, in parts per million. */\ntradeFeeRate: number; \n/** Protocol share future pools snapshot, in parts per million. */\nprotocolFeeRate: number; \n/** Creator fee future pools snapshot, in parts per million. */\ncreatorFeeRate: number; };\n\nexport function getUpdateConfigInstructionDataEncoder(): FixedSizeEncoder<UpdateConfigInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['newAuthority', getAddressEncoder()], ['tradeFeeRate', getU32Encoder()], ['protocolFeeRate', getU32Encoder()], ['creatorFeeRate', getU32Encoder()]]), (value) => ({ ...value, discriminator: 1 }));\n}\n\nexport function getUpdateConfigInstructionDataDecoder(): FixedSizeDecoder<UpdateConfigInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(UPDATE_CONFIG_DISCRIMINATOR, getU8Decoder())], ['newAuthority', getAddressDecoder()], ['tradeFeeRate', getU32Decoder()], ['protocolFeeRate', getU32Decoder()], ['creatorFeeRate', getU32Decoder()]]);\n}\n\nexport function getUpdateConfigInstructionDataCodec(): FixedSizeCodec<UpdateConfigInstructionDataArgs, UpdateConfigInstructionData> {\n return combineCodec(getUpdateConfigInstructionDataEncoder(), getUpdateConfigInstructionDataDecoder());\n}\n\nexport type UpdateConfigInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput = InstructionAccountInput> = {\n /** The tier's current authority. */\nauthority: TAccountAuthority;\n/** The tier to update. */\nammConfig: TAccountAmmConfig;\nnewAuthority: UpdateConfigInstructionDataArgs[\"newAuthority\"];\ntradeFeeRate: UpdateConfigInstructionDataArgs[\"tradeFeeRate\"];\nprotocolFeeRate: UpdateConfigInstructionDataArgs[\"protocolFeeRate\"];\ncreatorFeeRate: UpdateConfigInstructionDataArgs[\"creatorFeeRate\"];\n}\n\nexport function getUpdateConfigInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAmmConfig extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: UpdateConfigInput<TAccountAuthority, TAccountAmmConfig>, config?: { programAddress?: TProgramAddress } ): UpdateConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { authority: { value: input.authority ?? null, isSigner: true, isWritable: false }, ammConfig: { value: input.ammConfig ?? null, isSigner: false, isWritable: true } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"authority\", accounts.authority), getAccountMeta(\"ammConfig\", accounts.ammConfig)], data: getUpdateConfigInstructionDataEncoder().encode(args as UpdateConfigInstructionDataArgs), programAddress } as UpdateConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAmmConfig, InstructionAccountInputAddress<TAccountAmmConfig>>>);\n}\n\nexport type ParsedUpdateConfigInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The tier's current authority. */\nauthority: TAccountMetas[0];\n/** The tier to update. */\nammConfig: TAccountMetas[1];\n};\ndata: UpdateConfigInstructionData; };\n\nexport function parseUpdateConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdateConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 2 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { authority: getNextAccount(), ammConfig: getNextAccount() }, data: getUpdateConfigInstructionDataDecoder().decode(instruction.data) };\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 { getPinaPodDiscriminatorDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, SolanaError, transformEncoder, type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';\nimport { getAccountMetaFactory, type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccount, type ResolvedInstructionAccountMeta } from '@solana/program-client-core';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\nexport const WITHDRAW_DISCRIMINATOR = 4;\n\nexport function getWithdrawDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(WITHDRAW_DISCRIMINATOR); }\n\nexport type WithdrawInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountOwnerToken0 extends string | AccountMeta<string> = string, TAccountOwnerToken1 extends string | AccountMeta<string> = string, TAccountOwnerLpToken extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TAccountLpTokenProgram extends string | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\", TRemainingAccounts extends readonly AccountMeta<string>[] = []> =\nInstruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountVault0 extends string ? WritableAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? WritableAccount<TAccountVault1> : TAccountVault1, TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint, TAccountOwnerToken0 extends string ? WritableAccount<TAccountOwnerToken0> : TAccountOwnerToken0, TAccountOwnerToken1 extends string ? WritableAccount<TAccountOwnerToken1> : TAccountOwnerToken1, TAccountOwnerLpToken extends string ? WritableAccount<TAccountOwnerLpToken> : TAccountOwnerLpToken, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, TAccountLpTokenProgram extends string ? ReadonlyAccount<TAccountLpTokenProgram> : TAccountLpTokenProgram, ...TRemainingAccounts]>;\n\nexport type WithdrawInstructionData = { discriminator: number; \n/** LP to burn. */\nlpAmount: bigint; \n/** Least token 0 the owner will accept. */\nminimumAmount0: bigint; \n/** Least token 1 the owner will accept. */\nminimumAmount1: bigint; };\n\nexport type WithdrawInstructionDataArgs = { \n/** LP to burn. */\nlpAmount: number | bigint; \n/** Least token 0 the owner will accept. */\nminimumAmount0: number | bigint; \n/** Least token 1 the owner will accept. */\nminimumAmount1: number | bigint; };\n\nexport function getWithdrawInstructionDataEncoder(): FixedSizeEncoder<WithdrawInstructionDataArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['lpAmount', getU64Encoder()], ['minimumAmount0', getU64Encoder()], ['minimumAmount1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 4 }));\n}\n\nexport function getWithdrawInstructionDataDecoder(): FixedSizeDecoder<WithdrawInstructionData> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(WITHDRAW_DISCRIMINATOR, getU8Decoder())], ['lpAmount', getU64Decoder()], ['minimumAmount0', getU64Decoder()], ['minimumAmount1', getU64Decoder()]]);\n}\n\nexport function getWithdrawInstructionDataCodec(): FixedSizeCodec<WithdrawInstructionDataArgs, WithdrawInstructionData> {\n return combineCodec(getWithdrawInstructionDataEncoder(), getWithdrawInstructionDataDecoder());\n}\n\nexport type WithdrawInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpMint extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerToken0 extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerToken1 extends InstructionAccountInput = InstructionAccountInput, TAccountOwnerLpToken extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {\n /** The LP owner, who owns every token account below. */\nowner: TAccountOwner;\n/** The pool. */\npool: TAccountPool;\n/** The pool's token 0 vault. */\nvault0: TAccountVault0;\n/** The pool's token 1 vault. */\nvault1: TAccountVault1;\n/** The pool's LP mint. */\nlpMint: TAccountLpMint;\n/** The owner's token 0 account. */\nownerToken0: TAccountOwnerToken0;\n/** The owner's token 1 account. */\nownerToken1: TAccountOwnerToken1;\n/** The owner's LP token account. */\nownerLpToken: TAccountOwnerLpToken;\n/** Token program that owns token 0. */\ntokenProgram0: TAccountTokenProgram0;\n/** Token program that owns token 1. */\ntokenProgram1: TAccountTokenProgram1;\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram?: TAccountLpTokenProgram;\nlpAmount: WithdrawInstructionDataArgs[\"lpAmount\"];\nminimumAmount0: WithdrawInstructionDataArgs[\"minimumAmount0\"];\nminimumAmount1: WithdrawInstructionDataArgs[\"minimumAmount1\"];\n}\n\nexport function getWithdrawInstruction<TAccountOwner extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountLpMint extends InstructionAccountInput, TAccountOwnerToken0 extends InstructionAccountInput, TAccountOwnerToken1 extends InstructionAccountInput, TAccountOwnerLpToken extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TAccountLpTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: WithdrawInput<TAccountOwner, TAccountPool, TAccountVault0, TAccountVault1, TAccountLpMint, TAccountOwnerToken0, TAccountOwnerToken1, TAccountOwnerLpToken, TAccountTokenProgram0, TAccountTokenProgram1, TAccountLpTokenProgram>, config?: { programAddress?: TProgramAddress } ): WithdrawInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountOwnerToken0, InstructionAccountInputAddress<TAccountOwnerToken0>>, ResolvedInstructionAccountMeta<TAccountOwnerToken1, InstructionAccountInputAddress<TAccountOwnerToken1>>, ResolvedInstructionAccountMeta<TAccountOwnerLpToken, InstructionAccountInputAddress<TAccountOwnerLpToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>> {\n // Program address.\nconst programAddress = config?.programAddress ?? PINA_AMM_PROGRAM_ADDRESS;\n\n// Account meta helper.\nconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\n // Original accounts.\nconst originalAccounts = { owner: { value: input.owner ?? null, isSigner: true, isWritable: false }, pool: { value: input.pool ?? null, isSigner: false, isWritable: true }, vault0: { value: input.vault0 ?? null, isSigner: false, isWritable: true }, vault1: { value: input.vault1 ?? null, isSigner: false, isWritable: true }, lpMint: { value: input.lpMint ?? null, isSigner: false, isWritable: true }, ownerToken0: { value: input.ownerToken0 ?? null, isSigner: false, isWritable: true }, ownerToken1: { value: input.ownerToken1 ?? null, isSigner: false, isWritable: true }, ownerLpToken: { value: input.ownerLpToken ?? null, isSigner: false, isWritable: true }, tokenProgram0: { value: input.tokenProgram0 ?? null, isSigner: false, isWritable: false }, tokenProgram1: { value: input.tokenProgram1 ?? null, isSigner: false, isWritable: false }, lpTokenProgram: { value: input.lpTokenProgram ?? null, isSigner: false, isWritable: false } }\nconst accounts = originalAccounts as Record<keyof typeof originalAccounts, ResolvedInstructionAccount>;\n\n\n// Original args.\nconst args = { ...input, };\n\n\n// Resolve default values.\nif (!accounts.lpTokenProgram.value) {\naccounts.lpTokenProgram.value = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n}\n\nreturn Object.freeze({ accounts: [getAccountMeta(\"owner\", accounts.owner), getAccountMeta(\"pool\", accounts.pool), getAccountMeta(\"vault0\", accounts.vault0), getAccountMeta(\"vault1\", accounts.vault1), getAccountMeta(\"lpMint\", accounts.lpMint), getAccountMeta(\"ownerToken0\", accounts.ownerToken0), getAccountMeta(\"ownerToken1\", accounts.ownerToken1), getAccountMeta(\"ownerLpToken\", accounts.ownerLpToken), getAccountMeta(\"tokenProgram0\", accounts.tokenProgram0), getAccountMeta(\"tokenProgram1\", accounts.tokenProgram1), getAccountMeta(\"lpTokenProgram\", accounts.lpTokenProgram)], data: getWithdrawInstructionDataEncoder().encode(args as WithdrawInstructionDataArgs), programAddress } as WithdrawInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountLpMint, InstructionAccountInputAddress<TAccountLpMint>>, ResolvedInstructionAccountMeta<TAccountOwnerToken0, InstructionAccountInputAddress<TAccountOwnerToken0>>, ResolvedInstructionAccountMeta<TAccountOwnerToken1, InstructionAccountInputAddress<TAccountOwnerToken1>>, ResolvedInstructionAccountMeta<TAccountOwnerLpToken, InstructionAccountInputAddress<TAccountOwnerLpToken>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>, ResolvedInstructionAccountMeta<TAccountLpTokenProgram, InstructionAccountInputAddress<TAccountLpTokenProgram>>>);\n}\n\nexport type ParsedWithdrawInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>;\naccounts: {\n/** The LP owner, who owns every token account below. */\nowner: TAccountMetas[0];\n/** The pool. */\npool: TAccountMetas[1];\n/** The pool's token 0 vault. */\nvault0: TAccountMetas[2];\n/** The pool's token 1 vault. */\nvault1: TAccountMetas[3];\n/** The pool's LP mint. */\nlpMint: TAccountMetas[4];\n/** The owner's token 0 account. */\nownerToken0: TAccountMetas[5];\n/** The owner's token 1 account. */\nownerToken1: TAccountMetas[6];\n/** The owner's LP token account. */\nownerLpToken: TAccountMetas[7];\n/** Token program that owns token 0. */\ntokenProgram0: TAccountMetas[8];\n/** Token program that owns token 1. */\ntokenProgram1: TAccountMetas[9];\n/** SPL Token, which owns every LP mint. */\nlpTokenProgram: TAccountMetas[10];\n};\ndata: WithdrawInstructionData; };\n\nexport function parseWithdrawInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedWithdrawInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, { actualAccountMetas: instruction.accounts.length, expectedAccountMetas: 11 });\n}\nlet accountIndex = 0;\nconst getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n}\n return { programAddress: instruction.programAddress, accounts: { owner: getNextAccount(), pool: getNextAccount(), vault0: getNextAccount(), vault1: getNextAccount(), lpMint: getNextAccount(), ownerToken0: getNextAccount(), ownerToken1: getNextAccount(), ownerLpToken: getNextAccount(), tokenProgram0: getNextAccount(), tokenProgram1: getNextAccount(), lpTokenProgram: getNextAccount() }, data: getWithdrawInstructionDataDecoder().decode(instruction.data) };\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 { assertIsInstructionWithAccounts, containsBytes, extendClient, getU8Encoder, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, SolanaError, type Address, type ClientWithRpc, type ClientWithTransactionPlanning, type ClientWithTransactionSending, type ExtendedClient, type GetAccountInfoApi, type GetMultipleAccountsApi, type Instruction, type InstructionWithData, type ReadonlyUint8Array } from '@solana/kit';\nimport { addSelfFetchFunctions, addSelfPlanAndSendFunctions, type SelfFetchFunctions, type SelfPlanAndSendFunctions } from '@solana/program-client-core';\nimport { getAmmConfigCodec, getPoolCodec, type AmmConfig, type AmmConfigArgs, type Pool, type PoolArgs } from '../accounts';\nimport { getCollectCreatorFeesInstruction, getCollectProtocolFeesInstruction, getCreateConfigInstruction, getCreatePoolInstructionAsync, getDepositInstruction, getSetPoolCreatorInstruction, getSwapExactInInstruction, getSwapExactOutInstruction, getUpdateConfigInstruction, getWithdrawInstruction, parseCollectCreatorFeesInstruction, parseCollectProtocolFeesInstruction, parseCreateConfigInstruction, parseCreatePoolInstruction, parseDepositInstruction, parseSetPoolCreatorInstruction, parseSwapExactInInstruction, parseSwapExactOutInstruction, parseUpdateConfigInstruction, parseWithdrawInstruction, type CollectCreatorFeesInput, type CollectProtocolFeesInput, type CreateConfigInput, type CreatePoolAsyncInput, type DepositInput, type ParsedCollectCreatorFeesInstruction, type ParsedCollectProtocolFeesInstruction, type ParsedCreateConfigInstruction, type ParsedCreatePoolInstruction, type ParsedDepositInstruction, type ParsedSetPoolCreatorInstruction, type ParsedSwapExactInInstruction, type ParsedSwapExactOutInstruction, type ParsedUpdateConfigInstruction, type ParsedWithdrawInstruction, type SetPoolCreatorInput, type SwapExactInInput, type SwapExactOutInput, type UpdateConfigInput, type WithdrawInput } from '../instructions';\nimport { getMigrateInstruction, type MigrateInput } from \"../instructions\";\n\nimport { findAmmConfigPda, findPoolLpMintPda, findPoolPda, findPoolVaultPda } from '../pdas';\n\nexport const PINA_AMM_PROGRAM_ADDRESS = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV' as Address<'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'>;\n\nexport enum PinaAmmAccount { AmmConfig, Pool }\n\nexport function identifyPinaAmmAccount(account: { data: ReadonlyUint8Array } | ReadonlyUint8Array): PinaAmmAccount {\n const data = 'data' in account ? account.data : account;\n if (containsBytes(data, getU8Encoder().encode(1), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmAccount.AmmConfig; }\nif (containsBytes(data, getU8Encoder().encode(2), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmAccount.Pool; }\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT, { accountData: data, programName: \"pinaAmm\" });\n}\n\nexport enum PinaAmmEvent { PoolCreated, Swapped, LiquidityChanged, FeesCollected }\n\nexport function identifyPinaAmmEvent(event: { data: ReadonlyUint8Array } | ReadonlyUint8Array): PinaAmmEvent {\n const data = 'data' in event ? event.data : event;\n if (containsBytes(data, getU8Encoder().encode(1), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmEvent.PoolCreated; }\nif (containsBytes(data, getU8Encoder().encode(2), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmEvent.Swapped; }\nif (containsBytes(data, getU8Encoder().encode(3), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmEvent.LiquidityChanged; }\nif (containsBytes(data, getU8Encoder().encode(4), 0) && containsBytes(data, getU8Encoder().encode(0), 1)) { return PinaAmmEvent.FeesCollected; }\n throw new Error('The provided event could not be identified as a pinaAmm event.');\n}\n\nexport enum PinaAmmInstruction { CreateConfig, UpdateConfig, CreatePool, Deposit, Withdraw, SwapExactIn, SwapExactOut, CollectProtocolFees, CollectCreatorFees, SetPoolCreator }\n\nexport function identifyPinaAmmInstruction(instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array): PinaAmmInstruction {\n const data = 'data' in instruction ? instruction.data : instruction;\n if (containsBytes(data, getU8Encoder().encode(0), 0)) { return PinaAmmInstruction.CreateConfig; }\nif (containsBytes(data, getU8Encoder().encode(1), 0)) { return PinaAmmInstruction.UpdateConfig; }\nif (containsBytes(data, getU8Encoder().encode(2), 0)) { return PinaAmmInstruction.CreatePool; }\nif (containsBytes(data, getU8Encoder().encode(3), 0)) { return PinaAmmInstruction.Deposit; }\nif (containsBytes(data, getU8Encoder().encode(4), 0)) { return PinaAmmInstruction.Withdraw; }\nif (containsBytes(data, getU8Encoder().encode(5), 0)) { return PinaAmmInstruction.SwapExactIn; }\nif (containsBytes(data, getU8Encoder().encode(6), 0)) { return PinaAmmInstruction.SwapExactOut; }\nif (containsBytes(data, getU8Encoder().encode(7), 0)) { return PinaAmmInstruction.CollectProtocolFees; }\nif (containsBytes(data, getU8Encoder().encode(8), 0)) { return PinaAmmInstruction.CollectCreatorFees; }\nif (containsBytes(data, getU8Encoder().encode(9), 0)) { return PinaAmmInstruction.SetPoolCreator; }\n throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, { instructionData: data, programName: \"pinaAmm\" });\n}\n\nexport type ParsedPinaAmmInstruction<TProgram extends string = 'pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV'> =\n| { instructionType: PinaAmmInstruction.CreateConfig } & ParsedCreateConfigInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.UpdateConfig } & ParsedUpdateConfigInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.CreatePool } & ParsedCreatePoolInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.Deposit } & ParsedDepositInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.Withdraw } & ParsedWithdrawInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.SwapExactIn } & ParsedSwapExactInInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.SwapExactOut } & ParsedSwapExactOutInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.CollectProtocolFees } & ParsedCollectProtocolFeesInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.CollectCreatorFees } & ParsedCollectCreatorFeesInstruction<TProgram>\n| { instructionType: PinaAmmInstruction.SetPoolCreator } & ParsedSetPoolCreatorInstruction<TProgram>\n\n\n export function parsePinaAmmInstruction<TProgram extends string>(\n instruction: Instruction<TProgram> \n & InstructionWithData<ReadonlyUint8Array>\n ): ParsedPinaAmmInstruction<TProgram> {\n const instructionType = identifyPinaAmmInstruction(instruction);\n switch (instructionType) {\n case PinaAmmInstruction.CreateConfig: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.CreateConfig, ...parseCreateConfigInstruction(instruction) }; }\ncase PinaAmmInstruction.UpdateConfig: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.UpdateConfig, ...parseUpdateConfigInstruction(instruction) }; }\ncase PinaAmmInstruction.CreatePool: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.CreatePool, ...parseCreatePoolInstruction(instruction) }; }\ncase PinaAmmInstruction.Deposit: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.Deposit, ...parseDepositInstruction(instruction) }; }\ncase PinaAmmInstruction.Withdraw: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.Withdraw, ...parseWithdrawInstruction(instruction) }; }\ncase PinaAmmInstruction.SwapExactIn: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.SwapExactIn, ...parseSwapExactInInstruction(instruction) }; }\ncase PinaAmmInstruction.SwapExactOut: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.SwapExactOut, ...parseSwapExactOutInstruction(instruction) }; }\ncase PinaAmmInstruction.CollectProtocolFees: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.CollectProtocolFees, ...parseCollectProtocolFeesInstruction(instruction) }; }\ncase PinaAmmInstruction.CollectCreatorFees: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.CollectCreatorFees, ...parseCollectCreatorFeesInstruction(instruction) }; }\ncase PinaAmmInstruction.SetPoolCreator: { assertIsInstructionWithAccounts(instruction);\nreturn { instructionType: PinaAmmInstruction.SetPoolCreator, ...parseSetPoolCreatorInstruction(instruction) }; }\n default: throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, { instructionType: instructionType as string, programName: \"pinaAmm\" });\n }\n }\n\nexport type PinaAmmPlugin = { accounts: PinaAmmPluginAccounts; instructions: PinaAmmPluginInstructions; pdas: PinaAmmPluginPdas; identifyAccount: typeof identifyPinaAmmAccount; identifyInstruction: typeof identifyPinaAmmInstruction; parseInstruction: typeof parsePinaAmmInstruction; }\n\nexport type PinaAmmPluginAccounts = { ammConfig: ReturnType<typeof getAmmConfigCodec> & SelfFetchFunctions<AmmConfigArgs, AmmConfig>; pool: ReturnType<typeof getPoolCodec> & SelfFetchFunctions<PoolArgs, Pool>; }\n\nexport type PinaAmmPluginInstructions = { createConfig: (input: CreateConfigInput) => ReturnType<typeof getCreateConfigInstruction> & SelfPlanAndSendFunctions; updateConfig: (input: UpdateConfigInput) => ReturnType<typeof getUpdateConfigInstruction> & SelfPlanAndSendFunctions; createPool: (input: CreatePoolAsyncInput) => ReturnType<typeof getCreatePoolInstructionAsync> & SelfPlanAndSendFunctions; deposit: (input: DepositInput) => ReturnType<typeof getDepositInstruction> & SelfPlanAndSendFunctions; withdraw: (input: WithdrawInput) => ReturnType<typeof getWithdrawInstruction> & SelfPlanAndSendFunctions; swapExactIn: (input: SwapExactInInput) => ReturnType<typeof getSwapExactInInstruction> & SelfPlanAndSendFunctions; swapExactOut: (input: SwapExactOutInput) => ReturnType<typeof getSwapExactOutInstruction> & SelfPlanAndSendFunctions; collectProtocolFees: (input: CollectProtocolFeesInput) => ReturnType<typeof getCollectProtocolFeesInstruction> & SelfPlanAndSendFunctions; collectCreatorFees: (input: CollectCreatorFeesInput) => ReturnType<typeof getCollectCreatorFeesInstruction> & SelfPlanAndSendFunctions; setPoolCreator: (input: SetPoolCreatorInput) => ReturnType<typeof getSetPoolCreatorInstruction> & SelfPlanAndSendFunctions; }\n\nexport type PinaAmmPluginPdas = { ammConfig: typeof findAmmConfigPda; pool: typeof findPoolPda; poolVault: typeof findPoolVaultPda; poolLpMint: typeof findPoolLpMintPda; }\n\nexport type PinaAmmPluginRequirements = ClientWithRpc<GetAccountInfoApi & GetMultipleAccountsApi> & ClientWithTransactionPlanning & ClientWithTransactionSending\n\nexport function pinaAmmProgram() {\n return <T extends PinaAmmPluginRequirements>(client: T): ExtendedClient<T, { pinaAmm: PinaAmmPlugin }> => {\n return extendClient(client, { pinaAmm: <PinaAmmPlugin>{ accounts: { ammConfig: addSelfFetchFunctions(client, getAmmConfigCodec()), pool: addSelfFetchFunctions(client, getPoolCodec()) }, instructions: { \n\t\t\tmigrate: (input: MigrateInput) =>\n\t\t\t\taddSelfPlanAndSendFunctions(client, getMigrateInstruction(input)),createConfig: input => addSelfPlanAndSendFunctions(client, getCreateConfigInstruction(input)), updateConfig: input => addSelfPlanAndSendFunctions(client, getUpdateConfigInstruction(input)), createPool: input => addSelfPlanAndSendFunctions(client, getCreatePoolInstructionAsync(input)), deposit: input => addSelfPlanAndSendFunctions(client, getDepositInstruction(input)), withdraw: input => addSelfPlanAndSendFunctions(client, getWithdrawInstruction(input)), swapExactIn: input => addSelfPlanAndSendFunctions(client, getSwapExactInInstruction(input)), swapExactOut: input => addSelfPlanAndSendFunctions(client, getSwapExactOutInstruction(input)), collectProtocolFees: input => addSelfPlanAndSendFunctions(client, getCollectProtocolFeesInstruction(input)), collectCreatorFees: input => addSelfPlanAndSendFunctions(client, getCollectCreatorFeesInstruction(input)), setPoolCreator: input => addSelfPlanAndSendFunctions(client, getSetPoolCreatorInstruction(input)) }, pdas: { ammConfig: findAmmConfigPda, pool: findPoolPda, poolVault: findPoolVaultPda, poolLpMint: findPoolLpMintPda }, identifyAccount: identifyPinaAmmAccount, identifyInstruction: identifyPinaAmmInstruction, parseInstruction: parsePinaAmmInstruction } });\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 { isProgramError, type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';\nimport { PINA_AMM_PROGRAM_ADDRESS } from '../programs';\n\n/** Fee rates are out of range: trade plus creator fee above 10% or protocol share above 100%. */\nexport const PINA_AMM_ERROR__INVALID_FEE_RATES = 0x0; // 0\n/** The signer is not the authority this instruction requires. */\nexport const PINA_AMM_ERROR__UNAUTHORIZED = 0x1; // 1\n/** The program-data account is not this program's, or the program is not upgradeable. */\nexport const PINA_AMM_ERROR__INVALID_PROGRAM_DATA = 0x2; // 2\n/** Pool mints must be distinct and passed in ascending byte order. */\nexport const PINA_AMM_ERROR__INVALID_MINT_ORDER = 0x3; // 3\n/** The mint's token program or Token-2022 extensions are not supported. */\nexport const PINA_AMM_ERROR__UNSUPPORTED_MINT = 0x4; // 4\n/** A vault, LP mint, or fee tier account does not belong to this pool. */\nexport const PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH = 0x5; // 5\n/** The creator fee mode must be 0 (input token), 1 (token 0), or 2 (token 1). */\nexport const PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE = 0x6; // 6\n/** The initial deposit must mint more LP than the permanently locked minimum. */\nexport const PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY = 0x7; // 7\n/** An amount is zero or the trade rounds down to nothing. */\nexport const PINA_AMM_ERROR__ZERO_AMOUNT = 0x8; // 8\n/** The result is worse than the caller's slippage limit. */\nexport const PINA_AMM_ERROR__SLIPPAGE_EXCEEDED = 0x9; // 9\n/** The pool cannot pay this amount from its reserves. */\nexport const PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY = 0xa; // 10\n/** An intermediate value overflowed or did not fit its type. */\nexport const PINA_AMM_ERROR__MATH_OVERFLOW = 0xb; // 11\n/** The trade would decrease the pool's constant product. */\nexport const PINA_AMM_ERROR__INVARIANT_VIOLATION = 0xc; // 12\n/** A vault holds less than the fees accrued against it. */\nexport const PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH = 0xd; // 13\n/** This fee tier only lets its pool-creator authority create pools. */\nexport const PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED = 0xe; // 14\n\nexport type PinaAmmError = typeof PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY | typeof PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY | typeof PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE | typeof PINA_AMM_ERROR__INVALID_FEE_RATES | typeof PINA_AMM_ERROR__INVALID_MINT_ORDER | typeof PINA_AMM_ERROR__INVALID_PROGRAM_DATA | typeof PINA_AMM_ERROR__INVARIANT_VIOLATION | typeof PINA_AMM_ERROR__MATH_OVERFLOW | typeof PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH | typeof PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED | typeof PINA_AMM_ERROR__SLIPPAGE_EXCEEDED | typeof PINA_AMM_ERROR__UNAUTHORIZED | typeof PINA_AMM_ERROR__UNSUPPORTED_MINT | typeof PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH | typeof PINA_AMM_ERROR__ZERO_AMOUNT;\n\nlet pinaAmmErrorMessages: Record<PinaAmmError, string> | undefined;\nif (process.env['NODE_ENV'] !== 'production') {\n pinaAmmErrorMessages = { [PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY]: `The initial deposit must mint more LP than the permanently locked minimum.`, [PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY]: `The pool cannot pay this amount from its reserves.`, [PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE]: `The creator fee mode must be 0 (input token), 1 (token 0), or 2 (token 1).`, [PINA_AMM_ERROR__INVALID_FEE_RATES]: `Fee rates are out of range: trade plus creator fee above 10% or protocol share above 100%.`, [PINA_AMM_ERROR__INVALID_MINT_ORDER]: `Pool mints must be distinct and passed in ascending byte order.`, [PINA_AMM_ERROR__INVALID_PROGRAM_DATA]: `The program-data account is not this program's, or the program is not upgradeable.`, [PINA_AMM_ERROR__INVARIANT_VIOLATION]: `The trade would decrease the pool's constant product.`, [PINA_AMM_ERROR__MATH_OVERFLOW]: `An intermediate value overflowed or did not fit its type.`, [PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH]: `A vault, LP mint, or fee tier account does not belong to this pool.`, [PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED]: `This fee tier only lets its pool-creator authority create pools.`, [PINA_AMM_ERROR__SLIPPAGE_EXCEEDED]: `The result is worse than the caller's slippage limit.`, [PINA_AMM_ERROR__UNAUTHORIZED]: `The signer is not the authority this instruction requires.`, [PINA_AMM_ERROR__UNSUPPORTED_MINT]: `The mint's token program or Token-2022 extensions are not supported.`, [PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH]: `A vault holds less than the fees accrued against it.`, [PINA_AMM_ERROR__ZERO_AMOUNT]: `An amount is zero or the trade rounds down to nothing.` };\n}\n\nexport function getPinaAmmErrorMessage(code: PinaAmmError): string {\n if (process.env['NODE_ENV'] !== 'production') {\n return (pinaAmmErrorMessages as Record<PinaAmmError, string>)[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isPinaAmmError<TProgramErrorCode extends PinaAmmError>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n code?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError<TProgramErrorCode>(error, transactionMessage, PINA_AMM_PROGRAM_ADDRESS, code);\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, containsBytes, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const POOL_CREATED_EVENT_DISCRIMINATOR = 1;\n\nexport function getPoolCreatedEventDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(POOL_CREATED_EVENT_DISCRIMINATOR); }\n\nexport const POOL_CREATED_EVENT_DISCRIMINATOR2 = 0;\n\nexport function getPoolCreatedEventDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(POOL_CREATED_EVENT_DISCRIMINATOR2); }\n\n/** Emitted by `CreatePool`. */\nexport type PoolCreatedEvent = { discriminator: number; migrationVersion: number; \n/** The new pool. */\npool: Address; \n/** Fee tier the pool was created under. */\nammConfig: Address; \n/** Recipient of the pool's creator fees. */\ncreator: Address; \n/** Smaller mint of the pair. */\nmint0: Address; \n/** Larger mint of the pair. */\nmint1: Address; \n/** The pool's LP mint. */\nlpMint: Address; \n/** Initial reserve of token 0. */\namount0: bigint; \n/** Initial reserve of token 1. */\namount1: bigint; \n/** Initial economic LP supply, including the locked minimum. */\nlpSupply: bigint; };\n\nexport type PoolCreatedEventArgs = { \n/** The new pool. */\npool: Address; \n/** Fee tier the pool was created under. */\nammConfig: Address; \n/** Recipient of the pool's creator fees. */\ncreator: Address; \n/** Smaller mint of the pair. */\nmint0: Address; \n/** Larger mint of the pair. */\nmint1: Address; \n/** The pool's LP mint. */\nlpMint: Address; \n/** Initial reserve of token 0. */\namount0: number | bigint; \n/** Initial reserve of token 1. */\namount1: number | bigint; \n/** Initial economic LP supply, including the locked minimum. */\nlpSupply: number | bigint; };\n\n/** Gets the encoder for {@link PoolCreatedEventArgs} event data. */\nexport function getPoolCreatedEventEncoder(): FixedSizeEncoder<PoolCreatedEventArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['pool', getAddressEncoder()], ['ammConfig', getAddressEncoder()], ['creator', getAddressEncoder()], ['mint0', getAddressEncoder()], ['mint1', getAddressEncoder()], ['lpMint', getAddressEncoder()], ['amount0', getU64Encoder()], ['amount1', getU64Encoder()], ['lpSupply', getU64Encoder()]]), (value) => ({ ...value, discriminator: 1, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventDecoder(): FixedSizeDecoder<PoolCreatedEvent> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(POOL_CREATED_EVENT_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['pool', getAddressDecoder()], ['ammConfig', getAddressDecoder()], ['creator', getAddressDecoder()], ['mint0', getAddressDecoder()], ['mint1', getAddressDecoder()], ['lpMint', getAddressDecoder()], ['amount0', getU64Decoder()], ['amount1', getU64Decoder()], ['lpSupply', getU64Decoder()]]);\n}\n\n/** Gets the codec for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventCodec(): FixedSizeCodec<PoolCreatedEventArgs, PoolCreatedEvent> {\n return combineCodec(getPoolCreatedEventEncoder(), getPoolCreatedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PoolCreatedEvent} event data. */\nexport function parsePoolCreatedEvent(data: ReadonlyUint8Array | Uint8Array): PoolCreatedEvent {\n if (containsBytes(data, getU8Encoder().encode(POOL_CREATED_EVENT_DISCRIMINATOR), 0) && containsBytes(data, getU8Encoder().encode(POOL_CREATED_EVENT_DISCRIMINATOR2), 1)) { return getPoolCreatedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PoolCreatedEvent\" event discriminators.');\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, containsBytes, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const SWAPPED_EVENT_DISCRIMINATOR = 2;\n\nexport function getSwappedEventDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(SWAPPED_EVENT_DISCRIMINATOR); }\n\nexport const SWAPPED_EVENT_DISCRIMINATOR2 = 0;\n\nexport function getSwappedEventDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(SWAPPED_EVENT_DISCRIMINATOR2); }\n\n/** Emitted by `SwapExactIn` and `SwapExactOut`. */\nexport type SwappedEvent = { discriminator: number; migrationVersion: number; \n/** The pool traded against. */\npool: Address; \n/** The trader who signed. */\ntrader: Address; \n/** `1` when the trader sold token 0 for token 1, `0` for the reverse. */\nzeroForOne: number; \n/** Tokens the trader paid. */\namountIn: bigint; \n/** Tokens the trader received. */\namountOut: bigint; \n/** Trade fee in the input token, including the protocol share. */\ntradeFee: bigint; \n/** Protocol share of the trade fee, in the input token. */\nprotocolFee: bigint; \n/**\n * Creator fee. It is in the input token when `creator_fee_on_input` is\n * set and in the output token otherwise.\n */\ncreatorFee: bigint; \n/**\n * `1` when `creator_fee` is denominated in the input token, `0` when it is\n * in the output token.\n */\ncreatorFeeOnInput: number; \n/** Token 0 reserve after the swap. */\nreserve0: bigint; \n/** Token 1 reserve after the swap. */\nreserve1: bigint; };\n\nexport type SwappedEventArgs = { \n/** The pool traded against. */\npool: Address; \n/** The trader who signed. */\ntrader: Address; \n/** `1` when the trader sold token 0 for token 1, `0` for the reverse. */\nzeroForOne: number; \n/** Tokens the trader paid. */\namountIn: number | bigint; \n/** Tokens the trader received. */\namountOut: number | bigint; \n/** Trade fee in the input token, including the protocol share. */\ntradeFee: number | bigint; \n/** Protocol share of the trade fee, in the input token. */\nprotocolFee: number | bigint; \n/**\n * Creator fee. It is in the input token when `creator_fee_on_input` is\n * set and in the output token otherwise.\n */\ncreatorFee: number | bigint; \n/**\n * `1` when `creator_fee` is denominated in the input token, `0` when it is\n * in the output token.\n */\ncreatorFeeOnInput: number; \n/** Token 0 reserve after the swap. */\nreserve0: number | bigint; \n/** Token 1 reserve after the swap. */\nreserve1: number | bigint; };\n\n/** Gets the encoder for {@link SwappedEventArgs} event data. */\nexport function getSwappedEventEncoder(): FixedSizeEncoder<SwappedEventArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['pool', getAddressEncoder()], ['trader', getAddressEncoder()], ['zeroForOne', getU8Encoder()], ['amountIn', getU64Encoder()], ['amountOut', getU64Encoder()], ['tradeFee', getU64Encoder()], ['protocolFee', getU64Encoder()], ['creatorFee', getU64Encoder()], ['creatorFeeOnInput', getU8Encoder()], ['reserve0', getU64Encoder()], ['reserve1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 2, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link SwappedEvent} event data. */\nexport function getSwappedEventDecoder(): FixedSizeDecoder<SwappedEvent> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(SWAPPED_EVENT_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['pool', getAddressDecoder()], ['trader', getAddressDecoder()], ['zeroForOne', getU8Decoder()], ['amountIn', getU64Decoder()], ['amountOut', getU64Decoder()], ['tradeFee', getU64Decoder()], ['protocolFee', getU64Decoder()], ['creatorFee', getU64Decoder()], ['creatorFeeOnInput', getU8Decoder()], ['reserve0', getU64Decoder()], ['reserve1', getU64Decoder()]]);\n}\n\n/** Gets the codec for {@link SwappedEvent} event data. */\nexport function getSwappedEventCodec(): FixedSizeCodec<SwappedEventArgs, SwappedEvent> {\n return combineCodec(getSwappedEventEncoder(), getSwappedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link SwappedEvent} event data. */\nexport function parseSwappedEvent(data: ReadonlyUint8Array | Uint8Array): SwappedEvent {\n if (containsBytes(data, getU8Encoder().encode(SWAPPED_EVENT_DISCRIMINATOR), 0) && containsBytes(data, getU8Encoder().encode(SWAPPED_EVENT_DISCRIMINATOR2), 1)) { return getSwappedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"SwappedEvent\" event discriminators.');\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, containsBytes, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR = 3;\n\nexport function getLiquidityChangedEventDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR); }\n\nexport const LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR2 = 0;\n\nexport function getLiquidityChangedEventDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR2); }\n\n/** Emitted by `Deposit` and `Withdraw`. */\nexport type LiquidityChangedEvent = { discriminator: number; migrationVersion: number; \n/** The pool whose liquidity changed. */\npool: Address; \n/** The LP owner who signed. */\nowner: Address; \n/** `1` for a deposit and `0` for a withdrawal. */\nisDeposit: number; \n/** LP minted or burned. */\nlpAmount: bigint; \n/** Token 0 added or removed. */\namount0: bigint; \n/** Token 1 added or removed. */\namount1: bigint; \n/** Economic LP supply after the change. */\nlpSupply: bigint; };\n\nexport type LiquidityChangedEventArgs = { \n/** The pool whose liquidity changed. */\npool: Address; \n/** The LP owner who signed. */\nowner: Address; \n/** `1` for a deposit and `0` for a withdrawal. */\nisDeposit: number; \n/** LP minted or burned. */\nlpAmount: number | bigint; \n/** Token 0 added or removed. */\namount0: number | bigint; \n/** Token 1 added or removed. */\namount1: number | bigint; \n/** Economic LP supply after the change. */\nlpSupply: number | bigint; };\n\n/** Gets the encoder for {@link LiquidityChangedEventArgs} event data. */\nexport function getLiquidityChangedEventEncoder(): FixedSizeEncoder<LiquidityChangedEventArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['pool', getAddressEncoder()], ['owner', getAddressEncoder()], ['isDeposit', getU8Encoder()], ['lpAmount', getU64Encoder()], ['amount0', getU64Encoder()], ['amount1', getU64Encoder()], ['lpSupply', getU64Encoder()]]), (value) => ({ ...value, discriminator: 3, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link LiquidityChangedEvent} event data. */\nexport function getLiquidityChangedEventDecoder(): FixedSizeDecoder<LiquidityChangedEvent> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['pool', getAddressDecoder()], ['owner', getAddressDecoder()], ['isDeposit', getU8Decoder()], ['lpAmount', getU64Decoder()], ['amount0', getU64Decoder()], ['amount1', getU64Decoder()], ['lpSupply', getU64Decoder()]]);\n}\n\n/** Gets the codec for {@link LiquidityChangedEvent} event data. */\nexport function getLiquidityChangedEventCodec(): FixedSizeCodec<LiquidityChangedEventArgs, LiquidityChangedEvent> {\n return combineCodec(getLiquidityChangedEventEncoder(), getLiquidityChangedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link LiquidityChangedEvent} event data. */\nexport function parseLiquidityChangedEvent(data: ReadonlyUint8Array | Uint8Array): LiquidityChangedEvent {\n if (containsBytes(data, getU8Encoder().encode(LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR), 0) && containsBytes(data, getU8Encoder().encode(LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR2), 1)) { return getLiquidityChangedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"LiquidityChangedEvent\" event discriminators.');\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 { getPinaPodDiscriminatorDecoder, getPinaPodMigrationVersionDecoder } from \"../pinaPodCodecs\";\nimport { combineCodec, containsBytes, getAddressDecoder, getAddressEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, transformEncoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const FEES_COLLECTED_EVENT_DISCRIMINATOR = 4;\n\nexport function getFeesCollectedEventDiscriminatorBytes(): ReadonlyUint8Array { return getU8Encoder().encode(FEES_COLLECTED_EVENT_DISCRIMINATOR); }\n\nexport const FEES_COLLECTED_EVENT_DISCRIMINATOR2 = 0;\n\nexport function getFeesCollectedEventDiscriminator2Bytes(): ReadonlyUint8Array { return getU8Encoder().encode(FEES_COLLECTED_EVENT_DISCRIMINATOR2); }\n\n/** Emitted by `CollectProtocolFees` and `CollectCreatorFees`. */\nexport type FeesCollectedEvent = { discriminator: number; migrationVersion: number; \n/** The pool the fees were accrued in. */\npool: Address; \n/** The signer who collected them. */\ncollector: Address; \n/** `1` for protocol fees and `0` for creator fees. */\nisProtocol: number; \n/** Token 0 paid out. */\namount0: bigint; \n/** Token 1 paid out. */\namount1: bigint; };\n\nexport type FeesCollectedEventArgs = { \n/** The pool the fees were accrued in. */\npool: Address; \n/** The signer who collected them. */\ncollector: Address; \n/** `1` for protocol fees and `0` for creator fees. */\nisProtocol: number; \n/** Token 0 paid out. */\namount0: number | bigint; \n/** Token 1 paid out. */\namount1: number | bigint; };\n\n/** Gets the encoder for {@link FeesCollectedEventArgs} event data. */\nexport function getFeesCollectedEventEncoder(): FixedSizeEncoder<FeesCollectedEventArgs> {\n return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()], ['migrationVersion', getU8Encoder()], ['pool', getAddressEncoder()], ['collector', getAddressEncoder()], ['isProtocol', getU8Encoder()], ['amount0', getU64Encoder()], ['amount1', getU64Encoder()]]), (value) => ({ ...value, discriminator: 4, migrationVersion: 0 }));\n}\n\n/** Gets the decoder for {@link FeesCollectedEvent} event data. */\nexport function getFeesCollectedEventDecoder(): FixedSizeDecoder<FeesCollectedEvent> {\n return getStructDecoder([['discriminator', getPinaPodDiscriminatorDecoder(FEES_COLLECTED_EVENT_DISCRIMINATOR, getU8Decoder())], ['migrationVersion', getPinaPodMigrationVersionDecoder(0, getU8Decoder())], ['pool', getAddressDecoder()], ['collector', getAddressDecoder()], ['isProtocol', getU8Decoder()], ['amount0', getU64Decoder()], ['amount1', getU64Decoder()]]);\n}\n\n/** Gets the codec for {@link FeesCollectedEvent} event data. */\nexport function getFeesCollectedEventCodec(): FixedSizeCodec<FeesCollectedEventArgs, FeesCollectedEvent> {\n return combineCodec(getFeesCollectedEventEncoder(), getFeesCollectedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link FeesCollectedEvent} event data. */\nexport function parseFeesCollectedEvent(data: ReadonlyUint8Array | Uint8Array): FeesCollectedEvent {\n if (containsBytes(data, getU8Encoder().encode(FEES_COLLECTED_EVENT_DISCRIMINATOR), 0) && containsBytes(data, getU8Encoder().encode(FEES_COLLECTED_EVENT_DISCRIMINATOR2), 1)) { return getFeesCollectedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"FeesCollectedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library and Pina's migration\n * manifest. Please DO NOT EDIT THIS FILE, instead rerun client generation.\n *\n * Event log read path: decode `Program data:` log lines into typed events.\n * A migration-aware event is decoded with the layout of the version that\n * emitted it: each earlier version is its own `<Event>V<n>` event, and a\n * version no event here describes fails instead of being misread.\n */\n\nimport { getBase64Encoder, type ReadonlyUint8Array } from \"@solana/kit\";\nimport {\n\tgetPoolCreatedEventDecoder,\n\tgetPoolCreatedEventDiscriminatorBytes,\n\ttype PoolCreatedEvent,\n} from \"./poolCreated.js\";\nimport {\n\tgetSwappedEventDecoder,\n\tgetSwappedEventDiscriminatorBytes,\n\ttype SwappedEvent,\n} from \"./swapped.js\";\nimport {\n\tgetLiquidityChangedEventDecoder,\n\tgetLiquidityChangedEventDiscriminatorBytes,\n\ttype LiquidityChangedEvent,\n} from \"./liquidityChanged.js\";\nimport {\n\tgetFeesCollectedEventDecoder,\n\tgetFeesCollectedEventDiscriminatorBytes,\n\ttype FeesCollectedEvent,\n} from \"./feesCollected.js\";\n\n/**\n * Decode one `poolCreated` record: only records carrying this event's migration version decode.\n */\nexport function decodePoolCreatedEvent(\n\tdata: ReadonlyUint8Array | Uint8Array,\n): DecodedPoolCreatedEvent {\n\tconst bytes = data instanceof Uint8Array ? data : new Uint8Array(data);\n\tconst discriminatorBytes = getPoolCreatedEventDiscriminatorBytes();\n\tif (bytes.length < 2) {\n\t\tthrow new RangeError(\n\t\t\t`the provided data is too short for the \"PoolCreatedEvent\" event envelope`,\n\t\t);\n\t}\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'the provided data does not match the \"PoolCreatedEvent\" event discriminator.',\n\t\t\t);\n\t\t}\n\t}\n\tconst sourceVersion = bytes[1];\n\tif (sourceVersion !== 0) {\n\t\tthrow new RangeError(\n\t\t\t`event migration version mismatch: expected 0, received ${sourceVersion} (decode it with the event for that version, or regenerate this client)`,\n\t\t);\n\t}\n\treturn { name: \"poolCreated\", data: getPoolCreatedEventDecoder().decode(bytes) };\n}\n\n/** One log entry that named this event. */\nexport type DecodedPoolCreatedEvent = { name: \"poolCreated\"; data: PoolCreatedEvent };\n\n/**\n * Decode a `Program data:` log line, or return `null` when the line is not\n * this event.\n */\nexport function parsePoolCreatedEventFromLog(log: string): DecodedPoolCreatedEvent | null {\n\tconst prefix = \"Program data: \";\n\tif (!log.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tconst bytes = getBase64Encoder().encode(log.slice(prefix.length));\n\tif (bytes.length < 2) {\n\t\treturn null;\n\t}\n\tconst discriminatorBytes = getPoolCreatedEventDiscriminatorBytes();\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (bytes[1] !== 0) {\n\t\treturn null;\n\t}\n\treturn decodePoolCreatedEvent(bytes);\n}\n\n/**\n * Decode one `swapped` record: only records carrying this event's migration version decode.\n */\nexport function decodeSwappedEvent(\n\tdata: ReadonlyUint8Array | Uint8Array,\n): DecodedSwappedEvent {\n\tconst bytes = data instanceof Uint8Array ? data : new Uint8Array(data);\n\tconst discriminatorBytes = getSwappedEventDiscriminatorBytes();\n\tif (bytes.length < 2) {\n\t\tthrow new RangeError(\n\t\t\t`the provided data is too short for the \"SwappedEvent\" event envelope`,\n\t\t);\n\t}\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'the provided data does not match the \"SwappedEvent\" event discriminator.',\n\t\t\t);\n\t\t}\n\t}\n\tconst sourceVersion = bytes[1];\n\tif (sourceVersion !== 0) {\n\t\tthrow new RangeError(\n\t\t\t`event migration version mismatch: expected 0, received ${sourceVersion} (decode it with the event for that version, or regenerate this client)`,\n\t\t);\n\t}\n\treturn { name: \"swapped\", data: getSwappedEventDecoder().decode(bytes) };\n}\n\n/** One log entry that named this event. */\nexport type DecodedSwappedEvent = { name: \"swapped\"; data: SwappedEvent };\n\n/**\n * Decode a `Program data:` log line, or return `null` when the line is not\n * this event.\n */\nexport function parseSwappedEventFromLog(log: string): DecodedSwappedEvent | null {\n\tconst prefix = \"Program data: \";\n\tif (!log.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tconst bytes = getBase64Encoder().encode(log.slice(prefix.length));\n\tif (bytes.length < 2) {\n\t\treturn null;\n\t}\n\tconst discriminatorBytes = getSwappedEventDiscriminatorBytes();\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (bytes[1] !== 0) {\n\t\treturn null;\n\t}\n\treturn decodeSwappedEvent(bytes);\n}\n\n/**\n * Decode one `liquidityChanged` record: only records carrying this event's migration version decode.\n */\nexport function decodeLiquidityChangedEvent(\n\tdata: ReadonlyUint8Array | Uint8Array,\n): DecodedLiquidityChangedEvent {\n\tconst bytes = data instanceof Uint8Array ? data : new Uint8Array(data);\n\tconst discriminatorBytes = getLiquidityChangedEventDiscriminatorBytes();\n\tif (bytes.length < 2) {\n\t\tthrow new RangeError(\n\t\t\t`the provided data is too short for the \"LiquidityChangedEvent\" event envelope`,\n\t\t);\n\t}\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'the provided data does not match the \"LiquidityChangedEvent\" event discriminator.',\n\t\t\t);\n\t\t}\n\t}\n\tconst sourceVersion = bytes[1];\n\tif (sourceVersion !== 0) {\n\t\tthrow new RangeError(\n\t\t\t`event migration version mismatch: expected 0, received ${sourceVersion} (decode it with the event for that version, or regenerate this client)`,\n\t\t);\n\t}\n\treturn { name: \"liquidityChanged\", data: getLiquidityChangedEventDecoder().decode(bytes) };\n}\n\n/** One log entry that named this event. */\nexport type DecodedLiquidityChangedEvent = { name: \"liquidityChanged\"; data: LiquidityChangedEvent };\n\n/**\n * Decode a `Program data:` log line, or return `null` when the line is not\n * this event.\n */\nexport function parseLiquidityChangedEventFromLog(log: string): DecodedLiquidityChangedEvent | null {\n\tconst prefix = \"Program data: \";\n\tif (!log.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tconst bytes = getBase64Encoder().encode(log.slice(prefix.length));\n\tif (bytes.length < 2) {\n\t\treturn null;\n\t}\n\tconst discriminatorBytes = getLiquidityChangedEventDiscriminatorBytes();\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (bytes[1] !== 0) {\n\t\treturn null;\n\t}\n\treturn decodeLiquidityChangedEvent(bytes);\n}\n\n/**\n * Decode one `feesCollected` record: only records carrying this event's migration version decode.\n */\nexport function decodeFeesCollectedEvent(\n\tdata: ReadonlyUint8Array | Uint8Array,\n): DecodedFeesCollectedEvent {\n\tconst bytes = data instanceof Uint8Array ? data : new Uint8Array(data);\n\tconst discriminatorBytes = getFeesCollectedEventDiscriminatorBytes();\n\tif (bytes.length < 2) {\n\t\tthrow new RangeError(\n\t\t\t`the provided data is too short for the \"FeesCollectedEvent\" event envelope`,\n\t\t);\n\t}\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'the provided data does not match the \"FeesCollectedEvent\" event discriminator.',\n\t\t\t);\n\t\t}\n\t}\n\tconst sourceVersion = bytes[1];\n\tif (sourceVersion !== 0) {\n\t\tthrow new RangeError(\n\t\t\t`event migration version mismatch: expected 0, received ${sourceVersion} (decode it with the event for that version, or regenerate this client)`,\n\t\t);\n\t}\n\treturn { name: \"feesCollected\", data: getFeesCollectedEventDecoder().decode(bytes) };\n}\n\n/** One log entry that named this event. */\nexport type DecodedFeesCollectedEvent = { name: \"feesCollected\"; data: FeesCollectedEvent };\n\n/**\n * Decode a `Program data:` log line, or return `null` when the line is not\n * this event.\n */\nexport function parseFeesCollectedEventFromLog(log: string): DecodedFeesCollectedEvent | null {\n\tconst prefix = \"Program data: \";\n\tif (!log.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tconst bytes = getBase64Encoder().encode(log.slice(prefix.length));\n\tif (bytes.length < 2) {\n\t\treturn null;\n\t}\n\tconst discriminatorBytes = getFeesCollectedEventDiscriminatorBytes();\n\tfor (let index = 0; index < 1; index += 1) {\n\t\tif (bytes[index] !== discriminatorBytes[index]) {\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (bytes[1] !== 0) {\n\t\treturn null;\n\t}\n\treturn decodeFeesCollectedEvent(bytes);\n}\n\n\n/**\n * Explain a `Program data:` line that names a migration-aware event but that\n * no generated event claimed, or return `null` for an unrelated line.\n */\nfunction unrecognizedEventVersion(log: string): string | null {\n\tconst prefix = \"Program data: \";\n\tif (!log.startsWith(prefix)) {\n\t\treturn null;\n\t}\n\tconst bytes = getBase64Encoder().encode(log.slice(prefix.length));\n\tif (bytes.length >= 1 && bytes[0] === 1) {\n\t\treturn bytes.length < 2\n\t\t\t? 'event \"poolCreated\" log is too short for its version envelope'\n\t\t\t: `event \"poolCreated\" log carries migration version ${bytes[1]}, which this client cannot decode; regenerate it`;\n\t}\n\tif (bytes.length >= 1 && bytes[0] === 2) {\n\t\treturn bytes.length < 2\n\t\t\t? 'event \"swapped\" log is too short for its version envelope'\n\t\t\t: `event \"swapped\" log carries migration version ${bytes[1]}, which this client cannot decode; regenerate it`;\n\t}\n\tif (bytes.length >= 1 && bytes[0] === 3) {\n\t\treturn bytes.length < 2\n\t\t\t? 'event \"liquidityChanged\" log is too short for its version envelope'\n\t\t\t: `event \"liquidityChanged\" log carries migration version ${bytes[1]}, which this client cannot decode; regenerate it`;\n\t}\n\tif (bytes.length >= 1 && bytes[0] === 4) {\n\t\treturn bytes.length < 2\n\t\t\t? 'event \"feesCollected\" log is too short for its version envelope'\n\t\t\t: `event \"feesCollected\" log carries migration version ${bytes[1]}, which this client cannot decode; regenerate it`;\n\t}\n\treturn null;\n}\n\n/** Every event this program can emit, as decoded from a log line. */\nexport type DecodedPinaAmmEvent =\n\t| DecodedPoolCreatedEvent\n\t| DecodedSwappedEvent\n\t| DecodedLiquidityChangedEvent\n\t| DecodedFeesCollectedEvent;\n\n/** The program whose invocation frames emit the events decoded here. */\nexport const PINA_AMM_EVENT_SOURCE_ADDRESS = \"pAMMvXaqR2VVFqznf6dgvUFQjLXXAEeL9cb48cXsGeV\";\n\nconst PROGRAM_INVOKE_LOG = /^Program (\\S+) invoke \\[\\d+\\]$/;\nconst PROGRAM_EXIT_LOG = /^Program (\\S+) (?:success|failed: .*)$/;\n\n/**\n * Decode every `Program data:` line this program emitted in a transaction's\n * logs.\n *\n * `logs` must be the complete, ordered log messages of one transaction. The\n * parser follows the runtime's `Program <address> invoke [n]` and\n * `Program <address> success` / `failed` frames and decodes a data line only\n * while `programAddress` is the innermost invoked program. Any program can\n * write a `Program data:` line with this program's discriminator, so data\n * lines from other programs (including ones this program invokes through CPI)\n * and lines outside any frame are skipped rather than trusted.\n *\n * Unrelated lines are skipped. A line this program emitted that names an event\n * but carries a version no generated event describes throws instead of being\n * silently dropped. The per-event `parse*FromLog` helpers decode one line\n * without this attribution and are only safe for data already known to come\n * from this program.\n */\nexport function parsePinaAmmEventsFromLogs(\n\tlogs: readonly string[],\n\tprogramAddress: string = PINA_AMM_EVENT_SOURCE_ADDRESS,\n): DecodedPinaAmmEvent[] {\n\tconst discovered: DecodedPinaAmmEvent[] = [];\n\tconst frames: string[] = [];\n\tfor (const log of logs) {\n\t\tconst invoke = PROGRAM_INVOKE_LOG.exec(log);\n\t\tif (invoke !== null) {\n\t\t\tframes.push(invoke[1] ?? \"\");\n\t\t\tcontinue;\n\t\t}\n\t\tconst exit = PROGRAM_EXIT_LOG.exec(log);\n\t\tif (exit !== null) {\n\t\t\tframes.pop();\n\t\t\tcontinue;\n\t\t}\n\t\tif (frames.length === 0 || frames[frames.length - 1] !== programAddress) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst poolCreated = parsePoolCreatedEventFromLog(log);\n\t\tif (poolCreated !== null) {\n\t\t\tdiscovered.push(poolCreated);\n\t\t\tcontinue;\n\t\t}\n\t\tconst swapped = parseSwappedEventFromLog(log);\n\t\tif (swapped !== null) {\n\t\t\tdiscovered.push(swapped);\n\t\t\tcontinue;\n\t\t}\n\t\tconst liquidityChanged = parseLiquidityChangedEventFromLog(log);\n\t\tif (liquidityChanged !== null) {\n\t\t\tdiscovered.push(liquidityChanged);\n\t\t\tcontinue;\n\t\t}\n\t\tconst feesCollected = parseFeesCollectedEventFromLog(log);\n\t\tif (feesCollected !== null) {\n\t\t\tdiscovered.push(feesCollected);\n\t\t\tcontinue;\n\t\t}\n\t\tconst unknownVersion = unrecognizedEventVersion(log);\n\t\tif (unknownVersion !== null) {\n\t\t\tthrow new RangeError(unknownVersion);\n\t\t}\n\t}\n\treturn discovered;\n}\n"]}