@send-fun/sdk 1.0.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 (172) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/index.cjs +12808 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +4406 -0
  6. package/dist/index.d.cts.map +1 -0
  7. package/dist/index.d.mts +4405 -0
  8. package/dist/index.d.mts.map +1 -0
  9. package/dist/index.mjs +12749 -0
  10. package/dist/index.mjs.map +1 -0
  11. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  12. package/package.json +72 -0
  13. package/src/constants.ts +38 -0
  14. package/src/dex/generated/accounts/globalConfig.ts +189 -0
  15. package/src/dex/generated/accounts/index.ts +12 -0
  16. package/src/dex/generated/accounts/pool.ts +244 -0
  17. package/src/dex/generated/accounts/rewardAccrual.ts +191 -0
  18. package/src/dex/generated/accounts/sendDex.accounts.ts +47 -0
  19. package/src/dex/generated/errors/index.ts +9 -0
  20. package/src/dex/generated/errors/sendDex.ts +161 -0
  21. package/src/dex/generated/events/anchorEventCpiDiscriminator.framing.ts +28 -0
  22. package/src/dex/generated/events/creatorClaimEvent.ts +119 -0
  23. package/src/dex/generated/events/depositQuoteEvent.ts +115 -0
  24. package/src/dex/generated/events/index.ts +16 -0
  25. package/src/dex/generated/events/poolCreateEvent.ts +128 -0
  26. package/src/dex/generated/events/protocolClaimEvent.ts +111 -0
  27. package/src/dex/generated/events/sendDex.events.ts +184 -0
  28. package/src/dex/generated/events/tokenCreateEvent.ts +143 -0
  29. package/src/dex/generated/events/tradeEvent.ts +143 -0
  30. package/src/dex/generated/index.ts +16 -0
  31. package/src/dex/generated/instructions/buyExactIn.ts +815 -0
  32. package/src/dex/generated/instructions/buyExactOut.ts +815 -0
  33. package/src/dex/generated/instructions/claimCreatorFees.ts +648 -0
  34. package/src/dex/generated/instructions/claimProtocolFees.ts +640 -0
  35. package/src/dex/generated/instructions/index.ts +15 -0
  36. package/src/dex/generated/instructions/sellExactIn.ts +815 -0
  37. package/src/dex/generated/instructions/sellExactOut.ts +815 -0
  38. package/src/dex/generated/instructions/sendDex.instructions.ts +173 -0
  39. package/src/dex/generated/pdas/eventAuthority.ts +20 -0
  40. package/src/dex/generated/pdas/globalConfig.ts +20 -0
  41. package/src/dex/generated/pdas/index.ts +14 -0
  42. package/src/dex/generated/pdas/lpMint.ts +36 -0
  43. package/src/dex/generated/pdas/pool.ts +34 -0
  44. package/src/dex/generated/pdas/rewardAccrual.ts +37 -0
  45. package/src/dex/generated/pdas/wsolRewardAccrual.ts +20 -0
  46. package/src/dex/generated/plugins/index.ts +9 -0
  47. package/src/dex/generated/plugins/sendDex.ts +282 -0
  48. package/src/dex/generated/programs/index.ts +9 -0
  49. package/src/dex/generated/programs/sendDex.ts +12 -0
  50. package/src/dex/generated/types/index.ts +10 -0
  51. package/src/dex/generated/types/poolStatus.ts +38 -0
  52. package/src/dex/generated/types/tradeDirection.ts +38 -0
  53. package/src/dex/index.ts +8 -0
  54. package/src/dex/trade.ts +215 -0
  55. package/src/index.ts +8 -0
  56. package/src/launchpad/create.ts +116 -0
  57. package/src/launchpad/generated/accounts/bondingCurve.ts +273 -0
  58. package/src/launchpad/generated/accounts/globalConfig.ts +211 -0
  59. package/src/launchpad/generated/accounts/index.ts +12 -0
  60. package/src/launchpad/generated/accounts/rewardAccrual.ts +191 -0
  61. package/src/launchpad/generated/accounts/sendLaunchpad.accounts.ts +50 -0
  62. package/src/launchpad/generated/errors/index.ts +9 -0
  63. package/src/launchpad/generated/errors/sendLaunchpad.ts +175 -0
  64. package/src/launchpad/generated/events/anchorEventCpiDiscriminator.framing.ts +28 -0
  65. package/src/launchpad/generated/events/completeEvent.ts +120 -0
  66. package/src/launchpad/generated/events/creatorClaimEvent.ts +122 -0
  67. package/src/launchpad/generated/events/index.ts +17 -0
  68. package/src/launchpad/generated/events/migrateEvent.ts +121 -0
  69. package/src/launchpad/generated/events/protocolClaimEvent.ts +114 -0
  70. package/src/launchpad/generated/events/recycleEvent.ts +113 -0
  71. package/src/launchpad/generated/events/sendLaunchpad.events.ts +207 -0
  72. package/src/launchpad/generated/events/tokenCreateEvent.ts +156 -0
  73. package/src/launchpad/generated/events/tradeEvent.ts +148 -0
  74. package/src/launchpad/generated/index.ts +16 -0
  75. package/src/launchpad/generated/instructions/buyExactIn.ts +818 -0
  76. package/src/launchpad/generated/instructions/buyExactOut.ts +818 -0
  77. package/src/launchpad/generated/instructions/claimCreatorFees.ts +651 -0
  78. package/src/launchpad/generated/instructions/claimProtocolFees.ts +640 -0
  79. package/src/launchpad/generated/instructions/createToken.ts +1150 -0
  80. package/src/launchpad/generated/instructions/index.ts +17 -0
  81. package/src/launchpad/generated/instructions/migrate.ts +840 -0
  82. package/src/launchpad/generated/instructions/sellExactIn.ts +818 -0
  83. package/src/launchpad/generated/instructions/sellExactOut.ts +818 -0
  84. package/src/launchpad/generated/instructions/sendLaunchpad.instructions.ts +210 -0
  85. package/src/launchpad/generated/pdas/bondingCurve.ts +39 -0
  86. package/src/launchpad/generated/pdas/eventAuthority.ts +20 -0
  87. package/src/launchpad/generated/pdas/globalConfig.ts +20 -0
  88. package/src/launchpad/generated/pdas/index.ts +14 -0
  89. package/src/launchpad/generated/pdas/migrationAuthority.ts +20 -0
  90. package/src/launchpad/generated/pdas/rewardAccrual.ts +37 -0
  91. package/src/launchpad/generated/pdas/wsolRewardAccrual.ts +20 -0
  92. package/src/launchpad/generated/plugins/index.ts +9 -0
  93. package/src/launchpad/generated/plugins/sendLaunchpad.ts +315 -0
  94. package/src/launchpad/generated/programs/index.ts +9 -0
  95. package/src/launchpad/generated/programs/sendLaunchpad.ts +12 -0
  96. package/src/launchpad/generated/types/bondingCurveStatus.ts +43 -0
  97. package/src/launchpad/generated/types/index.ts +10 -0
  98. package/src/launchpad/generated/types/tradeDirection.ts +38 -0
  99. package/src/launchpad/index.ts +10 -0
  100. package/src/launchpad/migrate.ts +54 -0
  101. package/src/launchpad/trade.ts +247 -0
  102. package/src/math/amm.ts +511 -0
  103. package/src/math/fee-decay.ts +49 -0
  104. package/src/math/fees.ts +75 -0
  105. package/src/math/index.ts +3 -0
  106. package/src/math/internal.ts +16 -0
  107. package/src/nexus/fee-helpers.ts +49 -0
  108. package/src/nexus/generated/accounts/altRegistry.ts +177 -0
  109. package/src/nexus/generated/accounts/creatorFeeConfig.ts +200 -0
  110. package/src/nexus/generated/accounts/feePreset.ts +196 -0
  111. package/src/nexus/generated/accounts/globalConfig.ts +188 -0
  112. package/src/nexus/generated/accounts/index.ts +19 -0
  113. package/src/nexus/generated/accounts/partnerConfig.ts +209 -0
  114. package/src/nexus/generated/accounts/partnerMetadata.ts +216 -0
  115. package/src/nexus/generated/accounts/rewardState.ts +209 -0
  116. package/src/nexus/generated/accounts/sendNexus.accounts.ts +85 -0
  117. package/src/nexus/generated/accounts/stakingConfig.ts +197 -0
  118. package/src/nexus/generated/accounts/userRewardDebt.ts +221 -0
  119. package/src/nexus/generated/accounts/userStakePosition.ts +218 -0
  120. package/src/nexus/generated/constants/index.ts +9 -0
  121. package/src/nexus/generated/constants/sendNexus.ts +13 -0
  122. package/src/nexus/generated/errors/index.ts +9 -0
  123. package/src/nexus/generated/errors/sendNexus.ts +229 -0
  124. package/src/nexus/generated/events/anchorEventCpiDiscriminator.framing.ts +28 -0
  125. package/src/nexus/generated/events/claimEvent.ts +106 -0
  126. package/src/nexus/generated/events/index.ts +13 -0
  127. package/src/nexus/generated/events/sendNexus.events.ts +121 -0
  128. package/src/nexus/generated/events/stakeEvent.ts +106 -0
  129. package/src/nexus/generated/events/unstakeEvent.ts +106 -0
  130. package/src/nexus/generated/index.ts +17 -0
  131. package/src/nexus/generated/instructions/claim.ts +740 -0
  132. package/src/nexus/generated/instructions/createUserRewardDebt.ts +498 -0
  133. package/src/nexus/generated/instructions/index.ts +14 -0
  134. package/src/nexus/generated/instructions/sendNexus.instructions.ts +146 -0
  135. package/src/nexus/generated/instructions/settle.ts +517 -0
  136. package/src/nexus/generated/instructions/stake.ts +615 -0
  137. package/src/nexus/generated/instructions/unstake.ts +593 -0
  138. package/src/nexus/generated/pdas/altRegistry.ts +20 -0
  139. package/src/nexus/generated/pdas/creatorFeeConfig.ts +39 -0
  140. package/src/nexus/generated/pdas/defaultFeePreset.ts +37 -0
  141. package/src/nexus/generated/pdas/defaultPartner.ts +40 -0
  142. package/src/nexus/generated/pdas/defaultPartnerMetadata.ts +42 -0
  143. package/src/nexus/generated/pdas/eventAuthority.ts +20 -0
  144. package/src/nexus/generated/pdas/feePreset.ts +39 -0
  145. package/src/nexus/generated/pdas/globalConfig.ts +20 -0
  146. package/src/nexus/generated/pdas/index.ts +22 -0
  147. package/src/nexus/generated/pdas/partnerConfig.ts +36 -0
  148. package/src/nexus/generated/pdas/partnerMetadata.ts +38 -0
  149. package/src/nexus/generated/pdas/rewardState.ts +36 -0
  150. package/src/nexus/generated/pdas/stakingConfig.ts +20 -0
  151. package/src/nexus/generated/pdas/userRewardDebt.ts +41 -0
  152. package/src/nexus/generated/pdas/userStakePosition.ts +39 -0
  153. package/src/nexus/generated/plugins/index.ts +9 -0
  154. package/src/nexus/generated/plugins/sendNexus.ts +494 -0
  155. package/src/nexus/generated/programs/index.ts +9 -0
  156. package/src/nexus/generated/programs/sendNexus.ts +12 -0
  157. package/src/nexus/generated/types/authPlatformEntry.ts +52 -0
  158. package/src/nexus/generated/types/callerType.ts +38 -0
  159. package/src/nexus/generated/types/dexFees.ts +64 -0
  160. package/src/nexus/generated/types/feeConfig.ts +73 -0
  161. package/src/nexus/generated/types/index.ts +13 -0
  162. package/src/nexus/generated/types/launchpadFees.ts +63 -0
  163. package/src/nexus/index.ts +9 -0
  164. package/src/nexus/staking.ts +581 -0
  165. package/src/platform.ts +19 -0
  166. package/src/transfer-fee.ts +216 -0
  167. package/src/utils/chunk.ts +21 -0
  168. package/src/utils/creator-hash.ts +57 -0
  169. package/src/utils/index.ts +9 -0
  170. package/src/utils/mint-info.ts +102 -0
  171. package/src/utils/partner.ts +5 -0
  172. package/src/utils/pda.ts +24 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["address","GLOBAL_CONFIG_DISCRIMINATOR","getGlobalConfigDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getGlobalConfigEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getBooleanEncoder","getGlobalConfigDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getBooleanDecoder","getGlobalConfigCodec","combineCodec","decodeGlobalConfig","containsBytes","decodeAccount","fetchGlobalConfig","fetchMaybeGlobalConfig","fetchEncodedAccount","fetchAllGlobalConfig","fetchAllMaybeGlobalConfig","fetchEncodedAccounts","getGlobalConfigSize","getEnumEncoder","getEnumDecoder","combineCodec","TradeDirection","getTradeDirectionEncoder","getEnumEncoder","getTradeDirectionDecoder","getEnumDecoder","getTradeDirectionCodec","combineCodec","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU64Encoder","getI64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU64Decoder","getI64Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","REWARD_ACCRUAL_DISCRIMINATOR","getRewardAccrualDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getRewardAccrualEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU128Encoder","getU64Encoder","getRewardAccrualDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU128Decoder","getU64Decoder","getRewardAccrualCodec","combineCodec","decodeRewardAccrual","containsBytes","decodeAccount","fetchRewardAccrual","fetchMaybeRewardAccrual","fetchEncodedAccount","fetchAllRewardAccrual","fetchAllMaybeRewardAccrual","fetchEncodedAccounts","getRewardAccrualSize","containsBytes","GLOBAL_CONFIG_DISCRIMINATOR","REWARD_ACCRUAL_DISCRIMINATOR","isProgramError","EVENT_AUTHORITY_PDA_ADDRESS","findEventAuthorityPda","GLOBAL_CONFIG_PDA_ADDRESS","findGlobalConfigPda","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","findRewardAccrualPda","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","WSOL_REWARD_ACCRUAL_PDA_ADDRESS","findWsolRewardAccrualPda","ANCHOR_EVENT_CPI_DISCRIMINATOR","getAnchorEventCpiDiscriminatorBytes","fixEncoderSize","getBytesEncoder","CREATOR_CLAIM_EVENT_DISCRIMINATOR","getCreatorClaimEventDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getCreatorClaimEventDecoderCache","getCreatorClaimEventDecoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","isCreatorClaimEvent","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","parseCreatorClaimEvent","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU8Decoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","PROTOCOL_CLAIM_EVENT_DISCRIMINATOR","getProtocolClaimEventDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getProtocolClaimEventDecoderCache","getProtocolClaimEventDecoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","isProtocolClaimEvent","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","parseProtocolClaimEvent","TOKEN_CREATE_EVENT_DISCRIMINATOR","getTokenCreateEventDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getTokenCreateEventDecoderCache","getTokenCreateEventDecoder","getStructDecoder","getAddressDecoder","getU8Decoder","getU64Decoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getBooleanDecoder","getI64Decoder","isTokenCreateEvent","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","parseTokenCreateEvent","TRADE_EVENT_DISCRIMINATOR","getTradeEventDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getTradeEventDecoderCache","getTradeEventDecoder","getStructDecoder","getAddressDecoder","getU64Decoder","getTradeDirectionDecoder","getBooleanDecoder","getI64Decoder","isTradeEvent","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","parseTradeEvent","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","CREATOR_CLAIM_EVENT_DISCRIMINATOR","PROTOCOL_CLAIM_EVENT_DISCRIMINATOR","TOKEN_CREATE_EVENT_DISCRIMINATOR","TRADE_EVENT_DISCRIMINATOR","getCreatorClaimEventDecoder","getProtocolClaimEventDecoder","getTokenCreateEventDecoder","getTradeEventDecoder","BUY_EXACT_IN_DISCRIMINATOR","getBuyExactInDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getBuyExactInInstructionDataEncoder","transformEncoder","getStructEncoder","getU64Encoder","getBuyExactInInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","getBuyExactInInstructionDataCodec","combineCodec","getBuyExactInInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getBuyExactInInstruction","parseBuyExactInInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","BUY_EXACT_OUT_DISCRIMINATOR","getBuyExactOutDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getBuyExactOutInstructionDataEncoder","transformEncoder","getStructEncoder","getU64Encoder","getBuyExactOutInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","getBuyExactOutInstructionDataCodec","combineCodec","getBuyExactOutInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getBuyExactOutInstruction","parseBuyExactOutInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","CLAIM_CREATOR_FEES_DISCRIMINATOR","getClaimCreatorFeesDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getClaimCreatorFeesInstructionDataEncoder","transformEncoder","getStructEncoder","getClaimCreatorFeesInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getClaimCreatorFeesInstructionDataCodec","combineCodec","getClaimCreatorFeesInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getClaimCreatorFeesInstruction","parseClaimCreatorFeesInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","CLAIM_PROTOCOL_FEES_DISCRIMINATOR","getClaimProtocolFeesDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getClaimProtocolFeesInstructionDataEncoder","transformEncoder","getStructEncoder","getClaimProtocolFeesInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getClaimProtocolFeesInstructionDataCodec","combineCodec","getClaimProtocolFeesInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","findRewardAccrualPda","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getClaimProtocolFeesInstruction","parseClaimProtocolFeesInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","SELL_EXACT_IN_DISCRIMINATOR","getSellExactInDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getSellExactInInstructionDataEncoder","transformEncoder","getStructEncoder","getU64Encoder","getSellExactInInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","getSellExactInInstructionDataCodec","combineCodec","getSellExactInInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getSellExactInInstruction","parseSellExactInInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","SELL_EXACT_OUT_DISCRIMINATOR","getSellExactOutDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getSellExactOutInstructionDataEncoder","transformEncoder","getStructEncoder","getU64Encoder","getSellExactOutInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","getSellExactOutInstructionDataCodec","combineCodec","getSellExactOutInstructionAsync","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","getSellExactOutInstruction","parseSellExactOutInstruction","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","containsBytes","BUY_EXACT_IN_DISCRIMINATOR","BUY_EXACT_OUT_DISCRIMINATOR","CLAIM_CREATOR_FEES_DISCRIMINATOR","CLAIM_PROTOCOL_FEES_DISCRIMINATOR","SELL_EXACT_IN_DISCRIMINATOR","SELL_EXACT_OUT_DISCRIMINATOR","parseBuyExactInInstruction","parseBuyExactOutInstruction","parseClaimCreatorFeesInstruction","parseClaimProtocolFeesInstruction","parseSellExactInInstruction","parseSellExactOutInstruction","extendClient","getGlobalConfigCodec","fetchGlobalConfig","fetchAllGlobalConfig","fetchAllMaybeGlobalConfig","fetchMaybeGlobalConfig","getRewardAccrualCodec","fetchRewardAccrual","fetchAllRewardAccrual","fetchAllMaybeRewardAccrual","fetchMaybeRewardAccrual","getCreatorClaimEventDecoder","getProtocolClaimEventDecoder","getTokenCreateEventDecoder","getTradeEventDecoder","addSelfPlanAndSendFunctions","getBuyExactInInstructionAsync","getBuyExactOutInstructionAsync","getClaimCreatorFeesInstructionAsync","getClaimProtocolFeesInstructionAsync","getSellExactInInstructionAsync","getSellExactOutInstructionAsync","findEventAuthorityPda","findRewardAccrualPda","findGlobalConfigPda","findWsolRewardAccrualPda","buyExactOut","buyExactIn","sellExactIn","sellExactOut","buyExactOut","amm.buyExactOut","amm.calculateSlippageUp","buildBuyExactOutInstruction","buyExactIn","amm.buyExactIn","amm.calculateSlippageDown","buildBuyExactInInstruction","sellExactIn","amm.sellExactIn","buildSellExactInInstruction","sellExactOut","amm.sellExactOut","buildSellExactOutInstruction","resolveSharedAccounts","getBuyExactInInstructionAsync","getBuyExactOutInstructionAsync","getSellExactInInstructionAsync","getSellExactOutInstructionAsync","getEnumEncoder","getEnumDecoder","combineCodec","getEnumEncoder","getEnumDecoder","combineCodec","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU64Encoder","getI64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU64Decoder","getI64Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","GLOBAL_CONFIG_DISCRIMINATOR","getGlobalConfigDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getGlobalConfigEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getBooleanEncoder","getU64Encoder","getGlobalConfigDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getBooleanDecoder","getU64Decoder","getGlobalConfigCodec","combineCodec","decodeGlobalConfig","containsBytes","decodeAccount","fetchGlobalConfig","fetchMaybeGlobalConfig","fetchEncodedAccount","fetchAllGlobalConfig","fetchAllMaybeGlobalConfig","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU128Encoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU128Decoder","getU64Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","containsBytes","GLOBAL_CONFIG_DISCRIMINATOR","isProgramError","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","EVENT_AUTHORITY_PDA_ADDRESS","findEventAuthorityPda","GLOBAL_CONFIG_PDA_ADDRESS","findGlobalConfigPda","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getAddressDecoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getAddressEncoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getAddressDecoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","combineCodec","GLOBAL_CONFIG_PDA_ADDRESS","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getNonNullResolvedInstructionInput","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","amm.buyExactOut","amm.calculateSlippageUp","amm.buyExactIn","amm.calculateSlippageDown","amm.sellExactIn","amm.sellExactOut","ANCHOR_EVENT_CPI_DISCRIMINATOR","getAnchorEventCpiDiscriminatorBytes","fixEncoderSize","getBytesEncoder","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getBooleanDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU8Decoder","getU64Decoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getBooleanDecoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getBooleanDecoder","getI64Decoder","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","containsBytes","ANCHOR_EVENT_CPI_DISCRIMINATOR","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","EVENT_AUTHORITY_PDA_ADDRESS","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","containsBytes","extendClient","getGlobalConfigCodec","fetchGlobalConfig","fetchAllGlobalConfig","fetchAllMaybeGlobalConfig","fetchMaybeGlobalConfig","addSelfPlanAndSendFunctions","findEventAuthorityPda","findGlobalConfigPda","getAddressEncoder","getProgramDerivedAddress","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","getStructEncoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getBooleanEncoder","getStructDecoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getBooleanDecoder","combineCodec","getEnumEncoder","getEnumDecoder","combineCodec","getStructEncoder","getU64Encoder","getU16Encoder","getStructDecoder","getU64Decoder","getU16Decoder","combineCodec","getStructEncoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","fixEncoderSize","getBytesEncoder","getStructDecoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","fixDecoderSize","getBytesDecoder","combineCodec","getStructEncoder","getU64Encoder","getU16Encoder","getStructDecoder","getU64Decoder","getU16Decoder","combineCodec","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getAddressEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getAddressDecoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getArrayEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getArrayDecoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getI64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getI64Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU64Encoder","getI64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU64Decoder","getI64Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU64Encoder","getBooleanEncoder","getU16Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU64Decoder","getBooleanDecoder","getU16Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU128Encoder","getU64Encoder","getU32Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU128Decoder","getU64Decoder","getU32Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU8Encoder","getAddressEncoder","getU64Encoder","getU32Encoder","getU16Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU8Decoder","getAddressDecoder","getU64Decoder","getU32Decoder","getU16Decoder","combineCodec","containsBytes","decodeAccount","fetchEncodedAccount","fetchEncodedAccounts","containsBytes","fixEncoderSize","getBytesEncoder","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","fixEncoderSize","getBytesEncoder","getStructDecoder","getAddressDecoder","getU64Decoder","getI64Decoder","containsBytes","containsBytes","isProgramError","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getU8Encoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","getProgramDerivedAddress","getBytesEncoder","getAddressEncoder","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getStructDecoder","fixDecoderSize","getBytesDecoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getU64Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU64Decoder","combineCodec","getAddressFromResolvedInstructionAccount","getProgramDerivedAddress","getAddressEncoder","address","getAccountMetaFactory","containsBytes","SolanaError","SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS","containsBytes","extendClient","addSelfPlanAndSendFunctions","getBase64Encoder","getAddressDecoder","containsBytes","fetchEncodedAccounts","findLaunchpadRewardAccrualPda","findDexRewardAccrualPda","getProgramDerivedAddress","MINT_BASE_LENGTH","getAddressDecoder","getBase64Encoder","getBase64Encoder"],"sources":["../src/dex/generated/programs/sendDex.ts","../src/launchpad/generated/programs/sendLaunchpad.ts","../src/nexus/generated/programs/sendNexus.ts","../src/constants.ts","../src/dex/generated/accounts/globalConfig.ts","../src/dex/generated/types/poolStatus.ts","../src/dex/generated/types/tradeDirection.ts","../src/dex/generated/types/index.ts","../src/dex/generated/accounts/pool.ts","../src/dex/generated/accounts/rewardAccrual.ts","../src/dex/generated/accounts/sendDex.accounts.ts","../src/dex/generated/accounts/index.ts","../src/dex/generated/errors/sendDex.ts","../src/dex/generated/errors/index.ts","../src/dex/generated/pdas/eventAuthority.ts","../src/dex/generated/pdas/globalConfig.ts","../src/dex/generated/pdas/lpMint.ts","../src/dex/generated/pdas/pool.ts","../src/dex/generated/pdas/rewardAccrual.ts","../src/dex/generated/pdas/wsolRewardAccrual.ts","../src/dex/generated/pdas/index.ts","../src/dex/generated/events/anchorEventCpiDiscriminator.framing.ts","../src/dex/generated/events/creatorClaimEvent.ts","../src/dex/generated/events/depositQuoteEvent.ts","../src/dex/generated/events/poolCreateEvent.ts","../src/dex/generated/events/protocolClaimEvent.ts","../src/dex/generated/events/tokenCreateEvent.ts","../src/dex/generated/events/tradeEvent.ts","../src/dex/generated/events/sendDex.events.ts","../src/dex/generated/events/index.ts","../src/dex/generated/instructions/buyExactIn.ts","../src/dex/generated/instructions/buyExactOut.ts","../src/dex/generated/instructions/claimCreatorFees.ts","../src/dex/generated/instructions/claimProtocolFees.ts","../src/dex/generated/instructions/sellExactIn.ts","../src/dex/generated/instructions/sellExactOut.ts","../src/dex/generated/instructions/sendDex.instructions.ts","../src/dex/generated/instructions/index.ts","../src/dex/generated/plugins/sendDex.ts","../src/dex/generated/plugins/index.ts","../src/math/internal.ts","../src/math/amm.ts","../src/dex/trade.ts","../src/dex/index.ts","../src/launchpad/generated/types/bondingCurveStatus.ts","../src/launchpad/generated/types/tradeDirection.ts","../src/launchpad/generated/types/index.ts","../src/launchpad/generated/accounts/bondingCurve.ts","../src/launchpad/generated/accounts/globalConfig.ts","../src/launchpad/generated/accounts/rewardAccrual.ts","../src/launchpad/generated/accounts/sendLaunchpad.accounts.ts","../src/launchpad/generated/accounts/index.ts","../src/launchpad/generated/errors/sendLaunchpad.ts","../src/launchpad/generated/errors/index.ts","../src/launchpad/generated/pdas/bondingCurve.ts","../src/launchpad/generated/pdas/eventAuthority.ts","../src/launchpad/generated/pdas/globalConfig.ts","../src/launchpad/generated/pdas/migrationAuthority.ts","../src/launchpad/generated/pdas/rewardAccrual.ts","../src/launchpad/generated/pdas/wsolRewardAccrual.ts","../src/launchpad/generated/pdas/index.ts","../src/utils/creator-hash.ts","../src/nexus/generated/pdas/creatorFeeConfig.ts","../src/launchpad/generated/instructions/createToken.ts","../src/launchpad/generated/instructions/buyExactIn.ts","../src/launchpad/generated/instructions/buyExactOut.ts","../src/launchpad/generated/instructions/sellExactIn.ts","../src/launchpad/generated/instructions/sellExactOut.ts","../src/launchpad/trade.ts","../src/launchpad/create.ts","../src/launchpad/generated/events/anchorEventCpiDiscriminator.framing.ts","../src/launchpad/generated/events/completeEvent.ts","../src/launchpad/generated/events/creatorClaimEvent.ts","../src/launchpad/generated/events/migrateEvent.ts","../src/launchpad/generated/events/protocolClaimEvent.ts","../src/launchpad/generated/events/recycleEvent.ts","../src/launchpad/generated/events/tokenCreateEvent.ts","../src/launchpad/generated/events/tradeEvent.ts","../src/launchpad/generated/events/sendLaunchpad.events.ts","../src/launchpad/generated/events/index.ts","../src/launchpad/generated/instructions/claimCreatorFees.ts","../src/launchpad/generated/instructions/claimProtocolFees.ts","../src/launchpad/generated/instructions/migrate.ts","../src/launchpad/generated/instructions/sendLaunchpad.instructions.ts","../src/launchpad/generated/instructions/index.ts","../src/launchpad/generated/plugins/sendLaunchpad.ts","../src/launchpad/generated/plugins/index.ts","../src/utils/pda.ts","../src/launchpad/migrate.ts","../src/launchpad/index.ts","../src/math/fee-decay.ts","../src/math/fees.ts","../src/math/index.ts","../src/nexus/generated/accounts/altRegistry.ts","../src/nexus/generated/accounts/creatorFeeConfig.ts","../src/nexus/generated/types/authPlatformEntry.ts","../src/nexus/generated/types/callerType.ts","../src/nexus/generated/types/dexFees.ts","../src/nexus/generated/types/feeConfig.ts","../src/nexus/generated/types/launchpadFees.ts","../src/nexus/generated/types/index.ts","../src/nexus/generated/accounts/feePreset.ts","../src/nexus/generated/accounts/globalConfig.ts","../src/nexus/generated/accounts/partnerConfig.ts","../src/nexus/generated/accounts/partnerMetadata.ts","../src/nexus/generated/accounts/rewardState.ts","../src/nexus/generated/accounts/stakingConfig.ts","../src/nexus/generated/accounts/userRewardDebt.ts","../src/nexus/generated/accounts/userStakePosition.ts","../src/nexus/generated/accounts/sendNexus.accounts.ts","../src/nexus/generated/accounts/index.ts","../src/nexus/generated/events/anchorEventCpiDiscriminator.framing.ts","../src/nexus/generated/events/claimEvent.ts","../src/nexus/generated/events/stakeEvent.ts","../src/nexus/generated/events/unstakeEvent.ts","../src/nexus/generated/events/sendNexus.events.ts","../src/nexus/generated/events/index.ts","../src/nexus/generated/errors/sendNexus.ts","../src/nexus/generated/errors/index.ts","../src/nexus/generated/pdas/altRegistry.ts","../src/nexus/generated/pdas/defaultFeePreset.ts","../src/nexus/generated/pdas/defaultPartner.ts","../src/nexus/generated/pdas/defaultPartnerMetadata.ts","../src/nexus/generated/pdas/eventAuthority.ts","../src/nexus/generated/pdas/feePreset.ts","../src/nexus/generated/pdas/globalConfig.ts","../src/nexus/generated/pdas/partnerConfig.ts","../src/nexus/generated/pdas/partnerMetadata.ts","../src/nexus/generated/pdas/rewardState.ts","../src/nexus/generated/pdas/stakingConfig.ts","../src/nexus/generated/pdas/userRewardDebt.ts","../src/nexus/generated/pdas/userStakePosition.ts","../src/nexus/generated/pdas/index.ts","../src/nexus/generated/instructions/claim.ts","../src/nexus/generated/instructions/createUserRewardDebt.ts","../src/nexus/generated/instructions/settle.ts","../src/nexus/generated/instructions/stake.ts","../src/nexus/generated/instructions/unstake.ts","../src/nexus/generated/instructions/sendNexus.instructions.ts","../src/nexus/generated/instructions/index.ts","../src/nexus/generated/plugins/sendNexus.ts","../src/nexus/generated/plugins/index.ts","../src/nexus/fee-helpers.ts","../src/utils/chunk.ts","../src/nexus/staking.ts","../src/nexus/index.ts","../src/platform.ts","../src/transfer-fee.ts","../src/utils/mint-info.ts","../src/utils/index.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport type { Address } from '@solana/kit';\n\nexport const SEND_DEX_PROGRAM_ADDRESS =\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\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 type { Address } from '@solana/kit';\n\nexport const SEND_LAUNCHPAD_PROGRAM_ADDRESS =\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\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 type { Address } from '@solana/kit';\n\nexport const SEND_NEXUS_PROGRAM_ADDRESS =\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n","import { address } from '@solana/kit';\nimport type { Address } from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from './dex/generated/programs/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from './launchpad/generated/programs/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from './nexus/generated/programs/index.js';\n\nexport const TOKEN_DECIMALS = 6;\n\nexport { SEND_LAUNCHPAD_PROGRAM_ADDRESS };\nexport { SEND_DEX_PROGRAM_ADDRESS };\nexport { SEND_NEXUS_PROGRAM_ADDRESS };\n\nexport const SYSTEM_PROGRAM_ADDRESS: Address<'11111111111111111111111111111111'> =\n\taddress('11111111111111111111111111111111');\n\nexport const TOKEN_PROGRAM_ADDRESS: Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'> =\n\taddress('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');\n\nexport const TOKEN_2022_PROGRAM_ADDRESS: Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'> =\n\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb');\n\nexport const ASSOCIATED_TOKEN_PROGRAM_ADDRESS: Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'> =\n\taddress('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');\n\nexport const WSOL_MINT: Address = address(\n\t'So11111111111111111111111111111111111111112',\n);\n\nexport const USDC_MINT: Address = address(\n\t'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',\n);\n\nexport const DEFAULT_PARTNER: Address<'11111111111111111111111111111111'> =\n\tSYSTEM_PROGRAM_ADDRESS;\n\nexport const PYTH_SOL_USD_PRICE_ACCOUNT: Address = address(\n\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n);\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBooleanDecoder,\n\tgetBooleanEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const GLOBAL_CONFIG_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t149, 8, 156, 202, 160, 252, 176, 217,\n]);\n\nexport function getGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tGLOBAL_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type GlobalConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tcreateTokenDisabled: boolean;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type GlobalConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tcreateTokenDisabled: boolean;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link GlobalConfigArgs} account data. */\nexport function getGlobalConfigEncoder(): FixedSizeEncoder<GlobalConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['authority', getAddressEncoder()],\n\t\t\t['operator', getAddressEncoder()],\n\t\t\t['createTokenDisabled', getBooleanEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: GLOBAL_CONFIG_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link GlobalConfig} account data. */\nexport function getGlobalConfigDecoder(): FixedSizeDecoder<GlobalConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['authority', getAddressDecoder()],\n\t\t['operator', getAddressDecoder()],\n\t\t['createTokenDisabled', getBooleanDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link GlobalConfig} account data. */\nexport function getGlobalConfigCodec(): FixedSizeCodec<\n\tGlobalConfigArgs,\n\tGlobalConfig\n> {\n\treturn combineCodec(getGlobalConfigEncoder(), getGlobalConfigDecoder());\n}\n\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress> | MaybeAccount<GlobalConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_DEX_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_DEX_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, GLOBAL_CONFIG_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} does not match the GlobalConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetGlobalConfigDecoder(),\n\t);\n}\n\nexport async function fetchGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybeGlobalConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeGlobalConfig(maybeAccount);\n}\n\nexport async function fetchAllGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybeGlobalConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeGlobalConfig(maybeAccount),\n\t);\n}\n\nexport function getGlobalConfigSize(): number {\n\treturn 139;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcombineCodec,\n\tgetEnumDecoder,\n\tgetEnumEncoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum PoolStatus {\n\tActive,\n\tPaused,\n}\n\nexport type PoolStatusArgs = PoolStatus;\n\nexport function getPoolStatusEncoder(): FixedSizeEncoder<PoolStatusArgs> {\n\treturn getEnumEncoder(PoolStatus);\n}\n\nexport function getPoolStatusDecoder(): FixedSizeDecoder<PoolStatus> {\n\treturn getEnumDecoder(PoolStatus);\n}\n\nexport function getPoolStatusCodec(): FixedSizeCodec<\n\tPoolStatusArgs,\n\tPoolStatus\n> {\n\treturn combineCodec(getPoolStatusEncoder(), getPoolStatusDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcombineCodec,\n\tgetEnumDecoder,\n\tgetEnumEncoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum TradeDirection {\n\tBuy,\n\tSell,\n}\n\nexport type TradeDirectionArgs = TradeDirection;\n\nexport function getTradeDirectionEncoder(): FixedSizeEncoder<TradeDirectionArgs> {\n\treturn getEnumEncoder(TradeDirection);\n}\n\nexport function getTradeDirectionDecoder(): FixedSizeDecoder<TradeDirection> {\n\treturn getEnumDecoder(TradeDirection);\n}\n\nexport function getTradeDirectionCodec(): FixedSizeCodec<\n\tTradeDirectionArgs,\n\tTradeDirection\n> {\n\treturn combineCodec(getTradeDirectionEncoder(), getTradeDirectionDecoder());\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\nexport * from './poolStatus.js';\nexport * from './tradeDirection.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetI64Encoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetPoolStatusDecoder,\n\tgetPoolStatusEncoder,\n\ttype PoolStatus,\n\ttype PoolStatusArgs,\n} from '../types/index.js';\n\nexport const POOL_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t241, 154, 109, 4, 17, 177, 109, 188,\n]);\n\nexport function getPoolDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(POOL_DISCRIMINATOR);\n}\n\nexport type Pool = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tstatus: PoolStatus;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tbaseVault: Address;\n\tquoteVault: Address;\n\tlpMint: Address;\n\tlpSupply: bigint;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\tquoteLedger: bigint;\n\tcreatedAt: bigint;\n\tprotocolOwed: bigint;\n\tcreatorOwed: bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type PoolArgs = {\n\tversion: number;\n\tbump: number;\n\tstatus: PoolStatusArgs;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tbaseVault: Address;\n\tquoteVault: Address;\n\tlpMint: Address;\n\tlpSupply: number | bigint;\n\tbaseReserves: number | bigint;\n\tquoteReserves: number | bigint;\n\tquoteLedger: number | bigint;\n\tcreatedAt: number | bigint;\n\tprotocolOwed: number | bigint;\n\tcreatorOwed: number | bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link PoolArgs} account data. */\nexport function getPoolEncoder(): FixedSizeEncoder<PoolArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['status', getPoolStatusEncoder()],\n\t\t\t['baseMint', getAddressEncoder()],\n\t\t\t['baseDecimals', getU8Encoder()],\n\t\t\t['quoteMint', getAddressEncoder()],\n\t\t\t['quoteDecimals', getU8Encoder()],\n\t\t\t['coinCreator', getAddressEncoder()],\n\t\t\t['creatorFeeConfig', getAddressEncoder()],\n\t\t\t['baseVault', getAddressEncoder()],\n\t\t\t['quoteVault', getAddressEncoder()],\n\t\t\t['lpMint', getAddressEncoder()],\n\t\t\t['lpSupply', getU64Encoder()],\n\t\t\t['baseReserves', getU64Encoder()],\n\t\t\t['quoteReserves', getU64Encoder()],\n\t\t\t['quoteLedger', getU64Encoder()],\n\t\t\t['createdAt', getI64Encoder()],\n\t\t\t['protocolOwed', getU64Encoder()],\n\t\t\t['creatorOwed', getU64Encoder()],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: POOL_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link Pool} account data. */\nexport function getPoolDecoder(): FixedSizeDecoder<Pool> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['status', getPoolStatusDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['baseDecimals', getU8Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['quoteDecimals', getU8Decoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['baseVault', getAddressDecoder()],\n\t\t['quoteVault', getAddressDecoder()],\n\t\t['lpMint', getAddressDecoder()],\n\t\t['lpSupply', getU64Decoder()],\n\t\t['baseReserves', getU64Decoder()],\n\t\t['quoteReserves', getU64Decoder()],\n\t\t['quoteLedger', getU64Decoder()],\n\t\t['createdAt', getI64Decoder()],\n\t\t['protocolOwed', getU64Decoder()],\n\t\t['creatorOwed', getU64Decoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link Pool} account data. */\nexport function getPoolCodec(): FixedSizeCodec<PoolArgs, Pool> {\n\treturn combineCodec(getPoolEncoder(), getPoolDecoder());\n}\n\nexport function decodePool<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<Pool, TAddress>;\nexport function decodePool<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<Pool, TAddress>;\nexport function decodePool<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<Pool, TAddress> | MaybeAccount<Pool, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_DEX_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePool: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_DEX_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (!containsBytes(encodedAccount.data, POOL_DISCRIMINATOR, 0)) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePool: account ${encodedAccount.address} does not match the Pool discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetPoolDecoder(),\n\t);\n}\n\nexport async function fetchPool<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<Pool, TAddress>> {\n\tconst maybeAccount = await fetchMaybePool(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybePool<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<Pool, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodePool(maybeAccount);\n}\n\nexport async function fetchAllPool(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<Pool>[]> {\n\tconst maybeAccounts = await fetchAllMaybePool(rpc, addresses, config);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybePool(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<Pool>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) => decodePool(maybeAccount));\n}\n\nexport function getPoolSize(): number {\n\treturn 389;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU128Decoder,\n\tgetU128Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const REWARD_ACCRUAL_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t158, 244, 116, 30, 227, 132, 105, 182,\n]);\n\nexport function getRewardAccrualDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tREWARD_ACCRUAL_DISCRIMINATOR,\n\t);\n}\n\nexport type RewardAccrual = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tquoteMint: Address;\n\taccPerToken: bigint;\n\ttotalDeposited: bigint;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type RewardAccrualArgs = {\n\tversion: number;\n\tbump: number;\n\tquoteMint: Address;\n\taccPerToken: number | bigint;\n\ttotalDeposited: number | bigint;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link RewardAccrualArgs} account data. */\nexport function getRewardAccrualEncoder(): FixedSizeEncoder<RewardAccrualArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['quoteMint', getAddressEncoder()],\n\t\t\t['accPerToken', getU128Encoder()],\n\t\t\t['totalDeposited', getU64Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: REWARD_ACCRUAL_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link RewardAccrual} account data. */\nexport function getRewardAccrualDecoder(): FixedSizeDecoder<RewardAccrual> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['accPerToken', getU128Decoder()],\n\t\t['totalDeposited', getU64Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link RewardAccrual} account data. */\nexport function getRewardAccrualCodec(): FixedSizeCodec<\n\tRewardAccrualArgs,\n\tRewardAccrual\n> {\n\treturn combineCodec(getRewardAccrualEncoder(), getRewardAccrualDecoder());\n}\n\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<RewardAccrual, TAddress>;\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<RewardAccrual, TAddress>;\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<RewardAccrual, TAddress> | MaybeAccount<RewardAccrual, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_DEX_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardAccrual: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_DEX_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, REWARD_ACCRUAL_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardAccrual: account ${encodedAccount.address} does not match the RewardAccrual discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetRewardAccrualDecoder(),\n\t);\n}\n\nexport async function fetchRewardAccrual<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<RewardAccrual, TAddress>> {\n\tconst maybeAccount = await fetchMaybeRewardAccrual(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeRewardAccrual<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<RewardAccrual, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeRewardAccrual(maybeAccount);\n}\n\nexport async function fetchAllRewardAccrual(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<RewardAccrual>[]> {\n\tconst maybeAccounts = await fetchAllMaybeRewardAccrual(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeRewardAccrual(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<RewardAccrual>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeRewardAccrual(maybeAccount),\n\t);\n}\n\nexport function getRewardAccrualSize(): number {\n\treturn 130;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { GLOBAL_CONFIG_DISCRIMINATOR } from './globalConfig.js';\nimport { POOL_DISCRIMINATOR } from './pool.js';\nimport { REWARD_ACCRUAL_DISCRIMINATOR } from './rewardAccrual.js';\n\n/** Account kinds of the sendDex program. */\nexport type SendDexAccountType = 'globalConfig' | 'pool' | 'rewardAccrual';\n\n/**\n * Identifies sendDex account data by its discriminators.\n * Returns `null` when the account belongs to another program or the data matches no known account.\n */\nexport function identifySendDexAccount(\n\taccount:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendDexAccountType | null {\n\tif (\n\t\t'data' in account &&\n\t\taccount.programAddress !== SEND_DEX_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in account ? account.data : account;\n\tif (containsBytes(data, GLOBAL_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'globalConfig';\n\t}\n\tif (containsBytes(data, POOL_DISCRIMINATOR, 0)) {\n\t\treturn 'pool';\n\t}\n\tif (containsBytes(data, REWARD_ACCRUAL_DISCRIMINATOR, 0)) {\n\t\treturn 'rewardAccrual';\n\t}\n\treturn null;\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\nexport * from './globalConfig.js';\nexport * from './pool.js';\nexport * from './rewardAccrual.js';\nexport * from './sendDex.accounts.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tisProgramError,\n\ttype Address,\n\ttype SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n\ttype SolanaError,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\n/** PoolPaused: Pool is paused */\nexport const SEND_DEX_ERROR__POOL_PAUSED = 0x1770; // 6000\n/** SlippageExceeded: Slippage tolerance exceeded */\nexport const SEND_DEX_ERROR__SLIPPAGE_EXCEEDED = 0x1771; // 6001\n/** InsufficientBalance: Insufficient balance in source account */\nexport const SEND_DEX_ERROR__INSUFFICIENT_BALANCE = 0x1772; // 6002\n/** InvalidBaseMint: Invalid base mint */\nexport const SEND_DEX_ERROR__INVALID_BASE_MINT = 0x1773; // 6003\n/** InvalidQuoteMint: Invalid quote mint */\nexport const SEND_DEX_ERROR__INVALID_QUOTE_MINT = 0x1774; // 6004\n/** PoolCreationDisabled: Pool creation is disabled */\nexport const SEND_DEX_ERROR__POOL_CREATION_DISABLED = 0x1775; // 6005\n/** InvalidPoolState: Invalid pool state */\nexport const SEND_DEX_ERROR__INVALID_POOL_STATE = 0x1776; // 6006\n/** InvalidDeposit: Invalid deposit */\nexport const SEND_DEX_ERROR__INVALID_DEPOSIT = 0x1777; // 6007\n/** InvalidPoolBalance: Invalid pool balance */\nexport const SEND_DEX_ERROR__INVALID_POOL_BALANCE = 0x1778; // 6008\n/** InsufficientPoolBalance: Insufficient pool balance */\nexport const SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE = 0x1779; // 6009\n/** InvalidAuthority: Invalid authority */\nexport const SEND_DEX_ERROR__INVALID_AUTHORITY = 0x177a; // 6010\n/** InvalidCreatorHash: creator_hash does not match (creator_platform, creator_id) */\nexport const SEND_DEX_ERROR__INVALID_CREATOR_HASH = 0x177b; // 6011\n/** InvalidPlatformConfig: Platform config cannot be the default address */\nexport const SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG = 0x177c; // 6012\n/** ProgramPaused: Program is paused */\nexport const SEND_DEX_ERROR__PROGRAM_PAUSED = 0x1b58; // 7000\n/** Unauthorized: Unauthorized */\nexport const SEND_DEX_ERROR__UNAUTHORIZED = 0x1b59; // 7001\n/** ArithmeticOverflow: Arithmetic overflow */\nexport const SEND_DEX_ERROR__ARITHMETIC_OVERFLOW = 0x1b5a; // 7002\n/** InvalidPythAccount: Invalid Pyth price account */\nexport const SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT = 0x1b5b; // 7003\n/** InvalidPythFeed: Invalid Pyth feed ID */\nexport const SEND_DEX_ERROR__INVALID_PYTH_FEED = 0x1b5c; // 7004\n/** InvalidSlug: Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore */\nexport const SEND_DEX_ERROR__INVALID_SLUG = 0x1b5d; // 7005\n/** TextTooLong: Text too long */\nexport const SEND_DEX_ERROR__TEXT_TOO_LONG = 0x1b5e; // 7006\n/** UserTokenAccountWrongProgram: User token account owned by the wrong token program */\nexport const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM = 0x1b5f; // 7007\n/** UserTokenAccountInvalid: User token account is not an initialized token account */\nexport const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID = 0x1b60; // 7008\n/** UserTokenAccountWrongMint: User token account mint does not match the trade */\nexport const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 0x1b61; // 7009\n/** UserTokenAccountWrongAuthority: User token account is not owned by the trading user */\nexport const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 0x1b62; // 7010\n/** NothingToClaim: Nothing to claim */\nexport const SEND_DEX_ERROR__NOTHING_TO_CLAIM = 0x1b63; // 7011\n/** InvalidCreatorId: Creator identity is not a decodable wallet address */\nexport const SEND_DEX_ERROR__INVALID_CREATOR_ID = 0x1b64; // 7012\n/** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */\nexport const SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET = 0x1b65; // 7013\n/** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */\nexport const SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 0x1b66; // 7014\n/** InsufficientLiquidity: Insufficient liquidity */\nexport const SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY = 0x1bbc; // 7100\n/** InvalidAmount: Invalid amount */\nexport const SEND_DEX_ERROR__INVALID_AMOUNT = 0x1bbd; // 7101\n\nexport type SendDexError =\n\t| typeof SEND_DEX_ERROR__ARITHMETIC_OVERFLOW\n\t| typeof SEND_DEX_ERROR__INSUFFICIENT_BALANCE\n\t| typeof SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY\n\t| typeof SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE\n\t| typeof SEND_DEX_ERROR__INVALID_AMOUNT\n\t| typeof SEND_DEX_ERROR__INVALID_AUTHORITY\n\t| typeof SEND_DEX_ERROR__INVALID_BASE_MINT\n\t| typeof SEND_DEX_ERROR__INVALID_CREATOR_HASH\n\t| typeof SEND_DEX_ERROR__INVALID_CREATOR_ID\n\t| typeof SEND_DEX_ERROR__INVALID_DEPOSIT\n\t| typeof SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG\n\t| typeof SEND_DEX_ERROR__INVALID_POOL_BALANCE\n\t| typeof SEND_DEX_ERROR__INVALID_POOL_STATE\n\t| typeof SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT\n\t| typeof SEND_DEX_ERROR__INVALID_PYTH_FEED\n\t| typeof SEND_DEX_ERROR__INVALID_QUOTE_MINT\n\t| typeof SEND_DEX_ERROR__INVALID_SLUG\n\t| typeof SEND_DEX_ERROR__NOTHING_TO_CLAIM\n\t| typeof SEND_DEX_ERROR__POOL_CREATION_DISABLED\n\t| typeof SEND_DEX_ERROR__POOL_PAUSED\n\t| typeof SEND_DEX_ERROR__PROGRAM_PAUSED\n\t| typeof SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET\n\t| typeof SEND_DEX_ERROR__SLIPPAGE_EXCEEDED\n\t| typeof SEND_DEX_ERROR__TEXT_TOO_LONG\n\t| typeof SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE\n\t| typeof SEND_DEX_ERROR__UNAUTHORIZED\n\t| typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID\n\t| typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY\n\t| typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT\n\t| typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;\n\nexport const sendDexErrorMessages: Record<SendDexError, string> = {\n\t[SEND_DEX_ERROR__ARITHMETIC_OVERFLOW]: `Arithmetic overflow`,\n\t[SEND_DEX_ERROR__INSUFFICIENT_BALANCE]: `Insufficient balance in source account`,\n\t[SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY]: `Insufficient liquidity`,\n\t[SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE]: `Insufficient pool balance`,\n\t[SEND_DEX_ERROR__INVALID_AMOUNT]: `Invalid amount`,\n\t[SEND_DEX_ERROR__INVALID_AUTHORITY]: `Invalid authority`,\n\t[SEND_DEX_ERROR__INVALID_BASE_MINT]: `Invalid base mint`,\n\t[SEND_DEX_ERROR__INVALID_CREATOR_HASH]: `creator_hash does not match (creator_platform, creator_id)`,\n\t[SEND_DEX_ERROR__INVALID_CREATOR_ID]: `Creator identity is not a decodable wallet address`,\n\t[SEND_DEX_ERROR__INVALID_DEPOSIT]: `Invalid deposit`,\n\t[SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG]: `Platform config cannot be the default address`,\n\t[SEND_DEX_ERROR__INVALID_POOL_BALANCE]: `Invalid pool balance`,\n\t[SEND_DEX_ERROR__INVALID_POOL_STATE]: `Invalid pool state`,\n\t[SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT]: `Invalid Pyth price account`,\n\t[SEND_DEX_ERROR__INVALID_PYTH_FEED]: `Invalid Pyth feed ID`,\n\t[SEND_DEX_ERROR__INVALID_QUOTE_MINT]: `Invalid quote mint`,\n\t[SEND_DEX_ERROR__INVALID_SLUG]: `Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore`,\n\t[SEND_DEX_ERROR__NOTHING_TO_CLAIM]: `Nothing to claim`,\n\t[SEND_DEX_ERROR__POOL_CREATION_DISABLED]: `Pool creation is disabled`,\n\t[SEND_DEX_ERROR__POOL_PAUSED]: `Pool is paused`,\n\t[SEND_DEX_ERROR__PROGRAM_PAUSED]: `Program is paused`,\n\t[SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET]: `Quote mint has no USDC price on its nexus reward state`,\n\t[SEND_DEX_ERROR__SLIPPAGE_EXCEEDED]: `Slippage tolerance exceeded`,\n\t[SEND_DEX_ERROR__TEXT_TOO_LONG]: `Text too long`,\n\t[SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE]: `Token-2022 transfer fee schedule cannot settle the exact amount`,\n\t[SEND_DEX_ERROR__UNAUTHORIZED]: `Unauthorized`,\n\t[SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID]: `User token account is not an initialized token account`,\n\t[SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY]: `User token account is not owned by the trading user`,\n\t[SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT]: `User token account mint does not match the trade`,\n\t[SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM]: `User token account owned by the wrong token program`,\n} as const;\n\nexport function getSendDexErrorMessage(code: SendDexError): string {\n\treturn sendDexErrorMessages[code];\n}\n\nexport function isSendDexError<TProgramErrorCode extends SendDexError>(\n\terror: unknown,\n\ttransactionMessage: {\n\t\tinstructions: Record<number, { programAddress: Address }>;\n\t},\n\tcode?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &\n\tReadonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n\treturn isProgramError<TProgramErrorCode>(\n\t\terror,\n\t\ttransactionMessage,\n\t\tSEND_DEX_PROGRAM_ADDRESS,\n\t\tcode,\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\nexport * from './sendDex.js';\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const EVENT_AUTHORITY_PDA_ADDRESS =\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t' as Address<'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t'>;\n\nexport function findEventAuthorityPda(): ProgramDerivedAddress {\n\treturn [EVENT_AUTHORITY_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const GLOBAL_CONFIG_PDA_ADDRESS =\n\t'EzwCCwXhnp9DERXBmMw6gfZxHYBtBQYaC5FjCnuKbivA' as Address<'EzwCCwXhnp9DERXBmMw6gfZxHYBtBQYaC5FjCnuKbivA'>;\n\nexport function findGlobalConfigPda(): ProgramDerivedAddress {\n\treturn [GLOBAL_CONFIG_PDA_ADDRESS, 254 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type LpMintSeeds = {\n\tbaseMint: Address;\n\tquoteMint: Address;\n};\n\nexport async function findLpMintPda(\n\tseeds: LpMintSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_DEX_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([108, 112, 95, 109, 105, 110, 116]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.baseMint),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type PoolSeeds = {\n\tbaseMint: Address;\n\tquoteMint: Address;\n};\n\nexport async function findPoolPda(\n\tseeds: PoolSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_DEX_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(new Uint8Array([112, 111, 111, 108])),\n\t\t\tgetAddressEncoder().encode(seeds.baseMint),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type RewardAccrualSeeds = {\n\tquoteMint: Address;\n};\n\nexport async function findRewardAccrualPda(\n\tseeds: RewardAccrualSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_DEX_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117, 97,\n\t\t\t\t\t108,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const WSOL_REWARD_ACCRUAL_PDA_ADDRESS =\n\t'3AvcBtMajsyeNufVwkxV7UNXWo6G1qkJmCpiXx1HcFg8' as Address<'3AvcBtMajsyeNufVwkxV7UNXWo6G1qkJmCpiXx1HcFg8'>;\n\nexport function findWsolRewardAccrualPda(): ProgramDerivedAddress {\n\treturn [WSOL_REWARD_ACCRUAL_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\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\nexport * from './eventAuthority.js';\nexport * from './globalConfig.js';\nexport * from './lpMint.js';\nexport * from './pool.js';\nexport * from './rewardAccrual.js';\nexport * from './wsolRewardAccrual.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tfixEncoderSize,\n\tgetBytesEncoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\n\n/**\n * Shared event-framing tag prepended to every CPI-framed event.\n *\n * `containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)` checks whether data is a framed event\n * at all — including event kinds unknown to this program.\n */\nexport const ANCHOR_EVENT_CPI_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]);\n\nexport function getAnchorEventCpiDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const CREATOR_CLAIM_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([232, 58, 157, 141, 123, 5, 142, 9]);\n\nexport function getCreatorClaimEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type CreatorClaimEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tplatformConfig: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tclaimer: Address;\n\tdestinationOwner: Address;\n\tamount: bigint;\n\tquoteTransferFee: bigint;\n\ttimestamp: bigint;\n};\n\nlet getCreatorClaimEventDecoderCache:\n\t| FixedSizeDecoder<CreatorClaimEvent>\n\t| undefined;\n\nexport function getCreatorClaimEventDecoder(): FixedSizeDecoder<CreatorClaimEvent> {\n\treturn (getCreatorClaimEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['claimer', getAddressDecoder()],\n\t\t['destinationOwner', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link CreatorClaimEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseCreatorClaimEvent to decode the matching data\n */\nexport function isCreatorClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, CREATOR_CLAIM_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link CreatorClaimEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isCreatorClaimEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parseCreatorClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): CreatorClaimEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isCreatorClaimEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getCreatorClaimEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const DEPOSIT_QUOTE_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([56, 85, 51, 82, 217, 252, 229, 94]);\n\nexport function getDepositQuoteEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tDEPOSIT_QUOTE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type DepositQuoteEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tuser: Address;\n\tplatformConfig: Address;\n\tamount: bigint;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getDepositQuoteEventDecoderCache:\n\t| FixedSizeDecoder<DepositQuoteEvent>\n\t| undefined;\n\nexport function getDepositQuoteEventDecoder(): FixedSizeDecoder<DepositQuoteEvent> {\n\treturn (getDepositQuoteEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['user', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['baseReserves', getU64Decoder()],\n\t\t['quoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link DepositQuoteEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseDepositQuoteEvent to decode the matching data\n */\nexport function isDepositQuoteEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, DEPOSIT_QUOTE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link DepositQuoteEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isDepositQuoteEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parseDepositQuoteEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): DepositQuoteEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isDepositQuoteEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getDepositQuoteEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tDEPOSIT_QUOTE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\tgetU8Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const POOL_CREATE_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([151, 215, 226, 9, 118, 161, 115, 174]);\n\nexport function getPoolCreateEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tPOOL_CREATE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type PoolCreateEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tbaseVault: Address;\n\tquoteVault: Address;\n\tlpMint: Address;\n\tlpMinted: bigint;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getPoolCreateEventDecoderCache:\n\t| FixedSizeDecoder<PoolCreateEvent>\n\t| undefined;\n\nexport function getPoolCreateEventDecoder(): FixedSizeDecoder<PoolCreateEvent> {\n\treturn (getPoolCreateEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['baseDecimals', getU8Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['quoteDecimals', getU8Decoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['baseVault', getAddressDecoder()],\n\t\t['quoteVault', getAddressDecoder()],\n\t\t['lpMint', getAddressDecoder()],\n\t\t['lpMinted', getU64Decoder()],\n\t\t['baseReserves', getU64Decoder()],\n\t\t['quoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link PoolCreateEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parsePoolCreateEvent to decode the matching data\n */\nexport function isPoolCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, POOL_CREATE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link PoolCreateEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isPoolCreateEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parsePoolCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): PoolCreateEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isPoolCreateEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getPoolCreateEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tPOOL_CREATE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const PROTOCOL_CLAIM_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([149, 70, 119, 5, 21, 57, 123, 244]);\n\nexport function getProtocolClaimEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type ProtocolClaimEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tplatformConfig: Address;\n\tamount: bigint;\n\tquoteTransferFee: bigint;\n\ttimestamp: bigint;\n};\n\nlet getProtocolClaimEventDecoderCache:\n\t| FixedSizeDecoder<ProtocolClaimEvent>\n\t| undefined;\n\nexport function getProtocolClaimEventDecoder(): FixedSizeDecoder<ProtocolClaimEvent> {\n\treturn (getProtocolClaimEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link ProtocolClaimEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseProtocolClaimEvent to decode the matching data\n */\nexport function isProtocolClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, PROTOCOL_CLAIM_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link ProtocolClaimEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isProtocolClaimEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parseProtocolClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ProtocolClaimEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isProtocolClaimEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getProtocolClaimEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR.length,\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 {\n\taddDecoderSizePrefix,\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBooleanDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU32Decoder,\n\tgetU64Decoder,\n\tgetU8Decoder,\n\tgetUtf8Decoder,\n\ttype Address,\n\ttype Decoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const TOKEN_CREATE_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([152, 16, 194, 59, 171, 105, 172, 45]);\n\nexport function getTokenCreateEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type TokenCreateEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tbaseSupply: bigint;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorPlatform: string;\n\tcreatorId: string;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tname: string;\n\tsymbol: string;\n\turi: string;\n\tpartner: Address;\n\tisPartner: boolean;\n\tcreationFee: bigint;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getTokenCreateEventDecoderCache: Decoder<TokenCreateEvent> | undefined;\n\nexport function getTokenCreateEventDecoder(): Decoder<TokenCreateEvent> {\n\treturn (getTokenCreateEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['baseDecimals', getU8Decoder()],\n\t\t['baseSupply', getU64Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['quoteDecimals', getU8Decoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t[\n\t\t\t'creatorPlatform',\n\t\t\taddDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n\t\t],\n\t\t['creatorId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['partner', getAddressDecoder()],\n\t\t['isPartner', getBooleanDecoder()],\n\t\t['creationFee', getU64Decoder()],\n\t\t['baseReserves', getU64Decoder()],\n\t\t['quoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link TokenCreateEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseTokenCreateEvent to decode the matching data\n */\nexport function isTokenCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, TOKEN_CREATE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link TokenCreateEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isTokenCreateEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parseTokenCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): TokenCreateEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isTokenCreateEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getTokenCreateEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBooleanDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetTradeDirectionDecoder,\n\ttype TradeDirection,\n} from '../types/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const TRADE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t189, 219, 127, 211, 78, 230, 97, 238,\n]);\n\nexport function getTradeEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tTRADE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type TradeEvent = {\n\tpool: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tuser: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tbaseAmount: bigint;\n\tquoteAmountGross: bigint;\n\tquoteAmountNet: bigint;\n\ttradeDirection: TradeDirection;\n\tpartner: Address;\n\tisPartner: boolean;\n\tprotocolFee: bigint;\n\tlpFee: bigint;\n\tcreatorFee: bigint;\n\tbaseTransferFee: bigint;\n\tquoteTransferFee: bigint;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getTradeEventDecoderCache: FixedSizeDecoder<TradeEvent> | undefined;\n\nexport function getTradeEventDecoder(): FixedSizeDecoder<TradeEvent> {\n\treturn (getTradeEventDecoderCache ??= getStructDecoder([\n\t\t['pool', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['user', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['baseAmount', getU64Decoder()],\n\t\t['quoteAmountGross', getU64Decoder()],\n\t\t['quoteAmountNet', getU64Decoder()],\n\t\t['tradeDirection', getTradeDirectionDecoder()],\n\t\t['partner', getAddressDecoder()],\n\t\t['isPartner', getBooleanDecoder()],\n\t\t['protocolFee', getU64Decoder()],\n\t\t['lpFee', getU64Decoder()],\n\t\t['creatorFee', getU64Decoder()],\n\t\t['baseTransferFee', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['baseReserves', getU64Decoder()],\n\t\t['quoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link TradeEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseTradeEvent to decode the matching data\n */\nexport function isTradeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, TRADE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link TradeEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_DEX_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isTradeEvent to check without decoding\n * @see identifySendDexEvent to identify any program event\n * @see parseSendDexEvent\n */\nexport function parseTradeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): TradeEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isTradeEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getTradeEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tTRADE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\nimport {\n\tCREATOR_CLAIM_EVENT_DISCRIMINATOR,\n\tgetCreatorClaimEventDecoder,\n\ttype CreatorClaimEvent,\n} from './creatorClaimEvent.js';\nimport {\n\tDEPOSIT_QUOTE_EVENT_DISCRIMINATOR,\n\tgetDepositQuoteEventDecoder,\n\ttype DepositQuoteEvent,\n} from './depositQuoteEvent.js';\nimport {\n\tgetPoolCreateEventDecoder,\n\tPOOL_CREATE_EVENT_DISCRIMINATOR,\n\ttype PoolCreateEvent,\n} from './poolCreateEvent.js';\nimport {\n\tgetProtocolClaimEventDecoder,\n\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR,\n\ttype ProtocolClaimEvent,\n} from './protocolClaimEvent.js';\nimport {\n\tgetTokenCreateEventDecoder,\n\tTOKEN_CREATE_EVENT_DISCRIMINATOR,\n\ttype TokenCreateEvent,\n} from './tokenCreateEvent.js';\nimport {\n\tgetTradeEventDecoder,\n\tTRADE_EVENT_DISCRIMINATOR,\n\ttype TradeEvent,\n} from './tradeEvent.js';\n\n/** Event kinds of the sendDex program. */\nexport type SendDexEventType =\n\t| 'creatorClaimEvent'\n\t| 'depositQuoteEvent'\n\t| 'poolCreateEvent'\n\t| 'protocolClaimEvent'\n\t| 'tokenCreateEvent'\n\t| 'tradeEvent';\n\n/**\n * Identifies sendDex event data by its discriminators, without decoding.\n * Returns `null` when the event was emitted by another program or no known event matches.\n * Never throws.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function identifySendDexEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendDexEventType | null {\n\tif ('data' in event && event.programAddress !== SEND_DEX_PROGRAM_ADDRESS)\n\t\treturn null;\n\tconst data = 'data' in event ? event.data : event;\n\tif (containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)) {\n\t\tif (containsBytes(data, CREATOR_CLAIM_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'creatorClaimEvent';\n\t\t}\n\t\tif (containsBytes(data, DEPOSIT_QUOTE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'depositQuoteEvent';\n\t\t}\n\t\tif (containsBytes(data, POOL_CREATE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'poolCreateEvent';\n\t\t}\n\t\tif (containsBytes(data, PROTOCOL_CLAIM_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'protocolClaimEvent';\n\t\t}\n\t\tif (containsBytes(data, TOKEN_CREATE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'tokenCreateEvent';\n\t\t}\n\t\tif (containsBytes(data, TRADE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'tradeEvent';\n\t\t}\n\t}\n\treturn null;\n}\n\n/** Parsed sendDex event: the event kind tag plus its decoded payload. */\nexport type ParsedSendDexEvent =\n\t| { eventType: 'creatorClaimEvent'; data: CreatorClaimEvent }\n\t| { eventType: 'depositQuoteEvent'; data: DepositQuoteEvent }\n\t| { eventType: 'poolCreateEvent'; data: PoolCreateEvent }\n\t| { eventType: 'protocolClaimEvent'; data: ProtocolClaimEvent }\n\t| { eventType: 'tokenCreateEvent'; data: TokenCreateEvent }\n\t| { eventType: 'tradeEvent'; data: TradeEvent };\n\n/**\n * Parses sendDex event data into its event kind and decoded payload.\n * Returns `null` when the event was emitted by another program or no known event matches;\n * throws if a matched event fails to decode.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function parseSendDexEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ParsedSendDexEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tconst eventType = identifySendDexEvent(checkedEvent);\n\tif (eventType === null) return null;\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\tswitch (eventType) {\n\t\tcase 'creatorClaimEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'creatorClaimEvent',\n\t\t\t\tdata: getCreatorClaimEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'depositQuoteEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'depositQuoteEvent',\n\t\t\t\tdata: getDepositQuoteEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tDEPOSIT_QUOTE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'poolCreateEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'poolCreateEvent',\n\t\t\t\tdata: getPoolCreateEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tPOOL_CREATE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'protocolClaimEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'protocolClaimEvent',\n\t\t\t\tdata: getProtocolClaimEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'tokenCreateEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'tokenCreateEvent',\n\t\t\t\tdata: getTokenCreateEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'tradeEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'tradeEvent',\n\t\t\t\tdata: getTradeEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tTRADE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\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\nexport * from './anchorEventCpiDiscriminator.framing.js';\nexport * from './creatorClaimEvent.js';\nexport * from './depositQuoteEvent.js';\nexport * from './poolCreateEvent.js';\nexport * from './protocolClaimEvent.js';\nexport * from './sendDex.events.js';\nexport * from './tokenCreateEvent.js';\nexport * from './tradeEvent.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport { EVENT_AUTHORITY_PDA_ADDRESS, findPoolPda } from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const BUY_EXACT_IN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t250, 234, 13, 123, 213, 156, 19, 236,\n]);\n\nexport function getBuyExactInDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tBUY_EXACT_IN_DISCRIMINATOR,\n\t);\n}\n\nexport type BuyExactInInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type BuyExactInInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountIn: bigint;\n\tminAmountOut: bigint;\n};\n\nexport type BuyExactInInstructionDataArgs = {\n\tamountIn: number | bigint;\n\tminAmountOut: number | bigint;\n};\n\nexport function getBuyExactInInstructionDataEncoder(): FixedSizeEncoder<BuyExactInInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountIn', getU64Encoder()],\n\t\t\t['minAmountOut', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: BUY_EXACT_IN_DISCRIMINATOR }),\n\t);\n}\n\nexport function getBuyExactInInstructionDataDecoder(): FixedSizeDecoder<BuyExactInInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountIn', getU64Decoder()],\n\t\t['minAmountOut', getU64Decoder()],\n\t]);\n}\n\nexport function getBuyExactInInstructionDataCodec(): FixedSizeCodec<\n\tBuyExactInInstructionDataArgs,\n\tBuyExactInInstructionData\n> {\n\treturn combineCodec(\n\t\tgetBuyExactInInstructionDataEncoder(),\n\t\tgetBuyExactInInstructionDataDecoder(),\n\t);\n}\n\nexport type BuyExactInInstructionExtraArgs = { platformConfig: Address };\n\nexport type BuyExactInAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: BuyExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: BuyExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig: BuyExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getBuyExactInInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactInAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tBuyExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactInInstructionDataEncoder().encode(\n\t\t\targs as BuyExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type BuyExactInInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: BuyExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: BuyExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig?: BuyExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport function getBuyExactInInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactInInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): BuyExactInInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactInInstructionDataEncoder().encode(\n\t\t\targs as BuyExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedBuyExactInInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tpool: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: BuyExactInInstructionData;\n};\n\nexport function parseBuyExactInInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedBuyExactInInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, BUY_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseBuyExactInInstruction: instruction data does not match the BuyExactIn discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getBuyExactInInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport { EVENT_AUTHORITY_PDA_ADDRESS, findPoolPda } from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const BUY_EXACT_OUT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t24, 211, 116, 40, 105, 3, 153, 56,\n]);\n\nexport function getBuyExactOutDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tBUY_EXACT_OUT_DISCRIMINATOR,\n\t);\n}\n\nexport type BuyExactOutInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type BuyExactOutInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountOut: bigint;\n\tmaxAmountIn: bigint;\n};\n\nexport type BuyExactOutInstructionDataArgs = {\n\tamountOut: number | bigint;\n\tmaxAmountIn: number | bigint;\n};\n\nexport function getBuyExactOutInstructionDataEncoder(): FixedSizeEncoder<BuyExactOutInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountOut', getU64Encoder()],\n\t\t\t['maxAmountIn', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: BUY_EXACT_OUT_DISCRIMINATOR }),\n\t);\n}\n\nexport function getBuyExactOutInstructionDataDecoder(): FixedSizeDecoder<BuyExactOutInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountOut', getU64Decoder()],\n\t\t['maxAmountIn', getU64Decoder()],\n\t]);\n}\n\nexport function getBuyExactOutInstructionDataCodec(): FixedSizeCodec<\n\tBuyExactOutInstructionDataArgs,\n\tBuyExactOutInstructionData\n> {\n\treturn combineCodec(\n\t\tgetBuyExactOutInstructionDataEncoder(),\n\t\tgetBuyExactOutInstructionDataDecoder(),\n\t);\n}\n\nexport type BuyExactOutInstructionExtraArgs = { platformConfig: Address };\n\nexport type BuyExactOutAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: BuyExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: BuyExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig: BuyExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getBuyExactOutInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactOutAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tBuyExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactOutInstructionDataEncoder().encode(\n\t\t\targs as BuyExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type BuyExactOutInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: BuyExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: BuyExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig?: BuyExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport function getBuyExactOutInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactOutInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): BuyExactOutInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactOutInstructionDataEncoder().encode(\n\t\t\targs as BuyExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedBuyExactOutInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tpool: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: BuyExactOutInstructionData;\n};\n\nexport function parseBuyExactOutInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedBuyExactOutInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, BUY_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseBuyExactOutInstruction: instruction data does not match the BuyExactOut discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getBuyExactOutInstructionDataDecoder().decode(instruction.data),\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 {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport { EVENT_AUTHORITY_PDA_ADDRESS, findPoolPda } from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CLAIM_CREATOR_FEES_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([0, 23, 125, 234, 156, 118, 134, 89]);\n\nexport function getClaimCreatorFeesDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCLAIM_CREATOR_FEES_DISCRIMINATOR,\n\t);\n}\n\nexport type ClaimCreatorFeesInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountClaimer extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountCreatorFeeConfig extends string | AccountMeta<string> = string,\n\tTAccountNexusGlobalConfig extends string | AccountMeta<string> =\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountDestinationOwner extends string | AccountMeta<string> = string,\n\tTAccountDestination extends string | AccountMeta<string> = string,\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountClaimer extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountClaimer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountClaimer>\n\t\t\t\t: TAccountClaimer,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountCreatorFeeConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountCreatorFeeConfig>\n\t\t\t\t: TAccountCreatorFeeConfig,\n\t\t\tTAccountNexusGlobalConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusGlobalConfig>\n\t\t\t\t: TAccountNexusGlobalConfig,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountDestinationOwner extends string\n\t\t\t\t? ReadonlyAccount<TAccountDestinationOwner>\n\t\t\t\t: TAccountDestinationOwner,\n\t\t\tTAccountDestination extends string\n\t\t\t\t? WritableAccount<TAccountDestination>\n\t\t\t\t: TAccountDestination,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type ClaimCreatorFeesInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n};\n\nexport type ClaimCreatorFeesInstructionDataArgs = {};\n\nexport function getClaimCreatorFeesInstructionDataEncoder(): FixedSizeEncoder<ClaimCreatorFeesInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CLAIM_CREATOR_FEES_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\nexport function getClaimCreatorFeesInstructionDataDecoder(): FixedSizeDecoder<ClaimCreatorFeesInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getClaimCreatorFeesInstructionDataCodec(): FixedSizeCodec<\n\tClaimCreatorFeesInstructionDataArgs,\n\tClaimCreatorFeesInstructionData\n> {\n\treturn combineCodec(\n\t\tgetClaimCreatorFeesInstructionDataEncoder(),\n\t\tgetClaimCreatorFeesInstructionDataDecoder(),\n\t);\n}\n\nexport type ClaimCreatorFeesAsyncInput<\n\tTAccountClaimer extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountDestinationOwner extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tclaimer: TransactionSigner<TAccountClaimer>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tdestinationOwner: Address<TAccountDestinationOwner>;\n\tdestination?: Address<TAccountDestination>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport async function getClaimCreatorFeesInstructionAsync<\n\tTAccountClaimer extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountDestinationOwner extends string,\n\tTAccountDestination extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimCreatorFeesAsyncInput<\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tClaimCreatorFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tclaimer: { value: input.claimer ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdestinationOwner: {\n\t\t\tvalue: input.destinationOwner ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.destination.value) {\n\t\taccounts.destination.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'destinationOwner',\n\t\t\t\t\t\taccounts.destinationOwner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('claimer', accounts.claimer),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('destinationOwner', accounts.destinationOwner),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimCreatorFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimCreatorFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ClaimCreatorFeesInput<\n\tTAccountClaimer extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountDestinationOwner extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tclaimer: TransactionSigner<TAccountClaimer>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tdestinationOwner: Address<TAccountDestinationOwner>;\n\tdestination: Address<TAccountDestination>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport function getClaimCreatorFeesInstruction<\n\tTAccountClaimer extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountDestinationOwner extends string,\n\tTAccountDestination extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimCreatorFeesInput<\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): ClaimCreatorFeesInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountClaimer,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountCreatorFeeConfig,\n\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountQuoteVault,\n\tTAccountDestinationOwner,\n\tTAccountDestination,\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tclaimer: { value: input.claimer ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdestinationOwner: {\n\t\t\tvalue: input.destinationOwner ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('claimer', accounts.claimer),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('destinationOwner', accounts.destinationOwner),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimCreatorFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimCreatorFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedClaimCreatorFeesInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tclaimer: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tpool: TAccountMetas[2];\n\t\tcreatorFeeConfig: TAccountMetas[3];\n\t\tnexusGlobalConfig: TAccountMetas[4];\n\t\tbaseMint: TAccountMetas[5];\n\t\tquoteMint: TAccountMetas[6];\n\t\tquoteVault: TAccountMetas[7];\n\t\tdestinationOwner: TAccountMetas[8];\n\t\tdestination: TAccountMetas[9];\n\t\tquoteTokenProgram: TAccountMetas[10];\n\t\tassociatedTokenProgram: TAccountMetas[11];\n\t\tsystemProgram: TAccountMetas[12];\n\t\teventAuthority: TAccountMetas[13];\n\t\tprogram: TAccountMetas[14];\n\t};\n\tdata: ClaimCreatorFeesInstructionData;\n};\n\nexport function parseClaimCreatorFeesInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedClaimCreatorFeesInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, CLAIM_CREATOR_FEES_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseClaimCreatorFeesInstruction: instruction data does not match the ClaimCreatorFees discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 15) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 15,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tclaimer: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tcreatorFeeConfig: getNextAccount(),\n\t\t\tnexusGlobalConfig: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tdestinationOwner: getNextAccount(),\n\t\t\tdestination: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getClaimCreatorFeesInstructionDataDecoder().decode(\n\t\t\tinstruction.data,\n\t\t),\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 {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\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\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindPoolPda,\n\tfindRewardAccrualPda,\n} from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CLAIM_PROTOCOL_FEES_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([34, 142, 219, 112, 109, 54, 133, 23]);\n\nexport function getClaimProtocolFeesDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\t);\n}\n\nexport type ClaimProtocolFeesInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountNexusStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountStakingRewardState extends string | AccountMeta<string> = string,\n\tTAccountRewardAccrual extends string | AccountMeta<string> = string,\n\tTAccountStakingVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountNexusStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusStakingConfig>\n\t\t\t\t: TAccountNexusStakingConfig,\n\t\t\tTAccountStakingRewardState extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingRewardState>\n\t\t\t\t: TAccountStakingRewardState,\n\t\t\tTAccountRewardAccrual extends string\n\t\t\t\t? WritableAccount<TAccountRewardAccrual>\n\t\t\t\t: TAccountRewardAccrual,\n\t\t\tTAccountStakingVault extends string\n\t\t\t\t? WritableAccount<TAccountStakingVault>\n\t\t\t\t: TAccountStakingVault,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type ClaimProtocolFeesInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n};\n\nexport type ClaimProtocolFeesInstructionDataArgs = {};\n\nexport function getClaimProtocolFeesInstructionDataEncoder(): FixedSizeEncoder<ClaimProtocolFeesInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\nexport function getClaimProtocolFeesInstructionDataDecoder(): FixedSizeDecoder<ClaimProtocolFeesInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getClaimProtocolFeesInstructionDataCodec(): FixedSizeCodec<\n\tClaimProtocolFeesInstructionDataArgs,\n\tClaimProtocolFeesInstructionData\n> {\n\treturn combineCodec(\n\t\tgetClaimProtocolFeesInstructionDataEncoder(),\n\t\tgetClaimProtocolFeesInstructionDataDecoder(),\n\t);\n}\n\nexport type ClaimProtocolFeesAsyncInput<\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState?: Address<TAccountStakingRewardState>;\n\trewardAccrual?: Address<TAccountRewardAccrual>;\n\tstakingVault?: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport async function getClaimProtocolFeesInstructionAsync<\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimProtocolFeesAsyncInput<\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tClaimProtocolFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.stakingRewardState.value) {\n\t\taccounts.stakingRewardState.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([114, 101, 119, 97, 114, 100]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.rewardAccrual.value) {\n\t\taccounts.rewardAccrual.value = await findRewardAccrualPda({\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.stakingVault.value) {\n\t\taccounts.stakingVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimProtocolFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimProtocolFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ClaimProtocolFeesInput<\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState: Address<TAccountStakingRewardState>;\n\trewardAccrual: Address<TAccountRewardAccrual>;\n\tstakingVault: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport function getClaimProtocolFeesInstruction<\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimProtocolFeesInput<\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): ClaimProtocolFeesInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountQuoteVault,\n\tTAccountNexusStakingConfig,\n\tTAccountStakingRewardState,\n\tTAccountRewardAccrual,\n\tTAccountStakingVault,\n\tTAccountQuoteTokenProgram,\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimProtocolFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimProtocolFeesInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedClaimProtocolFeesInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tpayer: TAccountMetas[0];\n\t\tpool: TAccountMetas[1];\n\t\tbaseMint: TAccountMetas[2];\n\t\tquoteMint: TAccountMetas[3];\n\t\tquoteVault: TAccountMetas[4];\n\t\tnexusStakingConfig: TAccountMetas[5];\n\t\tstakingRewardState: TAccountMetas[6];\n\t\trewardAccrual: TAccountMetas[7];\n\t\tstakingVault: TAccountMetas[8];\n\t\tquoteTokenProgram: TAccountMetas[9];\n\t\tsystemProgram: TAccountMetas[10];\n\t\teventAuthority: TAccountMetas[11];\n\t\tprogram: TAccountMetas[12];\n\t};\n\tdata: ClaimProtocolFeesInstructionData;\n};\n\nexport function parseClaimProtocolFeesInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedClaimProtocolFeesInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (\n\t\t!containsBytes(instruction.data, CLAIM_PROTOCOL_FEES_DISCRIMINATOR, 0)\n\t) {\n\t\tconst error = new Error(\n\t\t\t`parseClaimProtocolFeesInstruction: instruction data does not match the ClaimProtocolFees discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 13) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 13,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tnexusStakingConfig: getNextAccount(),\n\t\t\tstakingRewardState: getNextAccount(),\n\t\t\trewardAccrual: getNextAccount(),\n\t\t\tstakingVault: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getClaimProtocolFeesInstructionDataDecoder().decode(\n\t\t\tinstruction.data,\n\t\t),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport { EVENT_AUTHORITY_PDA_ADDRESS, findPoolPda } from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const SELL_EXACT_IN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t149, 39, 222, 155, 211, 124, 152, 26,\n]);\n\nexport function getSellExactInDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSELL_EXACT_IN_DISCRIMINATOR,\n\t);\n}\n\nexport type SellExactInInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type SellExactInInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountIn: bigint;\n\tminAmountOut: bigint;\n};\n\nexport type SellExactInInstructionDataArgs = {\n\tamountIn: number | bigint;\n\tminAmountOut: number | bigint;\n};\n\nexport function getSellExactInInstructionDataEncoder(): FixedSizeEncoder<SellExactInInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountIn', getU64Encoder()],\n\t\t\t['minAmountOut', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: SELL_EXACT_IN_DISCRIMINATOR }),\n\t);\n}\n\nexport function getSellExactInInstructionDataDecoder(): FixedSizeDecoder<SellExactInInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountIn', getU64Decoder()],\n\t\t['minAmountOut', getU64Decoder()],\n\t]);\n}\n\nexport function getSellExactInInstructionDataCodec(): FixedSizeCodec<\n\tSellExactInInstructionDataArgs,\n\tSellExactInInstructionData\n> {\n\treturn combineCodec(\n\t\tgetSellExactInInstructionDataEncoder(),\n\t\tgetSellExactInInstructionDataDecoder(),\n\t);\n}\n\nexport type SellExactInInstructionExtraArgs = { platformConfig: Address };\n\nexport type SellExactInAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: SellExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: SellExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig: SellExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getSellExactInInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactInAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tSellExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactInInstructionDataEncoder().encode(\n\t\t\targs as SellExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type SellExactInInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: SellExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: SellExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig?: SellExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport function getSellExactInInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactInInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): SellExactInInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactInInstructionDataEncoder().encode(\n\t\t\targs as SellExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactInInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedSellExactInInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tpool: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: SellExactInInstructionData;\n};\n\nexport function parseSellExactInInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSellExactInInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, SELL_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseSellExactInInstruction: instruction data does not match the SellExactIn discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getSellExactInInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport { EVENT_AUTHORITY_PDA_ADDRESS, findPoolPda } from '../pdas/index.js';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const SELL_EXACT_OUT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t95, 200, 71, 34, 8, 9, 11, 166,\n]);\n\nexport function getSellExactOutDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSELL_EXACT_OUT_DISCRIMINATOR,\n\t);\n}\n\nexport type SellExactOutInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type SellExactOutInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountOut: bigint;\n\tmaxAmountIn: bigint;\n};\n\nexport type SellExactOutInstructionDataArgs = {\n\tamountOut: number | bigint;\n\tmaxAmountIn: number | bigint;\n};\n\nexport function getSellExactOutInstructionDataEncoder(): FixedSizeEncoder<SellExactOutInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountOut', getU64Encoder()],\n\t\t\t['maxAmountIn', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: SELL_EXACT_OUT_DISCRIMINATOR }),\n\t);\n}\n\nexport function getSellExactOutInstructionDataDecoder(): FixedSizeDecoder<SellExactOutInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountOut', getU64Decoder()],\n\t\t['maxAmountIn', getU64Decoder()],\n\t]);\n}\n\nexport function getSellExactOutInstructionDataCodec(): FixedSizeCodec<\n\tSellExactOutInstructionDataArgs,\n\tSellExactOutInstructionData\n> {\n\treturn combineCodec(\n\t\tgetSellExactOutInstructionDataEncoder(),\n\t\tgetSellExactOutInstructionDataDecoder(),\n\t);\n}\n\nexport type SellExactOutInstructionExtraArgs = { platformConfig: Address };\n\nexport type SellExactOutAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool?: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: SellExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: SellExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig: SellExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getSellExactOutInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactOutAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tSellExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await findPoolPda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'pool',\n\t\t\t\t\t\taccounts.pool.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactOutInstructionDataEncoder().encode(\n\t\t\targs as SellExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type SellExactOutInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tpool: Address<TAccountPool>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: SellExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: SellExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig?: SellExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport function getSellExactOutInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountPool extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactOutInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): SellExactOutInstruction<\n\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountPool,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_DEX_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactOutInstructionDataEncoder().encode(\n\t\t\targs as SellExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactOutInstruction<\n\t\ttypeof SEND_DEX_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountPool,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'\n\t>);\n}\n\nexport type ParsedSellExactOutInstruction<\n\tTProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tpool: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: SellExactOutInstructionData;\n};\n\nexport function parseSellExactOutInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSellExactOutInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_DEX_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, SELL_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseSellExactOutInstruction: instruction data does not match the SellExactOut discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getSellExactOutInstructionDataDecoder().decode(instruction.data),\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 {\n\tassertIsInstructionWithAccounts,\n\tcontainsBytes,\n\ttype Address,\n\ttype Instruction,\n\ttype InstructionWithData,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_DEX_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tBUY_EXACT_IN_DISCRIMINATOR,\n\tparseBuyExactInInstruction,\n\ttype ParsedBuyExactInInstruction,\n} from './buyExactIn.js';\nimport {\n\tBUY_EXACT_OUT_DISCRIMINATOR,\n\tparseBuyExactOutInstruction,\n\ttype ParsedBuyExactOutInstruction,\n} from './buyExactOut.js';\nimport {\n\tCLAIM_CREATOR_FEES_DISCRIMINATOR,\n\tparseClaimCreatorFeesInstruction,\n\ttype ParsedClaimCreatorFeesInstruction,\n} from './claimCreatorFees.js';\nimport {\n\tCLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\tparseClaimProtocolFeesInstruction,\n\ttype ParsedClaimProtocolFeesInstruction,\n} from './claimProtocolFees.js';\nimport {\n\tparseSellExactInInstruction,\n\tSELL_EXACT_IN_DISCRIMINATOR,\n\ttype ParsedSellExactInInstruction,\n} from './sellExactIn.js';\nimport {\n\tparseSellExactOutInstruction,\n\tSELL_EXACT_OUT_DISCRIMINATOR,\n\ttype ParsedSellExactOutInstruction,\n} from './sellExactOut.js';\n\n/** Instruction kinds of the sendDex program. */\nexport type SendDexInstructionType =\n\t| 'buyExactIn'\n\t| 'buyExactOut'\n\t| 'claimCreatorFees'\n\t| 'claimProtocolFees'\n\t| 'sellExactIn'\n\t| 'sellExactOut';\n\n/**\n * Identifies sendDex instruction data by its discriminators.\n * Returns `null` when the instruction is for another program or the data matches no known instruction.\n */\nexport function identifySendDexInstruction(\n\tinstruction:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendDexInstructionType | null {\n\tif (\n\t\t'data' in instruction &&\n\t\tinstruction.programAddress !== SEND_DEX_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in instruction ? instruction.data : instruction;\n\tif (containsBytes(data, BUY_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\treturn 'buyExactIn';\n\t}\n\tif (containsBytes(data, BUY_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\treturn 'buyExactOut';\n\t}\n\tif (containsBytes(data, CLAIM_CREATOR_FEES_DISCRIMINATOR, 0)) {\n\t\treturn 'claimCreatorFees';\n\t}\n\tif (containsBytes(data, CLAIM_PROTOCOL_FEES_DISCRIMINATOR, 0)) {\n\t\treturn 'claimProtocolFees';\n\t}\n\tif (containsBytes(data, SELL_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\treturn 'sellExactIn';\n\t}\n\tif (containsBytes(data, SELL_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\treturn 'sellExactOut';\n\t}\n\treturn null;\n}\n\n/** Parsed sendDex instruction: the instruction kind tag plus its parsed accounts and data. */\nexport type ParsedSendDexInstruction<\n\tTProgram extends string = '84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n> =\n\t| ({\n\t\t\tinstructionType: 'buyExactIn';\n\t } & ParsedBuyExactInInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'buyExactOut';\n\t } & ParsedBuyExactOutInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'claimCreatorFees';\n\t } & ParsedClaimCreatorFeesInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'claimProtocolFees';\n\t } & ParsedClaimProtocolFeesInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'sellExactIn';\n\t } & ParsedSellExactInInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'sellExactOut';\n\t } & ParsedSellExactOutInstruction<TProgram>);\n\n/**\n * Parses a sendDex instruction into its kind tag plus parsed accounts and data.\n * Returns `null` when the instruction is for another program or no known instruction matches;\n * throws if a matched instruction fails to parse.\n */\nexport function parseSendDexInstruction<TProgram extends string>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSendDexInstruction<TProgram> | null {\n\tif (instruction.programAddress !== SEND_DEX_PROGRAM_ADDRESS) return null;\n\tconst instructionType = identifySendDexInstruction(instruction);\n\tif (instructionType === null) return null;\n\tswitch (instructionType) {\n\t\tcase 'buyExactIn': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'buyExactIn',\n\t\t\t\t...parseBuyExactInInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'buyExactOut': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'buyExactOut',\n\t\t\t\t...parseBuyExactOutInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'claimCreatorFees': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'claimCreatorFees',\n\t\t\t\t...parseClaimCreatorFeesInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'claimProtocolFees': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'claimProtocolFees',\n\t\t\t\t...parseClaimProtocolFeesInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'sellExactIn': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'sellExactIn',\n\t\t\t\t...parseSellExactInInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'sellExactOut': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'sellExactOut',\n\t\t\t\t...parseSellExactOutInstruction(instruction),\n\t\t\t};\n\t\t}\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\nexport * from './buyExactIn.js';\nexport * from './buyExactOut.js';\nexport * from './claimCreatorFees.js';\nexport * from './claimProtocolFees.js';\nexport * from './sellExactIn.js';\nexport * from './sellExactOut.js';\nexport * from './sendDex.instructions.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\textendClient,\n\ttype ClientWithPayer,\n\ttype ClientWithRpc,\n\ttype ClientWithTransactionPlanning,\n\ttype ClientWithTransactionSending,\n\ttype ExtendedClient,\n\ttype GetAccountInfoApi,\n\ttype GetMultipleAccountsApi,\n} from '@solana/kit';\nimport {\n\taddSelfPlanAndSendFunctions,\n\ttype SelfFetchFunctions,\n\ttype SelfPlanAndSendFunctions,\n} from '@solana/program-client-core';\nimport {\n\tfetchAllGlobalConfig,\n\tfetchAllMaybeGlobalConfig,\n\tfetchAllMaybePool,\n\tfetchAllMaybeRewardAccrual,\n\tfetchAllPool,\n\tfetchAllRewardAccrual,\n\tfetchGlobalConfig,\n\tfetchMaybeGlobalConfig,\n\tfetchMaybePool,\n\tfetchMaybeRewardAccrual,\n\tfetchPool,\n\tfetchRewardAccrual,\n\tgetGlobalConfigCodec,\n\tgetPoolCodec,\n\tgetRewardAccrualCodec,\n\tidentifySendDexAccount,\n\ttype GlobalConfig,\n\ttype GlobalConfigArgs,\n\ttype Pool,\n\ttype PoolArgs,\n\ttype RewardAccrual,\n\ttype RewardAccrualArgs,\n} from '../accounts/index.js';\nimport {\n\tgetCreatorClaimEventDecoder,\n\tgetDepositQuoteEventDecoder,\n\tgetPoolCreateEventDecoder,\n\tgetProtocolClaimEventDecoder,\n\tgetTokenCreateEventDecoder,\n\tgetTradeEventDecoder,\n} from '../events/index.js';\nimport {\n\tgetBuyExactInInstructionAsync,\n\tgetBuyExactOutInstructionAsync,\n\tgetClaimCreatorFeesInstructionAsync,\n\tgetClaimProtocolFeesInstructionAsync,\n\tgetSellExactInInstructionAsync,\n\tgetSellExactOutInstructionAsync,\n\tidentifySendDexInstruction,\n\tparseSendDexInstruction,\n\ttype BuyExactInAsyncInput,\n\ttype BuyExactOutAsyncInput,\n\ttype ClaimCreatorFeesAsyncInput,\n\ttype ClaimProtocolFeesAsyncInput,\n\ttype SellExactInAsyncInput,\n\ttype SellExactOutAsyncInput,\n} from '../instructions/index.js';\nimport {\n\tfindEventAuthorityPda,\n\tfindGlobalConfigPda,\n\tfindLpMintPda,\n\tfindPoolPda,\n\tfindRewardAccrualPda,\n\tfindWsolRewardAccrualPda,\n} from '../pdas/index.js';\n\nexport type SendDexPlugin = {\n\taccounts: SendDexPluginAccounts;\n\tevents: SendDexPluginEvents;\n\tinstructions: SendDexPluginInstructions;\n\tpdas: SendDexPluginPdas;\n\tidentifyAccount: typeof identifySendDexAccount;\n\tidentifyInstruction: typeof identifySendDexInstruction;\n\tparseInstruction: typeof parseSendDexInstruction;\n};\n\nexport type SendDexPluginAccounts = {\n\tglobalConfig: ReturnType<typeof getGlobalConfigCodec> &\n\t\tSelfFetchFunctions<GlobalConfigArgs, GlobalConfig>;\n\tpool: ReturnType<typeof getPoolCodec> & SelfFetchFunctions<PoolArgs, Pool>;\n\trewardAccrual: ReturnType<typeof getRewardAccrualCodec> &\n\t\tSelfFetchFunctions<RewardAccrualArgs, RewardAccrual>;\n};\n\nexport type SendDexPluginEvents = {\n\tcreatorClaimEvent: ReturnType<typeof getCreatorClaimEventDecoder>;\n\tdepositQuoteEvent: ReturnType<typeof getDepositQuoteEventDecoder>;\n\tpoolCreateEvent: ReturnType<typeof getPoolCreateEventDecoder>;\n\tprotocolClaimEvent: ReturnType<typeof getProtocolClaimEventDecoder>;\n\ttokenCreateEvent: ReturnType<typeof getTokenCreateEventDecoder>;\n\ttradeEvent: ReturnType<typeof getTradeEventDecoder>;\n};\n\nexport type SendDexPluginInstructions = {\n\tbuyExactIn: (\n\t\tinput: MakeOptional<BuyExactInAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getBuyExactInInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tbuyExactOut: (\n\t\tinput: MakeOptional<BuyExactOutAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getBuyExactOutInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tclaimCreatorFees: (\n\t\tinput: MakeOptional<ClaimCreatorFeesAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getClaimCreatorFeesInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tclaimProtocolFees: (\n\t\tinput: MakeOptional<ClaimProtocolFeesAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getClaimProtocolFeesInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tsellExactIn: (\n\t\tinput: MakeOptional<SellExactInAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getSellExactInInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tsellExactOut: (\n\t\tinput: MakeOptional<SellExactOutAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getSellExactOutInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n};\n\nexport type SendDexPluginPdas = {\n\tpool: typeof findPoolPda;\n\teventAuthority: typeof findEventAuthorityPda;\n\trewardAccrual: typeof findRewardAccrualPda;\n\tglobalConfig: typeof findGlobalConfigPda;\n\tlpMint: typeof findLpMintPda;\n\twsolRewardAccrual: typeof findWsolRewardAccrualPda;\n};\n\nexport type SendDexPluginRequirements = ClientWithRpc<\n\tGetAccountInfoApi & GetMultipleAccountsApi\n> &\n\tClientWithPayer &\n\tClientWithTransactionPlanning &\n\tClientWithTransactionSending;\n\nexport function sendDexProgram() {\n\treturn <T extends SendDexPluginRequirements>(\n\t\tclient: T,\n\t): ExtendedClient<T, { sendDex: SendDexPlugin }> => {\n\t\treturn extendClient(client, {\n\t\t\tsendDex: <SendDexPlugin>{\n\t\t\t\taccounts: {\n\t\t\t\t\tglobalConfig: Object.freeze({\n\t\t\t\t\t\t...getGlobalConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllGlobalConfig(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeGlobalConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tpool: Object.freeze({\n\t\t\t\t\t\t...getPoolCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchPool(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllPool(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybePool(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybePool(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\trewardAccrual: Object.freeze({\n\t\t\t\t\t\t...getRewardAccrualCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchRewardAccrual(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tevents: {\n\t\t\t\t\tcreatorClaimEvent: getCreatorClaimEventDecoder(),\n\t\t\t\t\tdepositQuoteEvent: getDepositQuoteEventDecoder(),\n\t\t\t\t\tpoolCreateEvent: getPoolCreateEventDecoder(),\n\t\t\t\t\tprotocolClaimEvent: getProtocolClaimEventDecoder(),\n\t\t\t\t\ttokenCreateEvent: getTokenCreateEventDecoder(),\n\t\t\t\t\ttradeEvent: getTradeEventDecoder(),\n\t\t\t\t},\n\t\t\t\tinstructions: {\n\t\t\t\t\tbuyExactIn: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetBuyExactInInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tbuyExactOut: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetBuyExactOutInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tclaimCreatorFees: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetClaimCreatorFeesInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tclaimProtocolFees: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetClaimProtocolFeesInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tsellExactIn: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetSellExactInInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tsellExactOut: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetSellExactOutInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tpdas: {\n\t\t\t\t\tpool: findPoolPda,\n\t\t\t\t\teventAuthority: findEventAuthorityPda,\n\t\t\t\t\trewardAccrual: findRewardAccrualPda,\n\t\t\t\t\tglobalConfig: findGlobalConfigPda,\n\t\t\t\t\tlpMint: findLpMintPda,\n\t\t\t\t\twsolRewardAccrual: findWsolRewardAccrualPda,\n\t\t\t\t},\n\t\t\t\tidentifyAccount: identifySendDexAccount,\n\t\t\t\tidentifyInstruction: identifySendDexInstruction,\n\t\t\t\tparseInstruction: parseSendDexInstruction,\n\t\t\t},\n\t\t});\n\t};\n}\n\ntype MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\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\nexport * from './sendDex.js';\n","export function floorDiv(a: bigint, b: bigint): bigint {\n\treturn a / b;\n}\n\n// Assumes non-negative inputs.\nexport function ceilDiv(a: bigint, b: bigint): bigint {\n\treturn a / b + (a % b > 0n ? 1n : 0n);\n}\n\nexport function assertBps(fn: string, name: string, bps: number): void {\n\tif (!Number.isInteger(bps) || bps < 0 || bps > 10_000) {\n\t\tthrow new RangeError(\n\t\t\t`${fn}: ${name} must be an integer between 0 and 10_000`,\n\t\t);\n\t}\n}\n","import { assertBps, ceilDiv, floorDiv } from './internal.js';\n\nconst BPS_DIVISOR = 10_000n;\n\nconst U64_MAX = 18_446_744_073_709_551_615n;\n\n/** Each call mirrors a `u64::try_from` in the Rust twin; drop one and an oversized leg fails in the encoder. */\nfunction assertU64(label: string, value: bigint): bigint {\n\tif (value > U64_MAX) {\n\t\tthrow new RangeError(`${label}: overflows u64`);\n\t}\n\treturn value;\n}\n\n/** Token-2022 `TransferFeeConfig` for the epoch the trade lands in; a stale one misprices the trade. */\nexport interface MintFee {\n\t/** 0 to 10_000. */\n\tbps: number;\n\t/** Cap on the withheld amount, in the mint's raw units. */\n\tmaximumFee: bigint;\n}\n\n/** No transfer lands exactly the requested amount; approximating one hands the program a bound it rejects. */\nexport class TransferFeeNotSettleableError extends RangeError {\n\treadonly amount: bigint;\n\treadonly mintFee: MintFee;\n\n\tconstructor(amount: bigint, mintFee: MintFee) {\n\t\tsuper(\n\t\t\t`transfer fee not settleable: no transfer lands exactly ${amount} at ${mintFee.bps} bps with a ${mintFee.maximumFee} cap`,\n\t\t);\n\t\tthis.name = 'TransferFeeNotSettleableError';\n\t\tthis.amount = amount;\n\t\tthis.mintFee = mintFee;\n\t}\n}\n\nfunction assertMintFee(fee: MintFee): void {\n\tassertBps('MintFee', 'bps', fee.bps);\n\tif (fee.maximumFee < 0n || fee.maximumFee > U64_MAX) {\n\t\tthrow new RangeError('MintFee: maximumFee must fit a u64');\n\t}\n}\n\n/** Rounds up, then caps (SPL's order); swapping them lets a split booking over-credit. */\nexport function feeOn(amount: bigint, fee?: MintFee): bigint {\n\tif (fee === undefined) return 0n;\n\tassertMintFee(fee);\n\tif (amount === 0n || fee.bps === 0) return 0n;\n\n\tconst raw = ceilDiv(amount * BigInt(fee.bps), BPS_DIVISOR);\n\treturn raw < fee.maximumFee ? raw : fee.maximumFee;\n}\n\n/** What lands when `amount` is sent; use `grossUp` to land an exact amount. */\nexport function amountAfterFee(amount: bigint, fee?: MintFee): bigint {\n\treturn amount - feeOn(amount, fee);\n}\n\n/** Line-for-line mirror of SPL's `TransferFee::calculate_pre_fee_amount`; `undefined` when no u64 answer exists. */\nfunction preFeeAmount(amount: bigint, fee: MintFee): bigint | undefined {\n\tconst bps = BigInt(fee.bps);\n\tif (bps === 0n) return amount;\n\t// Unreachable via `grossUp`; SPL has it, so the mirror keeps it.\n\tif (amount === 0n) return 0n;\n\t// 100%: only the cap can be settled.\n\tif (bps === BPS_DIVISOR) {\n\t\tconst capped = amount + fee.maximumFee;\n\t\treturn capped > U64_MAX ? undefined : capped;\n\t}\n\n\tconst rawPreFee = ceilDiv(amount * BPS_DIVISOR, BPS_DIVISOR - bps);\n\tif (rawPreFee - amount >= fee.maximumFee) {\n\t\tconst capped = amount + fee.maximumFee;\n\t\treturn capped > U64_MAX ? undefined : capped;\n\t}\n\treturn rawPreFee > U64_MAX ? undefined : rawPreFee;\n}\n\n/** What must be sent for exactly `amount` to land; throws {@link TransferFeeNotSettleableError} if none does. */\nexport function grossUp(amount: bigint, fee?: MintFee): bigint {\n\tif (fee === undefined) return amount;\n\tassertMintFee(fee);\n\tif (amount === 0n) return 0n;\n\n\tconst preFee = preFeeAmount(amount, fee);\n\tif (preFee === undefined)\n\t\tthrow new TransferFeeNotSettleableError(amount, fee);\n\n\t// SPL's inverse is inexact (`feeOn(x) >= inverse(x - feeOn(x))`): re-derive forward and reject a mismatch.\n\tconst impliedFee = feeOn(preFee, fee);\n\tconst gross = amount + impliedFee;\n\tif (gross > U64_MAX || feeOn(gross, fee) !== impliedFee) {\n\t\tthrow new TransferFeeNotSettleableError(amount, fee);\n\t}\n\treturn gross;\n}\n\n/** `baseAmount`/`quoteAmount` are the user's transfers, as in on-chain `TradeResult`. Read the net\n * fields on {@link BuyQuote}/{@link SellQuote}; re-deriving them drifts from the program by a rounding step. */\nexport interface TradeQuote {\n\t/** Base sent: vault to user on a buy, user to vault on a sell. */\n\tbaseAmount: bigint;\n\t/** Quote sent: user to vault on a buy, vault to user on a sell. */\n\tquoteAmount: bigint;\n\t/** Platform fee, in quote units. */\n\tfee: bigint;\n\tbaseTransferFee: bigint;\n\tquoteTransferFee: bigint;\n}\n\nexport interface BuyQuote extends TradeQuote {\n\t/** Priced on the quote reaching the vault. */\n\tfee: bigint;\n\t/** Base credited to the buyer, after the base mint's cut. */\n\tbaseToUser: bigint;\n\t/** Equals `quoteAmount`. */\n\tquoteFromUser: bigint;\n}\n\nexport interface SellQuote extends TradeQuote {\n\t/** Priced on the quote leaving the vault. */\n\tfee: bigint;\n\t/** Equals `baseAmount`. */\n\tbaseFromUser: bigint;\n\t/** Quote credited to the seller, after the quote mint's cut. */\n\tquoteToUser: bigint;\n}\n\nfunction sqrtBigInt(value: bigint): bigint {\n\tif (value < 0n) throw new RangeError('sqrtBigInt: negative input');\n\tif (value === 0n) return 0n;\n\tlet x = value;\n\tlet y = (x + 1n) / 2n;\n\twhile (y < x) {\n\t\tx = y;\n\t\ty = (x + value / x) / 2n;\n\t}\n\treturn x;\n}\n\n/** Output rounds down (the new reserve rounds up), so `k` never shrinks. */\nexport function calculateOutput(\n\treserveIn: bigint,\n\treserveOut: bigint,\n\tamountIn: bigint,\n): bigint {\n\tif (reserveIn === 0n || reserveOut === 0n) {\n\t\tthrow new RangeError('calculateOutput: insufficient liquidity');\n\t}\n\tif (amountIn === 0n) {\n\t\tthrow new RangeError('calculateOutput: invalid amount');\n\t}\n\n\tconst k = reserveIn * reserveOut;\n\tconst newReserveIn = reserveIn + amountIn;\n\n\tconst newReserveOut = ceilDiv(k, newReserveIn);\n\n\tif (newReserveOut >= reserveOut) {\n\t\tthrow new RangeError('calculateOutput: insufficient liquidity');\n\t}\n\n\tconst amountOut = reserveOut - newReserveOut;\n\tif (amountOut === 0n) {\n\t\tthrow new RangeError('calculateOutput: insufficient liquidity');\n\t}\n\n\treturn assertU64('calculateOutput', amountOut);\n}\n\n/** Required input rounds up so the user pays enough. */\nexport function calculateInputForOutput(\n\treserveIn: bigint,\n\treserveOut: bigint,\n\tamountOut: bigint,\n): bigint {\n\tif (reserveIn === 0n || reserveOut === 0n) {\n\t\tthrow new RangeError('calculateInputForOutput: insufficient liquidity');\n\t}\n\tif (amountOut === 0n || amountOut >= reserveOut) {\n\t\tthrow new RangeError('calculateInputForOutput: invalid amount');\n\t}\n\n\tconst k = reserveIn * reserveOut;\n\tconst newReserveOut = reserveOut - amountOut;\n\n\tconst newReserveIn = ceilDiv(k, newReserveOut);\n\n\tif (newReserveIn <= reserveIn) {\n\t\tthrow new RangeError('calculateInputForOutput: insufficient liquidity');\n\t}\n\n\tconst amountIn = newReserveIn - reserveIn;\n\tif (amountIn === 0n) {\n\t\tthrow new RangeError('calculateInputForOutput: insufficient liquidity');\n\t}\n\n\treturn assertU64('calculateInputForOutput', amountIn);\n}\n\ninterface BaseQuoteParams {\n\treserveQuote: bigint;\n\treserveBase: bigint;\n\tfeeBps: number;\n\tquoteFee?: MintFee;\n\tbaseFee?: MintFee;\n}\n\n/** Launchpad only: `bondingCurve.realBaseReserves`. A DEX pool has no cap. */\ninterface BaseReserveCap {\n\tbaseReserveCap?: bigint;\n}\n\n/** Vault-side legs, before either mint's transfer fee. */\ninterface AmmLegs {\n\tbaseAmount: bigint;\n\tquoteAmount: bigint;\n\tfee: bigint;\n}\n\nfunction ammBuyExactOut(\n\tparams: { reserveQuote: bigint; reserveBase: bigint; feeBps: number },\n\tbaseAmountOut: bigint,\n): AmmLegs {\n\tconst quoteBeforeFee = calculateInputForOutput(\n\t\tparams.reserveQuote,\n\t\tparams.reserveBase,\n\t\tbaseAmountOut,\n\t);\n\n\tconst divisor = BPS_DIVISOR - BigInt(params.feeBps);\n\tif (divisor <= 0n) {\n\t\tthrow new RangeError('buyExactOut: invalid feeBps');\n\t}\n\n\t// A `feeBps` near 10_000 amplifies the leg up to 10_000x, so this can overflow u64.\n\tconst totalQuote = assertU64(\n\t\t'buyExactOut',\n\t\tceilDiv(quoteBeforeFee * BPS_DIVISOR, divisor),\n\t);\n\n\treturn {\n\t\tbaseAmount: baseAmountOut,\n\t\tquoteAmount: totalQuote,\n\t\tfee: totalQuote - quoteBeforeFee,\n\t};\n}\n\nfunction ammBuyExactIn(\n\tparams: { reserveQuote: bigint; reserveBase: bigint; feeBps: number },\n\tquoteAmountIn: bigint,\n): AmmLegs {\n\t// Fee comes off before the swap; the net rounds down, so the fee keeps the remainder.\n\tconst netFactor = BPS_DIVISOR - BigInt(params.feeBps);\n\tif (netFactor <= 0n) {\n\t\tthrow new RangeError('buyExactIn: invalid feeBps');\n\t}\n\n\tconst netQuote = floorDiv(quoteAmountIn * netFactor, BPS_DIVISOR);\n\tif (netQuote === 0n) {\n\t\tthrow new RangeError('buyExactIn: invalid amount');\n\t}\n\n\treturn {\n\t\tbaseAmount: calculateOutput(\n\t\t\tparams.reserveQuote,\n\t\t\tparams.reserveBase,\n\t\t\tnetQuote,\n\t\t),\n\t\tquoteAmount: quoteAmountIn,\n\t\tfee: quoteAmountIn - netQuote,\n\t};\n}\n\nfunction ammSellExactIn(\n\tparams: { reserveQuote: bigint; reserveBase: bigint; feeBps: number },\n\tbaseAmountIn: bigint,\n): AmmLegs {\n\tconst quoteBeforeFee = calculateOutput(\n\t\tparams.reserveBase,\n\t\tparams.reserveQuote,\n\t\tbaseAmountIn,\n\t);\n\n\tconst feeAmount = ceilDiv(\n\t\tquoteBeforeFee * BigInt(params.feeBps),\n\t\tBPS_DIVISOR,\n\t);\n\n\treturn {\n\t\tbaseAmount: baseAmountIn,\n\t\tquoteAmount: quoteBeforeFee - feeAmount,\n\t\tfee: feeAmount,\n\t};\n}\n\nfunction ammSellExactOut(\n\tparams: { reserveQuote: bigint; reserveBase: bigint; feeBps: number },\n\tquoteAmountOut: bigint,\n): AmmLegs {\n\tconst divisor = BPS_DIVISOR - BigInt(params.feeBps);\n\tif (divisor <= 0n) {\n\t\tthrow new RangeError('sellExactOut: invalid feeBps');\n\t}\n\n\tconst quoteBeforeFee = assertU64(\n\t\t'sellExactOut',\n\t\tceilDiv(quoteAmountOut * BPS_DIVISOR, divisor),\n\t);\n\n\treturn {\n\t\tbaseAmount: calculateInputForOutput(\n\t\t\tparams.reserveBase,\n\t\t\tparams.reserveQuote,\n\t\t\tquoteBeforeFee,\n\t\t),\n\t\tquoteAmount: quoteAmountOut,\n\t\tfee: quoteBeforeFee - quoteAmountOut,\n\t};\n}\n\nfunction buyQuote(\n\tlegs: AmmLegs,\n\tquoteTransferFee: bigint,\n\tbaseFee?: MintFee,\n): BuyQuote {\n\tconst baseTransferFee = feeOn(legs.baseAmount, baseFee);\n\treturn {\n\t\tbaseAmount: legs.baseAmount,\n\t\tquoteAmount: legs.quoteAmount,\n\t\tfee: legs.fee,\n\t\tbaseTransferFee,\n\t\tquoteTransferFee,\n\t\tbaseToUser: legs.baseAmount - baseTransferFee,\n\t\tquoteFromUser: legs.quoteAmount,\n\t};\n}\n\n/** Guard with `calculateSlippageUp(quoteAmount, bps)`; it already carries the quote mint's cut. */\nexport function buyExactOut(\n\tparams: BaseQuoteParams & BaseReserveCap & { baseAmountOut: bigint },\n): BuyQuote {\n\tassertBps('buyExactOut', 'feeBps', params.feeBps);\n\tif (params.baseAmountOut === 0n) {\n\t\tthrow new RangeError('buyExactOut: invalid amount');\n\t}\n\n\tconst baseOutOfVault = grossUp(params.baseAmountOut, params.baseFee);\n\tconst cap = params.baseReserveCap;\n\tconst baseAmount =\n\t\tcap !== undefined && baseOutOfVault > cap ? cap : baseOutOfVault;\n\n\tconst legs = ammBuyExactOut(params, baseAmount);\n\t// The priced total must land, so the user is debited more than it.\n\tconst quoteFromUser = grossUp(legs.quoteAmount, params.quoteFee);\n\n\treturn buyQuote(\n\t\t{ ...legs, quoteAmount: quoteFromUser },\n\t\tquoteFromUser - legs.quoteAmount,\n\t\tparams.baseFee,\n\t);\n}\n\n/** Guard with `calculateSlippageDown(baseToUser, bps)`, not `baseAmount`: the program bounds what the buyer nets. */\nexport function buyExactIn(\n\tparams: BaseQuoteParams & BaseReserveCap & { quoteAmountIn: bigint },\n): BuyQuote {\n\tassertBps('buyExactIn', 'feeBps', params.feeBps);\n\tif (params.quoteAmountIn === 0n) {\n\t\tthrow new RangeError('buyExactIn: invalid amount');\n\t}\n\n\t// The AMM only ever prices what reaches the vault.\n\tconst quoteIntoVault = amountAfterFee(\n\t\tparams.quoteAmountIn,\n\t\tparams.quoteFee,\n\t);\n\tif (quoteIntoVault === 0n) {\n\t\tthrow new RangeError('buyExactIn: invalid amount');\n\t}\n\n\tconst uncapped = ammBuyExactIn(params, quoteIntoVault);\n\n\t// Capped: re-price exact-out at the cap and gross up; clamping the base output overstates the quote leg.\n\tconst cap = params.baseReserveCap;\n\tif (cap === undefined || uncapped.baseAmount <= cap) {\n\t\treturn buyQuote(\n\t\t\t{ ...uncapped, quoteAmount: params.quoteAmountIn },\n\t\t\tparams.quoteAmountIn - quoteIntoVault,\n\t\t\tparams.baseFee,\n\t\t);\n\t}\n\n\tconst capped = ammBuyExactOut(params, cap);\n\tconst quoteFromUser = grossUp(capped.quoteAmount, params.quoteFee);\n\n\treturn buyQuote(\n\t\t{ ...capped, quoteAmount: quoteFromUser },\n\t\tquoteFromUser - capped.quoteAmount,\n\t\tparams.baseFee,\n\t);\n}\n\n/** Guard with `calculateSlippageDown(quoteToUser, bps)`, not `quoteAmount`. */\nexport function sellExactIn(\n\tparams: BaseQuoteParams & { baseAmountIn: bigint },\n): SellQuote {\n\tassertBps('sellExactIn', 'feeBps', params.feeBps);\n\tif (params.baseAmountIn === 0n) {\n\t\tthrow new RangeError('sellExactIn: invalid amount');\n\t}\n\n\tconst baseIntoVault = amountAfterFee(params.baseAmountIn, params.baseFee);\n\tif (baseIntoVault === 0n) {\n\t\tthrow new RangeError('sellExactIn: invalid amount');\n\t}\n\n\tconst legs = ammSellExactIn(params, baseIntoVault);\n\t// `feeOn`, never `grossUp`: the AMM's output leaves the vault as priced.\n\tconst quoteTransferFee = feeOn(legs.quoteAmount, params.quoteFee);\n\n\treturn {\n\t\tbaseAmount: params.baseAmountIn,\n\t\tquoteAmount: legs.quoteAmount,\n\t\tfee: legs.fee,\n\t\tbaseTransferFee: params.baseAmountIn - baseIntoVault,\n\t\tquoteTransferFee,\n\t\tbaseFromUser: params.baseAmountIn,\n\t\tquoteToUser: legs.quoteAmount - quoteTransferFee,\n\t};\n}\n\n/** Guard with `calculateSlippageUp(baseFromUser, bps)`, which already carries the base mint's cut. */\nexport function sellExactOut(\n\tparams: BaseQuoteParams & { quoteAmountOut: bigint },\n): SellQuote {\n\tassertBps('sellExactOut', 'feeBps', params.feeBps);\n\tif (params.quoteAmountOut === 0n) {\n\t\tthrow new RangeError('sellExactOut: invalid amount');\n\t}\n\n\tconst quoteOutOfVault = grossUp(params.quoteAmountOut, params.quoteFee);\n\tconst legs = ammSellExactOut(params, quoteOutOfVault);\n\tconst baseFromUser = grossUp(legs.baseAmount, params.baseFee);\n\n\treturn {\n\t\tbaseAmount: baseFromUser,\n\t\tquoteAmount: quoteOutOfVault,\n\t\tfee: legs.fee,\n\t\tbaseTransferFee: baseFromUser - legs.baseAmount,\n\t\tquoteTransferFee: quoteOutOfVault - params.quoteAmountOut,\n\t\tbaseFromUser,\n\t\tquoteToUser: params.quoteAmountOut,\n\t};\n}\n\nexport function calculateSlippageUp(\n\tamount: bigint,\n\tslippageBps: number,\n): bigint {\n\tassertBps('calculateSlippageUp', 'slippageBps', slippageBps);\n\treturn assertU64(\n\t\t'calculateSlippageUp',\n\t\tceilDiv(amount * (BPS_DIVISOR + BigInt(slippageBps)), BPS_DIVISOR),\n\t);\n}\n\nexport function calculateSlippageDown(\n\tamount: bigint,\n\tslippageBps: number,\n): bigint {\n\tassertBps('calculateSlippageDown', 'slippageBps', slippageBps);\n\tconst factor = BPS_DIVISOR - BigInt(slippageBps);\n\treturn assertU64(\n\t\t'calculateSlippageDown',\n\t\tfloorDiv(amount * factor, BPS_DIVISOR),\n\t);\n}\n\n/** Floors, as the program's `isqrt` does. */\nexport function calculateInitialLp(\n\tquoteAmount: bigint,\n\tbaseAmount: bigint,\n): bigint {\n\treturn sqrtBigInt(quoteAmount * baseAmount);\n}\n\n/** Floating-point quote per base, for display only. */\nexport function calculatePrice(params: {\n\tquoteReserves: bigint;\n\tbaseReserves: bigint;\n\tquoteDecimals: number;\n\tbaseDecimals: number;\n}): number {\n\tconst { quoteReserves, baseReserves, quoteDecimals, baseDecimals } = params;\n\tif (baseReserves === 0n) return 0;\n\tconst rawRatio = Number(quoteReserves) / Number(baseReserves);\n\treturn rawRatio * 10 ** (baseDecimals - quoteDecimals);\n}\n\n/** Market cap in raw quote-token units. */\nexport function calculateMarketCap(params: {\n\tquoteReserves: bigint;\n\tbaseReserves: bigint;\n\tbaseSupply: bigint;\n}): bigint {\n\tconst { quoteReserves, baseReserves, baseSupply } = params;\n\tif (baseReserves === 0n) return 0n;\n\treturn floorDiv(quoteReserves * baseSupply, baseReserves);\n}\n","import type { Address, Instruction, TransactionSigner } from '@solana/kit';\nimport type { BuyQuote, MintFee, SellQuote } from '../math/amm.js';\nimport * as amm from '../math/amm.js';\nimport type { PartnerInput } from '../utils/partner.js';\nimport { getBuyExactInInstructionAsync } from './generated/instructions/buyExactIn.js';\nimport { getBuyExactOutInstructionAsync } from './generated/instructions/buyExactOut.js';\nimport { getSellExactInInstructionAsync } from './generated/instructions/sellExactIn.js';\nimport { getSellExactOutInstructionAsync } from './generated/instructions/sellExactOut.js';\n\nexport interface DexTradeParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tbaseReserves: bigint;\n\tquoteReserves: bigint;\n\tfeeBps: number;\n\tslippageBps: number;\n\tpartner: PartnerInput;\n\tplatformConfig: Address;\n\tquoteTokenProgram: Address;\n\t/** Token-2022 schedule for the epoch the trade lands in; stale or missing skews the slippage bounds. */\n\tquoteFee?: MintFee;\n\tbaseFee?: MintFee;\n\t/** {@inheritDoc DexInstructionParams.userQuoteAccount} */\n\tuserQuoteAccount?: Address;\n\t/** {@inheritDoc DexInstructionParams.userBaseAccount} */\n\tuserBaseAccount?: Address;\n}\n\nexport interface DexInstructionParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tpartner: PartnerInput;\n\tplatformConfig: Address;\n\tquoteTokenProgram: Address;\n\t/** Any user-owned quote-mint account. Defaults to the ATA, created mid-trade\n\t * if missing (payer funds rent), which only rescues a sell. For WSOL,\n\t * a throwaway `createAccountWithSeed` account is cheaper. */\n\tuserQuoteAccount?: Address;\n\t/** Any user-owned base-mint account. Defaults to the ATA, created mid-trade\n\t * if missing (payer funds rent), which only rescues a buy. */\n\tuserBaseAccount?: Address;\n}\n\n/** `baseAmountOut` is net to the buyer: the program reads `amount` as `base_to_user`. */\nexport async function buyExactOut(\n\tparams: DexTradeParams & { baseAmountOut: bigint },\n): Promise<{ instruction: Instruction; quote: BuyQuote }> {\n\tconst quote = amm.buyExactOut({\n\t\treserveQuote: params.quoteReserves,\n\t\treserveBase: params.baseReserves,\n\t\tbaseAmountOut: params.baseAmountOut,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The cap is measured on the gross the buyer sends, quote transfer fee included.\n\tconst maxQuoteIn = amm.calculateSlippageUp(\n\t\tquote.quoteFromUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildBuyExactOutInstruction({\n\t\t\t...params,\n\t\t\tamountOut: params.baseAmountOut,\n\t\t\tmaxAmountIn: maxQuoteIn,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function buyExactIn(\n\tparams: DexTradeParams & { quoteAmountIn: bigint },\n): Promise<{ instruction: Instruction; quote: BuyQuote }> {\n\tconst quote = amm.buyExactIn({\n\t\treserveQuote: params.quoteReserves,\n\t\treserveBase: params.baseReserves,\n\t\tquoteAmountIn: params.quoteAmountIn,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The floor is measured on the buyer's credit, not the vault's debit.\n\tconst minBaseOut = amm.calculateSlippageDown(\n\t\tquote.baseToUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildBuyExactInInstruction({\n\t\t\t...params,\n\t\t\tamountIn: params.quoteAmountIn,\n\t\t\tminAmountOut: minBaseOut,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function sellExactIn(\n\tparams: DexTradeParams & { baseAmountIn: bigint },\n): Promise<{ instruction: Instruction; quote: SellQuote }> {\n\tconst quote = amm.sellExactIn({\n\t\treserveQuote: params.quoteReserves,\n\t\treserveBase: params.baseReserves,\n\t\tbaseAmountIn: params.baseAmountIn,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The floor is measured on the seller's credit, not what leaves the vault.\n\tconst minQuoteOut = amm.calculateSlippageDown(\n\t\tquote.quoteToUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildSellExactInInstruction({\n\t\t\t...params,\n\t\t\tamountIn: params.baseAmountIn,\n\t\t\tminAmountOut: minQuoteOut,\n\t\t}),\n\t\tquote,\n\t};\n}\n\n/** `quoteAmountOut` is net to the seller: the program reads `amount` as `quote_to_user`. */\nexport async function sellExactOut(\n\tparams: DexTradeParams & { quoteAmountOut: bigint },\n): Promise<{ instruction: Instruction; quote: SellQuote }> {\n\tconst quote = amm.sellExactOut({\n\t\treserveQuote: params.quoteReserves,\n\t\treserveBase: params.baseReserves,\n\t\tquoteAmountOut: params.quoteAmountOut,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The cap is measured on the gross the seller sends, base transfer fee included.\n\tconst maxBaseIn = amm.calculateSlippageUp(\n\t\tquote.baseFromUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildSellExactOutInstruction({\n\t\t\t...params,\n\t\t\tamountOut: params.quoteAmountOut,\n\t\t\tmaxAmountIn: maxBaseIn,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function buildBuyExactInInstruction(\n\tparams: DexInstructionParams & { amountIn: bigint; minAmountOut: bigint },\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getBuyExactInInstructionAsync({\n\t\t...shared,\n\t\tamountIn: params.amountIn,\n\t\tminAmountOut: params.minAmountOut,\n\t});\n}\n\nexport async function buildBuyExactOutInstruction(\n\tparams: DexInstructionParams & { amountOut: bigint; maxAmountIn: bigint },\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getBuyExactOutInstructionAsync({\n\t\t...shared,\n\t\tamountOut: params.amountOut,\n\t\tmaxAmountIn: params.maxAmountIn,\n\t});\n}\n\nexport async function buildSellExactInInstruction(\n\tparams: DexInstructionParams & { amountIn: bigint; minAmountOut: bigint },\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getSellExactInInstructionAsync({\n\t\t...shared,\n\t\tamountIn: params.amountIn,\n\t\tminAmountOut: params.minAmountOut,\n\t});\n}\n\nexport async function buildSellExactOutInstruction(\n\tparams: DexInstructionParams & { amountOut: bigint; maxAmountIn: bigint },\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getSellExactOutInstructionAsync({\n\t\t...shared,\n\t\tamountOut: params.amountOut,\n\t\tmaxAmountIn: params.maxAmountIn,\n\t});\n}\n\nfunction resolveSharedAccounts(params: DexInstructionParams) {\n\treturn {\n\t\tuser: params.user,\n\t\tpayer: params.payer ?? params.user,\n\t\tbaseMint: params.baseMint,\n\t\tquoteMint: params.quoteMint,\n\t\tpartner: params.partner,\n\t\tplatformConfig: params.platformConfig,\n\t\tquoteTokenProgram: params.quoteTokenProgram,\n\t\t// Left undefined so the generated client derives the ATA itself.\n\t\t...(params.userQuoteAccount !== undefined && {\n\t\t\tuserQuoteAccount: params.userQuoteAccount,\n\t\t}),\n\t\t...(params.userBaseAccount !== undefined && {\n\t\t\tuserBaseAccount: params.userBaseAccount,\n\t\t}),\n\t};\n}\n","export * as accounts from './generated/accounts/index.js';\nexport * as types from './generated/types/index.js';\nexport * as errors from './generated/errors/index.js';\nexport * as pda from './generated/pdas/index.js';\nexport * as events from './generated/events/index.js';\nexport * as instructions from './generated/instructions/index.js';\nexport * as plugins from './generated/plugins/index.js';\nexport * as trade from './trade.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcombineCodec,\n\tgetEnumDecoder,\n\tgetEnumEncoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum BondingCurveStatus {\n\tFunding,\n\tCompleted,\n\tMigrated,\n\tPaused,\n}\n\nexport type BondingCurveStatusArgs = BondingCurveStatus;\n\nexport function getBondingCurveStatusEncoder(): FixedSizeEncoder<BondingCurveStatusArgs> {\n\treturn getEnumEncoder(BondingCurveStatus);\n}\n\nexport function getBondingCurveStatusDecoder(): FixedSizeDecoder<BondingCurveStatus> {\n\treturn getEnumDecoder(BondingCurveStatus);\n}\n\nexport function getBondingCurveStatusCodec(): FixedSizeCodec<\n\tBondingCurveStatusArgs,\n\tBondingCurveStatus\n> {\n\treturn combineCodec(\n\t\tgetBondingCurveStatusEncoder(),\n\t\tgetBondingCurveStatusDecoder(),\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 {\n\tcombineCodec,\n\tgetEnumDecoder,\n\tgetEnumEncoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum TradeDirection {\n\tBuy,\n\tSell,\n}\n\nexport type TradeDirectionArgs = TradeDirection;\n\nexport function getTradeDirectionEncoder(): FixedSizeEncoder<TradeDirectionArgs> {\n\treturn getEnumEncoder(TradeDirection);\n}\n\nexport function getTradeDirectionDecoder(): FixedSizeDecoder<TradeDirection> {\n\treturn getEnumDecoder(TradeDirection);\n}\n\nexport function getTradeDirectionCodec(): FixedSizeCodec<\n\tTradeDirectionArgs,\n\tTradeDirection\n> {\n\treturn combineCodec(getTradeDirectionEncoder(), getTradeDirectionDecoder());\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\nexport * from './bondingCurveStatus.js';\nexport * from './tradeDirection.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetI64Encoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetBondingCurveStatusDecoder,\n\tgetBondingCurveStatusEncoder,\n\ttype BondingCurveStatus,\n\ttype BondingCurveStatusArgs,\n} from '../types/index.js';\n\nexport const BONDING_CURVE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t23, 183, 248, 55, 96, 216, 172, 96,\n]);\n\nexport function getBondingCurveDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tBONDING_CURVE_DISCRIMINATOR,\n\t);\n}\n\nexport type BondingCurve = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tstatus: BondingCurveStatus;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tbaseSupply: bigint;\n\tinitialVirtualBase: bigint;\n\tinitialVirtualQuote: bigint;\n\tinitialRealBase: bigint;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tpartner: Address;\n\tbaseVault: Address;\n\tquoteVault: Address;\n\tvirtualBaseReserves: bigint;\n\tvirtualQuoteReserves: bigint;\n\trealBaseReserves: bigint;\n\trealQuoteReserves: bigint;\n\tcreatedAt: bigint;\n\tprotocolOwed: bigint;\n\tcreatorOwed: bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type BondingCurveArgs = {\n\tversion: number;\n\tbump: number;\n\tstatus: BondingCurveStatusArgs;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tbaseSupply: number | bigint;\n\tinitialVirtualBase: number | bigint;\n\tinitialVirtualQuote: number | bigint;\n\tinitialRealBase: number | bigint;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tpartner: Address;\n\tbaseVault: Address;\n\tquoteVault: Address;\n\tvirtualBaseReserves: number | bigint;\n\tvirtualQuoteReserves: number | bigint;\n\trealBaseReserves: number | bigint;\n\trealQuoteReserves: number | bigint;\n\tcreatedAt: number | bigint;\n\tprotocolOwed: number | bigint;\n\tcreatorOwed: number | bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link BondingCurveArgs} account data. */\nexport function getBondingCurveEncoder(): FixedSizeEncoder<BondingCurveArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['status', getBondingCurveStatusEncoder()],\n\t\t\t['baseMint', getAddressEncoder()],\n\t\t\t['baseDecimals', getU8Encoder()],\n\t\t\t['baseSupply', getU64Encoder()],\n\t\t\t['initialVirtualBase', getU64Encoder()],\n\t\t\t['initialVirtualQuote', getU64Encoder()],\n\t\t\t['initialRealBase', getU64Encoder()],\n\t\t\t['quoteMint', getAddressEncoder()],\n\t\t\t['quoteDecimals', getU8Encoder()],\n\t\t\t['coinCreator', getAddressEncoder()],\n\t\t\t['creatorFeeConfig', getAddressEncoder()],\n\t\t\t['partner', getAddressEncoder()],\n\t\t\t['baseVault', getAddressEncoder()],\n\t\t\t['quoteVault', getAddressEncoder()],\n\t\t\t['virtualBaseReserves', getU64Encoder()],\n\t\t\t['virtualQuoteReserves', getU64Encoder()],\n\t\t\t['realBaseReserves', getU64Encoder()],\n\t\t\t['realQuoteReserves', getU64Encoder()],\n\t\t\t['createdAt', getI64Encoder()],\n\t\t\t['protocolOwed', getU64Encoder()],\n\t\t\t['creatorOwed', getU64Encoder()],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: BONDING_CURVE_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link BondingCurve} account data. */\nexport function getBondingCurveDecoder(): FixedSizeDecoder<BondingCurve> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['status', getBondingCurveStatusDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['baseDecimals', getU8Decoder()],\n\t\t['baseSupply', getU64Decoder()],\n\t\t['initialVirtualBase', getU64Decoder()],\n\t\t['initialVirtualQuote', getU64Decoder()],\n\t\t['initialRealBase', getU64Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['quoteDecimals', getU8Decoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['partner', getAddressDecoder()],\n\t\t['baseVault', getAddressDecoder()],\n\t\t['quoteVault', getAddressDecoder()],\n\t\t['virtualBaseReserves', getU64Decoder()],\n\t\t['virtualQuoteReserves', getU64Decoder()],\n\t\t['realBaseReserves', getU64Decoder()],\n\t\t['realQuoteReserves', getU64Decoder()],\n\t\t['createdAt', getI64Decoder()],\n\t\t['protocolOwed', getU64Decoder()],\n\t\t['creatorOwed', getU64Decoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link BondingCurve} account data. */\nexport function getBondingCurveCodec(): FixedSizeCodec<\n\tBondingCurveArgs,\n\tBondingCurve\n> {\n\treturn combineCodec(getBondingCurveEncoder(), getBondingCurveDecoder());\n}\n\nexport function decodeBondingCurve<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<BondingCurve, TAddress>;\nexport function decodeBondingCurve<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<BondingCurve, TAddress>;\nexport function decodeBondingCurve<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<BondingCurve, TAddress> | MaybeAccount<BondingCurve, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeBondingCurve: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_LAUNCHPAD_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, BONDING_CURVE_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeBondingCurve: account ${encodedAccount.address} does not match the BondingCurve discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetBondingCurveDecoder(),\n\t);\n}\n\nexport async function fetchBondingCurve<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<BondingCurve, TAddress>> {\n\tconst maybeAccount = await fetchMaybeBondingCurve(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeBondingCurve<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<BondingCurve, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeBondingCurve(maybeAccount);\n}\n\nexport async function fetchAllBondingCurve(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<BondingCurve>[]> {\n\tconst maybeAccounts = await fetchAllMaybeBondingCurve(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeBondingCurve(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<BondingCurve>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeBondingCurve(maybeAccount),\n\t);\n}\n\nexport function getBondingCurveSize(): number {\n\treturn 421;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBooleanDecoder,\n\tgetBooleanEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const GLOBAL_CONFIG_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t149, 8, 156, 202, 160, 252, 176, 217,\n]);\n\nexport function getGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tGLOBAL_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type GlobalConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tcreateTokenDisabled: boolean;\n\tnormalizedSolPriceCents: bigint;\n\tinitialBaseSupply: bigint;\n\tinitialVirtualBaseReserves: bigint;\n\tinitialRealBaseReserves: bigint;\n\tinitialVirtualQuoteReserves: bigint;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type GlobalConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tcreateTokenDisabled: boolean;\n\tnormalizedSolPriceCents: number | bigint;\n\tinitialBaseSupply: number | bigint;\n\tinitialVirtualBaseReserves: number | bigint;\n\tinitialRealBaseReserves: number | bigint;\n\tinitialVirtualQuoteReserves: number | bigint;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link GlobalConfigArgs} account data. */\nexport function getGlobalConfigEncoder(): FixedSizeEncoder<GlobalConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['authority', getAddressEncoder()],\n\t\t\t['operator', getAddressEncoder()],\n\t\t\t['createTokenDisabled', getBooleanEncoder()],\n\t\t\t['normalizedSolPriceCents', getU64Encoder()],\n\t\t\t['initialBaseSupply', getU64Encoder()],\n\t\t\t['initialVirtualBaseReserves', getU64Encoder()],\n\t\t\t['initialRealBaseReserves', getU64Encoder()],\n\t\t\t['initialVirtualQuoteReserves', getU64Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: GLOBAL_CONFIG_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link GlobalConfig} account data. */\nexport function getGlobalConfigDecoder(): FixedSizeDecoder<GlobalConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['authority', getAddressDecoder()],\n\t\t['operator', getAddressDecoder()],\n\t\t['createTokenDisabled', getBooleanDecoder()],\n\t\t['normalizedSolPriceCents', getU64Decoder()],\n\t\t['initialBaseSupply', getU64Decoder()],\n\t\t['initialVirtualBaseReserves', getU64Decoder()],\n\t\t['initialRealBaseReserves', getU64Decoder()],\n\t\t['initialVirtualQuoteReserves', getU64Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link GlobalConfig} account data. */\nexport function getGlobalConfigCodec(): FixedSizeCodec<\n\tGlobalConfigArgs,\n\tGlobalConfig\n> {\n\treturn combineCodec(getGlobalConfigEncoder(), getGlobalConfigDecoder());\n}\n\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress> | MaybeAccount<GlobalConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_LAUNCHPAD_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, GLOBAL_CONFIG_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} does not match the GlobalConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetGlobalConfigDecoder(),\n\t);\n}\n\nexport async function fetchGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybeGlobalConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeGlobalConfig(maybeAccount);\n}\n\nexport async function fetchAllGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybeGlobalConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeGlobalConfig(maybeAccount),\n\t);\n}\n\nexport function getGlobalConfigSize(): number {\n\treturn 179;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU128Decoder,\n\tgetU128Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const REWARD_ACCRUAL_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t158, 244, 116, 30, 227, 132, 105, 182,\n]);\n\nexport function getRewardAccrualDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tREWARD_ACCRUAL_DISCRIMINATOR,\n\t);\n}\n\nexport type RewardAccrual = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tquoteMint: Address;\n\taccPerToken: bigint;\n\ttotalDeposited: bigint;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type RewardAccrualArgs = {\n\tversion: number;\n\tbump: number;\n\tquoteMint: Address;\n\taccPerToken: number | bigint;\n\ttotalDeposited: number | bigint;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link RewardAccrualArgs} account data. */\nexport function getRewardAccrualEncoder(): FixedSizeEncoder<RewardAccrualArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['quoteMint', getAddressEncoder()],\n\t\t\t['accPerToken', getU128Encoder()],\n\t\t\t['totalDeposited', getU64Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: REWARD_ACCRUAL_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link RewardAccrual} account data. */\nexport function getRewardAccrualDecoder(): FixedSizeDecoder<RewardAccrual> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['accPerToken', getU128Decoder()],\n\t\t['totalDeposited', getU64Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link RewardAccrual} account data. */\nexport function getRewardAccrualCodec(): FixedSizeCodec<\n\tRewardAccrualArgs,\n\tRewardAccrual\n> {\n\treturn combineCodec(getRewardAccrualEncoder(), getRewardAccrualDecoder());\n}\n\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<RewardAccrual, TAddress>;\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<RewardAccrual, TAddress>;\nexport function decodeRewardAccrual<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<RewardAccrual, TAddress> | MaybeAccount<RewardAccrual, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardAccrual: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_LAUNCHPAD_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, REWARD_ACCRUAL_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardAccrual: account ${encodedAccount.address} does not match the RewardAccrual discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetRewardAccrualDecoder(),\n\t);\n}\n\nexport async function fetchRewardAccrual<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<RewardAccrual, TAddress>> {\n\tconst maybeAccount = await fetchMaybeRewardAccrual(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeRewardAccrual<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<RewardAccrual, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeRewardAccrual(maybeAccount);\n}\n\nexport async function fetchAllRewardAccrual(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<RewardAccrual>[]> {\n\tconst maybeAccounts = await fetchAllMaybeRewardAccrual(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeRewardAccrual(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<RewardAccrual>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeRewardAccrual(maybeAccount),\n\t);\n}\n\nexport function getRewardAccrualSize(): number {\n\treturn 130;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { BONDING_CURVE_DISCRIMINATOR } from './bondingCurve.js';\nimport { GLOBAL_CONFIG_DISCRIMINATOR } from './globalConfig.js';\nimport { REWARD_ACCRUAL_DISCRIMINATOR } from './rewardAccrual.js';\n\n/** Account kinds of the sendLaunchpad program. */\nexport type SendLaunchpadAccountType =\n\t| 'bondingCurve'\n\t| 'globalConfig'\n\t| 'rewardAccrual';\n\n/**\n * Identifies sendLaunchpad account data by its discriminators.\n * Returns `null` when the account belongs to another program or the data matches no known account.\n */\nexport function identifySendLaunchpadAccount(\n\taccount:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendLaunchpadAccountType | null {\n\tif (\n\t\t'data' in account &&\n\t\taccount.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in account ? account.data : account;\n\tif (containsBytes(data, BONDING_CURVE_DISCRIMINATOR, 0)) {\n\t\treturn 'bondingCurve';\n\t}\n\tif (containsBytes(data, GLOBAL_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'globalConfig';\n\t}\n\tif (containsBytes(data, REWARD_ACCRUAL_DISCRIMINATOR, 0)) {\n\t\treturn 'rewardAccrual';\n\t}\n\treturn null;\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\nexport * from './bondingCurve.js';\nexport * from './globalConfig.js';\nexport * from './rewardAccrual.js';\nexport * from './sendLaunchpad.accounts.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tisProgramError,\n\ttype Address,\n\ttype SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n\ttype SolanaError,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\n/** TokenCreationDisabled: Token creation is disabled */\nexport const SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED = 0x1770; // 6000\n/** SlippageExceeded: Slippage tolerance exceeded */\nexport const SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED = 0x1771; // 6001\n/** AlreadyMigrated: Already migrated */\nexport const SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED = 0x1772; // 6002\n/** ThresholdNotReached: Migration threshold not reached */\nexport const SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED = 0x1773; // 6003\n/** ThresholdReached: Migration threshold reached - trading disabled until migration completes */\nexport const SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED = 0x1774; // 6004\n/** InvalidBaseMint: Invalid base mint */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT = 0x1775; // 6005\n/** InvalidQuoteMint: Invalid quote mint */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT = 0x1776; // 6006\n/** NotTradeable: Bonding curve is not tradeable */\nexport const SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE = 0x1777; // 6007\n/** InvalidStatusTransition: Invalid status transition */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION = 0x1778; // 6008\n/** CurveIsLive: Curve is live */\nexport const SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE = 0x1779; // 6009\n/** BaseMintNotFound: Base mint not found */\nexport const SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND = 0x177a; // 6010\n/** BlockedByHeldSupply: Blocked by held supply */\nexport const SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY = 0x177b; // 6011\n/** InvalidCoinCreator: Invalid coin creator */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR = 0x177c; // 6012\n/** InvalidAuthority: Invalid authority */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY = 0x177d; // 6013\n/** InsufficientBalance: Insufficient balance in source account */\nexport const SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE = 0x177e; // 6014\n/** PoolFeesOutstanding: Pool has unclaimed protocol or creator fees */\nexport const SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING = 0x177f; // 6015\n/** ProgramPaused: Program is paused */\nexport const SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED = 0x1b58; // 7000\n/** Unauthorized: Unauthorized */\nexport const SEND_LAUNCHPAD_ERROR__UNAUTHORIZED = 0x1b59; // 7001\n/** ArithmeticOverflow: Arithmetic overflow */\nexport const SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW = 0x1b5a; // 7002\n/** InvalidPythAccount: Invalid Pyth price account */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT = 0x1b5b; // 7003\n/** InvalidPythFeed: Invalid Pyth feed ID */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED = 0x1b5c; // 7004\n/** InvalidSlug: Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_SLUG = 0x1b5d; // 7005\n/** TextTooLong: Text too long */\nexport const SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG = 0x1b5e; // 7006\n/** UserTokenAccountWrongProgram: User token account owned by the wrong token program */\nexport const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM = 0x1b5f; // 7007\n/** UserTokenAccountInvalid: User token account is not an initialized token account */\nexport const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID = 0x1b60; // 7008\n/** UserTokenAccountWrongMint: User token account mint does not match the trade */\nexport const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 0x1b61; // 7009\n/** UserTokenAccountWrongAuthority: User token account is not owned by the trading user */\nexport const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 0x1b62; // 7010\n/** NothingToClaim: Nothing to claim */\nexport const SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM = 0x1b63; // 7011\n/** InvalidCreatorId: Creator identity is not a decodable wallet address */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID = 0x1b64; // 7012\n/** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */\nexport const SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET = 0x1b65; // 7013\n/** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */\nexport const SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 0x1b66; // 7014\n/** InsufficientLiquidity: Insufficient liquidity */\nexport const SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY = 0x1bbc; // 7100\n/** InvalidAmount: Invalid amount */\nexport const SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT = 0x1bbd; // 7101\n\nexport type SendLaunchpadError =\n\t| typeof SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED\n\t| typeof SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW\n\t| typeof SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND\n\t| typeof SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY\n\t| typeof SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE\n\t| typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE\n\t| typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_SLUG\n\t| typeof SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION\n\t| typeof SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM\n\t| typeof SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE\n\t| typeof SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING\n\t| typeof SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED\n\t| typeof SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET\n\t| typeof SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED\n\t| typeof SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG\n\t| typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED\n\t| typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED\n\t| typeof SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED\n\t| typeof SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE\n\t| typeof SEND_LAUNCHPAD_ERROR__UNAUTHORIZED\n\t| typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID\n\t| typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY\n\t| typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT\n\t| typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;\n\nexport const sendLaunchpadErrorMessages: Record<SendLaunchpadError, string> = {\n\t[SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED]: `Already migrated`,\n\t[SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW]: `Arithmetic overflow`,\n\t[SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND]: `Base mint not found`,\n\t[SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY]: `Blocked by held supply`,\n\t[SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE]: `Curve is live`,\n\t[SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE]: `Insufficient balance in source account`,\n\t[SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY]: `Insufficient liquidity`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT]: `Invalid amount`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY]: `Invalid authority`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT]: `Invalid base mint`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR]: `Invalid coin creator`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID]: `Creator identity is not a decodable wallet address`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT]: `Invalid Pyth price account`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED]: `Invalid Pyth feed ID`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT]: `Invalid quote mint`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_SLUG]: `Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore`,\n\t[SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION]: `Invalid status transition`,\n\t[SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM]: `Nothing to claim`,\n\t[SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE]: `Bonding curve is not tradeable`,\n\t[SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING]: `Pool has unclaimed protocol or creator fees`,\n\t[SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED]: `Program is paused`,\n\t[SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET]: `Quote mint has no USDC price on its nexus reward state`,\n\t[SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED]: `Slippage tolerance exceeded`,\n\t[SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG]: `Text too long`,\n\t[SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED]: `Migration threshold not reached`,\n\t[SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED]: `Migration threshold reached - trading disabled until migration completes`,\n\t[SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED]: `Token creation is disabled`,\n\t[SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE]: `Token-2022 transfer fee schedule cannot settle the exact amount`,\n\t[SEND_LAUNCHPAD_ERROR__UNAUTHORIZED]: `Unauthorized`,\n\t[SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID]: `User token account is not an initialized token account`,\n\t[SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY]: `User token account is not owned by the trading user`,\n\t[SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT]: `User token account mint does not match the trade`,\n\t[SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM]: `User token account owned by the wrong token program`,\n} as const;\n\nexport function getSendLaunchpadErrorMessage(code: SendLaunchpadError): string {\n\treturn sendLaunchpadErrorMessages[code];\n}\n\nexport function isSendLaunchpadError<\n\tTProgramErrorCode extends SendLaunchpadError,\n>(\n\terror: unknown,\n\ttransactionMessage: {\n\t\tinstructions: Record<number, { programAddress: Address }>;\n\t},\n\tcode?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &\n\tReadonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n\treturn isProgramError<TProgramErrorCode>(\n\t\terror,\n\t\ttransactionMessage,\n\t\tSEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tcode,\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\nexport * from './sendLaunchpad.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type BondingCurveSeeds = {\n\tbaseMint: Address;\n\tquoteMint: Address;\n};\n\nexport async function findBondingCurvePda(\n\tseeds: BondingCurveSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118,\n\t\t\t\t\t101,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.baseMint),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const EVENT_AUTHORITY_PDA_ADDRESS =\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T' as Address<'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T'>;\n\nexport function findEventAuthorityPda(): ProgramDerivedAddress {\n\treturn [EVENT_AUTHORITY_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const GLOBAL_CONFIG_PDA_ADDRESS =\n\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq' as Address<'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq'>;\n\nexport function findGlobalConfigPda(): ProgramDerivedAddress {\n\treturn [GLOBAL_CONFIG_PDA_ADDRESS, 248 as ProgramDerivedAddressBump];\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const MIGRATION_AUTHORITY_PDA_ADDRESS =\n\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V' as Address<'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V'>;\n\nexport function findMigrationAuthorityPda(): ProgramDerivedAddress {\n\treturn [MIGRATION_AUTHORITY_PDA_ADDRESS, 251 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type RewardAccrualSeeds = {\n\tquoteMint: Address;\n};\n\nexport async function findRewardAccrualPda(\n\tseeds: RewardAccrualSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117, 97,\n\t\t\t\t\t108,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const WSOL_REWARD_ACCRUAL_PDA_ADDRESS =\n\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH' as Address<'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH'>;\n\nexport function findWsolRewardAccrualPda(): ProgramDerivedAddress {\n\treturn [WSOL_REWARD_ACCRUAL_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\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\nexport * from './bondingCurve.js';\nexport * from './eventAuthority.js';\nexport * from './globalConfig.js';\nexport * from './migrationAuthority.js';\nexport * from './rewardAccrual.js';\nexport * from './wsolRewardAccrual.js';\n","import { getAddressDecoder } from '@solana/kit';\nimport type { Address, ReadonlyUint8Array } from '@solana/kit';\n\nconst MAX_CREATOR_PLATFORM_LEN = 32;\n\n/** SHA-256 of the LE-u32-length-prefixed platform and id. Frozen: it seeds live PDAs. */\nexport async function creatorHashFromId(\n\tcreatorPlatform: string,\n\tcreatorId: string,\n): Promise<Address> {\n\tconst encoder = new TextEncoder();\n\tconst platformBuf = encoder.encode(creatorPlatform);\n\tconst idBuf = encoder.encode(creatorId);\n\n\tif (platformBuf.length > MAX_CREATOR_PLATFORM_LEN) {\n\t\tthrow new RangeError(\n\t\t\t`creatorPlatform exceeds ${MAX_CREATOR_PLATFORM_LEN} bytes (got ${platformBuf.length})`,\n\t\t);\n\t}\n\tconst platformLength = new Uint8Array(4);\n\tnew DataView(platformLength.buffer).setUint32(0, platformBuf.length, true);\n\tconst idLength = new Uint8Array(4);\n\tnew DataView(idLength.buffer).setUint32(0, idBuf.length, true);\n\n\tconst buf = new Uint8Array(4 + platformBuf.length + 4 + idBuf.length);\n\tbuf.set(platformLength, 0);\n\tbuf.set(platformBuf, 4);\n\tbuf.set(idLength, 4 + platformBuf.length);\n\tbuf.set(idBuf, 4 + platformBuf.length + 4);\n\n\tconst hash = new Uint8Array(await crypto.subtle.digest('SHA-256', buf));\n\n\tconst addressDecoder = getAddressDecoder();\n\treturn addressDecoder.decode(hash);\n}\n\n/** NUL-pads `text` to `length` bytes, the on-chain `CreatorFeeConfig.platformId` form; throws RangeError if longer. */\nexport function encodeCreatorId(text: string, length: number): Uint8Array {\n\tconst bytes = new TextEncoder().encode(text);\n\tif (bytes.length > length) {\n\t\tthrow new RangeError(\n\t\t\t`text exceeds ${length} bytes (got ${bytes.length})`,\n\t\t);\n\t}\n\tconst out = new Uint8Array(length);\n\tout.set(bytes, 0);\n\treturn out;\n}\n\n/** Strips NUL padding. Pass this, never the padded array, to {@link creatorHashFromId}: the hash is length-prefixed. */\nexport function decodeCreatorId(bytes: ReadonlyUint8Array): string {\n\tlet end = bytes.length;\n\twhile (end > 0 && bytes[end - 1] === 0) {\n\t\tend -= 1;\n\t}\n\treturn new TextDecoder().decode(bytes.slice(0, end));\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type CreatorFeeConfigSeeds = {\n\tcreatorHash: Address;\n\tquoteMint: Address;\n};\n\nexport async function findCreatorFeeConfigPda(\n\tseeds: CreatorFeeConfigSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t99, 114, 101, 97, 116, 111, 114, 95, 102, 101, 101, 95, 98,\n\t\t\t\t\t97, 108, 97, 110, 99, 101,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.creatorHash),\n\t\t\tgetAddressEncoder().encode(seeds.quoteMint),\n\t\t],\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 {\n\taddDecoderSizePrefix,\n\taddEncoderSizePrefix,\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetUtf8Decoder,\n\tgetUtf8Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype Codec,\n\ttype Decoder,\n\ttype Encoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n\tfindRewardAccrualPda,\n\tGLOBAL_CONFIG_PDA_ADDRESS,\n\tWSOL_REWARD_ACCRUAL_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CREATE_TOKEN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t84, 52, 204, 228, 24, 140, 234, 75,\n]);\n\nexport function getCreateTokenDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCREATE_TOKEN_DISCRIMINATOR,\n\t);\n}\n\nexport type CreateTokenInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountCoinCreator extends string | AccountMeta<string> = string,\n\tTAccountGlobalConfig extends string | AccountMeta<string> =\n\t\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq',\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountCreatorFeeConfig extends string | AccountMeta<string> = string,\n\tTAccountNexusProgram extends string | AccountMeta<string> =\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTAccountNexusGlobalConfig extends string | AccountMeta<string> =\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountNexusStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountStakingRewardState extends string | AccountMeta<string> = string,\n\tTAccountRewardAccrual extends string | AccountMeta<string> = string,\n\tTAccountStakingVault extends string | AccountMeta<string> = string,\n\tTAccountStakingWsolVault extends string | AccountMeta<string> =\n\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz',\n\tTAccountWsolRewardAccrual extends string | AccountMeta<string> =\n\t\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH',\n\tTAccountPythPriceFeed extends string | AccountMeta<string> =\n\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountWsolTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? WritableSignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountCoinCreator extends string\n\t\t\t\t? ReadonlyAccount<TAccountCoinCreator>\n\t\t\t\t: TAccountCoinCreator,\n\t\t\tTAccountGlobalConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountGlobalConfig>\n\t\t\t\t: TAccountGlobalConfig,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? WritableSignerAccount<TAccountBaseMint> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountCreatorFeeConfig extends string\n\t\t\t\t? WritableAccount<TAccountCreatorFeeConfig>\n\t\t\t\t: TAccountCreatorFeeConfig,\n\t\t\tTAccountNexusProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusProgram>\n\t\t\t\t: TAccountNexusProgram,\n\t\t\tTAccountNexusGlobalConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusGlobalConfig>\n\t\t\t\t: TAccountNexusGlobalConfig,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountNexusStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusStakingConfig>\n\t\t\t\t: TAccountNexusStakingConfig,\n\t\t\tTAccountStakingRewardState extends string\n\t\t\t\t? WritableAccount<TAccountStakingRewardState>\n\t\t\t\t: TAccountStakingRewardState,\n\t\t\tTAccountRewardAccrual extends string\n\t\t\t\t? WritableAccount<TAccountRewardAccrual>\n\t\t\t\t: TAccountRewardAccrual,\n\t\t\tTAccountStakingVault extends string\n\t\t\t\t? WritableAccount<TAccountStakingVault>\n\t\t\t\t: TAccountStakingVault,\n\t\t\tTAccountStakingWsolVault extends string\n\t\t\t\t? WritableAccount<TAccountStakingWsolVault>\n\t\t\t\t: TAccountStakingWsolVault,\n\t\t\tTAccountWsolRewardAccrual extends string\n\t\t\t\t? WritableAccount<TAccountWsolRewardAccrual>\n\t\t\t\t: TAccountWsolRewardAccrual,\n\t\t\tTAccountPythPriceFeed extends string\n\t\t\t\t? ReadonlyAccount<TAccountPythPriceFeed>\n\t\t\t\t: TAccountPythPriceFeed,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountWsolTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountWsolTokenProgram>\n\t\t\t\t: TAccountWsolTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type CreateTokenInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tplatformConfig: Address;\n\tcreatorPlatform: string;\n\tcreatorId: string;\n\tcreatorHash: Address;\n\tname: string;\n\tsymbol: string;\n\turi: string;\n};\n\nexport type CreateTokenInstructionDataArgs = {\n\tplatformConfig: Address;\n\tcreatorPlatform: string;\n\tcreatorId: string;\n\tcreatorHash: Address;\n\tname: string;\n\tsymbol: string;\n\turi: string;\n};\n\nexport function getCreateTokenInstructionDataEncoder(): Encoder<CreateTokenInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t[\n\t\t\t\t'creatorPlatform',\n\t\t\t\taddEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n\t\t\t],\n\t\t\t[\n\t\t\t\t'creatorId',\n\t\t\t\taddEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n\t\t\t],\n\t\t\t['creatorHash', getAddressEncoder()],\n\t\t\t['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t\t['symbol', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t\t['uri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: CREATE_TOKEN_DISCRIMINATOR }),\n\t);\n}\n\nexport function getCreateTokenInstructionDataDecoder(): Decoder<CreateTokenInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t[\n\t\t\t'creatorPlatform',\n\t\t\taddDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n\t\t],\n\t\t['creatorId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['creatorHash', getAddressDecoder()],\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t]);\n}\n\nexport function getCreateTokenInstructionDataCodec(): Codec<\n\tCreateTokenInstructionDataArgs,\n\tCreateTokenInstructionData\n> {\n\treturn combineCodec(\n\t\tgetCreateTokenInstructionDataEncoder(),\n\t\tgetCreateTokenInstructionDataDecoder(),\n\t);\n}\n\nexport type CreateTokenAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountCoinCreator extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tcoinCreator: Address<TAccountCoinCreator>;\n\tbaseMint: TransactionSigner<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tcreatorFeeConfig?: Address<TAccountCreatorFeeConfig>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState?: Address<TAccountStakingRewardState>;\n\trewardAccrual?: Address<TAccountRewardAccrual>;\n\tstakingVault?: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tplatformConfig: CreateTokenInstructionDataArgs['platformConfig'];\n\tcreatorPlatform: CreateTokenInstructionDataArgs['creatorPlatform'];\n\tcreatorId: CreateTokenInstructionDataArgs['creatorId'];\n\tcreatorHash: CreateTokenInstructionDataArgs['creatorHash'];\n\tname: CreateTokenInstructionDataArgs['name'];\n\tsymbol: CreateTokenInstructionDataArgs['symbol'];\n\turi: CreateTokenInstructionDataArgs['uri'];\n};\n\nexport async function getCreateTokenInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountCoinCreator extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: CreateTokenAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountCoinCreator,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tCreateTokenInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountCoinCreator,\n\t\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountCreatorFeeConfig,\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz',\n\t\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH',\n\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: true },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tcoinCreator: { value: input.coinCreator ?? null, isWritable: false },\n\t\tglobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: true },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tnexusProgram: { value: null, isWritable: false },\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tstakingWsolVault: { value: null, isWritable: true },\n\t\twsolRewardAccrual: { value: null, isWritable: true },\n\t\tpythPriceFeed: { value: null, isWritable: false },\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\twsolTokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.globalConfig.value) {\n\t\taccounts.globalConfig.value = GLOBAL_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.creatorFeeConfig.value) {\n\t\taccounts.creatorFeeConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([\n\t\t\t\t\t\t99, 114, 101, 97, 116, 111, 114, 95, 102, 101, 101, 95,\n\t\t\t\t\t\t98, 97, 108, 97, 110, 99, 101,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'creatorHash',\n\t\t\t\t\t\targs.creatorHash,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.nexusProgram.value) {\n\t\taccounts.nexusProgram.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.stakingRewardState.value) {\n\t\taccounts.stakingRewardState.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([114, 101, 119, 97, 114, 100]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.rewardAccrual.value) {\n\t\taccounts.rewardAccrual.value = await findRewardAccrualPda({\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.stakingVault.value) {\n\t\taccounts.stakingVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.stakingWsolVault.value) {\n\t\taccounts.stakingWsolVault.value =\n\t\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz' as Address<'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz'>;\n\t}\n\tif (!accounts.wsolRewardAccrual.value) {\n\t\taccounts.wsolRewardAccrual.value = WSOL_REWARD_ACCRUAL_PDA_ADDRESS;\n\t}\n\tif (!accounts.pythPriceFeed.value) {\n\t\taccounts.pythPriceFeed.value =\n\t\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE' as Address<'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE'>;\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.wsolTokenProgram.value) {\n\t\taccounts.wsolTokenProgram.value =\n\t\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('coinCreator', accounts.coinCreator),\n\t\t\tgetAccountMeta('globalConfig', accounts.globalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusProgram', accounts.nexusProgram),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('stakingWsolVault', accounts.stakingWsolVault),\n\t\t\tgetAccountMeta('wsolRewardAccrual', accounts.wsolRewardAccrual),\n\t\t\tgetAccountMeta('pythPriceFeed', accounts.pythPriceFeed),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('wsolTokenProgram', accounts.wsolTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getCreateTokenInstructionDataEncoder().encode(\n\t\t\targs as CreateTokenInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as CreateTokenInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountCoinCreator,\n\t\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountCreatorFeeConfig,\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz',\n\t\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH',\n\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type CreateTokenInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountCoinCreator extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tcoinCreator: Address<TAccountCoinCreator>;\n\tbaseMint: TransactionSigner<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState: Address<TAccountStakingRewardState>;\n\trewardAccrual: Address<TAccountRewardAccrual>;\n\tstakingVault: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tplatformConfig: CreateTokenInstructionDataArgs['platformConfig'];\n\tcreatorPlatform: CreateTokenInstructionDataArgs['creatorPlatform'];\n\tcreatorId: CreateTokenInstructionDataArgs['creatorId'];\n\tcreatorHash: CreateTokenInstructionDataArgs['creatorHash'];\n\tname: CreateTokenInstructionDataArgs['name'];\n\tsymbol: CreateTokenInstructionDataArgs['symbol'];\n\turi: CreateTokenInstructionDataArgs['uri'];\n};\n\nexport function getCreateTokenInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountCoinCreator extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: CreateTokenInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountCoinCreator,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): CreateTokenInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountCoinCreator,\n\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq',\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBondingCurve,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountCreatorFeeConfig,\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\tTAccountNexusStakingConfig,\n\tTAccountStakingRewardState,\n\tTAccountRewardAccrual,\n\tTAccountStakingVault,\n\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz',\n\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH',\n\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: true },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tcoinCreator: { value: input.coinCreator ?? null, isWritable: false },\n\t\tglobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: true },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tnexusProgram: { value: null, isWritable: false },\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tstakingWsolVault: { value: null, isWritable: true },\n\t\twsolRewardAccrual: { value: null, isWritable: true },\n\t\tpythPriceFeed: { value: null, isWritable: false },\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\twsolTokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.globalConfig.value) {\n\t\taccounts.globalConfig.value = GLOBAL_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.nexusProgram.value) {\n\t\taccounts.nexusProgram.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.stakingWsolVault.value) {\n\t\taccounts.stakingWsolVault.value =\n\t\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz' as Address<'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz'>;\n\t}\n\tif (!accounts.wsolRewardAccrual.value) {\n\t\taccounts.wsolRewardAccrual.value = WSOL_REWARD_ACCRUAL_PDA_ADDRESS;\n\t}\n\tif (!accounts.pythPriceFeed.value) {\n\t\taccounts.pythPriceFeed.value =\n\t\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE' as Address<'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE'>;\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.wsolTokenProgram.value) {\n\t\taccounts.wsolTokenProgram.value =\n\t\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('coinCreator', accounts.coinCreator),\n\t\t\tgetAccountMeta('globalConfig', accounts.globalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusProgram', accounts.nexusProgram),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('stakingWsolVault', accounts.stakingWsolVault),\n\t\t\tgetAccountMeta('wsolRewardAccrual', accounts.wsolRewardAccrual),\n\t\t\tgetAccountMeta('pythPriceFeed', accounts.pythPriceFeed),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('wsolTokenProgram', accounts.wsolTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getCreateTokenInstructionDataEncoder().encode(\n\t\t\targs as CreateTokenInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as CreateTokenInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountCoinCreator,\n\t\t'H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountCreatorFeeConfig,\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\t'AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz',\n\t\t'91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH',\n\t\t'7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE',\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedCreateTokenInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tcoinCreator: TAccountMetas[2];\n\t\tglobalConfig: TAccountMetas[3];\n\t\tbaseMint: TAccountMetas[4];\n\t\tquoteMint: TAccountMetas[5];\n\t\tbondingCurve: TAccountMetas[6];\n\t\tbaseVault: TAccountMetas[7];\n\t\tquoteVault: TAccountMetas[8];\n\t\tcreatorFeeConfig: TAccountMetas[9];\n\t\tnexusProgram: TAccountMetas[10];\n\t\tnexusGlobalConfig: TAccountMetas[11];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[12];\n\t\tpartnerConfig: TAccountMetas[13];\n\t\tnexusStakingConfig: TAccountMetas[14];\n\t\tstakingRewardState: TAccountMetas[15];\n\t\trewardAccrual: TAccountMetas[16];\n\t\tstakingVault: TAccountMetas[17];\n\t\tstakingWsolVault: TAccountMetas[18];\n\t\twsolRewardAccrual: TAccountMetas[19];\n\t\tpythPriceFeed: TAccountMetas[20];\n\t\tbaseTokenProgram: TAccountMetas[21];\n\t\tquoteTokenProgram: TAccountMetas[22];\n\t\twsolTokenProgram: TAccountMetas[23];\n\t\tassociatedTokenProgram: TAccountMetas[24];\n\t\tsystemProgram: TAccountMetas[25];\n\t\teventAuthority: TAccountMetas[26];\n\t\tprogram: TAccountMetas[27];\n\t};\n\tdata: CreateTokenInstructionData;\n};\n\nexport function parseCreateTokenInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedCreateTokenInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, CREATE_TOKEN_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseCreateTokenInstruction: instruction data does not match the CreateToken discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 28) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 28,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tcoinCreator: getNextAccount(),\n\t\t\tglobalConfig: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tcreatorFeeConfig: getNextAccount(),\n\t\t\tnexusProgram: getNextAccount(),\n\t\t\tnexusGlobalConfig: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tnexusStakingConfig: getNextAccount(),\n\t\t\tstakingRewardState: getNextAccount(),\n\t\t\trewardAccrual: getNextAccount(),\n\t\t\tstakingVault: getNextAccount(),\n\t\t\tstakingWsolVault: getNextAccount(),\n\t\t\twsolRewardAccrual: getNextAccount(),\n\t\t\tpythPriceFeed: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\twsolTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getCreateTokenInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const BUY_EXACT_IN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t250, 234, 13, 123, 213, 156, 19, 236,\n]);\n\nexport function getBuyExactInDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tBUY_EXACT_IN_DISCRIMINATOR,\n\t);\n}\n\nexport type BuyExactInInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type BuyExactInInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountIn: bigint;\n\tminAmountOut: bigint;\n};\n\nexport type BuyExactInInstructionDataArgs = {\n\tamountIn: number | bigint;\n\tminAmountOut: number | bigint;\n};\n\nexport function getBuyExactInInstructionDataEncoder(): FixedSizeEncoder<BuyExactInInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountIn', getU64Encoder()],\n\t\t\t['minAmountOut', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: BUY_EXACT_IN_DISCRIMINATOR }),\n\t);\n}\n\nexport function getBuyExactInInstructionDataDecoder(): FixedSizeDecoder<BuyExactInInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountIn', getU64Decoder()],\n\t\t['minAmountOut', getU64Decoder()],\n\t]);\n}\n\nexport function getBuyExactInInstructionDataCodec(): FixedSizeCodec<\n\tBuyExactInInstructionDataArgs,\n\tBuyExactInInstructionData\n> {\n\treturn combineCodec(\n\t\tgetBuyExactInInstructionDataEncoder(),\n\t\tgetBuyExactInInstructionDataDecoder(),\n\t);\n}\n\nexport type BuyExactInInstructionExtraArgs = { platformConfig: Address };\n\nexport type BuyExactInAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: BuyExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: BuyExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig: BuyExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getBuyExactInInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactInAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tBuyExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactInInstructionDataEncoder().encode(\n\t\t\targs as BuyExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type BuyExactInInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: BuyExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: BuyExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig?: BuyExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport function getBuyExactInInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactInInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): BuyExactInInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactInInstructionDataEncoder().encode(\n\t\t\targs as BuyExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedBuyExactInInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tbondingCurve: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: BuyExactInInstructionData;\n};\n\nexport function parseBuyExactInInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedBuyExactInInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, BUY_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseBuyExactInInstruction: instruction data does not match the BuyExactIn discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getBuyExactInInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const BUY_EXACT_OUT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t24, 211, 116, 40, 105, 3, 153, 56,\n]);\n\nexport function getBuyExactOutDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tBUY_EXACT_OUT_DISCRIMINATOR,\n\t);\n}\n\nexport type BuyExactOutInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type BuyExactOutInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountOut: bigint;\n\tmaxAmountIn: bigint;\n};\n\nexport type BuyExactOutInstructionDataArgs = {\n\tamountOut: number | bigint;\n\tmaxAmountIn: number | bigint;\n};\n\nexport function getBuyExactOutInstructionDataEncoder(): FixedSizeEncoder<BuyExactOutInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountOut', getU64Encoder()],\n\t\t\t['maxAmountIn', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: BUY_EXACT_OUT_DISCRIMINATOR }),\n\t);\n}\n\nexport function getBuyExactOutInstructionDataDecoder(): FixedSizeDecoder<BuyExactOutInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountOut', getU64Decoder()],\n\t\t['maxAmountIn', getU64Decoder()],\n\t]);\n}\n\nexport function getBuyExactOutInstructionDataCodec(): FixedSizeCodec<\n\tBuyExactOutInstructionDataArgs,\n\tBuyExactOutInstructionData\n> {\n\treturn combineCodec(\n\t\tgetBuyExactOutInstructionDataEncoder(),\n\t\tgetBuyExactOutInstructionDataDecoder(),\n\t);\n}\n\nexport type BuyExactOutInstructionExtraArgs = { platformConfig: Address };\n\nexport type BuyExactOutAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: BuyExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: BuyExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig: BuyExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getBuyExactOutInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactOutAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tBuyExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactOutInstructionDataEncoder().encode(\n\t\t\targs as BuyExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type BuyExactOutInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: BuyExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: BuyExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig?: BuyExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport function getBuyExactOutInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: BuyExactOutInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): BuyExactOutInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getBuyExactOutInstructionDataEncoder().encode(\n\t\t\targs as BuyExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as BuyExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedBuyExactOutInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tbondingCurve: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: BuyExactOutInstructionData;\n};\n\nexport function parseBuyExactOutInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedBuyExactOutInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, BUY_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseBuyExactOutInstruction: instruction data does not match the BuyExactOut discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getBuyExactOutInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const SELL_EXACT_IN_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t149, 39, 222, 155, 211, 124, 152, 26,\n]);\n\nexport function getSellExactInDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSELL_EXACT_IN_DISCRIMINATOR,\n\t);\n}\n\nexport type SellExactInInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type SellExactInInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountIn: bigint;\n\tminAmountOut: bigint;\n};\n\nexport type SellExactInInstructionDataArgs = {\n\tamountIn: number | bigint;\n\tminAmountOut: number | bigint;\n};\n\nexport function getSellExactInInstructionDataEncoder(): FixedSizeEncoder<SellExactInInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountIn', getU64Encoder()],\n\t\t\t['minAmountOut', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: SELL_EXACT_IN_DISCRIMINATOR }),\n\t);\n}\n\nexport function getSellExactInInstructionDataDecoder(): FixedSizeDecoder<SellExactInInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountIn', getU64Decoder()],\n\t\t['minAmountOut', getU64Decoder()],\n\t]);\n}\n\nexport function getSellExactInInstructionDataCodec(): FixedSizeCodec<\n\tSellExactInInstructionDataArgs,\n\tSellExactInInstructionData\n> {\n\treturn combineCodec(\n\t\tgetSellExactInInstructionDataEncoder(),\n\t\tgetSellExactInInstructionDataDecoder(),\n\t);\n}\n\nexport type SellExactInInstructionExtraArgs = { platformConfig: Address };\n\nexport type SellExactInAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: SellExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: SellExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig: SellExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getSellExactInInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactInAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tSellExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactInInstructionDataEncoder().encode(\n\t\t\targs as SellExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type SellExactInInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountIn: SellExactInInstructionDataArgs['amountIn'];\n\tminAmountOut: SellExactInInstructionDataArgs['minAmountOut'];\n\tplatformConfig?: SellExactInInstructionExtraArgs['platformConfig'];\n};\n\nexport function getSellExactInInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactInInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): SellExactInInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactInInstructionDataEncoder().encode(\n\t\t\targs as SellExactInInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactInInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedSellExactInInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tbondingCurve: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: SellExactInInstructionData;\n};\n\nexport function parseSellExactInInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSellExactInInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, SELL_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseSellExactInInstruction: instruction data does not match the SellExactIn discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getSellExactInInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\tgetNonNullResolvedInstructionInput,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const SELL_EXACT_OUT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t95, 200, 71, 34, 8, 9, 11, 166,\n]);\n\nexport function getSellExactOutDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSELL_EXACT_OUT_DISCRIMINATOR,\n\t);\n}\n\nexport type SellExactOutInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountUserBaseAccount extends string | AccountMeta<string> = string,\n\tTAccountUserQuoteAccount extends string | AccountMeta<string> = string,\n\tTAccountPartner extends string | AccountMeta<string> = string,\n\tTAccountPartnerConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountUserBaseAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserBaseAccount>\n\t\t\t\t: TAccountUserBaseAccount,\n\t\t\tTAccountUserQuoteAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserQuoteAccount>\n\t\t\t\t: TAccountUserQuoteAccount,\n\t\t\tTAccountPartner extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartner>\n\t\t\t\t: TAccountPartner,\n\t\t\tTAccountPartnerConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountPartnerConfig>\n\t\t\t\t: TAccountPartnerConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type SellExactOutInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamountOut: bigint;\n\tmaxAmountIn: bigint;\n};\n\nexport type SellExactOutInstructionDataArgs = {\n\tamountOut: number | bigint;\n\tmaxAmountIn: number | bigint;\n};\n\nexport function getSellExactOutInstructionDataEncoder(): FixedSizeEncoder<SellExactOutInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amountOut', getU64Encoder()],\n\t\t\t['maxAmountIn', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: SELL_EXACT_OUT_DISCRIMINATOR }),\n\t);\n}\n\nexport function getSellExactOutInstructionDataDecoder(): FixedSizeDecoder<SellExactOutInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amountOut', getU64Decoder()],\n\t\t['maxAmountIn', getU64Decoder()],\n\t]);\n}\n\nexport function getSellExactOutInstructionDataCodec(): FixedSizeCodec<\n\tSellExactOutInstructionDataArgs,\n\tSellExactOutInstructionData\n> {\n\treturn combineCodec(\n\t\tgetSellExactOutInstructionDataEncoder(),\n\t\tgetSellExactOutInstructionDataDecoder(),\n\t);\n}\n\nexport type SellExactOutInstructionExtraArgs = { platformConfig: Address };\n\nexport type SellExactOutAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount?: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount?: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig?: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: SellExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: SellExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig: SellExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport async function getSellExactOutInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactOutAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tSellExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userBaseAccount.value) {\n\t\taccounts.userBaseAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userQuoteAccount.value) {\n\t\taccounts.userQuoteAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.partnerConfig.value) {\n\t\taccounts.partnerConfig.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetNonNullResolvedInstructionInput(\n\t\t\t\t\t\t'platformConfig',\n\t\t\t\t\t\targs.platformConfig,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'partner',\n\t\t\t\t\t\taccounts.partner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactOutInstructionDataEncoder().encode(\n\t\t\targs as SellExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type SellExactOutInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountUserBaseAccount extends string = string,\n\tTAccountUserQuoteAccount extends string = string,\n\tTAccountPartner extends string = string,\n\tTAccountPartnerConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\tuserBaseAccount: Address<TAccountUserBaseAccount>;\n\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\tuserQuoteAccount: Address<TAccountUserQuoteAccount>;\n\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\tpartner: Address<TAccountPartner> | TransactionSigner<TAccountPartner>;\n\tpartnerConfig: Address<TAccountPartnerConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n\tamountOut: SellExactOutInstructionDataArgs['amountOut'];\n\tmaxAmountIn: SellExactOutInstructionDataArgs['maxAmountIn'];\n\tplatformConfig?: SellExactOutInstructionExtraArgs['platformConfig'];\n};\n\nexport function getSellExactOutInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountUserBaseAccount extends string,\n\tTAccountUserQuoteAccount extends string,\n\tTAccountPartner extends string,\n\tTAccountPartnerConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: SellExactOutInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\tTAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): SellExactOutInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\tTAccountUserBaseAccount,\n\tTAccountUserQuoteAccount,\n\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t: TAccountPartner,\n\tTAccountPartnerConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tuserBaseAccount: {\n\t\t\tvalue: input.userBaseAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserQuoteAccount: {\n\t\t\tvalue: input.userQuoteAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpartner: { value: input.partner ?? null, isWritable: false },\n\t\tpartnerConfig: {\n\t\t\tvalue: input.partnerConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('userBaseAccount', accounts.userBaseAccount),\n\t\t\tgetAccountMeta('userQuoteAccount', accounts.userQuoteAccount),\n\t\t\tgetAccountMeta('partner', accounts.partner),\n\t\t\tgetAccountMeta('partnerConfig', accounts.partnerConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getSellExactOutInstructionDataEncoder().encode(\n\t\t\targs as SellExactOutInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as SellExactOutInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountUserBaseAccount,\n\t\tTAccountUserQuoteAccount,\n\t\t(typeof input)['partner'] extends TransactionSigner<TAccountPartner>\n\t\t\t? ReadonlySignerAccount<TAccountPartner> &\n\t\t\t\t\tAccountSignerMeta<TAccountPartner>\n\t\t\t: TAccountPartner,\n\t\tTAccountPartnerConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedSellExactOutInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tbondingCurve: TAccountMetas[2];\n\t\tbaseMint: TAccountMetas[3];\n\t\tquoteMint: TAccountMetas[4];\n\t\tbaseVault: TAccountMetas[5];\n\t\tquoteVault: TAccountMetas[6];\n\t\t/** Optional: any base-mint account `user` owns; defaults to this ATA. */\n\t\tuserBaseAccount: TAccountMetas[7];\n\t\t/** Optional: any quote-mint account `user` owns; defaults to this ATA. */\n\t\tuserQuoteAccount: TAccountMetas[8];\n\t\t/** The partner must sign. `DEFAULT_PARTNER`, the system program, does not sign. */\n\t\tpartner: TAccountMetas[9];\n\t\tpartnerConfig: TAccountMetas[10];\n\t\tbaseTokenProgram: TAccountMetas[11];\n\t\tquoteTokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: SellExactOutInstructionData;\n};\n\nexport function parseSellExactOutInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSellExactOutInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, SELL_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseSellExactOutInstruction: instruction data does not match the SellExactOut discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tuserBaseAccount: getNextAccount(),\n\t\t\tuserQuoteAccount: getNextAccount(),\n\t\t\tpartner: getNextAccount(),\n\t\t\tpartnerConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getSellExactOutInstructionDataDecoder().decode(instruction.data),\n\t};\n}\n","import type { Address, Instruction, TransactionSigner } from '@solana/kit';\nimport type { BuyQuote, MintFee, SellQuote } from '../math/amm.js';\nimport * as amm from '../math/amm.js';\nimport type { PartnerInput } from '../utils/partner.js';\nimport { getBuyExactInInstructionAsync } from './generated/instructions/buyExactIn.js';\nimport { getBuyExactOutInstructionAsync } from './generated/instructions/buyExactOut.js';\nimport { getSellExactInInstructionAsync } from './generated/instructions/sellExactIn.js';\nimport { getSellExactOutInstructionAsync } from './generated/instructions/sellExactOut.js';\n\nexport interface LaunchpadTradeParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tvirtualBaseReserves: bigint;\n\tvirtualQuoteReserves: bigint;\n\tfeeBps: number;\n\tslippageBps: number;\n\tpartner: PartnerInput;\n\tplatformConfig: Address;\n\tquoteTokenProgram: Address;\n\t/** Token-2022 schedule for the epoch the trade lands in; stale or missing skews the slippage bounds. */\n\tquoteFee?: MintFee;\n\tbaseFee?: MintFee;\n\t/** {@inheritDoc LaunchpadInstructionParams.userQuoteAccount} */\n\tuserQuoteAccount?: Address;\n\t/** {@inheritDoc LaunchpadInstructionParams.userBaseAccount} */\n\tuserBaseAccount?: Address;\n}\n\nexport interface LaunchpadBuyParams extends LaunchpadTradeParams {\n\trealBaseReserves: bigint;\n}\n\nexport interface LaunchpadInstructionParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tpartner: PartnerInput;\n\tplatformConfig: Address;\n\tquoteTokenProgram: Address;\n\t/** Any user-owned quote-mint account. Defaults to the ATA, created mid-trade\n\t * if missing (payer funds rent), which only rescues a sell. For WSOL,\n\t * a throwaway `createAccountWithSeed` account is cheaper. */\n\tuserQuoteAccount?: Address;\n\t/** Any user-owned base-mint account. Defaults to the ATA, created mid-trade\n\t * if missing (payer funds rent), which only rescues a buy. */\n\tuserBaseAccount?: Address;\n}\n\n/** `baseAmountOut` is net to the buyer: the program reads `amount` as `base_to_user`. */\nexport async function buyExactOut(\n\tparams: LaunchpadBuyParams & { baseAmountOut: bigint },\n): Promise<{ instruction: Instruction; quote: BuyQuote }> {\n\tconst quote = amm.buyExactOut({\n\t\treserveQuote: params.virtualQuoteReserves,\n\t\treserveBase: params.virtualBaseReserves,\n\t\tbaseAmountOut: params.baseAmountOut,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t\tbaseReserveCap: params.realBaseReserves,\n\t});\n\t// The cap is measured on the gross the buyer sends, quote transfer fee included.\n\tconst maxQuoteIn = amm.calculateSlippageUp(\n\t\tquote.quoteFromUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildBuyExactOutInstruction({\n\t\t\t...params,\n\t\t\tamountOut: params.baseAmountOut,\n\t\t\tmaxAmountIn: maxQuoteIn,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function buyExactIn(\n\tparams: LaunchpadBuyParams & { quoteAmountIn: bigint },\n): Promise<{ instruction: Instruction; quote: BuyQuote }> {\n\tconst quote = amm.buyExactIn({\n\t\treserveQuote: params.virtualQuoteReserves,\n\t\treserveBase: params.virtualBaseReserves,\n\t\tquoteAmountIn: params.quoteAmountIn,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t\tbaseReserveCap: params.realBaseReserves,\n\t});\n\t// The floor is measured on the buyer's credit, not the vault's debit.\n\tconst minBaseOut = amm.calculateSlippageDown(\n\t\tquote.baseToUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildBuyExactInInstruction({\n\t\t\t...params,\n\t\t\tamountIn: params.quoteAmountIn,\n\t\t\tminAmountOut: minBaseOut,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function sellExactIn(\n\tparams: LaunchpadTradeParams & { baseAmountIn: bigint },\n): Promise<{ instruction: Instruction; quote: SellQuote }> {\n\tconst quote = amm.sellExactIn({\n\t\treserveQuote: params.virtualQuoteReserves,\n\t\treserveBase: params.virtualBaseReserves,\n\t\tbaseAmountIn: params.baseAmountIn,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The floor is measured on the seller's credit, not what leaves the vault.\n\tconst minQuoteOut = amm.calculateSlippageDown(\n\t\tquote.quoteToUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildSellExactInInstruction({\n\t\t\t...params,\n\t\t\tamountIn: params.baseAmountIn,\n\t\t\tminAmountOut: minQuoteOut,\n\t\t}),\n\t\tquote,\n\t};\n}\n\n/** `quoteAmountOut` is net to the seller: the program reads `amount` as `quote_to_user`. */\nexport async function sellExactOut(\n\tparams: LaunchpadTradeParams & { quoteAmountOut: bigint },\n): Promise<{ instruction: Instruction; quote: SellQuote }> {\n\tconst quote = amm.sellExactOut({\n\t\treserveQuote: params.virtualQuoteReserves,\n\t\treserveBase: params.virtualBaseReserves,\n\t\tquoteAmountOut: params.quoteAmountOut,\n\t\tfeeBps: params.feeBps,\n\t\tquoteFee: params.quoteFee,\n\t\tbaseFee: params.baseFee,\n\t});\n\t// The cap is measured on the gross the seller sends, base transfer fee included.\n\tconst maxBaseIn = amm.calculateSlippageUp(\n\t\tquote.baseFromUser,\n\t\tparams.slippageBps,\n\t);\n\treturn {\n\t\tinstruction: await buildSellExactOutInstruction({\n\t\t\t...params,\n\t\t\tamountOut: params.quoteAmountOut,\n\t\t\tmaxAmountIn: maxBaseIn,\n\t\t}),\n\t\tquote,\n\t};\n}\n\nexport async function buildBuyExactInInstruction(\n\tparams: LaunchpadInstructionParams & {\n\t\tamountIn: bigint;\n\t\tminAmountOut: bigint;\n\t},\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getBuyExactInInstructionAsync({\n\t\t...shared,\n\t\tamountIn: params.amountIn,\n\t\tminAmountOut: params.minAmountOut,\n\t});\n}\n\nexport async function buildBuyExactOutInstruction(\n\tparams: LaunchpadInstructionParams & {\n\t\tamountOut: bigint;\n\t\tmaxAmountIn: bigint;\n\t},\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getBuyExactOutInstructionAsync({\n\t\t...shared,\n\t\tamountOut: params.amountOut,\n\t\tmaxAmountIn: params.maxAmountIn,\n\t});\n}\n\nexport async function buildSellExactInInstruction(\n\tparams: LaunchpadInstructionParams & {\n\t\tamountIn: bigint;\n\t\tminAmountOut: bigint;\n\t},\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getSellExactInInstructionAsync({\n\t\t...shared,\n\t\tamountIn: params.amountIn,\n\t\tminAmountOut: params.minAmountOut,\n\t});\n}\n\nexport async function buildSellExactOutInstruction(\n\tparams: LaunchpadInstructionParams & {\n\t\tamountOut: bigint;\n\t\tmaxAmountIn: bigint;\n\t},\n): Promise<Instruction> {\n\tconst shared = resolveSharedAccounts(params);\n\treturn getSellExactOutInstructionAsync({\n\t\t...shared,\n\t\tamountOut: params.amountOut,\n\t\tmaxAmountIn: params.maxAmountIn,\n\t});\n}\n\n/** Percent of the curve's real base sold (0-100); 100 is the migration threshold. */\nexport function calculateBondingCurveProgress(params: {\n\trealBaseReserves: bigint;\n\tinitialRealBase: bigint;\n}): number {\n\tconst { realBaseReserves, initialRealBase } = params;\n\tif (initialRealBase === 0n) return 100;\n\tconst sold = initialRealBase - realBaseReserves;\n\treturn Math.max(\n\t\t0,\n\t\tMath.min(Number((sold * 1000n) / initialRealBase) / 10, 100),\n\t);\n}\n\nfunction resolveSharedAccounts(params: LaunchpadInstructionParams) {\n\treturn {\n\t\tuser: params.user,\n\t\tpayer: params.payer ?? params.user,\n\t\tbaseMint: params.baseMint,\n\t\tquoteMint: params.quoteMint,\n\t\tpartner: params.partner,\n\t\tplatformConfig: params.platformConfig,\n\t\tquoteTokenProgram: params.quoteTokenProgram,\n\t\t// Left undefined so the generated client derives the ATA itself.\n\t\t...(params.userQuoteAccount !== undefined && {\n\t\t\tuserQuoteAccount: params.userQuoteAccount,\n\t\t}),\n\t\t...(params.userBaseAccount !== undefined && {\n\t\t\tuserBaseAccount: params.userBaseAccount,\n\t\t}),\n\t};\n}\n","import type { Address, Instruction, TransactionSigner } from '@solana/kit';\nimport type { MintFee, TradeQuote } from '../math/amm.js';\nimport type { PartnerInput } from '../utils/partner.js';\nimport { creatorHashFromId } from '../utils/creator-hash.js';\nimport { findCreatorFeeConfigPda } from '../nexus/generated/pdas/creatorFeeConfig.js';\nimport { getCreateTokenInstructionAsync } from './generated/instructions/createToken.js';\nimport { buyExactIn } from './trade.js';\n\nexport interface CreateTokenParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tcoinCreator: Address;\n\tbaseMint: TransactionSigner;\n\tquoteMint: Address;\n\tname: string;\n\tsymbol: string;\n\turi: string;\n\t/** An enabled nexus auth platform (e.g. \"wallet\"), max 32 bytes; hashed with\n\t * `creatorId` into the creator fee identity. Unrelated to `platformConfig`. */\n\tcreatorPlatform: string;\n\tcreatorId: string;\n\tpartner: PartnerInput;\n\tplatformConfig: Address;\n\tquoteTokenProgram: Address;\n}\n\nexport interface CreateAndBuyParams extends CreateTokenParams {\n\tbuyQuoteAmount: bigint;\n\tfeeBps: number;\n\tslippageBps: number;\n\tinitialVirtualQuoteReserves: bigint;\n\tinitialVirtualBaseReserves: bigint;\n\t/** `globalConfig.initialRealBaseReserves`: caps the appended buy. */\n\tinitialRealBaseReserves: bigint;\n\t/** Quote mint's Token-2022 schedule for the launch epoch; without it `minAmountOut`\n\t * ignores the mint's cut, and a cut above `slippageBps` can revert the buy. No\n\t * `baseFee`: this transaction creates the base mint without the extension. */\n\tquoteFee?: MintFee;\n}\n\nexport async function buildCreateTokenInstruction(\n\tparams: CreateTokenParams,\n): Promise<Instruction> {\n\treturn buildCreateTokenInstructionWithHash(\n\t\tparams,\n\t\tawait creatorHashFromId(params.creatorPlatform, params.creatorId),\n\t);\n}\n\nasync function buildCreateTokenInstructionWithHash(\n\tparams: CreateTokenParams,\n\tcreatorHash: Address,\n): Promise<Instruction> {\n\tconst [creatorFeeConfig] = await findCreatorFeeConfigPda({\n\t\tcreatorHash,\n\t\tquoteMint: params.quoteMint,\n\t});\n\t// The creation fee is native SOL from `user`; the client derives the WSOL staking vault.\n\treturn getCreateTokenInstructionAsync({\n\t\tuser: params.user,\n\t\tpayer: params.payer ?? params.user,\n\t\tcoinCreator: params.coinCreator,\n\t\tbaseMint: params.baseMint,\n\t\tquoteMint: params.quoteMint,\n\t\tcreatorFeeConfig,\n\t\tpartner: params.partner,\n\t\tplatformConfig: params.platformConfig,\n\t\tquoteTokenProgram: params.quoteTokenProgram,\n\t\tcreatorPlatform: params.creatorPlatform,\n\t\tcreatorId: params.creatorId,\n\t\tcreatorHash,\n\t\tname: params.name,\n\t\tsymbol: params.symbol,\n\t\turi: params.uri,\n\t});\n}\n\nexport async function buildCreateAndBuyInstructions(\n\tparams: CreateAndBuyParams,\n): Promise<{ instructions: Instruction[]; quote?: TradeQuote }> {\n\tconst creatorHash = await creatorHashFromId(\n\t\tparams.creatorPlatform,\n\t\tparams.creatorId,\n\t);\n\tconst createIx = await buildCreateTokenInstructionWithHash(\n\t\tparams,\n\t\tcreatorHash,\n\t);\n\tconst instructions: Instruction[] = [createIx];\n\tlet quote: TradeQuote | undefined;\n\n\tif (params.buyQuoteAmount > 0n) {\n\t\tconst buyResult = await buyExactIn({\n\t\t\tuser: params.user,\n\t\t\tpayer: params.payer,\n\t\t\tbaseMint: params.baseMint.address,\n\t\t\tquoteMint: params.quoteMint,\n\t\t\tvirtualQuoteReserves: params.initialVirtualQuoteReserves,\n\t\t\tvirtualBaseReserves: params.initialVirtualBaseReserves,\n\t\t\trealBaseReserves: params.initialRealBaseReserves,\n\t\t\t// The curve was just stamped with this same key.\n\t\t\tplatformConfig: params.platformConfig,\n\t\t\tfeeBps: params.feeBps,\n\t\t\tslippageBps: params.slippageBps,\n\t\t\tpartner: params.partner,\n\t\t\tquoteFee: params.quoteFee,\n\t\t\tquoteTokenProgram: params.quoteTokenProgram,\n\t\t\tquoteAmountIn: params.buyQuoteAmount,\n\t\t});\n\n\t\tinstructions.push(buyResult.instruction);\n\t\tquote = buyResult.quote;\n\t}\n\n\treturn { instructions, quote };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tfixEncoderSize,\n\tgetBytesEncoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\n\n/**\n * Shared event-framing tag prepended to every CPI-framed event.\n *\n * `containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)` checks whether data is a framed event\n * at all — including event kinds unknown to this program.\n */\nexport const ANCHOR_EVENT_CPI_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]);\n\nexport function getAnchorEventCpiDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBooleanDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const COMPLETE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t95, 114, 97, 156, 212, 46, 152, 8,\n]);\n\nexport function getCompleteEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCOMPLETE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type CompleteEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tcurvePartner: Address;\n\tisPartner: boolean;\n\trealQuoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getCompleteEventDecoderCache: FixedSizeDecoder<CompleteEvent> | undefined;\n\nexport function getCompleteEventDecoder(): FixedSizeDecoder<CompleteEvent> {\n\treturn (getCompleteEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['curvePartner', getAddressDecoder()],\n\t\t['isPartner', getBooleanDecoder()],\n\t\t['realQuoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link CompleteEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseCompleteEvent to decode the matching data\n */\nexport function isCompleteEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, COMPLETE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link CompleteEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isCompleteEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseCompleteEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): CompleteEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isCompleteEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getCompleteEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tCOMPLETE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const CREATOR_CLAIM_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([232, 58, 157, 141, 123, 5, 142, 9]);\n\nexport function getCreatorClaimEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type CreatorClaimEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tplatformConfig: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tclaimer: Address;\n\tdestinationOwner: Address;\n\tamount: bigint;\n\tquoteTransferFee: bigint;\n\ttimestamp: bigint;\n};\n\nlet getCreatorClaimEventDecoderCache:\n\t| FixedSizeDecoder<CreatorClaimEvent>\n\t| undefined;\n\nexport function getCreatorClaimEventDecoder(): FixedSizeDecoder<CreatorClaimEvent> {\n\treturn (getCreatorClaimEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['claimer', getAddressDecoder()],\n\t\t['destinationOwner', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link CreatorClaimEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseCreatorClaimEvent to decode the matching data\n */\nexport function isCreatorClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, CREATOR_CLAIM_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link CreatorClaimEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isCreatorClaimEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseCreatorClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): CreatorClaimEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isCreatorClaimEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getCreatorClaimEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const MIGRATE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t216, 175, 231, 95, 45, 98, 108, 21,\n]);\n\nexport function getMigrateEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tMIGRATE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type MigrateEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tpool: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tbaseAmount: bigint;\n\tquoteAmount: bigint;\n\trealQuoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getMigrateEventDecoderCache: FixedSizeDecoder<MigrateEvent> | undefined;\n\nexport function getMigrateEventDecoder(): FixedSizeDecoder<MigrateEvent> {\n\treturn (getMigrateEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['pool', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['baseAmount', getU64Decoder()],\n\t\t['quoteAmount', getU64Decoder()],\n\t\t['realQuoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link MigrateEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseMigrateEvent to decode the matching data\n */\nexport function isMigrateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, MIGRATE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link MigrateEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isMigrateEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseMigrateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): MigrateEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isMigrateEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getMigrateEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tMIGRATE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const PROTOCOL_CLAIM_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([149, 70, 119, 5, 21, 57, 123, 244]);\n\nexport function getProtocolClaimEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type ProtocolClaimEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tplatformConfig: Address;\n\tamount: bigint;\n\tquoteTransferFee: bigint;\n\ttimestamp: bigint;\n};\n\nlet getProtocolClaimEventDecoderCache:\n\t| FixedSizeDecoder<ProtocolClaimEvent>\n\t| undefined;\n\nexport function getProtocolClaimEventDecoder(): FixedSizeDecoder<ProtocolClaimEvent> {\n\treturn (getProtocolClaimEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link ProtocolClaimEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseProtocolClaimEvent to decode the matching data\n */\nexport function isProtocolClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, PROTOCOL_CLAIM_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link ProtocolClaimEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isProtocolClaimEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseProtocolClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ProtocolClaimEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isProtocolClaimEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getProtocolClaimEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const RECYCLE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t63, 115, 223, 82, 233, 208, 57, 35,\n]);\n\nexport function getRecycleEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tRECYCLE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type RecycleEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tplatformConfig: Address;\n\tquoteRecycled: bigint;\n\trentRecycled: bigint;\n\ttimestamp: bigint;\n};\n\nlet getRecycleEventDecoderCache: FixedSizeDecoder<RecycleEvent> | undefined;\n\nexport function getRecycleEventDecoder(): FixedSizeDecoder<RecycleEvent> {\n\treturn (getRecycleEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['quoteRecycled', getU64Decoder()],\n\t\t['rentRecycled', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link RecycleEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseRecycleEvent to decode the matching data\n */\nexport function isRecycleEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, RECYCLE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link RecycleEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isRecycleEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseRecycleEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): RecycleEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isRecycleEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getRecycleEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tRECYCLE_EVENT_DISCRIMINATOR.length,\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 {\n\taddDecoderSizePrefix,\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBooleanDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU32Decoder,\n\tgetU64Decoder,\n\tgetU8Decoder,\n\tgetUtf8Decoder,\n\ttype Address,\n\ttype Decoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const TOKEN_CREATE_EVENT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([152, 16, 194, 59, 171, 105, 172, 45]);\n\nexport function getTokenCreateEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type TokenCreateEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tbaseDecimals: number;\n\tbaseSupply: bigint;\n\tinitialVirtualBase: bigint;\n\tinitialVirtualQuote: bigint;\n\tinitialRealBase: bigint;\n\tquoteMint: Address;\n\tquoteDecimals: number;\n\tcoinCreator: Address;\n\tcreatorPlatform: string;\n\tcreatorId: string;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tname: string;\n\tsymbol: string;\n\turi: string;\n\tpartner: Address;\n\tisPartner: boolean;\n\tcreationFee: bigint;\n\tvirtualBaseReserves: bigint;\n\tvirtualQuoteReserves: bigint;\n\trealBaseReserves: bigint;\n\trealQuoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getTokenCreateEventDecoderCache: Decoder<TokenCreateEvent> | undefined;\n\nexport function getTokenCreateEventDecoder(): Decoder<TokenCreateEvent> {\n\treturn (getTokenCreateEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['baseDecimals', getU8Decoder()],\n\t\t['baseSupply', getU64Decoder()],\n\t\t['initialVirtualBase', getU64Decoder()],\n\t\t['initialVirtualQuote', getU64Decoder()],\n\t\t['initialRealBase', getU64Decoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['quoteDecimals', getU8Decoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t[\n\t\t\t'creatorPlatform',\n\t\t\taddDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n\t\t],\n\t\t['creatorId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['symbol', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['uri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['partner', getAddressDecoder()],\n\t\t['isPartner', getBooleanDecoder()],\n\t\t['creationFee', getU64Decoder()],\n\t\t['virtualBaseReserves', getU64Decoder()],\n\t\t['virtualQuoteReserves', getU64Decoder()],\n\t\t['realBaseReserves', getU64Decoder()],\n\t\t['realQuoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link TokenCreateEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseTokenCreateEvent to decode the matching data\n */\nexport function isTokenCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, TOKEN_CREATE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link TokenCreateEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isTokenCreateEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseTokenCreateEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): TokenCreateEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isTokenCreateEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getTokenCreateEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBooleanDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetTradeDirectionDecoder,\n\ttype TradeDirection,\n} from '../types/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const TRADE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t189, 219, 127, 211, 78, 230, 97, 238,\n]);\n\nexport function getTradeEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tTRADE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type TradeEvent = {\n\tbondingCurve: Address;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\tuser: Address;\n\tcoinCreator: Address;\n\tcreatorFeeConfig: Address;\n\tplatformConfig: Address;\n\tbaseAmount: bigint;\n\tquoteAmountGross: bigint;\n\tquoteAmountNet: bigint;\n\ttradeDirection: TradeDirection;\n\tpartner: Address;\n\tisPartner: boolean;\n\tprotocolFee: bigint;\n\tcreatorFee: bigint;\n\tbaseTransferFee: bigint;\n\tquoteTransferFee: bigint;\n\tvirtualBaseReserves: bigint;\n\tvirtualQuoteReserves: bigint;\n\trealBaseReserves: bigint;\n\trealQuoteReserves: bigint;\n\ttimestamp: bigint;\n};\n\nlet getTradeEventDecoderCache: FixedSizeDecoder<TradeEvent> | undefined;\n\nexport function getTradeEventDecoder(): FixedSizeDecoder<TradeEvent> {\n\treturn (getTradeEventDecoderCache ??= getStructDecoder([\n\t\t['bondingCurve', getAddressDecoder()],\n\t\t['baseMint', getAddressDecoder()],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['user', getAddressDecoder()],\n\t\t['coinCreator', getAddressDecoder()],\n\t\t['creatorFeeConfig', getAddressDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['baseAmount', getU64Decoder()],\n\t\t['quoteAmountGross', getU64Decoder()],\n\t\t['quoteAmountNet', getU64Decoder()],\n\t\t['tradeDirection', getTradeDirectionDecoder()],\n\t\t['partner', getAddressDecoder()],\n\t\t['isPartner', getBooleanDecoder()],\n\t\t['protocolFee', getU64Decoder()],\n\t\t['creatorFee', getU64Decoder()],\n\t\t['baseTransferFee', getU64Decoder()],\n\t\t['quoteTransferFee', getU64Decoder()],\n\t\t['virtualBaseReserves', getU64Decoder()],\n\t\t['virtualQuoteReserves', getU64Decoder()],\n\t\t['realBaseReserves', getU64Decoder()],\n\t\t['realQuoteReserves', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link TradeEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseTradeEvent to decode the matching data\n */\nexport function isTradeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, TRADE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link TradeEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_LAUNCHPAD_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isTradeEvent to check without decoding\n * @see identifySendLaunchpadEvent to identify any program event\n * @see parseSendLaunchpadEvent\n */\nexport function parseTradeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): TradeEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isTradeEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getTradeEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tTRADE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\nimport {\n\tCOMPLETE_EVENT_DISCRIMINATOR,\n\tgetCompleteEventDecoder,\n\ttype CompleteEvent,\n} from './completeEvent.js';\nimport {\n\tCREATOR_CLAIM_EVENT_DISCRIMINATOR,\n\tgetCreatorClaimEventDecoder,\n\ttype CreatorClaimEvent,\n} from './creatorClaimEvent.js';\nimport {\n\tgetMigrateEventDecoder,\n\tMIGRATE_EVENT_DISCRIMINATOR,\n\ttype MigrateEvent,\n} from './migrateEvent.js';\nimport {\n\tgetProtocolClaimEventDecoder,\n\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR,\n\ttype ProtocolClaimEvent,\n} from './protocolClaimEvent.js';\nimport {\n\tgetRecycleEventDecoder,\n\tRECYCLE_EVENT_DISCRIMINATOR,\n\ttype RecycleEvent,\n} from './recycleEvent.js';\nimport {\n\tgetTokenCreateEventDecoder,\n\tTOKEN_CREATE_EVENT_DISCRIMINATOR,\n\ttype TokenCreateEvent,\n} from './tokenCreateEvent.js';\nimport {\n\tgetTradeEventDecoder,\n\tTRADE_EVENT_DISCRIMINATOR,\n\ttype TradeEvent,\n} from './tradeEvent.js';\n\n/** Event kinds of the sendLaunchpad program. */\nexport type SendLaunchpadEventType =\n\t| 'completeEvent'\n\t| 'creatorClaimEvent'\n\t| 'migrateEvent'\n\t| 'protocolClaimEvent'\n\t| 'recycleEvent'\n\t| 'tokenCreateEvent'\n\t| 'tradeEvent';\n\n/**\n * Identifies sendLaunchpad event data by its discriminators, without decoding.\n * Returns `null` when the event was emitted by another program or no known event matches.\n * Never throws.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function identifySendLaunchpadEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendLaunchpadEventType | null {\n\tif (\n\t\t'data' in event &&\n\t\tevent.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in event ? event.data : event;\n\tif (containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)) {\n\t\tif (containsBytes(data, COMPLETE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'completeEvent';\n\t\t}\n\t\tif (containsBytes(data, CREATOR_CLAIM_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'creatorClaimEvent';\n\t\t}\n\t\tif (containsBytes(data, MIGRATE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'migrateEvent';\n\t\t}\n\t\tif (containsBytes(data, PROTOCOL_CLAIM_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'protocolClaimEvent';\n\t\t}\n\t\tif (containsBytes(data, RECYCLE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'recycleEvent';\n\t\t}\n\t\tif (containsBytes(data, TOKEN_CREATE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'tokenCreateEvent';\n\t\t}\n\t\tif (containsBytes(data, TRADE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'tradeEvent';\n\t\t}\n\t}\n\treturn null;\n}\n\n/** Parsed sendLaunchpad event: the event kind tag plus its decoded payload. */\nexport type ParsedSendLaunchpadEvent =\n\t| { eventType: 'completeEvent'; data: CompleteEvent }\n\t| { eventType: 'creatorClaimEvent'; data: CreatorClaimEvent }\n\t| { eventType: 'migrateEvent'; data: MigrateEvent }\n\t| { eventType: 'protocolClaimEvent'; data: ProtocolClaimEvent }\n\t| { eventType: 'recycleEvent'; data: RecycleEvent }\n\t| { eventType: 'tokenCreateEvent'; data: TokenCreateEvent }\n\t| { eventType: 'tradeEvent'; data: TradeEvent };\n\n/**\n * Parses sendLaunchpad event data into its event kind and decoded payload.\n * Returns `null` when the event was emitted by another program or no known event matches;\n * throws if a matched event fails to decode.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function parseSendLaunchpadEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ParsedSendLaunchpadEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tconst eventType = identifySendLaunchpadEvent(checkedEvent);\n\tif (eventType === null) return null;\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\tswitch (eventType) {\n\t\tcase 'completeEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'completeEvent',\n\t\t\t\tdata: getCompleteEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tCOMPLETE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'creatorClaimEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'creatorClaimEvent',\n\t\t\t\tdata: getCreatorClaimEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tCREATOR_CLAIM_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'migrateEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'migrateEvent',\n\t\t\t\tdata: getMigrateEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tMIGRATE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'protocolClaimEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'protocolClaimEvent',\n\t\t\t\tdata: getProtocolClaimEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tPROTOCOL_CLAIM_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'recycleEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'recycleEvent',\n\t\t\t\tdata: getRecycleEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tRECYCLE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'tokenCreateEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'tokenCreateEvent',\n\t\t\t\tdata: getTokenCreateEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tTOKEN_CREATE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'tradeEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'tradeEvent',\n\t\t\t\tdata: getTradeEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tTRADE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\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\nexport * from './anchorEventCpiDiscriminator.framing.js';\nexport * from './completeEvent.js';\nexport * from './creatorClaimEvent.js';\nexport * from './migrateEvent.js';\nexport * from './protocolClaimEvent.js';\nexport * from './recycleEvent.js';\nexport * from './sendLaunchpad.events.js';\nexport * from './tokenCreateEvent.js';\nexport * from './tradeEvent.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CLAIM_CREATOR_FEES_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([0, 23, 125, 234, 156, 118, 134, 89]);\n\nexport function getClaimCreatorFeesDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCLAIM_CREATOR_FEES_DISCRIMINATOR,\n\t);\n}\n\nexport type ClaimCreatorFeesInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountClaimer extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountCreatorFeeConfig extends string | AccountMeta<string> = string,\n\tTAccountNexusGlobalConfig extends string | AccountMeta<string> =\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountDestinationOwner extends string | AccountMeta<string> = string,\n\tTAccountDestination extends string | AccountMeta<string> = string,\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountClaimer extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountClaimer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountClaimer>\n\t\t\t\t: TAccountClaimer,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountCreatorFeeConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountCreatorFeeConfig>\n\t\t\t\t: TAccountCreatorFeeConfig,\n\t\t\tTAccountNexusGlobalConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusGlobalConfig>\n\t\t\t\t: TAccountNexusGlobalConfig,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountDestinationOwner extends string\n\t\t\t\t? ReadonlyAccount<TAccountDestinationOwner>\n\t\t\t\t: TAccountDestinationOwner,\n\t\t\tTAccountDestination extends string\n\t\t\t\t? WritableAccount<TAccountDestination>\n\t\t\t\t: TAccountDestination,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type ClaimCreatorFeesInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n};\n\nexport type ClaimCreatorFeesInstructionDataArgs = {};\n\nexport function getClaimCreatorFeesInstructionDataEncoder(): FixedSizeEncoder<ClaimCreatorFeesInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CLAIM_CREATOR_FEES_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\nexport function getClaimCreatorFeesInstructionDataDecoder(): FixedSizeDecoder<ClaimCreatorFeesInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getClaimCreatorFeesInstructionDataCodec(): FixedSizeCodec<\n\tClaimCreatorFeesInstructionDataArgs,\n\tClaimCreatorFeesInstructionData\n> {\n\treturn combineCodec(\n\t\tgetClaimCreatorFeesInstructionDataEncoder(),\n\t\tgetClaimCreatorFeesInstructionDataDecoder(),\n\t);\n}\n\nexport type ClaimCreatorFeesAsyncInput<\n\tTAccountClaimer extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountDestinationOwner extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tclaimer: TransactionSigner<TAccountClaimer>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tdestinationOwner: Address<TAccountDestinationOwner>;\n\tdestination?: Address<TAccountDestination>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport async function getClaimCreatorFeesInstructionAsync<\n\tTAccountClaimer extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountDestinationOwner extends string,\n\tTAccountDestination extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimCreatorFeesAsyncInput<\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tClaimCreatorFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tclaimer: { value: input.claimer ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdestinationOwner: {\n\t\t\tvalue: input.destinationOwner ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.destination.value) {\n\t\taccounts.destination.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'destinationOwner',\n\t\t\t\t\t\taccounts.destinationOwner.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('claimer', accounts.claimer),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('destinationOwner', accounts.destinationOwner),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimCreatorFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimCreatorFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ClaimCreatorFeesInput<\n\tTAccountClaimer extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountDestinationOwner extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tclaimer: TransactionSigner<TAccountClaimer>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tdestinationOwner: Address<TAccountDestinationOwner>;\n\tdestination: Address<TAccountDestination>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport function getClaimCreatorFeesInstruction<\n\tTAccountClaimer extends string,\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountDestinationOwner extends string,\n\tTAccountDestination extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimCreatorFeesInput<\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): ClaimCreatorFeesInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountClaimer,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountCreatorFeeConfig,\n\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountQuoteVault,\n\tTAccountDestinationOwner,\n\tTAccountDestination,\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tclaimer: { value: input.claimer ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tnexusGlobalConfig: { value: null, isWritable: false },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdestinationOwner: {\n\t\t\tvalue: input.destinationOwner ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.nexusGlobalConfig.value) {\n\t\taccounts.nexusGlobalConfig.value =\n\t\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('claimer', accounts.claimer),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('nexusGlobalConfig', accounts.nexusGlobalConfig),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('destinationOwner', accounts.destinationOwner),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimCreatorFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimCreatorFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountClaimer,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountCreatorFeeConfig,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountDestinationOwner,\n\t\tTAccountDestination,\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedClaimCreatorFeesInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tclaimer: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tbondingCurve: TAccountMetas[2];\n\t\tcreatorFeeConfig: TAccountMetas[3];\n\t\tnexusGlobalConfig: TAccountMetas[4];\n\t\tbaseMint: TAccountMetas[5];\n\t\tquoteMint: TAccountMetas[6];\n\t\tquoteVault: TAccountMetas[7];\n\t\tdestinationOwner: TAccountMetas[8];\n\t\tdestination: TAccountMetas[9];\n\t\tquoteTokenProgram: TAccountMetas[10];\n\t\tassociatedTokenProgram: TAccountMetas[11];\n\t\tsystemProgram: TAccountMetas[12];\n\t\teventAuthority: TAccountMetas[13];\n\t\tprogram: TAccountMetas[14];\n\t};\n\tdata: ClaimCreatorFeesInstructionData;\n};\n\nexport function parseClaimCreatorFeesInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedClaimCreatorFeesInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, CLAIM_CREATOR_FEES_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseClaimCreatorFeesInstruction: instruction data does not match the ClaimCreatorFees discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 15) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 15,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tclaimer: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tcreatorFeeConfig: getNextAccount(),\n\t\t\tnexusGlobalConfig: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tdestinationOwner: getNextAccount(),\n\t\t\tdestination: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getClaimCreatorFeesInstructionDataDecoder().decode(\n\t\t\tinstruction.data,\n\t\t),\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 {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\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\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n\tfindRewardAccrualPda,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CLAIM_PROTOCOL_FEES_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([34, 142, 219, 112, 109, 54, 133, 23]);\n\nexport function getClaimProtocolFeesDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\t);\n}\n\nexport type ClaimProtocolFeesInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountNexusStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountStakingRewardState extends string | AccountMeta<string> = string,\n\tTAccountRewardAccrual extends string | AccountMeta<string> = string,\n\tTAccountStakingVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountNexusStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusStakingConfig>\n\t\t\t\t: TAccountNexusStakingConfig,\n\t\t\tTAccountStakingRewardState extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingRewardState>\n\t\t\t\t: TAccountStakingRewardState,\n\t\t\tTAccountRewardAccrual extends string\n\t\t\t\t? WritableAccount<TAccountRewardAccrual>\n\t\t\t\t: TAccountRewardAccrual,\n\t\t\tTAccountStakingVault extends string\n\t\t\t\t? WritableAccount<TAccountStakingVault>\n\t\t\t\t: TAccountStakingVault,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type ClaimProtocolFeesInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n};\n\nexport type ClaimProtocolFeesInstructionDataArgs = {};\n\nexport function getClaimProtocolFeesInstructionDataEncoder(): FixedSizeEncoder<ClaimProtocolFeesInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\nexport function getClaimProtocolFeesInstructionDataDecoder(): FixedSizeDecoder<ClaimProtocolFeesInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getClaimProtocolFeesInstructionDataCodec(): FixedSizeCodec<\n\tClaimProtocolFeesInstructionDataArgs,\n\tClaimProtocolFeesInstructionData\n> {\n\treturn combineCodec(\n\t\tgetClaimProtocolFeesInstructionDataEncoder(),\n\t\tgetClaimProtocolFeesInstructionDataDecoder(),\n\t);\n}\n\nexport type ClaimProtocolFeesAsyncInput<\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState?: Address<TAccountStakingRewardState>;\n\trewardAccrual?: Address<TAccountRewardAccrual>;\n\tstakingVault?: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport async function getClaimProtocolFeesInstructionAsync<\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimProtocolFeesAsyncInput<\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tClaimProtocolFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.stakingRewardState.value) {\n\t\taccounts.stakingRewardState.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([114, 101, 119, 97, 114, 100]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.rewardAccrual.value) {\n\t\taccounts.rewardAccrual.value = await findRewardAccrualPda({\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.stakingVault.value) {\n\t\taccounts.stakingVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'nexusStakingConfig',\n\t\t\t\t\t\taccounts.nexusStakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimProtocolFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimProtocolFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ClaimProtocolFeesInput<\n\tTAccountPayer extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountNexusStakingConfig extends string = string,\n\tTAccountStakingRewardState extends string = string,\n\tTAccountRewardAccrual extends string = string,\n\tTAccountStakingVault extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tpayer: TransactionSigner<TAccountPayer>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tnexusStakingConfig?: Address<TAccountNexusStakingConfig>;\n\tstakingRewardState: Address<TAccountStakingRewardState>;\n\trewardAccrual: Address<TAccountRewardAccrual>;\n\tstakingVault: Address<TAccountStakingVault>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport function getClaimProtocolFeesInstruction<\n\tTAccountPayer extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountNexusStakingConfig extends string,\n\tTAccountStakingRewardState extends string,\n\tTAccountRewardAccrual extends string,\n\tTAccountStakingVault extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: ClaimProtocolFeesInput<\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): ClaimProtocolFeesInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountPayer,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountQuoteVault,\n\tTAccountNexusStakingConfig,\n\tTAccountStakingRewardState,\n\tTAccountRewardAccrual,\n\tTAccountStakingVault,\n\tTAccountQuoteTokenProgram,\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: false },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tnexusStakingConfig: {\n\t\t\tvalue: input.nexusStakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tstakingRewardState: {\n\t\t\tvalue: input.stakingRewardState ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardAccrual: { value: input.rewardAccrual ?? null, isWritable: true },\n\t\tstakingVault: { value: input.stakingVault ?? null, isWritable: true },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.nexusStakingConfig.value) {\n\t\taccounts.nexusStakingConfig.value =\n\t\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('nexusStakingConfig', accounts.nexusStakingConfig),\n\t\t\tgetAccountMeta('stakingRewardState', accounts.stakingRewardState),\n\t\t\tgetAccountMeta('rewardAccrual', accounts.rewardAccrual),\n\t\t\tgetAccountMeta('stakingVault', accounts.stakingVault),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimProtocolFeesInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimProtocolFeesInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountPayer,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountQuoteVault,\n\t\tTAccountNexusStakingConfig,\n\t\tTAccountStakingRewardState,\n\t\tTAccountRewardAccrual,\n\t\tTAccountStakingVault,\n\t\tTAccountQuoteTokenProgram,\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedClaimProtocolFeesInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tpayer: TAccountMetas[0];\n\t\tbondingCurve: TAccountMetas[1];\n\t\tbaseMint: TAccountMetas[2];\n\t\tquoteMint: TAccountMetas[3];\n\t\tquoteVault: TAccountMetas[4];\n\t\tnexusStakingConfig: TAccountMetas[5];\n\t\tstakingRewardState: TAccountMetas[6];\n\t\trewardAccrual: TAccountMetas[7];\n\t\tstakingVault: TAccountMetas[8];\n\t\tquoteTokenProgram: TAccountMetas[9];\n\t\tsystemProgram: TAccountMetas[10];\n\t\teventAuthority: TAccountMetas[11];\n\t\tprogram: TAccountMetas[12];\n\t};\n\tdata: ClaimProtocolFeesInstructionData;\n};\n\nexport function parseClaimProtocolFeesInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedClaimProtocolFeesInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (\n\t\t!containsBytes(instruction.data, CLAIM_PROTOCOL_FEES_DISCRIMINATOR, 0)\n\t) {\n\t\tconst error = new Error(\n\t\t\t`parseClaimProtocolFeesInstruction: instruction data does not match the ClaimProtocolFees discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 13) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 13,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tpayer: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tnexusStakingConfig: getNextAccount(),\n\t\t\tstakingRewardState: getNextAccount(),\n\t\t\trewardAccrual: getNextAccount(),\n\t\t\tstakingVault: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getClaimProtocolFeesInstructionDataDecoder().decode(\n\t\t\tinstruction.data,\n\t\t),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\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\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindBondingCurvePda,\n\tMIGRATION_AUTHORITY_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const MIGRATE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t155, 234, 231, 146, 236, 158, 162, 30,\n]);\n\nexport function getMigrateDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(MIGRATE_DISCRIMINATOR);\n}\n\nexport type MigrateInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountCaller extends string | AccountMeta<string> = string,\n\tTAccountBondingCurve extends string | AccountMeta<string> = string,\n\tTAccountBaseMint extends string | AccountMeta<string> = string,\n\tTAccountQuoteMint extends string | AccountMeta<string> = string,\n\tTAccountBaseVault extends string | AccountMeta<string> = string,\n\tTAccountQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountDexProgram extends string | AccountMeta<string> =\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\tTAccountMigrationAuthority extends string | AccountMeta<string> =\n\t\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V',\n\tTAccountPool extends string | AccountMeta<string> = string,\n\tTAccountLpMint extends string | AccountMeta<string> = string,\n\tTAccountPoolBaseVault extends string | AccountMeta<string> = string,\n\tTAccountPoolQuoteVault extends string | AccountMeta<string> = string,\n\tTAccountPoolLpAccount extends string | AccountMeta<string> = string,\n\tTAccountDexEventAuthority extends string | AccountMeta<string> =\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\tTAccountNexusProgram extends string | AccountMeta<string> =\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTAccountCreatorFeeConfig extends string | AccountMeta<string> = string,\n\tTAccountBaseTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram extends string | AccountMeta<string> = string,\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountCaller extends string\n\t\t\t\t? WritableSignerAccount<TAccountCaller> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountCaller>\n\t\t\t\t: TAccountCaller,\n\t\t\tTAccountBondingCurve extends string\n\t\t\t\t? WritableAccount<TAccountBondingCurve>\n\t\t\t\t: TAccountBondingCurve,\n\t\t\tTAccountBaseMint extends string\n\t\t\t\t? WritableAccount<TAccountBaseMint>\n\t\t\t\t: TAccountBaseMint,\n\t\t\tTAccountQuoteMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteMint>\n\t\t\t\t: TAccountQuoteMint,\n\t\t\tTAccountBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountBaseVault>\n\t\t\t\t: TAccountBaseVault,\n\t\t\tTAccountQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountQuoteVault>\n\t\t\t\t: TAccountQuoteVault,\n\t\t\tTAccountDexProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountDexProgram>\n\t\t\t\t: TAccountDexProgram,\n\t\t\tTAccountMigrationAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountMigrationAuthority>\n\t\t\t\t: TAccountMigrationAuthority,\n\t\t\tTAccountPool extends string\n\t\t\t\t? WritableAccount<TAccountPool>\n\t\t\t\t: TAccountPool,\n\t\t\tTAccountLpMint extends string\n\t\t\t\t? WritableAccount<TAccountLpMint>\n\t\t\t\t: TAccountLpMint,\n\t\t\tTAccountPoolBaseVault extends string\n\t\t\t\t? WritableAccount<TAccountPoolBaseVault>\n\t\t\t\t: TAccountPoolBaseVault,\n\t\t\tTAccountPoolQuoteVault extends string\n\t\t\t\t? WritableAccount<TAccountPoolQuoteVault>\n\t\t\t\t: TAccountPoolQuoteVault,\n\t\t\tTAccountPoolLpAccount extends string\n\t\t\t\t? WritableAccount<TAccountPoolLpAccount>\n\t\t\t\t: TAccountPoolLpAccount,\n\t\t\tTAccountDexEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountDexEventAuthority>\n\t\t\t\t: TAccountDexEventAuthority,\n\t\t\tTAccountNexusProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountNexusProgram>\n\t\t\t\t: TAccountNexusProgram,\n\t\t\tTAccountCreatorFeeConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountCreatorFeeConfig>\n\t\t\t\t: TAccountCreatorFeeConfig,\n\t\t\tTAccountBaseTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountBaseTokenProgram>\n\t\t\t\t: TAccountBaseTokenProgram,\n\t\t\tTAccountQuoteTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountQuoteTokenProgram>\n\t\t\t\t: TAccountQuoteTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type MigrateInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type MigrateInstructionDataArgs = {};\n\nexport function getMigrateInstructionDataEncoder(): FixedSizeEncoder<MigrateInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: MIGRATE_DISCRIMINATOR }),\n\t);\n}\n\nexport function getMigrateInstructionDataDecoder(): FixedSizeDecoder<MigrateInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getMigrateInstructionDataCodec(): FixedSizeCodec<\n\tMigrateInstructionDataArgs,\n\tMigrateInstructionData\n> {\n\treturn combineCodec(\n\t\tgetMigrateInstructionDataEncoder(),\n\t\tgetMigrateInstructionDataDecoder(),\n\t);\n}\n\nexport type MigrateAsyncInput<\n\tTAccountCaller extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountLpMint extends string = string,\n\tTAccountPoolBaseVault extends string = string,\n\tTAccountPoolQuoteVault extends string = string,\n\tTAccountPoolLpAccount extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tcaller: TransactionSigner<TAccountCaller>;\n\tbondingCurve?: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault?: Address<TAccountBaseVault>;\n\tquoteVault?: Address<TAccountQuoteVault>;\n\tpool?: Address<TAccountPool>;\n\tlpMint?: Address<TAccountLpMint>;\n\tpoolBaseVault: Address<TAccountPoolBaseVault>;\n\tpoolQuoteVault: Address<TAccountPoolQuoteVault>;\n\tpoolLpAccount: Address<TAccountPoolLpAccount>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport async function getMigrateInstructionAsync<\n\tTAccountCaller extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountPool extends string,\n\tTAccountLpMint extends string,\n\tTAccountPoolBaseVault extends string,\n\tTAccountPoolQuoteVault extends string,\n\tTAccountPoolLpAccount extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: MigrateAsyncInput<\n\t\tTAccountCaller,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountPool,\n\t\tTAccountLpMint,\n\t\tTAccountPoolBaseVault,\n\t\tTAccountPoolQuoteVault,\n\t\tTAccountPoolLpAccount,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): Promise<\n\tMigrateInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountCaller,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\t\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V',\n\t\tTAccountPool,\n\t\tTAccountLpMint,\n\t\tTAccountPoolBaseVault,\n\t\tTAccountPoolQuoteVault,\n\t\tTAccountPoolLpAccount,\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\tTAccountCreatorFeeConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tcaller: { value: input.caller ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: true },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdexProgram: { value: null, isWritable: false },\n\t\tmigrationAuthority: { value: null, isWritable: false },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tlpMint: { value: input.lpMint ?? null, isWritable: true },\n\t\tpoolBaseVault: { value: input.poolBaseVault ?? null, isWritable: true },\n\t\tpoolQuoteVault: {\n\t\t\tvalue: input.poolQuoteVault ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolLpAccount: { value: input.poolLpAccount ?? null, isWritable: true },\n\t\tdexEventAuthority: { value: null, isWritable: false },\n\t\tnexusProgram: { value: null, isWritable: false },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.bondingCurve.value) {\n\t\taccounts.bondingCurve.value = await findBondingCurvePda({\n\t\t\tbaseMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'baseMint',\n\t\t\t\taccounts.baseMint.value,\n\t\t\t),\n\t\t\tquoteMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'quoteMint',\n\t\t\t\taccounts.quoteMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.baseVault.value) {\n\t\taccounts.baseVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.quoteVault.value) {\n\t\taccounts.quoteVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'bondingCurve',\n\t\t\t\t\t\taccounts.bondingCurve.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteTokenProgram',\n\t\t\t\t\t\taccounts.quoteTokenProgram.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.dexProgram.value) {\n\t\taccounts.dexProgram.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\tif (!accounts.migrationAuthority.value) {\n\t\taccounts.migrationAuthority.value = MIGRATION_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.pool.value) {\n\t\taccounts.pool.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(new Uint8Array([112, 111, 111, 108])),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.lpMint.value) {\n\t\taccounts.lpMint.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([108, 112, 95, 109, 105, 110, 116]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'baseMint',\n\t\t\t\t\t\taccounts.baseMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'quoteMint',\n\t\t\t\t\t\taccounts.quoteMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.dexEventAuthority.value) {\n\t\taccounts.dexEventAuthority.value =\n\t\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t' as Address<'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t'>;\n\t}\n\tif (!accounts.nexusProgram.value) {\n\t\taccounts.nexusProgram.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('caller', accounts.caller),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('dexProgram', accounts.dexProgram),\n\t\t\tgetAccountMeta('migrationAuthority', accounts.migrationAuthority),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('lpMint', accounts.lpMint),\n\t\t\tgetAccountMeta('poolBaseVault', accounts.poolBaseVault),\n\t\t\tgetAccountMeta('poolQuoteVault', accounts.poolQuoteVault),\n\t\t\tgetAccountMeta('poolLpAccount', accounts.poolLpAccount),\n\t\t\tgetAccountMeta('dexEventAuthority', accounts.dexEventAuthority),\n\t\t\tgetAccountMeta('nexusProgram', accounts.nexusProgram),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getMigrateInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as MigrateInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountCaller,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\t\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V',\n\t\tTAccountPool,\n\t\tTAccountLpMint,\n\t\tTAccountPoolBaseVault,\n\t\tTAccountPoolQuoteVault,\n\t\tTAccountPoolLpAccount,\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\tTAccountCreatorFeeConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type MigrateInput<\n\tTAccountCaller extends string = string,\n\tTAccountBondingCurve extends string = string,\n\tTAccountBaseMint extends string = string,\n\tTAccountQuoteMint extends string = string,\n\tTAccountBaseVault extends string = string,\n\tTAccountQuoteVault extends string = string,\n\tTAccountPool extends string = string,\n\tTAccountLpMint extends string = string,\n\tTAccountPoolBaseVault extends string = string,\n\tTAccountPoolQuoteVault extends string = string,\n\tTAccountPoolLpAccount extends string = string,\n\tTAccountCreatorFeeConfig extends string = string,\n\tTAccountQuoteTokenProgram extends string = string,\n> = {\n\tcaller: TransactionSigner<TAccountCaller>;\n\tbondingCurve: Address<TAccountBondingCurve>;\n\tbaseMint: Address<TAccountBaseMint>;\n\tquoteMint: Address<TAccountQuoteMint>;\n\tbaseVault: Address<TAccountBaseVault>;\n\tquoteVault: Address<TAccountQuoteVault>;\n\tpool: Address<TAccountPool>;\n\tlpMint: Address<TAccountLpMint>;\n\tpoolBaseVault: Address<TAccountPoolBaseVault>;\n\tpoolQuoteVault: Address<TAccountPoolQuoteVault>;\n\tpoolLpAccount: Address<TAccountPoolLpAccount>;\n\tcreatorFeeConfig: Address<TAccountCreatorFeeConfig>;\n\tquoteTokenProgram: Address<TAccountQuoteTokenProgram>;\n};\n\nexport function getMigrateInstruction<\n\tTAccountCaller extends string,\n\tTAccountBondingCurve extends string,\n\tTAccountBaseMint extends string,\n\tTAccountQuoteMint extends string,\n\tTAccountBaseVault extends string,\n\tTAccountQuoteVault extends string,\n\tTAccountPool extends string,\n\tTAccountLpMint extends string,\n\tTAccountPoolBaseVault extends string,\n\tTAccountPoolQuoteVault extends string,\n\tTAccountPoolLpAccount extends string,\n\tTAccountCreatorFeeConfig extends string,\n\tTAccountQuoteTokenProgram extends string,\n>(\n\tinput: MigrateInput<\n\t\tTAccountCaller,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\tTAccountPool,\n\t\tTAccountLpMint,\n\t\tTAccountPoolBaseVault,\n\t\tTAccountPoolQuoteVault,\n\t\tTAccountPoolLpAccount,\n\t\tTAccountCreatorFeeConfig,\n\t\tTAccountQuoteTokenProgram\n\t>,\n): MigrateInstruction<\n\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountCaller,\n\tTAccountBondingCurve,\n\tTAccountBaseMint,\n\tTAccountQuoteMint,\n\tTAccountBaseVault,\n\tTAccountQuoteVault,\n\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V',\n\tTAccountPool,\n\tTAccountLpMint,\n\tTAccountPoolBaseVault,\n\tTAccountPoolQuoteVault,\n\tTAccountPoolLpAccount,\n\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTAccountCreatorFeeConfig,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountQuoteTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n> {\n\t// Program address.\n\tconst programAddress = SEND_LAUNCHPAD_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tcaller: { value: input.caller ?? null, isWritable: true },\n\t\tbondingCurve: { value: input.bondingCurve ?? null, isWritable: true },\n\t\tbaseMint: { value: input.baseMint ?? null, isWritable: true },\n\t\tquoteMint: { value: input.quoteMint ?? null, isWritable: false },\n\t\tbaseVault: { value: input.baseVault ?? null, isWritable: true },\n\t\tquoteVault: { value: input.quoteVault ?? null, isWritable: true },\n\t\tdexProgram: { value: null, isWritable: false },\n\t\tmigrationAuthority: { value: null, isWritable: false },\n\t\tpool: { value: input.pool ?? null, isWritable: true },\n\t\tlpMint: { value: input.lpMint ?? null, isWritable: true },\n\t\tpoolBaseVault: { value: input.poolBaseVault ?? null, isWritable: true },\n\t\tpoolQuoteVault: {\n\t\t\tvalue: input.poolQuoteVault ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolLpAccount: { value: input.poolLpAccount ?? null, isWritable: true },\n\t\tdexEventAuthority: { value: null, isWritable: false },\n\t\tnexusProgram: { value: null, isWritable: false },\n\t\tcreatorFeeConfig: {\n\t\t\tvalue: input.creatorFeeConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tbaseTokenProgram: { value: null, isWritable: false },\n\t\tquoteTokenProgram: {\n\t\t\tvalue: input.quoteTokenProgram ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.dexProgram.value) {\n\t\taccounts.dexProgram.value =\n\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>;\n\t}\n\tif (!accounts.migrationAuthority.value) {\n\t\taccounts.migrationAuthority.value = MIGRATION_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.dexEventAuthority.value) {\n\t\taccounts.dexEventAuthority.value =\n\t\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t' as Address<'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t'>;\n\t}\n\tif (!accounts.nexusProgram.value) {\n\t\taccounts.nexusProgram.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\tif (!accounts.baseTokenProgram.value) {\n\t\taccounts.baseTokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('caller', accounts.caller),\n\t\t\tgetAccountMeta('bondingCurve', accounts.bondingCurve),\n\t\t\tgetAccountMeta('baseMint', accounts.baseMint),\n\t\t\tgetAccountMeta('quoteMint', accounts.quoteMint),\n\t\t\tgetAccountMeta('baseVault', accounts.baseVault),\n\t\t\tgetAccountMeta('quoteVault', accounts.quoteVault),\n\t\t\tgetAccountMeta('dexProgram', accounts.dexProgram),\n\t\t\tgetAccountMeta('migrationAuthority', accounts.migrationAuthority),\n\t\t\tgetAccountMeta('pool', accounts.pool),\n\t\t\tgetAccountMeta('lpMint', accounts.lpMint),\n\t\t\tgetAccountMeta('poolBaseVault', accounts.poolBaseVault),\n\t\t\tgetAccountMeta('poolQuoteVault', accounts.poolQuoteVault),\n\t\t\tgetAccountMeta('poolLpAccount', accounts.poolLpAccount),\n\t\t\tgetAccountMeta('dexEventAuthority', accounts.dexEventAuthority),\n\t\t\tgetAccountMeta('nexusProgram', accounts.nexusProgram),\n\t\t\tgetAccountMeta('creatorFeeConfig', accounts.creatorFeeConfig),\n\t\t\tgetAccountMeta('baseTokenProgram', accounts.baseTokenProgram),\n\t\t\tgetAccountMeta('quoteTokenProgram', accounts.quoteTokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getMigrateInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as MigrateInstruction<\n\t\ttypeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\t\tTAccountCaller,\n\t\tTAccountBondingCurve,\n\t\tTAccountBaseMint,\n\t\tTAccountQuoteMint,\n\t\tTAccountBaseVault,\n\t\tTAccountQuoteVault,\n\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX',\n\t\t'932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V',\n\t\tTAccountPool,\n\t\tTAccountLpMint,\n\t\tTAccountPoolBaseVault,\n\t\tTAccountPoolQuoteVault,\n\t\tTAccountPoolLpAccount,\n\t\t'4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\t\tTAccountCreatorFeeConfig,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\tTAccountQuoteTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T',\n\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'\n\t>);\n}\n\nexport type ParsedMigrateInstruction<\n\tTProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tcaller: TAccountMetas[0];\n\t\tbondingCurve: TAccountMetas[1];\n\t\tbaseMint: TAccountMetas[2];\n\t\tquoteMint: TAccountMetas[3];\n\t\tbaseVault: TAccountMetas[4];\n\t\tquoteVault: TAccountMetas[5];\n\t\tdexProgram: TAccountMetas[6];\n\t\tmigrationAuthority: TAccountMetas[7];\n\t\tpool: TAccountMetas[8];\n\t\tlpMint: TAccountMetas[9];\n\t\tpoolBaseVault: TAccountMetas[10];\n\t\tpoolQuoteVault: TAccountMetas[11];\n\t\tpoolLpAccount: TAccountMetas[12];\n\t\tdexEventAuthority: TAccountMetas[13];\n\t\tnexusProgram: TAccountMetas[14];\n\t\tcreatorFeeConfig: TAccountMetas[15];\n\t\tbaseTokenProgram: TAccountMetas[16];\n\t\tquoteTokenProgram: TAccountMetas[17];\n\t\tassociatedTokenProgram: TAccountMetas[18];\n\t\tsystemProgram: TAccountMetas[19];\n\t\teventAuthority: TAccountMetas[20];\n\t\tprogram: TAccountMetas[21];\n\t};\n\tdata: MigrateInstructionData;\n};\n\nexport function parseMigrateInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedMigrateInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_LAUNCHPAD_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, MIGRATE_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseMigrateInstruction: instruction data does not match the Migrate discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 22) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 22,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tcaller: getNextAccount(),\n\t\t\tbondingCurve: getNextAccount(),\n\t\t\tbaseMint: getNextAccount(),\n\t\t\tquoteMint: getNextAccount(),\n\t\t\tbaseVault: getNextAccount(),\n\t\t\tquoteVault: getNextAccount(),\n\t\t\tdexProgram: getNextAccount(),\n\t\t\tmigrationAuthority: getNextAccount(),\n\t\t\tpool: getNextAccount(),\n\t\t\tlpMint: getNextAccount(),\n\t\t\tpoolBaseVault: getNextAccount(),\n\t\t\tpoolQuoteVault: getNextAccount(),\n\t\t\tpoolLpAccount: getNextAccount(),\n\t\t\tdexEventAuthority: getNextAccount(),\n\t\t\tnexusProgram: getNextAccount(),\n\t\t\tcreatorFeeConfig: getNextAccount(),\n\t\t\tbaseTokenProgram: getNextAccount(),\n\t\t\tquoteTokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getMigrateInstructionDataDecoder().decode(instruction.data),\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 {\n\tassertIsInstructionWithAccounts,\n\tcontainsBytes,\n\ttype Address,\n\ttype Instruction,\n\ttype InstructionWithData,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_LAUNCHPAD_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tBUY_EXACT_IN_DISCRIMINATOR,\n\tparseBuyExactInInstruction,\n\ttype ParsedBuyExactInInstruction,\n} from './buyExactIn.js';\nimport {\n\tBUY_EXACT_OUT_DISCRIMINATOR,\n\tparseBuyExactOutInstruction,\n\ttype ParsedBuyExactOutInstruction,\n} from './buyExactOut.js';\nimport {\n\tCLAIM_CREATOR_FEES_DISCRIMINATOR,\n\tparseClaimCreatorFeesInstruction,\n\ttype ParsedClaimCreatorFeesInstruction,\n} from './claimCreatorFees.js';\nimport {\n\tCLAIM_PROTOCOL_FEES_DISCRIMINATOR,\n\tparseClaimProtocolFeesInstruction,\n\ttype ParsedClaimProtocolFeesInstruction,\n} from './claimProtocolFees.js';\nimport {\n\tCREATE_TOKEN_DISCRIMINATOR,\n\tparseCreateTokenInstruction,\n\ttype ParsedCreateTokenInstruction,\n} from './createToken.js';\nimport {\n\tMIGRATE_DISCRIMINATOR,\n\tparseMigrateInstruction,\n\ttype ParsedMigrateInstruction,\n} from './migrate.js';\nimport {\n\tparseSellExactInInstruction,\n\tSELL_EXACT_IN_DISCRIMINATOR,\n\ttype ParsedSellExactInInstruction,\n} from './sellExactIn.js';\nimport {\n\tparseSellExactOutInstruction,\n\tSELL_EXACT_OUT_DISCRIMINATOR,\n\ttype ParsedSellExactOutInstruction,\n} from './sellExactOut.js';\n\n/** Instruction kinds of the sendLaunchpad program. */\nexport type SendLaunchpadInstructionType =\n\t| 'buyExactIn'\n\t| 'buyExactOut'\n\t| 'claimCreatorFees'\n\t| 'claimProtocolFees'\n\t| 'createToken'\n\t| 'migrate'\n\t| 'sellExactIn'\n\t| 'sellExactOut';\n\n/**\n * Identifies sendLaunchpad instruction data by its discriminators.\n * Returns `null` when the instruction is for another program or the data matches no known instruction.\n */\nexport function identifySendLaunchpadInstruction(\n\tinstruction:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendLaunchpadInstructionType | null {\n\tif (\n\t\t'data' in instruction &&\n\t\tinstruction.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in instruction ? instruction.data : instruction;\n\tif (containsBytes(data, BUY_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\treturn 'buyExactIn';\n\t}\n\tif (containsBytes(data, BUY_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\treturn 'buyExactOut';\n\t}\n\tif (containsBytes(data, CLAIM_CREATOR_FEES_DISCRIMINATOR, 0)) {\n\t\treturn 'claimCreatorFees';\n\t}\n\tif (containsBytes(data, CLAIM_PROTOCOL_FEES_DISCRIMINATOR, 0)) {\n\t\treturn 'claimProtocolFees';\n\t}\n\tif (containsBytes(data, CREATE_TOKEN_DISCRIMINATOR, 0)) {\n\t\treturn 'createToken';\n\t}\n\tif (containsBytes(data, MIGRATE_DISCRIMINATOR, 0)) {\n\t\treturn 'migrate';\n\t}\n\tif (containsBytes(data, SELL_EXACT_IN_DISCRIMINATOR, 0)) {\n\t\treturn 'sellExactIn';\n\t}\n\tif (containsBytes(data, SELL_EXACT_OUT_DISCRIMINATOR, 0)) {\n\t\treturn 'sellExactOut';\n\t}\n\treturn null;\n}\n\n/** Parsed sendLaunchpad instruction: the instruction kind tag plus its parsed accounts and data. */\nexport type ParsedSendLaunchpadInstruction<\n\tTProgram extends string = '5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP',\n> =\n\t| ({\n\t\t\tinstructionType: 'buyExactIn';\n\t } & ParsedBuyExactInInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'buyExactOut';\n\t } & ParsedBuyExactOutInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'claimCreatorFees';\n\t } & ParsedClaimCreatorFeesInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'claimProtocolFees';\n\t } & ParsedClaimProtocolFeesInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'createToken';\n\t } & ParsedCreateTokenInstruction<TProgram>)\n\t| ({ instructionType: 'migrate' } & ParsedMigrateInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'sellExactIn';\n\t } & ParsedSellExactInInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'sellExactOut';\n\t } & ParsedSellExactOutInstruction<TProgram>);\n\n/**\n * Parses a sendLaunchpad instruction into its kind tag plus parsed accounts and data.\n * Returns `null` when the instruction is for another program or no known instruction matches;\n * throws if a matched instruction fails to parse.\n */\nexport function parseSendLaunchpadInstruction<TProgram extends string>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSendLaunchpadInstruction<TProgram> | null {\n\tif (instruction.programAddress !== SEND_LAUNCHPAD_PROGRAM_ADDRESS)\n\t\treturn null;\n\tconst instructionType = identifySendLaunchpadInstruction(instruction);\n\tif (instructionType === null) return null;\n\tswitch (instructionType) {\n\t\tcase 'buyExactIn': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'buyExactIn',\n\t\t\t\t...parseBuyExactInInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'buyExactOut': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'buyExactOut',\n\t\t\t\t...parseBuyExactOutInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'claimCreatorFees': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'claimCreatorFees',\n\t\t\t\t...parseClaimCreatorFeesInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'claimProtocolFees': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'claimProtocolFees',\n\t\t\t\t...parseClaimProtocolFeesInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'createToken': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'createToken',\n\t\t\t\t...parseCreateTokenInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'migrate': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'migrate',\n\t\t\t\t...parseMigrateInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'sellExactIn': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'sellExactIn',\n\t\t\t\t...parseSellExactInInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'sellExactOut': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'sellExactOut',\n\t\t\t\t...parseSellExactOutInstruction(instruction),\n\t\t\t};\n\t\t}\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\nexport * from './buyExactIn.js';\nexport * from './buyExactOut.js';\nexport * from './claimCreatorFees.js';\nexport * from './claimProtocolFees.js';\nexport * from './createToken.js';\nexport * from './migrate.js';\nexport * from './sellExactIn.js';\nexport * from './sellExactOut.js';\nexport * from './sendLaunchpad.instructions.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\textendClient,\n\ttype ClientWithPayer,\n\ttype ClientWithRpc,\n\ttype ClientWithTransactionPlanning,\n\ttype ClientWithTransactionSending,\n\ttype ExtendedClient,\n\ttype GetAccountInfoApi,\n\ttype GetMultipleAccountsApi,\n} from '@solana/kit';\nimport {\n\taddSelfPlanAndSendFunctions,\n\ttype SelfFetchFunctions,\n\ttype SelfPlanAndSendFunctions,\n} from '@solana/program-client-core';\nimport {\n\tfetchAllBondingCurve,\n\tfetchAllGlobalConfig,\n\tfetchAllMaybeBondingCurve,\n\tfetchAllMaybeGlobalConfig,\n\tfetchAllMaybeRewardAccrual,\n\tfetchAllRewardAccrual,\n\tfetchBondingCurve,\n\tfetchGlobalConfig,\n\tfetchMaybeBondingCurve,\n\tfetchMaybeGlobalConfig,\n\tfetchMaybeRewardAccrual,\n\tfetchRewardAccrual,\n\tgetBondingCurveCodec,\n\tgetGlobalConfigCodec,\n\tgetRewardAccrualCodec,\n\tidentifySendLaunchpadAccount,\n\ttype BondingCurve,\n\ttype BondingCurveArgs,\n\ttype GlobalConfig,\n\ttype GlobalConfigArgs,\n\ttype RewardAccrual,\n\ttype RewardAccrualArgs,\n} from '../accounts/index.js';\nimport {\n\tgetCompleteEventDecoder,\n\tgetCreatorClaimEventDecoder,\n\tgetMigrateEventDecoder,\n\tgetProtocolClaimEventDecoder,\n\tgetRecycleEventDecoder,\n\tgetTokenCreateEventDecoder,\n\tgetTradeEventDecoder,\n} from '../events/index.js';\nimport {\n\tgetBuyExactInInstructionAsync,\n\tgetBuyExactOutInstructionAsync,\n\tgetClaimCreatorFeesInstructionAsync,\n\tgetClaimProtocolFeesInstructionAsync,\n\tgetCreateTokenInstructionAsync,\n\tgetMigrateInstructionAsync,\n\tgetSellExactInInstructionAsync,\n\tgetSellExactOutInstructionAsync,\n\tidentifySendLaunchpadInstruction,\n\tparseSendLaunchpadInstruction,\n\ttype BuyExactInAsyncInput,\n\ttype BuyExactOutAsyncInput,\n\ttype ClaimCreatorFeesAsyncInput,\n\ttype ClaimProtocolFeesAsyncInput,\n\ttype CreateTokenAsyncInput,\n\ttype MigrateAsyncInput,\n\ttype SellExactInAsyncInput,\n\ttype SellExactOutAsyncInput,\n} from '../instructions/index.js';\nimport {\n\tfindBondingCurvePda,\n\tfindEventAuthorityPda,\n\tfindGlobalConfigPda,\n\tfindMigrationAuthorityPda,\n\tfindRewardAccrualPda,\n\tfindWsolRewardAccrualPda,\n} from '../pdas/index.js';\n\nexport type SendLaunchpadPlugin = {\n\taccounts: SendLaunchpadPluginAccounts;\n\tevents: SendLaunchpadPluginEvents;\n\tinstructions: SendLaunchpadPluginInstructions;\n\tpdas: SendLaunchpadPluginPdas;\n\tidentifyAccount: typeof identifySendLaunchpadAccount;\n\tidentifyInstruction: typeof identifySendLaunchpadInstruction;\n\tparseInstruction: typeof parseSendLaunchpadInstruction;\n};\n\nexport type SendLaunchpadPluginAccounts = {\n\tbondingCurve: ReturnType<typeof getBondingCurveCodec> &\n\t\tSelfFetchFunctions<BondingCurveArgs, BondingCurve>;\n\tglobalConfig: ReturnType<typeof getGlobalConfigCodec> &\n\t\tSelfFetchFunctions<GlobalConfigArgs, GlobalConfig>;\n\trewardAccrual: ReturnType<typeof getRewardAccrualCodec> &\n\t\tSelfFetchFunctions<RewardAccrualArgs, RewardAccrual>;\n};\n\nexport type SendLaunchpadPluginEvents = {\n\tcompleteEvent: ReturnType<typeof getCompleteEventDecoder>;\n\tcreatorClaimEvent: ReturnType<typeof getCreatorClaimEventDecoder>;\n\tmigrateEvent: ReturnType<typeof getMigrateEventDecoder>;\n\tprotocolClaimEvent: ReturnType<typeof getProtocolClaimEventDecoder>;\n\trecycleEvent: ReturnType<typeof getRecycleEventDecoder>;\n\ttokenCreateEvent: ReturnType<typeof getTokenCreateEventDecoder>;\n\ttradeEvent: ReturnType<typeof getTradeEventDecoder>;\n};\n\nexport type SendLaunchpadPluginInstructions = {\n\tbuyExactIn: (\n\t\tinput: MakeOptional<BuyExactInAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getBuyExactInInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tbuyExactOut: (\n\t\tinput: MakeOptional<BuyExactOutAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getBuyExactOutInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tclaimCreatorFees: (\n\t\tinput: MakeOptional<ClaimCreatorFeesAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getClaimCreatorFeesInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tclaimProtocolFees: (\n\t\tinput: MakeOptional<ClaimProtocolFeesAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getClaimProtocolFeesInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tcreateToken: (\n\t\tinput: MakeOptional<CreateTokenAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getCreateTokenInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tmigrate: (\n\t\tinput: MigrateAsyncInput,\n\t) => ReturnType<typeof getMigrateInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tsellExactIn: (\n\t\tinput: MakeOptional<SellExactInAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getSellExactInInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tsellExactOut: (\n\t\tinput: MakeOptional<SellExactOutAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getSellExactOutInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n};\n\nexport type SendLaunchpadPluginPdas = {\n\tbondingCurve: typeof findBondingCurvePda;\n\teventAuthority: typeof findEventAuthorityPda;\n\trewardAccrual: typeof findRewardAccrualPda;\n\tglobalConfig: typeof findGlobalConfigPda;\n\twsolRewardAccrual: typeof findWsolRewardAccrualPda;\n\tmigrationAuthority: typeof findMigrationAuthorityPda;\n};\n\nexport type SendLaunchpadPluginRequirements = ClientWithRpc<\n\tGetAccountInfoApi & GetMultipleAccountsApi\n> &\n\tClientWithPayer &\n\tClientWithTransactionPlanning &\n\tClientWithTransactionSending;\n\nexport function sendLaunchpadProgram() {\n\treturn <T extends SendLaunchpadPluginRequirements>(\n\t\tclient: T,\n\t): ExtendedClient<T, { sendLaunchpad: SendLaunchpadPlugin }> => {\n\t\treturn extendClient(client, {\n\t\t\tsendLaunchpad: <SendLaunchpadPlugin>{\n\t\t\t\taccounts: {\n\t\t\t\t\tbondingCurve: Object.freeze({\n\t\t\t\t\t\t...getBondingCurveCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchBondingCurve(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllBondingCurve(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeBondingCurve(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeBondingCurve(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tglobalConfig: Object.freeze({\n\t\t\t\t\t\t...getGlobalConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllGlobalConfig(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeGlobalConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\trewardAccrual: Object.freeze({\n\t\t\t\t\t\t...getRewardAccrualCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchRewardAccrual(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeRewardAccrual(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tevents: {\n\t\t\t\t\tcompleteEvent: getCompleteEventDecoder(),\n\t\t\t\t\tcreatorClaimEvent: getCreatorClaimEventDecoder(),\n\t\t\t\t\tmigrateEvent: getMigrateEventDecoder(),\n\t\t\t\t\tprotocolClaimEvent: getProtocolClaimEventDecoder(),\n\t\t\t\t\trecycleEvent: getRecycleEventDecoder(),\n\t\t\t\t\ttokenCreateEvent: getTokenCreateEventDecoder(),\n\t\t\t\t\ttradeEvent: getTradeEventDecoder(),\n\t\t\t\t},\n\t\t\t\tinstructions: {\n\t\t\t\t\tbuyExactIn: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetBuyExactInInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tbuyExactOut: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetBuyExactOutInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tclaimCreatorFees: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetClaimCreatorFeesInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tclaimProtocolFees: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetClaimProtocolFeesInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tcreateToken: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetCreateTokenInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tmigrate: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetMigrateInstructionAsync(input),\n\t\t\t\t\t\t),\n\t\t\t\t\tsellExactIn: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetSellExactInInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tsellExactOut: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetSellExactOutInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tpdas: {\n\t\t\t\t\tbondingCurve: findBondingCurvePda,\n\t\t\t\t\teventAuthority: findEventAuthorityPda,\n\t\t\t\t\trewardAccrual: findRewardAccrualPda,\n\t\t\t\t\tglobalConfig: findGlobalConfigPda,\n\t\t\t\t\twsolRewardAccrual: findWsolRewardAccrualPda,\n\t\t\t\t\tmigrationAuthority: findMigrationAuthorityPda,\n\t\t\t\t},\n\t\t\t\tidentifyAccount: identifySendLaunchpadAccount,\n\t\t\t\tidentifyInstruction: identifySendLaunchpadInstruction,\n\t\t\t\tparseInstruction: parseSendLaunchpadInstruction,\n\t\t\t},\n\t\t});\n\t};\n}\n\ntype MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\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\nexport * from './sendLaunchpad.js';\n","import { getAddressEncoder, getProgramDerivedAddress } from '@solana/kit';\nimport type { Address, ProgramDerivedAddress } from '@solana/kit';\nimport {\n\tASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n\tTOKEN_PROGRAM_ADDRESS,\n} from '../constants.js';\n\nconst addressEncoder = getAddressEncoder();\n\n/** Seed order is [wallet, tokenProgram, mint], not the parameter order. */\nexport async function findAssociatedTokenPda(\n\twallet: Address,\n\tmint: Address,\n\ttokenProgram: Address = TOKEN_PROGRAM_ADDRESS,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\taddressEncoder.encode(wallet),\n\t\t\taddressEncoder.encode(tokenProgram),\n\t\t\taddressEncoder.encode(mint),\n\t\t],\n\t});\n}\n","import type { Address, Instruction, TransactionSigner } from '@solana/kit';\nimport { TOKEN_2022_PROGRAM_ADDRESS } from '../constants.js';\nimport { findAssociatedTokenPda } from '../utils/pda.js';\nimport { findPoolPda } from '../dex/generated/pdas/pool.js';\nimport { findLpMintPda } from '../dex/generated/pdas/lpMint.js';\nimport { getMigrateInstructionAsync } from './generated/instructions/migrate.js';\n\nexport interface MigrateParams {\n\tcaller: TransactionSigner;\n\tbaseMint: Address;\n\tquoteMint: Address;\n\t/** `bondingCurve.creatorFeeConfig`; `migrate` rejects any other address. */\n\tcreatorFeeConfig: Address;\n\tquoteTokenProgram: Address;\n}\n\nexport async function buildMigrateInstruction(\n\tparams: MigrateParams,\n): Promise<Instruction> {\n\tconst { quoteTokenProgram } = params;\n\n\tconst [[pool], [lpMint]] = await Promise.all([\n\t\tfindPoolPda({\n\t\t\tbaseMint: params.baseMint,\n\t\t\tquoteMint: params.quoteMint,\n\t\t}),\n\t\tfindLpMintPda({\n\t\t\tbaseMint: params.baseMint,\n\t\t\tquoteMint: params.quoteMint,\n\t\t}),\n\t]);\n\n\tconst [[poolBaseVault], [poolQuoteVault], [poolLpAccount]] =\n\t\tawait Promise.all([\n\t\t\tfindAssociatedTokenPda(\n\t\t\t\tpool,\n\t\t\t\tparams.baseMint,\n\t\t\t\tTOKEN_2022_PROGRAM_ADDRESS,\n\t\t\t),\n\t\t\tfindAssociatedTokenPda(pool, params.quoteMint, quoteTokenProgram),\n\t\t\tfindAssociatedTokenPda(pool, lpMint, TOKEN_2022_PROGRAM_ADDRESS),\n\t\t]);\n\n\treturn getMigrateInstructionAsync({\n\t\tcaller: params.caller,\n\t\tbaseMint: params.baseMint,\n\t\tquoteMint: params.quoteMint,\n\t\tcreatorFeeConfig: params.creatorFeeConfig,\n\t\tpoolBaseVault,\n\t\tpoolQuoteVault,\n\t\tpoolLpAccount,\n\t\tquoteTokenProgram,\n\t});\n}\n","export * as accounts from './generated/accounts/index.js';\nexport * as types from './generated/types/index.js';\nexport * as errors from './generated/errors/index.js';\nexport * as pda from './generated/pdas/index.js';\nexport * as create from './create.js';\nexport * as events from './generated/events/index.js';\nexport * as instructions from './generated/instructions/index.js';\nexport * as plugins from './generated/plugins/index.js';\nexport * as migrate from './migrate.js';\nexport * as trade from './trade.js';\n","import { ceilDiv } from './internal.js';\n\n/** Premium in bps, rounded up. */\nexport function calculateFeeDecayPremium(params: {\n\tcurrentTimestamp: bigint;\n\tcreatedAtTimestamp: bigint;\n\tdecaySeconds: number;\n\tdecayStartBps: number;\n\tstandardFeeBps: number;\n}): bigint {\n\tconst {\n\t\tcurrentTimestamp,\n\t\tcreatedAtTimestamp,\n\t\tdecaySeconds,\n\t\tdecayStartBps,\n\t\tstandardFeeBps,\n\t} = params;\n\tif (decaySeconds === 0) {\n\t\treturn 0n;\n\t}\n\n\tconst startBps = BigInt(decayStartBps);\n\tconst standardBps = BigInt(standardFeeBps);\n\tconst decaySecondsBig = BigInt(decaySeconds);\n\n\t// Future creation timestamps pay the full premium, not a discount.\n\tif (createdAtTimestamp > currentTimestamp) {\n\t\tif (startBps <= standardBps) return 0n;\n\t\treturn startBps - standardBps;\n\t}\n\n\tconst elapsed = currentTimestamp - createdAtTimestamp;\n\n\tif (elapsed >= decaySecondsBig) {\n\t\treturn 0n;\n\t}\n\n\tif (startBps <= standardBps) {\n\t\treturn 0n;\n\t}\n\n\tconst range = startBps - standardBps;\n\tconst remaining = decaySecondsBig - elapsed;\n\n\tconst numerator = remaining * remaining * range;\n\tconst denominator = decaySecondsBig * decaySecondsBig;\n\n\treturn ceilDiv(numerator, denominator);\n}\n","export interface FeeSplitArgs {\n\tfeeAmount: bigint;\n\tprotocolBps: number;\n\tlpBps: number;\n\tbaseTotalBps: number;\n\tdecayPremiumBps: number;\n}\n\nexport interface FeeSplit {\n\tprotocol: bigint;\n\tlp: bigint;\n\tcreator: bigint;\n\t/** Decay share already included in `protocol`, not a separate payout. */\n\tsniper: bigint;\n}\n\n/** LP/creator round down; protocol absorbs the decay premium and all remainders. */\nexport function splitFeeAmount(args: FeeSplitArgs): FeeSplit {\n\tconst { feeAmount } = args;\n\tconst protocolBps = toBps(args.protocolBps, 'protocolBps');\n\tconst lpBps = toBps(args.lpBps, 'lpBps');\n\tconst baseTotalBps = toBps(args.baseTotalBps, 'baseTotalBps');\n\tconst decayPremiumBps = toBps(args.decayPremiumBps, 'decayPremiumBps');\n\n\tif (feeAmount < 0n) {\n\t\tthrow new RangeError('splitFeeAmount: feeAmount must be non-negative');\n\t}\n\tif (feeAmount === 0n) {\n\t\treturn { protocol: 0n, lp: 0n, creator: 0n, sniper: 0n };\n\t}\n\n\tconst effectiveTotalBps = baseTotalBps + decayPremiumBps;\n\tif (effectiveTotalBps === 0n) {\n\t\tthrow new RangeError('splitFeeAmount: effective total bps is zero');\n\t}\n\n\tif (baseTotalBps === 0n) {\n\t\treturn {\n\t\t\tprotocol: feeAmount,\n\t\t\tlp: 0n,\n\t\t\tcreator: 0n,\n\t\t\tsniper: feeAmount,\n\t\t};\n\t}\n\n\tconst lpFee = (feeAmount * lpBps) / effectiveTotalBps;\n\n\tconst creatorBps = baseTotalBps - protocolBps - lpBps;\n\tif (creatorBps < 0n) {\n\t\tthrow new RangeError(\n\t\t\t'splitFeeAmount: protocolBps + lpBps exceeds baseTotalBps',\n\t\t);\n\t}\n\tconst creatorFee = (feeAmount * creatorBps) / effectiveTotalBps;\n\n\tconst sniperFee = (feeAmount * decayPremiumBps) / effectiveTotalBps;\n\n\tconst protocolFee = feeAmount - lpFee - creatorFee;\n\n\treturn {\n\t\tprotocol: protocolFee,\n\t\tlp: lpFee,\n\t\tcreator: creatorFee,\n\t\tsniper: sniperFee,\n\t};\n}\n\nfunction toBps(value: number, name: string): bigint {\n\tif (!Number.isInteger(value) || value < 0) {\n\t\tthrow new RangeError(\n\t\t\t`splitFeeAmount: ${name} must be a non-negative integer`,\n\t\t);\n\t}\n\treturn BigInt(value);\n}\n","export * as amm from './amm.js';\nexport * as feeDecay from './fee-decay.js';\nexport * as fees from './fees.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const ALT_REGISTRY_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t184, 237, 52, 250, 77, 8, 59, 74,\n]);\n\nexport function getAltRegistryDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tALT_REGISTRY_DISCRIMINATOR,\n\t);\n}\n\nexport type AltRegistry = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\taltAddress: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type AltRegistryArgs = {\n\tversion: number;\n\tbump: number;\n\taltAddress: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link AltRegistryArgs} account data. */\nexport function getAltRegistryEncoder(): FixedSizeEncoder<AltRegistryArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['altAddress', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: ALT_REGISTRY_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link AltRegistry} account data. */\nexport function getAltRegistryDecoder(): FixedSizeDecoder<AltRegistry> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['altAddress', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link AltRegistry} account data. */\nexport function getAltRegistryCodec(): FixedSizeCodec<\n\tAltRegistryArgs,\n\tAltRegistry\n> {\n\treturn combineCodec(getAltRegistryEncoder(), getAltRegistryDecoder());\n}\n\nexport function decodeAltRegistry<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<AltRegistry, TAddress>;\nexport function decodeAltRegistry<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AltRegistry, TAddress>;\nexport function decodeAltRegistry<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<AltRegistry, TAddress> | MaybeAccount<AltRegistry, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeAltRegistry: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, ALT_REGISTRY_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeAltRegistry: account ${encodedAccount.address} does not match the AltRegistry discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetAltRegistryDecoder(),\n\t);\n}\n\nexport async function fetchAltRegistry<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<AltRegistry, TAddress>> {\n\tconst maybeAccount = await fetchMaybeAltRegistry(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeAltRegistry<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<AltRegistry, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeAltRegistry(maybeAccount);\n}\n\nexport async function fetchAllAltRegistry(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<AltRegistry>[]> {\n\tconst maybeAccounts = await fetchAllMaybeAltRegistry(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeAltRegistry(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<AltRegistry>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) => decodeAltRegistry(maybeAccount));\n}\n\nexport function getAltRegistrySize(): number {\n\treturn 74;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CREATOR_FEE_CONFIG_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([160, 88, 34, 74, 215, 196, 130, 32]);\n\nexport function getCreatorFeeConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCREATOR_FEE_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type CreatorFeeConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tplatformIndex: number;\n\tplatformId: ReadonlyUint8Array;\n\tquoteMint: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type CreatorFeeConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tplatformIndex: number;\n\tplatformId: ReadonlyUint8Array;\n\tquoteMint: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link CreatorFeeConfigArgs} account data. */\nexport function getCreatorFeeConfigEncoder(): FixedSizeEncoder<CreatorFeeConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['platformIndex', getU8Encoder()],\n\t\t\t['platformId', fixEncoderSize(getBytesEncoder(), 44)],\n\t\t\t['quoteMint', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CREATOR_FEE_CONFIG_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\n/** Gets the decoder for {@link CreatorFeeConfig} account data. */\nexport function getCreatorFeeConfigDecoder(): FixedSizeDecoder<CreatorFeeConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['platformIndex', getU8Decoder()],\n\t\t['platformId', fixDecoderSize(getBytesDecoder(), 44)],\n\t\t['quoteMint', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link CreatorFeeConfig} account data. */\nexport function getCreatorFeeConfigCodec(): FixedSizeCodec<\n\tCreatorFeeConfigArgs,\n\tCreatorFeeConfig\n> {\n\treturn combineCodec(\n\t\tgetCreatorFeeConfigEncoder(),\n\t\tgetCreatorFeeConfigDecoder(),\n\t);\n}\n\nexport function decodeCreatorFeeConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<CreatorFeeConfig, TAddress>;\nexport function decodeCreatorFeeConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<CreatorFeeConfig, TAddress>;\nexport function decodeCreatorFeeConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n\t| Account<CreatorFeeConfig, TAddress>\n\t| MaybeAccount<CreatorFeeConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeCreatorFeeConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(\n\t\t\t\tencodedAccount.data,\n\t\t\t\tCREATOR_FEE_CONFIG_DISCRIMINATOR,\n\t\t\t\t0,\n\t\t\t)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeCreatorFeeConfig: account ${encodedAccount.address} does not match the CreatorFeeConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetCreatorFeeConfigDecoder(),\n\t);\n}\n\nexport async function fetchCreatorFeeConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<CreatorFeeConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybeCreatorFeeConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeCreatorFeeConfig<\n\tTAddress extends string = string,\n>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<CreatorFeeConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeCreatorFeeConfig(maybeAccount);\n}\n\nexport async function fetchAllCreatorFeeConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<CreatorFeeConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybeCreatorFeeConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeCreatorFeeConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<CreatorFeeConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeCreatorFeeConfig(maybeAccount),\n\t);\n}\n\nexport function getCreatorFeeConfigSize(): number {\n\treturn 151;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\taddDecoderSizePrefix,\n\taddEncoderSizePrefix,\n\tcombineCodec,\n\tgetBooleanDecoder,\n\tgetBooleanEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetUtf8Decoder,\n\tgetUtf8Encoder,\n\ttype Codec,\n\ttype Decoder,\n\ttype Encoder,\n} from '@solana/kit';\n\nexport type AuthPlatformEntry = { name: string; enabled: boolean };\n\nexport type AuthPlatformEntryArgs = AuthPlatformEntry;\n\nexport function getAuthPlatformEntryEncoder(): Encoder<AuthPlatformEntryArgs> {\n\treturn getStructEncoder([\n\t\t['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t['enabled', getBooleanEncoder()],\n\t]);\n}\n\nexport function getAuthPlatformEntryDecoder(): Decoder<AuthPlatformEntry> {\n\treturn getStructDecoder([\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['enabled', getBooleanDecoder()],\n\t]);\n}\n\nexport function getAuthPlatformEntryCodec(): Codec<\n\tAuthPlatformEntryArgs,\n\tAuthPlatformEntry\n> {\n\treturn combineCodec(\n\t\tgetAuthPlatformEntryEncoder(),\n\t\tgetAuthPlatformEntryDecoder(),\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 {\n\tcombineCodec,\n\tgetEnumDecoder,\n\tgetEnumEncoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport enum CallerType {\n\tPlatformBondingCurve,\n\tPlatformPool,\n}\n\nexport type CallerTypeArgs = CallerType;\n\nexport function getCallerTypeEncoder(): FixedSizeEncoder<CallerTypeArgs> {\n\treturn getEnumEncoder(CallerType);\n}\n\nexport function getCallerTypeDecoder(): FixedSizeDecoder<CallerType> {\n\treturn getEnumDecoder(CallerType);\n}\n\nexport function getCallerTypeCodec(): FixedSizeCodec<\n\tCallerTypeArgs,\n\tCallerType\n> {\n\treturn combineCodec(getCallerTypeEncoder(), getCallerTypeDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcombineCodec,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU16Decoder,\n\tgetU16Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport type DexFees = {\n\tcreationFeeCents: bigint;\n\tprotocolFeeBps: number;\n\tlpFeeBps: number;\n\tcreatorFeeBps: number;\n\tfeeDecaySeconds: number;\n\tfeeDecayStartBps: number;\n};\n\nexport type DexFeesArgs = {\n\tcreationFeeCents: number | bigint;\n\tprotocolFeeBps: number;\n\tlpFeeBps: number;\n\tcreatorFeeBps: number;\n\tfeeDecaySeconds: number;\n\tfeeDecayStartBps: number;\n};\n\nexport function getDexFeesEncoder(): FixedSizeEncoder<DexFeesArgs> {\n\treturn getStructEncoder([\n\t\t['creationFeeCents', getU64Encoder()],\n\t\t['protocolFeeBps', getU16Encoder()],\n\t\t['lpFeeBps', getU16Encoder()],\n\t\t['creatorFeeBps', getU16Encoder()],\n\t\t['feeDecaySeconds', getU16Encoder()],\n\t\t['feeDecayStartBps', getU16Encoder()],\n\t]);\n}\n\nexport function getDexFeesDecoder(): FixedSizeDecoder<DexFees> {\n\treturn getStructDecoder([\n\t\t['creationFeeCents', getU64Decoder()],\n\t\t['protocolFeeBps', getU16Decoder()],\n\t\t['lpFeeBps', getU16Decoder()],\n\t\t['creatorFeeBps', getU16Decoder()],\n\t\t['feeDecaySeconds', getU16Decoder()],\n\t\t['feeDecayStartBps', getU16Decoder()],\n\t]);\n}\n\nexport function getDexFeesCodec(): FixedSizeCodec<DexFeesArgs, DexFees> {\n\treturn combineCodec(getDexFeesEncoder(), getDexFeesDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\taddDecoderSizePrefix,\n\taddEncoderSizePrefix,\n\tcombineCodec,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetUtf8Decoder,\n\tgetUtf8Encoder,\n\ttype Codec,\n\ttype Decoder,\n\ttype Encoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n\tgetDexFeesDecoder,\n\tgetDexFeesEncoder,\n\tgetLaunchpadFeesDecoder,\n\tgetLaunchpadFeesEncoder,\n\ttype DexFees,\n\ttype DexFeesArgs,\n\ttype LaunchpadFees,\n\ttype LaunchpadFeesArgs,\n} from './index.js';\n\nexport type FeeConfig = {\n\tname: string;\n\tlaunchpad: LaunchpadFees;\n\tdex: DexFees;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type FeeConfigArgs = {\n\tname: string;\n\tlaunchpad: LaunchpadFeesArgs;\n\tdex: DexFeesArgs;\n\treserved: ReadonlyUint8Array;\n};\n\nexport function getFeeConfigEncoder(): Encoder<FeeConfigArgs> {\n\treturn getStructEncoder([\n\t\t['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t['launchpad', getLaunchpadFeesEncoder()],\n\t\t['dex', getDexFeesEncoder()],\n\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t]);\n}\n\nexport function getFeeConfigDecoder(): Decoder<FeeConfig> {\n\treturn getStructDecoder([\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['launchpad', getLaunchpadFeesDecoder()],\n\t\t['dex', getDexFeesDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\nexport function getFeeConfigCodec(): Codec<FeeConfigArgs, FeeConfig> {\n\treturn combineCodec(getFeeConfigEncoder(), getFeeConfigDecoder());\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcombineCodec,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU16Decoder,\n\tgetU16Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n} from '@solana/kit';\n\nexport type LaunchpadFees = {\n\tcreationFeeCents: bigint;\n\tprotocolFeeBps: number;\n\tcreatorFeeBps: number;\n\tfeeDecaySeconds: number;\n\tfeeDecayStartBps: number;\n};\n\nexport type LaunchpadFeesArgs = {\n\tcreationFeeCents: number | bigint;\n\tprotocolFeeBps: number;\n\tcreatorFeeBps: number;\n\tfeeDecaySeconds: number;\n\tfeeDecayStartBps: number;\n};\n\nexport function getLaunchpadFeesEncoder(): FixedSizeEncoder<LaunchpadFeesArgs> {\n\treturn getStructEncoder([\n\t\t['creationFeeCents', getU64Encoder()],\n\t\t['protocolFeeBps', getU16Encoder()],\n\t\t['creatorFeeBps', getU16Encoder()],\n\t\t['feeDecaySeconds', getU16Encoder()],\n\t\t['feeDecayStartBps', getU16Encoder()],\n\t]);\n}\n\nexport function getLaunchpadFeesDecoder(): FixedSizeDecoder<LaunchpadFees> {\n\treturn getStructDecoder([\n\t\t['creationFeeCents', getU64Decoder()],\n\t\t['protocolFeeBps', getU16Decoder()],\n\t\t['creatorFeeBps', getU16Decoder()],\n\t\t['feeDecaySeconds', getU16Decoder()],\n\t\t['feeDecayStartBps', getU16Decoder()],\n\t]);\n}\n\nexport function getLaunchpadFeesCodec(): FixedSizeCodec<\n\tLaunchpadFeesArgs,\n\tLaunchpadFees\n> {\n\treturn combineCodec(getLaunchpadFeesEncoder(), getLaunchpadFeesDecoder());\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\nexport * from './authPlatformEntry.js';\nexport * from './callerType.js';\nexport * from './dexFees.js';\nexport * from './feeConfig.js';\nexport * from './launchpadFees.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\taddDecoderSizePrefix,\n\taddEncoderSizePrefix,\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\tgetUtf8Decoder,\n\tgetUtf8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype Codec,\n\ttype Decoder,\n\ttype EncodedAccount,\n\ttype Encoder,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetDexFeesDecoder,\n\tgetDexFeesEncoder,\n\tgetLaunchpadFeesDecoder,\n\tgetLaunchpadFeesEncoder,\n\ttype DexFees,\n\ttype DexFeesArgs,\n\ttype LaunchpadFees,\n\ttype LaunchpadFeesArgs,\n} from '../types/index.js';\n\nexport const FEE_PRESET_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t191, 132, 6, 83, 67, 74, 36, 212,\n]);\n\nexport function getFeePresetDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tFEE_PRESET_DISCRIMINATOR,\n\t);\n}\n\nexport type FeePreset = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tindex: number;\n\tname: string;\n\tlaunchpad: LaunchpadFees;\n\tdex: DexFees;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type FeePresetArgs = {\n\tversion: number;\n\tbump: number;\n\tindex: number;\n\tname: string;\n\tlaunchpad: LaunchpadFeesArgs;\n\tdex: DexFeesArgs;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link FeePresetArgs} account data. */\nexport function getFeePresetEncoder(): Encoder<FeePresetArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['index', getU8Encoder()],\n\t\t\t['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t\t['launchpad', getLaunchpadFeesEncoder()],\n\t\t\t['dex', getDexFeesEncoder()],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: FEE_PRESET_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link FeePreset} account data. */\nexport function getFeePresetDecoder(): Decoder<FeePreset> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['index', getU8Decoder()],\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['launchpad', getLaunchpadFeesDecoder()],\n\t\t['dex', getDexFeesDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link FeePreset} account data. */\nexport function getFeePresetCodec(): Codec<FeePresetArgs, FeePreset> {\n\treturn combineCodec(getFeePresetEncoder(), getFeePresetDecoder());\n}\n\nexport function decodeFeePreset<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<FeePreset, TAddress>;\nexport function decodeFeePreset<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<FeePreset, TAddress>;\nexport function decodeFeePreset<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<FeePreset, TAddress> | MaybeAccount<FeePreset, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeFeePreset: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (!containsBytes(encodedAccount.data, FEE_PRESET_DISCRIMINATOR, 0)) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeFeePreset: account ${encodedAccount.address} does not match the FeePreset discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetFeePresetDecoder(),\n\t);\n}\n\nexport async function fetchFeePreset<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<FeePreset, TAddress>> {\n\tconst maybeAccount = await fetchMaybeFeePreset(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeFeePreset<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<FeePreset, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeFeePreset(maybeAccount);\n}\n\nexport async function fetchAllFeePreset(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<FeePreset>[]> {\n\tconst maybeAccounts = await fetchAllMaybeFeePreset(rpc, addresses, config);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeFeePreset(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<FeePreset>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) => decodeFeePreset(maybeAccount));\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetArrayDecoder,\n\tgetArrayEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype Codec,\n\ttype Decoder,\n\ttype EncodedAccount,\n\ttype Encoder,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetAuthPlatformEntryDecoder,\n\tgetAuthPlatformEntryEncoder,\n\ttype AuthPlatformEntry,\n\ttype AuthPlatformEntryArgs,\n} from '../types/index.js';\n\nexport const GLOBAL_CONFIG_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t149, 8, 156, 202, 160, 252, 176, 217,\n]);\n\nexport function getGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tGLOBAL_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type GlobalConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tauthPlatforms: Array<AuthPlatformEntry>;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type GlobalConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\toperator: Address;\n\tauthPlatforms: Array<AuthPlatformEntryArgs>;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link GlobalConfigArgs} account data. */\nexport function getGlobalConfigEncoder(): Encoder<GlobalConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['authority', getAddressEncoder()],\n\t\t\t['operator', getAddressEncoder()],\n\t\t\t['authPlatforms', getArrayEncoder(getAuthPlatformEntryEncoder())],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: GLOBAL_CONFIG_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link GlobalConfig} account data. */\nexport function getGlobalConfigDecoder(): Decoder<GlobalConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['authority', getAddressDecoder()],\n\t\t['operator', getAddressDecoder()],\n\t\t['authPlatforms', getArrayDecoder(getAuthPlatformEntryDecoder())],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link GlobalConfig} account data. */\nexport function getGlobalConfigCodec(): Codec<GlobalConfigArgs, GlobalConfig> {\n\treturn combineCodec(getGlobalConfigEncoder(), getGlobalConfigDecoder());\n}\n\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<GlobalConfig, TAddress>;\nexport function decodeGlobalConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<GlobalConfig, TAddress> | MaybeAccount<GlobalConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, GLOBAL_CONFIG_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeGlobalConfig: account ${encodedAccount.address} does not match the GlobalConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetGlobalConfigDecoder(),\n\t);\n}\n\nexport async function fetchGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybeGlobalConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeGlobalConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<GlobalConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeGlobalConfig(maybeAccount);\n}\n\nexport async function fetchAllGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybeGlobalConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeGlobalConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<GlobalConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeGlobalConfig(maybeAccount),\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 {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tgetDexFeesDecoder,\n\tgetDexFeesEncoder,\n\tgetLaunchpadFeesDecoder,\n\tgetLaunchpadFeesEncoder,\n\ttype DexFees,\n\ttype DexFeesArgs,\n\ttype LaunchpadFees,\n\ttype LaunchpadFeesArgs,\n} from '../types/index.js';\n\nexport const PARTNER_CONFIG_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t212, 110, 106, 253, 66, 131, 77, 96,\n]);\n\nexport function getPartnerConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tPARTNER_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type PartnerConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\tpartner: Address;\n\tfeePreset: number;\n\tlaunchpad: LaunchpadFees;\n\tdex: DexFees;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type PartnerConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tauthority: Address;\n\tpartner: Address;\n\tfeePreset: number;\n\tlaunchpad: LaunchpadFeesArgs;\n\tdex: DexFeesArgs;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link PartnerConfigArgs} account data. */\nexport function getPartnerConfigEncoder(): FixedSizeEncoder<PartnerConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['authority', getAddressEncoder()],\n\t\t\t['partner', getAddressEncoder()],\n\t\t\t['feePreset', getU8Encoder()],\n\t\t\t['launchpad', getLaunchpadFeesEncoder()],\n\t\t\t['dex', getDexFeesEncoder()],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: PARTNER_CONFIG_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link PartnerConfig} account data. */\nexport function getPartnerConfigDecoder(): FixedSizeDecoder<PartnerConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['authority', getAddressDecoder()],\n\t\t['partner', getAddressDecoder()],\n\t\t['feePreset', getU8Decoder()],\n\t\t['launchpad', getLaunchpadFeesDecoder()],\n\t\t['dex', getDexFeesDecoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link PartnerConfig} account data. */\nexport function getPartnerConfigCodec(): FixedSizeCodec<\n\tPartnerConfigArgs,\n\tPartnerConfig\n> {\n\treturn combineCodec(getPartnerConfigEncoder(), getPartnerConfigDecoder());\n}\n\nexport function decodePartnerConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<PartnerConfig, TAddress>;\nexport function decodePartnerConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<PartnerConfig, TAddress>;\nexport function decodePartnerConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<PartnerConfig, TAddress> | MaybeAccount<PartnerConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePartnerConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, PARTNER_CONFIG_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePartnerConfig: account ${encodedAccount.address} does not match the PartnerConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetPartnerConfigDecoder(),\n\t);\n}\n\nexport async function fetchPartnerConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<PartnerConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybePartnerConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybePartnerConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<PartnerConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodePartnerConfig(maybeAccount);\n}\n\nexport async function fetchAllPartnerConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<PartnerConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybePartnerConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybePartnerConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<PartnerConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodePartnerConfig(maybeAccount),\n\t);\n}\n\nexport function getPartnerConfigSize(): number {\n\treturn 173;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\taddDecoderSizePrefix,\n\taddEncoderSizePrefix,\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetI64Encoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\tgetUtf8Decoder,\n\tgetUtf8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype Codec,\n\ttype Decoder,\n\ttype EncodedAccount,\n\ttype Encoder,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const PARTNER_METADATA_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([68, 68, 130, 19, 16, 209, 98, 156]);\n\nexport function getPartnerMetadataDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tPARTNER_METADATA_DISCRIMINATOR,\n\t);\n}\n\nexport type PartnerMetadata = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tpartner: Address;\n\tname: string;\n\tnote: string;\n\taddedAt: bigint;\n\tupdatedAt: bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type PartnerMetadataArgs = {\n\tversion: number;\n\tbump: number;\n\tpartner: Address;\n\tname: string;\n\tnote: string;\n\taddedAt: number | bigint;\n\tupdatedAt: number | bigint;\n\tplatformConfig: Address;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link PartnerMetadataArgs} account data. */\nexport function getPartnerMetadataEncoder(): Encoder<PartnerMetadataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['partner', getAddressEncoder()],\n\t\t\t['name', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t\t['note', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n\t\t\t['addedAt', getI64Encoder()],\n\t\t\t['updatedAt', getI64Encoder()],\n\t\t\t['platformConfig', getAddressEncoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: PARTNER_METADATA_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\n/** Gets the decoder for {@link PartnerMetadata} account data. */\nexport function getPartnerMetadataDecoder(): Decoder<PartnerMetadata> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['partner', getAddressDecoder()],\n\t\t['name', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['note', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n\t\t['addedAt', getI64Decoder()],\n\t\t['updatedAt', getI64Decoder()],\n\t\t['platformConfig', getAddressDecoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link PartnerMetadata} account data. */\nexport function getPartnerMetadataCodec(): Codec<\n\tPartnerMetadataArgs,\n\tPartnerMetadata\n> {\n\treturn combineCodec(\n\t\tgetPartnerMetadataEncoder(),\n\t\tgetPartnerMetadataDecoder(),\n\t);\n}\n\nexport function decodePartnerMetadata<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<PartnerMetadata, TAddress>;\nexport function decodePartnerMetadata<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<PartnerMetadata, TAddress>;\nexport function decodePartnerMetadata<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n\t| Account<PartnerMetadata, TAddress>\n\t| MaybeAccount<PartnerMetadata, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePartnerMetadata: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(\n\t\t\t\tencodedAccount.data,\n\t\t\t\tPARTNER_METADATA_DISCRIMINATOR,\n\t\t\t\t0,\n\t\t\t)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodePartnerMetadata: account ${encodedAccount.address} does not match the PartnerMetadata discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetPartnerMetadataDecoder(),\n\t);\n}\n\nexport async function fetchPartnerMetadata<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<PartnerMetadata, TAddress>> {\n\tconst maybeAccount = await fetchMaybePartnerMetadata(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybePartnerMetadata<\n\tTAddress extends string = string,\n>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<PartnerMetadata, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodePartnerMetadata(maybeAccount);\n}\n\nexport async function fetchAllPartnerMetadata(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<PartnerMetadata>[]> {\n\tconst maybeAccounts = await fetchAllMaybePartnerMetadata(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybePartnerMetadata(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<PartnerMetadata>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodePartnerMetadata(maybeAccount),\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 {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetI64Encoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const REWARD_STATE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t86, 245, 149, 170, 90, 108, 31, 251,\n]);\n\nexport function getRewardStateDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tREWARD_STATE_DISCRIMINATOR,\n\t);\n}\n\nexport type RewardState = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tstakingConfig: Address;\n\trewardMint: Address;\n\tvault: Address;\n\ttotalClaimed: bigint;\n\tusdcPrice: bigint;\n\tusdcPriceUpdatedAt: bigint;\n\tisStablecoin: number;\n\tdisabled: number;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type RewardStateArgs = {\n\tversion: number;\n\tbump: number;\n\tstakingConfig: Address;\n\trewardMint: Address;\n\tvault: Address;\n\ttotalClaimed: number | bigint;\n\tusdcPrice: number | bigint;\n\tusdcPriceUpdatedAt: number | bigint;\n\tisStablecoin: number;\n\tdisabled: number;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link RewardStateArgs} account data. */\nexport function getRewardStateEncoder(): FixedSizeEncoder<RewardStateArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['stakingConfig', getAddressEncoder()],\n\t\t\t['rewardMint', getAddressEncoder()],\n\t\t\t['vault', getAddressEncoder()],\n\t\t\t['totalClaimed', getU64Encoder()],\n\t\t\t['usdcPrice', getU64Encoder()],\n\t\t\t['usdcPriceUpdatedAt', getI64Encoder()],\n\t\t\t['isStablecoin', getU8Encoder()],\n\t\t\t['disabled', getU8Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: REWARD_STATE_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link RewardState} account data. */\nexport function getRewardStateDecoder(): FixedSizeDecoder<RewardState> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['stakingConfig', getAddressDecoder()],\n\t\t['rewardMint', getAddressDecoder()],\n\t\t['vault', getAddressDecoder()],\n\t\t['totalClaimed', getU64Decoder()],\n\t\t['usdcPrice', getU64Decoder()],\n\t\t['usdcPriceUpdatedAt', getI64Decoder()],\n\t\t['isStablecoin', getU8Decoder()],\n\t\t['disabled', getU8Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link RewardState} account data. */\nexport function getRewardStateCodec(): FixedSizeCodec<\n\tRewardStateArgs,\n\tRewardState\n> {\n\treturn combineCodec(getRewardStateEncoder(), getRewardStateDecoder());\n}\n\nexport function decodeRewardState<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<RewardState, TAddress>;\nexport function decodeRewardState<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<RewardState, TAddress>;\nexport function decodeRewardState<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<RewardState, TAddress> | MaybeAccount<RewardState, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardState: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, REWARD_STATE_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeRewardState: account ${encodedAccount.address} does not match the RewardState discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetRewardStateDecoder(),\n\t);\n}\n\nexport async function fetchRewardState<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<RewardState, TAddress>> {\n\tconst maybeAccount = await fetchMaybeRewardState(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeRewardState<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<RewardState, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeRewardState(maybeAccount);\n}\n\nexport async function fetchAllRewardState(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<RewardState>[]> {\n\tconst maybeAccounts = await fetchAllMaybeRewardState(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeRewardState(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<RewardState>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) => decodeRewardState(maybeAccount));\n}\n\nexport function getRewardStateSize(): number {\n\treturn 196;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBooleanDecoder,\n\tgetBooleanEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU16Decoder,\n\tgetU16Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const STAKING_CONFIG_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t45, 134, 252, 82, 37, 57, 84, 25,\n]);\n\nexport function getStakingConfigDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSTAKING_CONFIG_DISCRIMINATOR,\n\t);\n}\n\nexport type StakingConfig = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tstakingMint: Address;\n\ttotalStaked: bigint;\n\tstakingEnabled: boolean;\n\trewardCount: number;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type StakingConfigArgs = {\n\tversion: number;\n\tbump: number;\n\tstakingMint: Address;\n\ttotalStaked: number | bigint;\n\tstakingEnabled: boolean;\n\trewardCount: number;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link StakingConfigArgs} account data. */\nexport function getStakingConfigEncoder(): FixedSizeEncoder<StakingConfigArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['stakingMint', getAddressEncoder()],\n\t\t\t['totalStaked', getU64Encoder()],\n\t\t\t['stakingEnabled', getBooleanEncoder()],\n\t\t\t['rewardCount', getU16Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 64)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: STAKING_CONFIG_DISCRIMINATOR }),\n\t);\n}\n\n/** Gets the decoder for {@link StakingConfig} account data. */\nexport function getStakingConfigDecoder(): FixedSizeDecoder<StakingConfig> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['stakingMint', getAddressDecoder()],\n\t\t['totalStaked', getU64Decoder()],\n\t\t['stakingEnabled', getBooleanDecoder()],\n\t\t['rewardCount', getU16Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 64)],\n\t]);\n}\n\n/** Gets the codec for {@link StakingConfig} account data. */\nexport function getStakingConfigCodec(): FixedSizeCodec<\n\tStakingConfigArgs,\n\tStakingConfig\n> {\n\treturn combineCodec(getStakingConfigEncoder(), getStakingConfigDecoder());\n}\n\nexport function decodeStakingConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<StakingConfig, TAddress>;\nexport function decodeStakingConfig<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<StakingConfig, TAddress>;\nexport function decodeStakingConfig<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<StakingConfig, TAddress> | MaybeAccount<StakingConfig, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeStakingConfig: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(encodedAccount.data, STAKING_CONFIG_DISCRIMINATOR, 0)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeStakingConfig: account ${encodedAccount.address} does not match the StakingConfig discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetStakingConfigDecoder(),\n\t);\n}\n\nexport async function fetchStakingConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<StakingConfig, TAddress>> {\n\tconst maybeAccount = await fetchMaybeStakingConfig(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeStakingConfig<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<StakingConfig, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeStakingConfig(maybeAccount);\n}\n\nexport async function fetchAllStakingConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<StakingConfig>[]> {\n\tconst maybeAccounts = await fetchAllMaybeStakingConfig(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeStakingConfig(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<StakingConfig>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeStakingConfig(maybeAccount),\n\t);\n}\n\nexport function getStakingConfigSize(): number {\n\treturn 117;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU128Decoder,\n\tgetU128Encoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const USER_REWARD_DEBT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([92, 166, 184, 23, 127, 201, 251, 148]);\n\nexport function getUserRewardDebtDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tUSER_REWARD_DEBT_DISCRIMINATOR,\n\t);\n}\n\nexport type UserRewardDebt = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tuser: Address;\n\tstakingMint: Address;\n\trewardMint: Address;\n\taccSnapshot: bigint;\n\tclaimed: bigint;\n\tamountSnapshot: bigint;\n\tsettledVersion: number;\n\towed: bigint;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type UserRewardDebtArgs = {\n\tversion: number;\n\tbump: number;\n\tuser: Address;\n\tstakingMint: Address;\n\trewardMint: Address;\n\taccSnapshot: number | bigint;\n\tclaimed: number | bigint;\n\tamountSnapshot: number | bigint;\n\tsettledVersion: number;\n\towed: number | bigint;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link UserRewardDebtArgs} account data. */\nexport function getUserRewardDebtEncoder(): FixedSizeEncoder<UserRewardDebtArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['user', getAddressEncoder()],\n\t\t\t['stakingMint', getAddressEncoder()],\n\t\t\t['rewardMint', getAddressEncoder()],\n\t\t\t['accSnapshot', getU128Encoder()],\n\t\t\t['claimed', getU64Encoder()],\n\t\t\t['amountSnapshot', getU64Encoder()],\n\t\t\t['settledVersion', getU32Encoder()],\n\t\t\t['owed', getU64Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: USER_REWARD_DEBT_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\n/** Gets the decoder for {@link UserRewardDebt} account data. */\nexport function getUserRewardDebtDecoder(): FixedSizeDecoder<UserRewardDebt> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['user', getAddressDecoder()],\n\t\t['stakingMint', getAddressDecoder()],\n\t\t['rewardMint', getAddressDecoder()],\n\t\t['accSnapshot', getU128Decoder()],\n\t\t['claimed', getU64Decoder()],\n\t\t['amountSnapshot', getU64Decoder()],\n\t\t['settledVersion', getU32Decoder()],\n\t\t['owed', getU64Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link UserRewardDebt} account data. */\nexport function getUserRewardDebtCodec(): FixedSizeCodec<\n\tUserRewardDebtArgs,\n\tUserRewardDebt\n> {\n\treturn combineCodec(getUserRewardDebtEncoder(), getUserRewardDebtDecoder());\n}\n\nexport function decodeUserRewardDebt<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<UserRewardDebt, TAddress>;\nexport function decodeUserRewardDebt<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<UserRewardDebt, TAddress>;\nexport function decodeUserRewardDebt<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<UserRewardDebt, TAddress> | MaybeAccount<UserRewardDebt, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeUserRewardDebt: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(\n\t\t\t\tencodedAccount.data,\n\t\t\t\tUSER_REWARD_DEBT_DISCRIMINATOR,\n\t\t\t\t0,\n\t\t\t)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeUserRewardDebt: account ${encodedAccount.address} does not match the UserRewardDebt discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetUserRewardDebtDecoder(),\n\t);\n}\n\nexport async function fetchUserRewardDebt<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<UserRewardDebt, TAddress>> {\n\tconst maybeAccount = await fetchMaybeUserRewardDebt(rpc, address, config);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeUserRewardDebt<\n\tTAddress extends string = string,\n>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<UserRewardDebt, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeUserRewardDebt(maybeAccount);\n}\n\nexport async function fetchAllUserRewardDebt(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<UserRewardDebt>[]> {\n\tconst maybeAccounts = await fetchAllMaybeUserRewardDebt(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeUserRewardDebt(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<UserRewardDebt>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeUserRewardDebt(maybeAccount),\n\t);\n}\n\nexport function getUserRewardDebtSize(): number {\n\treturn 182;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertAccountExists,\n\tassertAccountsExist,\n\tcombineCodec,\n\tcontainsBytes,\n\tdecodeAccount,\n\tfetchEncodedAccount,\n\tfetchEncodedAccounts,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU16Decoder,\n\tgetU16Encoder,\n\tgetU32Decoder,\n\tgetU32Encoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tgetU8Decoder,\n\tgetU8Encoder,\n\ttransformEncoder,\n\ttype Account,\n\ttype Address,\n\ttype EncodedAccount,\n\ttype FetchAccountConfig,\n\ttype FetchAccountsConfig,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype MaybeAccount,\n\ttype MaybeEncodedAccount,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const USER_STAKE_POSITION_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([123, 46, 248, 17, 240, 135, 201, 17]);\n\nexport function getUserStakePositionDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tUSER_STAKE_POSITION_DISCRIMINATOR,\n\t);\n}\n\nexport type UserStakePosition = {\n\tdiscriminator: ReadonlyUint8Array;\n\tversion: number;\n\tbump: number;\n\tuser: Address;\n\tstakingMint: Address;\n\tamount: bigint;\n\tstakeVersion: number;\n\tsettledCount: number;\n\treserved: ReadonlyUint8Array;\n};\n\nexport type UserStakePositionArgs = {\n\tversion: number;\n\tbump: number;\n\tuser: Address;\n\tstakingMint: Address;\n\tamount: number | bigint;\n\tstakeVersion: number;\n\tsettledCount: number;\n\treserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link UserStakePositionArgs} account data. */\nexport function getUserStakePositionEncoder(): FixedSizeEncoder<UserStakePositionArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['version', getU8Encoder()],\n\t\t\t['bump', getU8Encoder()],\n\t\t\t['user', getAddressEncoder()],\n\t\t\t['stakingMint', getAddressEncoder()],\n\t\t\t['amount', getU64Encoder()],\n\t\t\t['stakeVersion', getU32Encoder()],\n\t\t\t['settledCount', getU16Encoder()],\n\t\t\t['reserved', fixEncoderSize(getBytesEncoder(), 32)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: USER_STAKE_POSITION_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\n/** Gets the decoder for {@link UserStakePosition} account data. */\nexport function getUserStakePositionDecoder(): FixedSizeDecoder<UserStakePosition> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['version', getU8Decoder()],\n\t\t['bump', getU8Decoder()],\n\t\t['user', getAddressDecoder()],\n\t\t['stakingMint', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['stakeVersion', getU32Decoder()],\n\t\t['settledCount', getU16Decoder()],\n\t\t['reserved', fixDecoderSize(getBytesDecoder(), 32)],\n\t]);\n}\n\n/** Gets the codec for {@link UserStakePosition} account data. */\nexport function getUserStakePositionCodec(): FixedSizeCodec<\n\tUserStakePositionArgs,\n\tUserStakePosition\n> {\n\treturn combineCodec(\n\t\tgetUserStakePositionEncoder(),\n\t\tgetUserStakePositionDecoder(),\n\t);\n}\n\nexport function decodeUserStakePosition<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress>,\n): Account<UserStakePosition, TAddress>;\nexport function decodeUserStakePosition<TAddress extends string = string>(\n\tencodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<UserStakePosition, TAddress>;\nexport function decodeUserStakePosition<TAddress extends string = string>(\n\tencodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n\t| Account<UserStakePosition, TAddress>\n\t| MaybeAccount<UserStakePosition, TAddress> {\n\tif (!('exists' in encodedAccount) || encodedAccount.exists) {\n\t\tif (encodedAccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeUserStakePosition: account ${encodedAccount.address} is owned by ${encodedAccount.programAddress}, expected ${SEND_NEXUS_PROGRAM_ADDRESS}`,\n\t\t\t);\n\t\t\terror.name = 'AccountOwnerMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t\tif (\n\t\t\t!containsBytes(\n\t\t\t\tencodedAccount.data,\n\t\t\t\tUSER_STAKE_POSITION_DISCRIMINATOR,\n\t\t\t\t0,\n\t\t\t)\n\t\t) {\n\t\t\tconst error = new Error(\n\t\t\t\t`decodeUserStakePosition: account ${encodedAccount.address} does not match the UserStakePosition discriminator`,\n\t\t\t);\n\t\t\terror.name = 'AccountDiscriminatorMismatchError';\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn decodeAccount(\n\t\tencodedAccount as MaybeEncodedAccount<TAddress>,\n\t\tgetUserStakePositionDecoder(),\n\t);\n}\n\nexport async function fetchUserStakePosition<TAddress extends string = string>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<Account<UserStakePosition, TAddress>> {\n\tconst maybeAccount = await fetchMaybeUserStakePosition(\n\t\trpc,\n\t\taddress,\n\t\tconfig,\n\t);\n\tassertAccountExists(maybeAccount);\n\treturn maybeAccount;\n}\n\nexport async function fetchMaybeUserStakePosition<\n\tTAddress extends string = string,\n>(\n\trpc: Parameters<typeof fetchEncodedAccount>[0],\n\taddress: Address<TAddress>,\n\tconfig?: FetchAccountConfig,\n): Promise<MaybeAccount<UserStakePosition, TAddress>> {\n\tconst maybeAccount = await fetchEncodedAccount(rpc, address, config);\n\treturn decodeUserStakePosition(maybeAccount);\n}\n\nexport async function fetchAllUserStakePosition(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<Account<UserStakePosition>[]> {\n\tconst maybeAccounts = await fetchAllMaybeUserStakePosition(\n\t\trpc,\n\t\taddresses,\n\t\tconfig,\n\t);\n\tassertAccountsExist(maybeAccounts);\n\treturn maybeAccounts;\n}\n\nexport async function fetchAllMaybeUserStakePosition(\n\trpc: Parameters<typeof fetchEncodedAccounts>[0],\n\taddresses: Array<Address>,\n\tconfig?: FetchAccountsConfig,\n): Promise<MaybeAccount<UserStakePosition>[]> {\n\tconst maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n\treturn maybeAccounts.map((maybeAccount) =>\n\t\tdecodeUserStakePosition(maybeAccount),\n\t);\n}\n\nexport function getUserStakePositionSize(): number {\n\treturn 120;\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ALT_REGISTRY_DISCRIMINATOR } from './altRegistry.js';\nimport { CREATOR_FEE_CONFIG_DISCRIMINATOR } from './creatorFeeConfig.js';\nimport { FEE_PRESET_DISCRIMINATOR } from './feePreset.js';\nimport { GLOBAL_CONFIG_DISCRIMINATOR } from './globalConfig.js';\nimport { PARTNER_CONFIG_DISCRIMINATOR } from './partnerConfig.js';\nimport { PARTNER_METADATA_DISCRIMINATOR } from './partnerMetadata.js';\nimport { REWARD_STATE_DISCRIMINATOR } from './rewardState.js';\nimport { STAKING_CONFIG_DISCRIMINATOR } from './stakingConfig.js';\nimport { USER_REWARD_DEBT_DISCRIMINATOR } from './userRewardDebt.js';\nimport { USER_STAKE_POSITION_DISCRIMINATOR } from './userStakePosition.js';\n\n/** Account kinds of the sendNexus program. */\nexport type SendNexusAccountType =\n\t| 'altRegistry'\n\t| 'creatorFeeConfig'\n\t| 'feePreset'\n\t| 'globalConfig'\n\t| 'partnerConfig'\n\t| 'partnerMetadata'\n\t| 'rewardState'\n\t| 'stakingConfig'\n\t| 'userRewardDebt'\n\t| 'userStakePosition';\n\n/**\n * Identifies sendNexus account data by its discriminators.\n * Returns `null` when the account belongs to another program or the data matches no known account.\n */\nexport function identifySendNexusAccount(\n\taccount:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendNexusAccountType | null {\n\tif (\n\t\t'data' in account &&\n\t\taccount.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in account ? account.data : account;\n\tif (containsBytes(data, ALT_REGISTRY_DISCRIMINATOR, 0)) {\n\t\treturn 'altRegistry';\n\t}\n\tif (containsBytes(data, CREATOR_FEE_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'creatorFeeConfig';\n\t}\n\tif (containsBytes(data, FEE_PRESET_DISCRIMINATOR, 0)) {\n\t\treturn 'feePreset';\n\t}\n\tif (containsBytes(data, GLOBAL_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'globalConfig';\n\t}\n\tif (containsBytes(data, PARTNER_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'partnerConfig';\n\t}\n\tif (containsBytes(data, PARTNER_METADATA_DISCRIMINATOR, 0)) {\n\t\treturn 'partnerMetadata';\n\t}\n\tif (containsBytes(data, REWARD_STATE_DISCRIMINATOR, 0)) {\n\t\treturn 'rewardState';\n\t}\n\tif (containsBytes(data, STAKING_CONFIG_DISCRIMINATOR, 0)) {\n\t\treturn 'stakingConfig';\n\t}\n\tif (containsBytes(data, USER_REWARD_DEBT_DISCRIMINATOR, 0)) {\n\t\treturn 'userRewardDebt';\n\t}\n\tif (containsBytes(data, USER_STAKE_POSITION_DISCRIMINATOR, 0)) {\n\t\treturn 'userStakePosition';\n\t}\n\treturn null;\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\nexport * from './altRegistry.js';\nexport * from './creatorFeeConfig.js';\nexport * from './feePreset.js';\nexport * from './globalConfig.js';\nexport * from './partnerConfig.js';\nexport * from './partnerMetadata.js';\nexport * from './rewardState.js';\nexport * from './sendNexus.accounts.js';\nexport * from './stakingConfig.js';\nexport * from './userRewardDebt.js';\nexport * from './userStakePosition.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tfixEncoderSize,\n\tgetBytesEncoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\n\n/**\n * Shared event-framing tag prepended to every CPI-framed event.\n *\n * `containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)` checks whether data is a framed event\n * at all — including event kinds unknown to this program.\n */\nexport const ANCHOR_EVENT_CPI_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([228, 69, 165, 46, 81, 203, 154, 29]);\n\nexport function getAnchorEventCpiDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const CLAIM_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t93, 15, 70, 170, 48, 140, 212, 219,\n]);\n\nexport function getClaimEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCLAIM_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type ClaimEvent = {\n\tuser: Address;\n\tstakingConfig: Address;\n\trewardMint: Address;\n\tamount: bigint;\n\ttimestamp: bigint;\n};\n\nlet getClaimEventDecoderCache: FixedSizeDecoder<ClaimEvent> | undefined;\n\nexport function getClaimEventDecoder(): FixedSizeDecoder<ClaimEvent> {\n\treturn (getClaimEventDecoderCache ??= getStructDecoder([\n\t\t['user', getAddressDecoder()],\n\t\t['stakingConfig', getAddressDecoder()],\n\t\t['rewardMint', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link ClaimEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseClaimEvent to decode the matching data\n */\nexport function isClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, CLAIM_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link ClaimEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isClaimEvent to check without decoding\n * @see identifySendNexusEvent to identify any program event\n * @see parseSendNexusEvent\n */\nexport function parseClaimEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ClaimEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isClaimEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getClaimEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tCLAIM_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const STAKE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t226, 134, 188, 173, 19, 33, 75, 175,\n]);\n\nexport function getStakeEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tSTAKE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type StakeEvent = {\n\tuser: Address;\n\tstakingConfig: Address;\n\tamount: bigint;\n\ttotalStaked: bigint;\n\ttimestamp: bigint;\n};\n\nlet getStakeEventDecoderCache: FixedSizeDecoder<StakeEvent> | undefined;\n\nexport function getStakeEventDecoder(): FixedSizeDecoder<StakeEvent> {\n\treturn (getStakeEventDecoderCache ??= getStructDecoder([\n\t\t['user', getAddressDecoder()],\n\t\t['stakingConfig', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['totalStaked', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link StakeEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseStakeEvent to decode the matching data\n */\nexport function isStakeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, STAKE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link StakeEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isStakeEvent to check without decoding\n * @see identifySendNexusEvent to identify any program event\n * @see parseSendNexusEvent\n */\nexport function parseStakeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): StakeEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isStakeEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getStakeEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tSTAKE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\tfixEncoderSize,\n\tgetAddressDecoder,\n\tgetBytesEncoder,\n\tgetI64Decoder,\n\tgetStructDecoder,\n\tgetU64Decoder,\n\ttype Address,\n\ttype FixedSizeDecoder,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\n\nexport const UNSTAKE_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t162, 104, 137, 228, 81, 3, 79, 197,\n]);\n\nexport function getUnstakeEventDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tUNSTAKE_EVENT_DISCRIMINATOR,\n\t);\n}\n\nexport type UnstakeEvent = {\n\tuser: Address;\n\tstakingConfig: Address;\n\tamount: bigint;\n\ttotalStaked: bigint;\n\ttimestamp: bigint;\n};\n\nlet getUnstakeEventDecoderCache: FixedSizeDecoder<UnstakeEvent> | undefined;\n\nexport function getUnstakeEventDecoder(): FixedSizeDecoder<UnstakeEvent> {\n\treturn (getUnstakeEventDecoderCache ??= getStructDecoder([\n\t\t['user', getAddressDecoder()],\n\t\t['stakingConfig', getAddressDecoder()],\n\t\t['amount', getU64Decoder()],\n\t\t['totalStaked', getU64Decoder()],\n\t\t['timestamp', getI64Decoder()],\n\t]));\n}\n\n/**\n * Checks whether the event data matches the framing and discriminator bytes of a\n * {@link UnstakeEvent}, without decoding. Never throws.\n *\n * Returns `false` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see parseUnstakeEvent to decode the matching data\n */\nexport function isUnstakeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): boolean {\n\tif ('data' in event && event.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS)\n\t\treturn false;\n\tconst data = 'data' in event ? event.data : event;\n\treturn (\n\t\tcontainsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0) &&\n\t\tcontainsBytes(data, UNSTAKE_EVENT_DISCRIMINATOR, 8)\n\t);\n}\n\n/**\n * Parses raw event data as a {@link UnstakeEvent}. Returns `null` on framing or discriminator\n * mismatch; throws if the event matches but its body fails to decode.\n *\n * Returns `null` unless `event.programAddress` is SEND_NEXUS_PROGRAM_ADDRESS.\n * Raw bytes carry no emitter and SKIP that check.\n *\n * @see isUnstakeEvent to check without decoding\n * @see identifySendNexusEvent to identify any program event\n * @see parseSendNexusEvent\n */\nexport function parseUnstakeEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): UnstakeEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tif (!isUnstakeEvent(checkedEvent)) {\n\t\treturn null;\n\t}\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\treturn getUnstakeEventDecoder().decode(\n\t\tdata,\n\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\tUNSTAKE_EVENT_DISCRIMINATOR.length,\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 {\n\tcontainsBytes,\n\ttype Address,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport { ANCHOR_EVENT_CPI_DISCRIMINATOR } from './anchorEventCpiDiscriminator.framing.js';\nimport {\n\tCLAIM_EVENT_DISCRIMINATOR,\n\tgetClaimEventDecoder,\n\ttype ClaimEvent,\n} from './claimEvent.js';\nimport {\n\tgetStakeEventDecoder,\n\tSTAKE_EVENT_DISCRIMINATOR,\n\ttype StakeEvent,\n} from './stakeEvent.js';\nimport {\n\tgetUnstakeEventDecoder,\n\ttype UnstakeEvent,\n\tUNSTAKE_EVENT_DISCRIMINATOR,\n} from './unstakeEvent.js';\n\n/** Event kinds of the sendNexus program. */\nexport type SendNexusEventType = 'claimEvent' | 'stakeEvent' | 'unstakeEvent';\n\n/**\n * Identifies sendNexus event data by its discriminators, without decoding.\n * Returns `null` when the event was emitted by another program or no known event matches.\n * Never throws.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function identifySendNexusEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendNexusEventType | null {\n\tif ('data' in event && event.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS)\n\t\treturn null;\n\tconst data = 'data' in event ? event.data : event;\n\tif (containsBytes(data, ANCHOR_EVENT_CPI_DISCRIMINATOR, 0)) {\n\t\tif (containsBytes(data, CLAIM_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'claimEvent';\n\t\t}\n\t\tif (containsBytes(data, STAKE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'stakeEvent';\n\t\t}\n\t\tif (containsBytes(data, UNSTAKE_EVENT_DISCRIMINATOR, 8)) {\n\t\t\treturn 'unstakeEvent';\n\t\t}\n\t}\n\treturn null;\n}\n\n/** Parsed sendNexus event: the event kind tag plus its decoded payload. */\nexport type ParsedSendNexusEvent =\n\t| { eventType: 'claimEvent'; data: ClaimEvent }\n\t| { eventType: 'stakeEvent'; data: StakeEvent }\n\t| { eventType: 'unstakeEvent'; data: UnstakeEvent };\n\n/**\n * Parses sendNexus event data into its event kind and decoded payload.\n * Returns `null` when the event was emitted by another program or no known event matches;\n * throws if a matched event fails to decode.\n *\n * Raw bytes carry no emitter and SKIP the program check.\n */\nexport function parseSendNexusEvent(\n\tevent:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): ParsedSendNexusEvent | null {\n\tconst checkedEvent =\n\t\t'data' in event\n\t\t\t? { data: event.data, programAddress: event.programAddress }\n\t\t\t: event;\n\tconst eventType = identifySendNexusEvent(checkedEvent);\n\tif (eventType === null) return null;\n\tconst data = 'data' in checkedEvent ? checkedEvent.data : checkedEvent;\n\tswitch (eventType) {\n\t\tcase 'claimEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'claimEvent',\n\t\t\t\tdata: getClaimEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tCLAIM_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'stakeEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'stakeEvent',\n\t\t\t\tdata: getStakeEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tSTAKE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase 'unstakeEvent': {\n\t\t\treturn {\n\t\t\t\teventType: 'unstakeEvent',\n\t\t\t\tdata: getUnstakeEventDecoder().decode(\n\t\t\t\t\tdata,\n\t\t\t\t\tANCHOR_EVENT_CPI_DISCRIMINATOR.length +\n\t\t\t\t\t\tUNSTAKE_EVENT_DISCRIMINATOR.length,\n\t\t\t\t),\n\t\t\t};\n\t\t}\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\nexport * from './anchorEventCpiDiscriminator.framing.js';\nexport * from './claimEvent.js';\nexport * from './sendNexus.events.js';\nexport * from './stakeEvent.js';\nexport * from './unstakeEvent.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tisProgramError,\n\ttype Address,\n\ttype SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n\ttype SolanaError,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\n/** InsufficientStake: Insufficient stake balance */\nexport const SEND_NEXUS_ERROR__INSUFFICIENT_STAKE = 0x1770; // 6000\n/** InvalidRewardMint: Invalid reward mint */\nexport const SEND_NEXUS_ERROR__INVALID_REWARD_MINT = 0x1771; // 6001\n/** InvalidVault: Invalid vault */\nexport const SEND_NEXUS_ERROR__INVALID_VAULT = 0x1772; // 6002\n/** StakingAlreadyEnabled: Staking already enabled */\nexport const SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED = 0x1775; // 6005\n/** StakingNotEnabled: Staking not enabled */\nexport const SEND_NEXUS_ERROR__STAKING_NOT_ENABLED = 0x1776; // 6006\n/** InvalidStakingMint: Invalid staking mint */\nexport const SEND_NEXUS_ERROR__INVALID_STAKING_MINT = 0x1777; // 6007\n/** InvalidRewardState: Invalid reward state */\nexport const SEND_NEXUS_ERROR__INVALID_REWARD_STATE = 0x1778; // 6008\n/** InvalidMint: Invalid mint */\nexport const SEND_NEXUS_ERROR__INVALID_MINT = 0x1779; // 6009\n/** InvalidDestination: Invalid destination account */\nexport const SEND_NEXUS_ERROR__INVALID_DESTINATION = 0x177a; // 6010\n/** StakingMintAlreadyBound: Staking mint already bound */\nexport const SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND = 0x177b; // 6011\n/** InvalidFeePreset: Invalid fee configuration */\nexport const SEND_NEXUS_ERROR__INVALID_FEE_PRESET = 0x177c; // 6012\n/** InvalidPresetIndex: Invalid preset index */\nexport const SEND_NEXUS_ERROR__INVALID_PRESET_INDEX = 0x177d; // 6013\n/** MissingFeeSource: Must provide either fee_preset or custom fees */\nexport const SEND_NEXUS_ERROR__MISSING_FEE_SOURCE = 0x177e; // 6014\n/** AmbiguousFeeSource: Cannot specify both fee_preset and custom_fees */\nexport const SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE = 0x177f; // 6015\n/** InvalidPartnerName: Partner name cannot be empty */\nexport const SEND_NEXUS_ERROR__INVALID_PARTNER_NAME = 0x1780; // 6016\n/** PartnerNotOnPreset: Partner account does not use this preset */\nexport const SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET = 0x1781; // 6017\n/** InvalidPartnerNote: Invalid partner note */\nexport const SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE = 0x1782; // 6018\n/** InvalidPresetName: Invalid preset name */\nexport const SEND_NEXUS_ERROR__INVALID_PRESET_NAME = 0x1783; // 6019\n/** TooManyAuthPlatforms: Too many auth platforms (max 255) */\nexport const SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS = 0x1784; // 6020\n/** InvalidAuthPlatformIndex: Invalid auth platform index */\nexport const SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX = 0x1785; // 6021\n/** InvalidAuthPlatformName: Invalid auth platform name */\nexport const SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME = 0x1786; // 6022\n/** DuplicateAuthPlatformName: Duplicate auth platform name */\nexport const SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME = 0x1787; // 6023\n/** InvalidAuthority: Invalid authority */\nexport const SEND_NEXUS_ERROR__INVALID_AUTHORITY = 0x1788; // 6024\n/** ReservedPartner: Cannot add the default partner */\nexport const SEND_NEXUS_ERROR__RESERVED_PARTNER = 0x1789; // 6025\n/** InvalidRewardAccrual: Invalid reward accrual */\nexport const SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL = 0x178a; // 6026\n/** RewardsNotSettled: Settle every reward mint before staking or unstaking - call settle for each registered mint */\nexport const SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED = 0x178b; // 6027\n/** InvalidUsdcPrice: USDC price must be non-zero - 0 means no price */\nexport const SEND_NEXUS_ERROR__INVALID_USDC_PRICE = 0x178c; // 6028\n/** InvalidPlatformConfig: Platform config cannot be the default address */\nexport const SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG = 0x178d; // 6029\n/** InvalidPartnerConfig: Partner config address does not match its stored seeds */\nexport const SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG = 0x178e; // 6030\n/** PresetPlatformMismatch: Fee preset belongs to a different platform */\nexport const SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH = 0x178f; // 6031\n/** ProgramPaused: Program is paused */\nexport const SEND_NEXUS_ERROR__PROGRAM_PAUSED = 0x1b58; // 7000\n/** Unauthorized: Unauthorized */\nexport const SEND_NEXUS_ERROR__UNAUTHORIZED = 0x1b59; // 7001\n/** ArithmeticOverflow: Arithmetic overflow */\nexport const SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW = 0x1b5a; // 7002\n/** InvalidPythAccount: Invalid Pyth price account */\nexport const SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT = 0x1b5b; // 7003\n/** InvalidPythFeed: Invalid Pyth feed ID */\nexport const SEND_NEXUS_ERROR__INVALID_PYTH_FEED = 0x1b5c; // 7004\n/** InvalidSlug: Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore */\nexport const SEND_NEXUS_ERROR__INVALID_SLUG = 0x1b5d; // 7005\n/** TextTooLong: Text too long */\nexport const SEND_NEXUS_ERROR__TEXT_TOO_LONG = 0x1b5e; // 7006\n/** UserTokenAccountWrongProgram: User token account owned by the wrong token program */\nexport const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM = 0x1b5f; // 7007\n/** UserTokenAccountInvalid: User token account is not an initialized token account */\nexport const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID = 0x1b60; // 7008\n/** UserTokenAccountWrongMint: User token account mint does not match the trade */\nexport const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 0x1b61; // 7009\n/** UserTokenAccountWrongAuthority: User token account is not owned by the trading user */\nexport const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 0x1b62; // 7010\n/** NothingToClaim: Nothing to claim */\nexport const SEND_NEXUS_ERROR__NOTHING_TO_CLAIM = 0x1b63; // 7011\n/** InvalidCreatorId: Creator identity is not a decodable wallet address */\nexport const SEND_NEXUS_ERROR__INVALID_CREATOR_ID = 0x1b64; // 7012\n/** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */\nexport const SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET = 0x1b65; // 7013\n/** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */\nexport const SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 0x1b66; // 7014\n/** InsufficientLiquidity: Insufficient liquidity */\nexport const SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY = 0x1bbc; // 7100\n/** InvalidAmount: Invalid amount */\nexport const SEND_NEXUS_ERROR__INVALID_AMOUNT = 0x1bbd; // 7101\n\nexport type SendNexusError =\n\t| typeof SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE\n\t| typeof SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW\n\t| typeof SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME\n\t| typeof SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY\n\t| typeof SEND_NEXUS_ERROR__INSUFFICIENT_STAKE\n\t| typeof SEND_NEXUS_ERROR__INVALID_AMOUNT\n\t| typeof SEND_NEXUS_ERROR__INVALID_AUTHORITY\n\t| typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX\n\t| typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME\n\t| typeof SEND_NEXUS_ERROR__INVALID_CREATOR_ID\n\t| typeof SEND_NEXUS_ERROR__INVALID_DESTINATION\n\t| typeof SEND_NEXUS_ERROR__INVALID_FEE_PRESET\n\t| typeof SEND_NEXUS_ERROR__INVALID_MINT\n\t| typeof SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG\n\t| typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NAME\n\t| typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE\n\t| typeof SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG\n\t| typeof SEND_NEXUS_ERROR__INVALID_PRESET_INDEX\n\t| typeof SEND_NEXUS_ERROR__INVALID_PRESET_NAME\n\t| typeof SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT\n\t| typeof SEND_NEXUS_ERROR__INVALID_PYTH_FEED\n\t| typeof SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL\n\t| typeof SEND_NEXUS_ERROR__INVALID_REWARD_MINT\n\t| typeof SEND_NEXUS_ERROR__INVALID_REWARD_STATE\n\t| typeof SEND_NEXUS_ERROR__INVALID_SLUG\n\t| typeof SEND_NEXUS_ERROR__INVALID_STAKING_MINT\n\t| typeof SEND_NEXUS_ERROR__INVALID_USDC_PRICE\n\t| typeof SEND_NEXUS_ERROR__INVALID_VAULT\n\t| typeof SEND_NEXUS_ERROR__MISSING_FEE_SOURCE\n\t| typeof SEND_NEXUS_ERROR__NOTHING_TO_CLAIM\n\t| typeof SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET\n\t| typeof SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH\n\t| typeof SEND_NEXUS_ERROR__PROGRAM_PAUSED\n\t| typeof SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET\n\t| typeof SEND_NEXUS_ERROR__RESERVED_PARTNER\n\t| typeof SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED\n\t| typeof SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED\n\t| typeof SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND\n\t| typeof SEND_NEXUS_ERROR__STAKING_NOT_ENABLED\n\t| typeof SEND_NEXUS_ERROR__TEXT_TOO_LONG\n\t| typeof SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS\n\t| typeof SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE\n\t| typeof SEND_NEXUS_ERROR__UNAUTHORIZED\n\t| typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID\n\t| typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY\n\t| typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT\n\t| typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;\n\nexport const sendNexusErrorMessages: Record<SendNexusError, string> = {\n\t[SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE]: `Cannot specify both fee_preset and custom_fees`,\n\t[SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW]: `Arithmetic overflow`,\n\t[SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME]: `Duplicate auth platform name`,\n\t[SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY]: `Insufficient liquidity`,\n\t[SEND_NEXUS_ERROR__INSUFFICIENT_STAKE]: `Insufficient stake balance`,\n\t[SEND_NEXUS_ERROR__INVALID_AMOUNT]: `Invalid amount`,\n\t[SEND_NEXUS_ERROR__INVALID_AUTHORITY]: `Invalid authority`,\n\t[SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX]: `Invalid auth platform index`,\n\t[SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME]: `Invalid auth platform name`,\n\t[SEND_NEXUS_ERROR__INVALID_CREATOR_ID]: `Creator identity is not a decodable wallet address`,\n\t[SEND_NEXUS_ERROR__INVALID_DESTINATION]: `Invalid destination account`,\n\t[SEND_NEXUS_ERROR__INVALID_FEE_PRESET]: `Invalid fee configuration`,\n\t[SEND_NEXUS_ERROR__INVALID_MINT]: `Invalid mint`,\n\t[SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG]: `Partner config address does not match its stored seeds`,\n\t[SEND_NEXUS_ERROR__INVALID_PARTNER_NAME]: `Partner name cannot be empty`,\n\t[SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE]: `Invalid partner note`,\n\t[SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG]: `Platform config cannot be the default address`,\n\t[SEND_NEXUS_ERROR__INVALID_PRESET_INDEX]: `Invalid preset index`,\n\t[SEND_NEXUS_ERROR__INVALID_PRESET_NAME]: `Invalid preset name`,\n\t[SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT]: `Invalid Pyth price account`,\n\t[SEND_NEXUS_ERROR__INVALID_PYTH_FEED]: `Invalid Pyth feed ID`,\n\t[SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL]: `Invalid reward accrual`,\n\t[SEND_NEXUS_ERROR__INVALID_REWARD_MINT]: `Invalid reward mint`,\n\t[SEND_NEXUS_ERROR__INVALID_REWARD_STATE]: `Invalid reward state`,\n\t[SEND_NEXUS_ERROR__INVALID_SLUG]: `Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore`,\n\t[SEND_NEXUS_ERROR__INVALID_STAKING_MINT]: `Invalid staking mint`,\n\t[SEND_NEXUS_ERROR__INVALID_USDC_PRICE]: `USDC price must be non-zero - 0 means no price`,\n\t[SEND_NEXUS_ERROR__INVALID_VAULT]: `Invalid vault`,\n\t[SEND_NEXUS_ERROR__MISSING_FEE_SOURCE]: `Must provide either fee_preset or custom fees`,\n\t[SEND_NEXUS_ERROR__NOTHING_TO_CLAIM]: `Nothing to claim`,\n\t[SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET]: `Partner account does not use this preset`,\n\t[SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH]: `Fee preset belongs to a different platform`,\n\t[SEND_NEXUS_ERROR__PROGRAM_PAUSED]: `Program is paused`,\n\t[SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET]: `Quote mint has no USDC price on its nexus reward state`,\n\t[SEND_NEXUS_ERROR__RESERVED_PARTNER]: `Cannot add the default partner`,\n\t[SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED]: `Settle every reward mint before staking or unstaking - call settle for each registered mint`,\n\t[SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED]: `Staking already enabled`,\n\t[SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND]: `Staking mint already bound`,\n\t[SEND_NEXUS_ERROR__STAKING_NOT_ENABLED]: `Staking not enabled`,\n\t[SEND_NEXUS_ERROR__TEXT_TOO_LONG]: `Text too long`,\n\t[SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS]: `Too many auth platforms (max 255)`,\n\t[SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE]: `Token-2022 transfer fee schedule cannot settle the exact amount`,\n\t[SEND_NEXUS_ERROR__UNAUTHORIZED]: `Unauthorized`,\n\t[SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID]: `User token account is not an initialized token account`,\n\t[SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY]: `User token account is not owned by the trading user`,\n\t[SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT]: `User token account mint does not match the trade`,\n\t[SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM]: `User token account owned by the wrong token program`,\n} as const;\n\nexport function getSendNexusErrorMessage(code: SendNexusError): string {\n\treturn sendNexusErrorMessages[code];\n}\n\nexport function isSendNexusError<TProgramErrorCode extends SendNexusError>(\n\terror: unknown,\n\ttransactionMessage: {\n\t\tinstructions: Record<number, { programAddress: Address }>;\n\t},\n\tcode?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &\n\tReadonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n\treturn isProgramError<TProgramErrorCode>(\n\t\terror,\n\t\ttransactionMessage,\n\t\tSEND_NEXUS_PROGRAM_ADDRESS,\n\t\tcode,\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\nexport * from './sendNexus.js';\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const ALT_REGISTRY_PDA_ADDRESS =\n\t'8QbgorUFZXo6Nv6CTn3Xgf1bYiu8yy5NsJNvxr19JA9H' as Address<'8QbgorUFZXo6Nv6CTn3Xgf1bYiu8yy5NsJNvxr19JA9H'>;\n\nexport function findAltRegistryPda(): ProgramDerivedAddress {\n\treturn [ALT_REGISTRY_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type DefaultFeePresetSeeds = {\n\tplatformConfig: Address;\n};\n\nexport async function findDefaultFeePresetPda(\n\tseeds: DefaultFeePresetSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t102, 101, 101, 95, 112, 114, 101, 115, 101, 116,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetBytesEncoder().encode(new Uint8Array([0])),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type DefaultPartnerSeeds = {\n\tplatformConfig: Address;\n};\n\nexport async function findDefaultPartnerPda(\n\tseeds: DefaultPartnerSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t]),\n\t\t\t),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type DefaultPartnerMetadataSeeds = {\n\tplatformConfig: Address;\n};\n\nexport async function findDefaultPartnerMetadataPda(\n\tseeds: DefaultPartnerMetadataSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t112, 97, 114, 116, 110, 101, 114, 95, 109, 101, 116, 97,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t]),\n\t\t\t),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const EVENT_AUTHORITY_PDA_ADDRESS =\n\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr' as Address<'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr'>;\n\nexport function findEventAuthorityPda(): ProgramDerivedAddress {\n\treturn [EVENT_AUTHORITY_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetU8Encoder,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type FeePresetSeeds = {\n\tplatformConfig: Address;\n\tindex: number;\n};\n\nexport async function findFeePresetPda(\n\tseeds: FeePresetSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t102, 101, 101, 95, 112, 114, 101, 115, 101, 116,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetU8Encoder().encode(seeds.index),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const GLOBAL_CONFIG_PDA_ADDRESS =\n\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr' as Address<'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr'>;\n\nexport function findGlobalConfigPda(): ProgramDerivedAddress {\n\treturn [GLOBAL_CONFIG_PDA_ADDRESS, 254 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type PartnerConfigSeeds = {\n\tplatformConfig: Address;\n\tpartner: Address;\n};\n\nexport async function findPartnerConfigPda(\n\tseeds: PartnerConfigSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([112, 97, 114, 116, 110, 101, 114]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetAddressEncoder().encode(seeds.partner),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type PartnerMetadataSeeds = {\n\tplatformConfig: Address;\n\tpartner: Address;\n};\n\nexport async function findPartnerMetadataPda(\n\tseeds: PartnerMetadataSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t112, 97, 114, 116, 110, 101, 114, 95, 109, 101, 116, 97,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.platformConfig),\n\t\t\tgetAddressEncoder().encode(seeds.partner),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type RewardStateSeeds = {\n\tstakingConfig: Address;\n\trewardMint: Address;\n};\n\nexport async function findRewardStatePda(\n\tseeds: RewardStateSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([114, 101, 119, 97, 114, 100]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.stakingConfig),\n\t\t\tgetAddressEncoder().encode(seeds.rewardMint),\n\t\t],\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 type {\n\tAddress,\n\tProgramDerivedAddress,\n\tProgramDerivedAddressBump,\n} from '@solana/kit';\n\nexport const STAKING_CONFIG_PDA_ADDRESS =\n\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF' as Address<'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF'>;\n\nexport function findStakingConfigPda(): ProgramDerivedAddress {\n\treturn [STAKING_CONFIG_PDA_ADDRESS, 255 as ProgramDerivedAddressBump];\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type UserRewardDebtSeeds = {\n\tuser: Address;\n\tstakingMint: Address;\n\trewardMint: Address;\n};\n\nexport async function findUserRewardDebtPda(\n\tseeds: UserRewardDebtSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t117, 115, 101, 114, 95, 114, 101, 119, 97, 114, 100, 95,\n\t\t\t\t\t100, 101, 98, 116,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.user),\n\t\t\tgetAddressEncoder().encode(seeds.stakingMint),\n\t\t\tgetAddressEncoder().encode(seeds.rewardMint),\n\t\t],\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 {\n\tgetAddressEncoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\ttype Address,\n\ttype ProgramDerivedAddress,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport type UserStakePositionSeeds = {\n\tuser: Address;\n\tstakingMint: Address;\n};\n\nexport async function findUserStakePositionPda(\n\tseeds: UserStakePositionSeeds,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tgetBytesEncoder().encode(\n\t\t\t\tnew Uint8Array([\n\t\t\t\t\t117, 115, 101, 114, 95, 115, 116, 97, 107, 101, 95, 112,\n\t\t\t\t\t111, 115, 105, 116, 105, 111, 110,\n\t\t\t\t]),\n\t\t\t),\n\t\t\tgetAddressEncoder().encode(seeds.user),\n\t\t\tgetAddressEncoder().encode(seeds.stakingMint),\n\t\t],\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\nexport * from './altRegistry.js';\nexport * from './creatorFeeConfig.js';\nexport * from './defaultFeePreset.js';\nexport * from './defaultPartner.js';\nexport * from './defaultPartnerMetadata.js';\nexport * from './eventAuthority.js';\nexport * from './feePreset.js';\nexport * from './globalConfig.js';\nexport * from './partnerConfig.js';\nexport * from './partnerMetadata.js';\nexport * from './rewardState.js';\nexport * from './stakingConfig.js';\nexport * from './userRewardDebt.js';\nexport * from './userStakePosition.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindRewardStatePda,\n\tfindUserRewardDebtPda,\n\tfindUserStakePositionPda,\n\tSTAKING_CONFIG_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CLAIM_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t62, 198, 214, 193, 213, 159, 108, 210,\n]);\n\nexport function getClaimDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(CLAIM_DISCRIMINATOR);\n}\n\nexport type ClaimInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountStakingMint extends string | AccountMeta<string> = string,\n\tTAccountRewardMint extends string | AccountMeta<string> = string,\n\tTAccountStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountUserStakePosition extends string | AccountMeta<string> = string,\n\tTAccountRewardState extends string | AccountMeta<string> = string,\n\tTAccountVault extends string | AccountMeta<string> = string,\n\tTAccountLaunchpadRewardAccrual extends string | AccountMeta<string> =\n\t\tstring,\n\tTAccountDexRewardAccrual extends string | AccountMeta<string> = string,\n\tTAccountUserRewardDebt extends string | AccountMeta<string> = string,\n\tTAccountDestination extends string | AccountMeta<string> = string,\n\tTAccountTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountStakingMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingMint>\n\t\t\t\t: TAccountStakingMint,\n\t\t\tTAccountRewardMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountRewardMint>\n\t\t\t\t: TAccountRewardMint,\n\t\t\tTAccountStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingConfig>\n\t\t\t\t: TAccountStakingConfig,\n\t\t\tTAccountUserStakePosition extends string\n\t\t\t\t? WritableAccount<TAccountUserStakePosition>\n\t\t\t\t: TAccountUserStakePosition,\n\t\t\tTAccountRewardState extends string\n\t\t\t\t? WritableAccount<TAccountRewardState>\n\t\t\t\t: TAccountRewardState,\n\t\t\tTAccountVault extends string\n\t\t\t\t? WritableAccount<TAccountVault>\n\t\t\t\t: TAccountVault,\n\t\t\tTAccountLaunchpadRewardAccrual extends string\n\t\t\t\t? ReadonlyAccount<TAccountLaunchpadRewardAccrual>\n\t\t\t\t: TAccountLaunchpadRewardAccrual,\n\t\t\tTAccountDexRewardAccrual extends string\n\t\t\t\t? ReadonlyAccount<TAccountDexRewardAccrual>\n\t\t\t\t: TAccountDexRewardAccrual,\n\t\t\tTAccountUserRewardDebt extends string\n\t\t\t\t? WritableAccount<TAccountUserRewardDebt>\n\t\t\t\t: TAccountUserRewardDebt,\n\t\t\tTAccountDestination extends string\n\t\t\t\t? WritableAccount<TAccountDestination>\n\t\t\t\t: TAccountDestination,\n\t\t\tTAccountTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountTokenProgram>\n\t\t\t\t: TAccountTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type ClaimInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type ClaimInstructionDataArgs = {};\n\nexport function getClaimInstructionDataEncoder(): FixedSizeEncoder<ClaimInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: CLAIM_DISCRIMINATOR }),\n\t);\n}\n\nexport function getClaimInstructionDataDecoder(): FixedSizeDecoder<ClaimInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getClaimInstructionDataCodec(): FixedSizeCodec<\n\tClaimInstructionDataArgs,\n\tClaimInstructionData\n> {\n\treturn combineCodec(\n\t\tgetClaimInstructionDataEncoder(),\n\t\tgetClaimInstructionDataDecoder(),\n\t);\n}\n\nexport type ClaimAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountRewardState extends string = string,\n\tTAccountVault extends string = string,\n\tTAccountLaunchpadRewardAccrual extends string = string,\n\tTAccountDexRewardAccrual extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition?: Address<TAccountUserStakePosition>;\n\trewardState?: Address<TAccountRewardState>;\n\tvault: Address<TAccountVault>;\n\tlaunchpadRewardAccrual?: Address<TAccountLaunchpadRewardAccrual>;\n\tdexRewardAccrual?: Address<TAccountDexRewardAccrual>;\n\tuserRewardDebt?: Address<TAccountUserRewardDebt>;\n\tdestination: Address<TAccountDestination>;\n\ttokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport async function getClaimInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountRewardState extends string,\n\tTAccountVault extends string,\n\tTAccountLaunchpadRewardAccrual extends string,\n\tTAccountDexRewardAccrual extends string,\n\tTAccountUserRewardDebt extends string,\n\tTAccountDestination extends string,\n\tTAccountTokenProgram extends string,\n>(\n\tinput: ClaimAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountRewardState,\n\t\tTAccountVault,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt,\n\t\tTAccountDestination,\n\t\tTAccountTokenProgram\n\t>,\n): Promise<\n\tClaimInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountRewardState,\n\t\tTAccountVault,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt,\n\t\tTAccountDestination,\n\t\tTAccountTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: {\n\t\t\tvalue: input.stakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\trewardState: { value: input.rewardState ?? null, isWritable: true },\n\t\tvault: { value: input.vault ?? null, isWritable: true },\n\t\tlaunchpadRewardAccrual: {\n\t\t\tvalue: input.launchpadRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdexRewardAccrual: {\n\t\t\tvalue: input.dexRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\ttokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.userStakePosition.value) {\n\t\taccounts.userStakePosition.value = await findUserStakePositionPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.rewardState.value) {\n\t\taccounts.rewardState.value = await findRewardStatePda({\n\t\t\tstakingConfig: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingConfig',\n\t\t\t\taccounts.stakingConfig.value,\n\t\t\t),\n\t\t\trewardMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'rewardMint',\n\t\t\t\taccounts.rewardMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.launchpadRewardAccrual.value) {\n\t\taccounts.launchpadRewardAccrual.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([\n\t\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117,\n\t\t\t\t\t\t97, 108,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'rewardMint',\n\t\t\t\t\t\taccounts.rewardMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.dexRewardAccrual.value) {\n\t\taccounts.dexRewardAccrual.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([\n\t\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117,\n\t\t\t\t\t\t97, 108,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'rewardMint',\n\t\t\t\t\t\taccounts.rewardMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userRewardDebt.value) {\n\t\taccounts.userRewardDebt.value = await findUserRewardDebtPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t\trewardMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'rewardMint',\n\t\t\t\taccounts.rewardMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('rewardState', accounts.rewardState),\n\t\t\tgetAccountMeta('vault', accounts.vault),\n\t\t\tgetAccountMeta(\n\t\t\t\t'launchpadRewardAccrual',\n\t\t\t\taccounts.launchpadRewardAccrual,\n\t\t\t),\n\t\t\tgetAccountMeta('dexRewardAccrual', accounts.dexRewardAccrual),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountRewardState,\n\t\tTAccountVault,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt,\n\t\tTAccountDestination,\n\t\tTAccountTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type ClaimInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountRewardState extends string = string,\n\tTAccountVault extends string = string,\n\tTAccountLaunchpadRewardAccrual extends string = string,\n\tTAccountDexRewardAccrual extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n\tTAccountDestination extends string = string,\n\tTAccountTokenProgram extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition: Address<TAccountUserStakePosition>;\n\trewardState: Address<TAccountRewardState>;\n\tvault: Address<TAccountVault>;\n\tlaunchpadRewardAccrual: Address<TAccountLaunchpadRewardAccrual>;\n\tdexRewardAccrual: Address<TAccountDexRewardAccrual>;\n\tuserRewardDebt: Address<TAccountUserRewardDebt>;\n\tdestination: Address<TAccountDestination>;\n\ttokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport function getClaimInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountRewardState extends string,\n\tTAccountVault extends string,\n\tTAccountLaunchpadRewardAccrual extends string,\n\tTAccountDexRewardAccrual extends string,\n\tTAccountUserRewardDebt extends string,\n\tTAccountDestination extends string,\n\tTAccountTokenProgram extends string,\n>(\n\tinput: ClaimInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountRewardState,\n\t\tTAccountVault,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt,\n\t\tTAccountDestination,\n\t\tTAccountTokenProgram\n\t>,\n): ClaimInstruction<\n\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountStakingMint,\n\tTAccountRewardMint,\n\tTAccountStakingConfig,\n\tTAccountUserStakePosition,\n\tTAccountRewardState,\n\tTAccountVault,\n\tTAccountLaunchpadRewardAccrual,\n\tTAccountDexRewardAccrual,\n\tTAccountUserRewardDebt,\n\tTAccountDestination,\n\tTAccountTokenProgram,\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: {\n\t\t\tvalue: input.stakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\trewardState: { value: input.rewardState ?? null, isWritable: true },\n\t\tvault: { value: input.vault ?? null, isWritable: true },\n\t\tlaunchpadRewardAccrual: {\n\t\t\tvalue: input.launchpadRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdexRewardAccrual: {\n\t\t\tvalue: input.dexRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tdestination: { value: input.destination ?? null, isWritable: true },\n\t\ttokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('rewardState', accounts.rewardState),\n\t\t\tgetAccountMeta('vault', accounts.vault),\n\t\t\tgetAccountMeta(\n\t\t\t\t'launchpadRewardAccrual',\n\t\t\t\taccounts.launchpadRewardAccrual,\n\t\t\t),\n\t\t\tgetAccountMeta('dexRewardAccrual', accounts.dexRewardAccrual),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t\tgetAccountMeta('destination', accounts.destination),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getClaimInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as ClaimInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountRewardState,\n\t\tTAccountVault,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt,\n\t\tTAccountDestination,\n\t\tTAccountTokenProgram,\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type ParsedClaimInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tstakingMint: TAccountMetas[2];\n\t\trewardMint: TAccountMetas[3];\n\t\tstakingConfig: TAccountMetas[4];\n\t\tuserStakePosition: TAccountMetas[5];\n\t\trewardState: TAccountMetas[6];\n\t\tvault: TAccountMetas[7];\n\t\tlaunchpadRewardAccrual: TAccountMetas[8];\n\t\tdexRewardAccrual: TAccountMetas[9];\n\t\tuserRewardDebt: TAccountMetas[10];\n\t\tdestination: TAccountMetas[11];\n\t\ttokenProgram: TAccountMetas[12];\n\t\tassociatedTokenProgram: TAccountMetas[13];\n\t\tsystemProgram: TAccountMetas[14];\n\t\teventAuthority: TAccountMetas[15];\n\t\tprogram: TAccountMetas[16];\n\t};\n\tdata: ClaimInstructionData;\n};\n\nexport function parseClaimInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedClaimInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_NEXUS_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, CLAIM_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseClaimInstruction: instruction data does not match the Claim discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 17) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 17,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tstakingMint: getNextAccount(),\n\t\t\trewardMint: getNextAccount(),\n\t\t\tstakingConfig: getNextAccount(),\n\t\t\tuserStakePosition: getNextAccount(),\n\t\t\trewardState: getNextAccount(),\n\t\t\tvault: getNextAccount(),\n\t\t\tlaunchpadRewardAccrual: getNextAccount(),\n\t\t\tdexRewardAccrual: getNextAccount(),\n\t\t\tuserRewardDebt: getNextAccount(),\n\t\t\tdestination: getNextAccount(),\n\t\t\ttokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getClaimInstructionDataDecoder().decode(instruction.data),\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 {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\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\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tfindRewardStatePda,\n\tfindUserRewardDebtPda,\n\tfindUserStakePositionPda,\n\tSTAKING_CONFIG_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const CREATE_USER_REWARD_DEBT_DISCRIMINATOR: ReadonlyUint8Array =\n\tnew Uint8Array([155, 124, 113, 190, 252, 235, 113, 155]);\n\nexport function getCreateUserRewardDebtDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(\n\t\tCREATE_USER_REWARD_DEBT_DISCRIMINATOR,\n\t);\n}\n\nexport type CreateUserRewardDebtInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountStakingMint extends string | AccountMeta<string> = string,\n\tTAccountRewardMint extends string | AccountMeta<string> = string,\n\tTAccountStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountRewardState extends string | AccountMeta<string> = string,\n\tTAccountUserStakePosition extends string | AccountMeta<string> = string,\n\tTAccountUserRewardDebt extends string | AccountMeta<string> = string,\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlyAccount<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountStakingMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingMint>\n\t\t\t\t: TAccountStakingMint,\n\t\t\tTAccountRewardMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountRewardMint>\n\t\t\t\t: TAccountRewardMint,\n\t\t\tTAccountStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingConfig>\n\t\t\t\t: TAccountStakingConfig,\n\t\t\tTAccountRewardState extends string\n\t\t\t\t? ReadonlyAccount<TAccountRewardState>\n\t\t\t\t: TAccountRewardState,\n\t\t\tTAccountUserStakePosition extends string\n\t\t\t\t? WritableAccount<TAccountUserStakePosition>\n\t\t\t\t: TAccountUserStakePosition,\n\t\t\tTAccountUserRewardDebt extends string\n\t\t\t\t? WritableAccount<TAccountUserRewardDebt>\n\t\t\t\t: TAccountUserRewardDebt,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type CreateUserRewardDebtInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n};\n\nexport type CreateUserRewardDebtInstructionDataArgs = {};\n\nexport function getCreateUserRewardDebtInstructionDataEncoder(): FixedSizeEncoder<CreateUserRewardDebtInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({\n\t\t\t...value,\n\t\t\tdiscriminator: CREATE_USER_REWARD_DEBT_DISCRIMINATOR,\n\t\t}),\n\t);\n}\n\nexport function getCreateUserRewardDebtInstructionDataDecoder(): FixedSizeDecoder<CreateUserRewardDebtInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getCreateUserRewardDebtInstructionDataCodec(): FixedSizeCodec<\n\tCreateUserRewardDebtInstructionDataArgs,\n\tCreateUserRewardDebtInstructionData\n> {\n\treturn combineCodec(\n\t\tgetCreateUserRewardDebtInstructionDataEncoder(),\n\t\tgetCreateUserRewardDebtInstructionDataDecoder(),\n\t);\n}\n\nexport type CreateUserRewardDebtAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountRewardState extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n> = {\n\tuser: Address<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\trewardState?: Address<TAccountRewardState>;\n\tuserStakePosition?: Address<TAccountUserStakePosition>;\n\tuserRewardDebt?: Address<TAccountUserRewardDebt>;\n};\n\nexport async function getCreateUserRewardDebtInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountRewardState extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserRewardDebt extends string,\n>(\n\tinput: CreateUserRewardDebtAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountRewardState,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserRewardDebt\n\t>,\n): Promise<\n\tCreateUserRewardDebtInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountRewardState,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserRewardDebt,\n\t\t'11111111111111111111111111111111'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: {\n\t\t\tvalue: input.stakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardState: { value: input.rewardState ?? null, isWritable: false },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.rewardState.value) {\n\t\taccounts.rewardState.value = await findRewardStatePda({\n\t\t\tstakingConfig: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingConfig',\n\t\t\t\taccounts.stakingConfig.value,\n\t\t\t),\n\t\t\trewardMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'rewardMint',\n\t\t\t\taccounts.rewardMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.userStakePosition.value) {\n\t\taccounts.userStakePosition.value = await findUserStakePositionPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.userRewardDebt.value) {\n\t\taccounts.userRewardDebt.value = await findUserRewardDebtPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t\trewardMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'rewardMint',\n\t\t\t\taccounts.rewardMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('rewardState', accounts.rewardState),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t],\n\t\tdata: getCreateUserRewardDebtInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as CreateUserRewardDebtInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountRewardState,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserRewardDebt,\n\t\t'11111111111111111111111111111111'\n\t>);\n}\n\nexport type CreateUserRewardDebtInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountRewardState extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n> = {\n\tuser: Address<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\trewardState: Address<TAccountRewardState>;\n\tuserStakePosition: Address<TAccountUserStakePosition>;\n\tuserRewardDebt: Address<TAccountUserRewardDebt>;\n};\n\nexport function getCreateUserRewardDebtInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountRewardState extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserRewardDebt extends string,\n>(\n\tinput: CreateUserRewardDebtInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountRewardState,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserRewardDebt\n\t>,\n): CreateUserRewardDebtInstruction<\n\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountStakingMint,\n\tTAccountRewardMint,\n\tTAccountStakingConfig,\n\tTAccountRewardState,\n\tTAccountUserStakePosition,\n\tTAccountUserRewardDebt,\n\t'11111111111111111111111111111111'\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: {\n\t\t\tvalue: input.stakingConfig ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\trewardState: { value: input.rewardState ?? null, isWritable: false },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tsystemProgram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('rewardState', accounts.rewardState),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t],\n\t\tdata: getCreateUserRewardDebtInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as CreateUserRewardDebtInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountRewardState,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserRewardDebt,\n\t\t'11111111111111111111111111111111'\n\t>);\n}\n\nexport type ParsedCreateUserRewardDebtInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tstakingMint: TAccountMetas[2];\n\t\trewardMint: TAccountMetas[3];\n\t\tstakingConfig: TAccountMetas[4];\n\t\trewardState: TAccountMetas[5];\n\t\tuserStakePosition: TAccountMetas[6];\n\t\tuserRewardDebt: TAccountMetas[7];\n\t\tsystemProgram: TAccountMetas[8];\n\t};\n\tdata: CreateUserRewardDebtInstructionData;\n};\n\nexport function parseCreateUserRewardDebtInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedCreateUserRewardDebtInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_NEXUS_PROGRAM_ADDRESS);\n\tif (\n\t\t!containsBytes(\n\t\t\tinstruction.data,\n\t\t\tCREATE_USER_REWARD_DEBT_DISCRIMINATOR,\n\t\t\t0,\n\t\t)\n\t) {\n\t\tconst error = new Error(\n\t\t\t`parseCreateUserRewardDebtInstruction: instruction data does not match the CreateUserRewardDebt discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 9) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 9,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tstakingMint: getNextAccount(),\n\t\t\trewardMint: getNextAccount(),\n\t\t\tstakingConfig: getNextAccount(),\n\t\t\trewardState: getNextAccount(),\n\t\t\tuserStakePosition: getNextAccount(),\n\t\t\tuserRewardDebt: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t},\n\t\tdata: getCreateUserRewardDebtInstructionDataDecoder().decode(\n\t\t\tinstruction.data,\n\t\t),\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 {\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\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\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tfindUserRewardDebtPda,\n\tfindUserStakePositionPda,\n\tSTAKING_CONFIG_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const SETTLE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t175, 42, 185, 87, 144, 131, 102, 212,\n]);\n\nexport function getSettleDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(SETTLE_DISCRIMINATOR);\n}\n\nexport type SettleInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountStakingMint extends string | AccountMeta<string> = string,\n\tTAccountRewardMint extends string | AccountMeta<string> = string,\n\tTAccountStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountUserStakePosition extends string | AccountMeta<string> = string,\n\tTAccountLaunchpadRewardAccrual extends string | AccountMeta<string> =\n\t\tstring,\n\tTAccountDexRewardAccrual extends string | AccountMeta<string> = string,\n\tTAccountUserRewardDebt extends string | AccountMeta<string> = string,\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlyAccount<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountStakingMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingMint>\n\t\t\t\t: TAccountStakingMint,\n\t\t\tTAccountRewardMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountRewardMint>\n\t\t\t\t: TAccountRewardMint,\n\t\t\tTAccountStakingConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingConfig>\n\t\t\t\t: TAccountStakingConfig,\n\t\t\tTAccountUserStakePosition extends string\n\t\t\t\t? WritableAccount<TAccountUserStakePosition>\n\t\t\t\t: TAccountUserStakePosition,\n\t\t\tTAccountLaunchpadRewardAccrual extends string\n\t\t\t\t? ReadonlyAccount<TAccountLaunchpadRewardAccrual>\n\t\t\t\t: TAccountLaunchpadRewardAccrual,\n\t\t\tTAccountDexRewardAccrual extends string\n\t\t\t\t? ReadonlyAccount<TAccountDexRewardAccrual>\n\t\t\t\t: TAccountDexRewardAccrual,\n\t\t\tTAccountUserRewardDebt extends string\n\t\t\t\t? WritableAccount<TAccountUserRewardDebt>\n\t\t\t\t: TAccountUserRewardDebt,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type SettleInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type SettleInstructionDataArgs = {};\n\nexport function getSettleInstructionDataEncoder(): FixedSizeEncoder<SettleInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: SETTLE_DISCRIMINATOR }),\n\t);\n}\n\nexport function getSettleInstructionDataDecoder(): FixedSizeDecoder<SettleInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t]);\n}\n\nexport function getSettleInstructionDataCodec(): FixedSizeCodec<\n\tSettleInstructionDataArgs,\n\tSettleInstructionData\n> {\n\treturn combineCodec(\n\t\tgetSettleInstructionDataEncoder(),\n\t\tgetSettleInstructionDataDecoder(),\n\t);\n}\n\nexport type SettleAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountLaunchpadRewardAccrual extends string = string,\n\tTAccountDexRewardAccrual extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n> = {\n\tuser: Address<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tuserStakePosition?: Address<TAccountUserStakePosition>;\n\tlaunchpadRewardAccrual?: Address<TAccountLaunchpadRewardAccrual>;\n\tdexRewardAccrual?: Address<TAccountDexRewardAccrual>;\n\tuserRewardDebt?: Address<TAccountUserRewardDebt>;\n};\n\nexport async function getSettleInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountLaunchpadRewardAccrual extends string,\n\tTAccountDexRewardAccrual extends string,\n\tTAccountUserRewardDebt extends string,\n>(\n\tinput: SettleAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountUserStakePosition,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt\n\t>,\n): Promise<\n\tSettleInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\t\tTAccountUserStakePosition,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: { value: null, isWritable: false },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tlaunchpadRewardAccrual: {\n\t\t\tvalue: input.launchpadRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdexRewardAccrual: {\n\t\t\tvalue: input.dexRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.userStakePosition.value) {\n\t\taccounts.userStakePosition.value = await findUserStakePositionPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.launchpadRewardAccrual.value) {\n\t\taccounts.launchpadRewardAccrual.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP' as Address<'5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([\n\t\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117,\n\t\t\t\t\t\t97, 108,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'rewardMint',\n\t\t\t\t\t\taccounts.rewardMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.dexRewardAccrual.value) {\n\t\taccounts.dexRewardAccrual.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX' as Address<'84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX'>,\n\t\t\tseeds: [\n\t\t\t\tgetBytesEncoder().encode(\n\t\t\t\t\tnew Uint8Array([\n\t\t\t\t\t\t114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117,\n\t\t\t\t\t\t97, 108,\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'rewardMint',\n\t\t\t\t\t\taccounts.rewardMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.userRewardDebt.value) {\n\t\taccounts.userRewardDebt.value = await findUserRewardDebtPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t\trewardMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'rewardMint',\n\t\t\t\taccounts.rewardMint.value,\n\t\t\t),\n\t\t});\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta(\n\t\t\t\t'launchpadRewardAccrual',\n\t\t\t\taccounts.launchpadRewardAccrual,\n\t\t\t),\n\t\t\tgetAccountMeta('dexRewardAccrual', accounts.dexRewardAccrual),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t],\n\t\tdata: getSettleInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as SettleInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\t\tTAccountUserStakePosition,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt\n\t>);\n}\n\nexport type SettleInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountRewardMint extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountLaunchpadRewardAccrual extends string = string,\n\tTAccountDexRewardAccrual extends string = string,\n\tTAccountUserRewardDebt extends string = string,\n> = {\n\tuser: Address<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\trewardMint: Address<TAccountRewardMint>;\n\tuserStakePosition: Address<TAccountUserStakePosition>;\n\tlaunchpadRewardAccrual: Address<TAccountLaunchpadRewardAccrual>;\n\tdexRewardAccrual: Address<TAccountDexRewardAccrual>;\n\tuserRewardDebt: Address<TAccountUserRewardDebt>;\n};\n\nexport function getSettleInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountRewardMint extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountLaunchpadRewardAccrual extends string,\n\tTAccountDexRewardAccrual extends string,\n\tTAccountUserRewardDebt extends string,\n>(\n\tinput: SettleInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\tTAccountUserStakePosition,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt\n\t>,\n): SettleInstruction<\n\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountStakingMint,\n\tTAccountRewardMint,\n\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountUserStakePosition,\n\tTAccountLaunchpadRewardAccrual,\n\tTAccountDexRewardAccrual,\n\tTAccountUserRewardDebt\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\trewardMint: { value: input.rewardMint ?? null, isWritable: false },\n\t\tstakingConfig: { value: null, isWritable: false },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tlaunchpadRewardAccrual: {\n\t\t\tvalue: input.launchpadRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tdexRewardAccrual: {\n\t\t\tvalue: input.dexRewardAccrual ?? null,\n\t\t\tisWritable: false,\n\t\t},\n\t\tuserRewardDebt: {\n\t\t\tvalue: input.userRewardDebt ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('rewardMint', accounts.rewardMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta(\n\t\t\t\t'launchpadRewardAccrual',\n\t\t\t\taccounts.launchpadRewardAccrual,\n\t\t\t),\n\t\t\tgetAccountMeta('dexRewardAccrual', accounts.dexRewardAccrual),\n\t\t\tgetAccountMeta('userRewardDebt', accounts.userRewardDebt),\n\t\t],\n\t\tdata: getSettleInstructionDataEncoder().encode({}),\n\t\tprogramAddress,\n\t} as SettleInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountRewardMint,\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\t\tTAccountUserStakePosition,\n\t\tTAccountLaunchpadRewardAccrual,\n\t\tTAccountDexRewardAccrual,\n\t\tTAccountUserRewardDebt\n\t>);\n}\n\nexport type ParsedSettleInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tstakingMint: TAccountMetas[2];\n\t\trewardMint: TAccountMetas[3];\n\t\tstakingConfig: TAccountMetas[4];\n\t\tuserStakePosition: TAccountMetas[5];\n\t\tlaunchpadRewardAccrual: TAccountMetas[6];\n\t\tdexRewardAccrual: TAccountMetas[7];\n\t\tuserRewardDebt: TAccountMetas[8];\n\t};\n\tdata: SettleInstructionData;\n};\n\nexport function parseSettleInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSettleInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_NEXUS_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, SETTLE_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseSettleInstruction: instruction data does not match the Settle discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 9) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 9,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tstakingMint: getNextAccount(),\n\t\t\trewardMint: getNextAccount(),\n\t\t\tstakingConfig: getNextAccount(),\n\t\t\tuserStakePosition: getNextAccount(),\n\t\t\tlaunchpadRewardAccrual: getNextAccount(),\n\t\t\tdexRewardAccrual: getNextAccount(),\n\t\t\tuserRewardDebt: getNextAccount(),\n\t\t},\n\t\tdata: getSettleInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindUserStakePositionPda,\n\tGLOBAL_CONFIG_PDA_ADDRESS,\n\tSTAKING_CONFIG_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const STAKE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t206, 176, 202, 18, 200, 209, 179, 108,\n]);\n\nexport function getStakeDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(STAKE_DISCRIMINATOR);\n}\n\nexport type StakeInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountStakingMint extends string | AccountMeta<string> = string,\n\tTAccountGlobalConfig extends string | AccountMeta<string> =\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountUserStakePosition extends string | AccountMeta<string> = string,\n\tTAccountUserTokenAccount extends string | AccountMeta<string> = string,\n\tTAccountPoolVault extends string | AccountMeta<string> = string,\n\tTAccountTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountStakingMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingMint>\n\t\t\t\t: TAccountStakingMint,\n\t\t\tTAccountGlobalConfig extends string\n\t\t\t\t? ReadonlyAccount<TAccountGlobalConfig>\n\t\t\t\t: TAccountGlobalConfig,\n\t\t\tTAccountStakingConfig extends string\n\t\t\t\t? WritableAccount<TAccountStakingConfig>\n\t\t\t\t: TAccountStakingConfig,\n\t\t\tTAccountUserStakePosition extends string\n\t\t\t\t? WritableAccount<TAccountUserStakePosition>\n\t\t\t\t: TAccountUserStakePosition,\n\t\t\tTAccountUserTokenAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserTokenAccount>\n\t\t\t\t: TAccountUserTokenAccount,\n\t\t\tTAccountPoolVault extends string\n\t\t\t\t? WritableAccount<TAccountPoolVault>\n\t\t\t\t: TAccountPoolVault,\n\t\t\tTAccountTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountTokenProgram>\n\t\t\t\t: TAccountTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type StakeInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamount: bigint;\n};\n\nexport type StakeInstructionDataArgs = { amount: number | bigint };\n\nexport function getStakeInstructionDataEncoder(): FixedSizeEncoder<StakeInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amount', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: STAKE_DISCRIMINATOR }),\n\t);\n}\n\nexport function getStakeInstructionDataDecoder(): FixedSizeDecoder<StakeInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amount', getU64Decoder()],\n\t]);\n}\n\nexport function getStakeInstructionDataCodec(): FixedSizeCodec<\n\tStakeInstructionDataArgs,\n\tStakeInstructionData\n> {\n\treturn combineCodec(\n\t\tgetStakeInstructionDataEncoder(),\n\t\tgetStakeInstructionDataDecoder(),\n\t);\n}\n\nexport type StakeAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserTokenAccount extends string = string,\n\tTAccountPoolVault extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition?: Address<TAccountUserStakePosition>;\n\tuserTokenAccount?: Address<TAccountUserTokenAccount>;\n\tpoolVault?: Address<TAccountPoolVault>;\n\tamount: StakeInstructionDataArgs['amount'];\n};\n\nexport async function getStakeInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserTokenAccount extends string,\n\tTAccountPoolVault extends string,\n>(\n\tinput: StakeAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault\n\t>,\n): Promise<\n\tStakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\tglobalConfig: { value: null, isWritable: false },\n\t\tstakingConfig: { value: input.stakingConfig ?? null, isWritable: true },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserTokenAccount: {\n\t\t\tvalue: input.userTokenAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolVault: { value: input.poolVault ?? null, isWritable: true },\n\t\ttokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.globalConfig.value) {\n\t\taccounts.globalConfig.value = GLOBAL_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.userStakePosition.value) {\n\t\taccounts.userStakePosition.value = await findUserStakePositionPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.userTokenAccount.value) {\n\t\taccounts.userTokenAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingMint',\n\t\t\t\t\t\taccounts.stakingMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.poolVault.value) {\n\t\taccounts.poolVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingConfig',\n\t\t\t\t\t\taccounts.stakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingMint',\n\t\t\t\t\t\taccounts.stakingMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('globalConfig', accounts.globalConfig),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userTokenAccount', accounts.userTokenAccount),\n\t\t\tgetAccountMeta('poolVault', accounts.poolVault),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getStakeInstructionDataEncoder().encode(\n\t\t\targs as StakeInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as StakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type StakeInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserTokenAccount extends string = string,\n\tTAccountPoolVault extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition: Address<TAccountUserStakePosition>;\n\tuserTokenAccount: Address<TAccountUserTokenAccount>;\n\tpoolVault: Address<TAccountPoolVault>;\n\tamount: StakeInstructionDataArgs['amount'];\n};\n\nexport function getStakeInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserTokenAccount extends string,\n\tTAccountPoolVault extends string,\n>(\n\tinput: StakeInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault\n\t>,\n): StakeInstruction<\n\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountStakingMint,\n\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\tTAccountStakingConfig,\n\tTAccountUserStakePosition,\n\tTAccountUserTokenAccount,\n\tTAccountPoolVault,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\tglobalConfig: { value: null, isWritable: false },\n\t\tstakingConfig: { value: input.stakingConfig ?? null, isWritable: true },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserTokenAccount: {\n\t\t\tvalue: input.userTokenAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolVault: { value: input.poolVault ?? null, isWritable: true },\n\t\ttokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.globalConfig.value) {\n\t\taccounts.globalConfig.value = GLOBAL_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('globalConfig', accounts.globalConfig),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userTokenAccount', accounts.userTokenAccount),\n\t\t\tgetAccountMeta('poolVault', accounts.poolVault),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getStakeInstructionDataEncoder().encode(\n\t\t\targs as StakeInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as StakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\t'3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr',\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type ParsedStakeInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tstakingMint: TAccountMetas[2];\n\t\tglobalConfig: TAccountMetas[3];\n\t\tstakingConfig: TAccountMetas[4];\n\t\tuserStakePosition: TAccountMetas[5];\n\t\tuserTokenAccount: TAccountMetas[6];\n\t\tpoolVault: TAccountMetas[7];\n\t\ttokenProgram: TAccountMetas[8];\n\t\tassociatedTokenProgram: TAccountMetas[9];\n\t\tsystemProgram: TAccountMetas[10];\n\t\teventAuthority: TAccountMetas[11];\n\t\tprogram: TAccountMetas[12];\n\t};\n\tdata: StakeInstructionData;\n};\n\nexport function parseStakeInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedStakeInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_NEXUS_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, STAKE_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseStakeInstruction: instruction data does not match the Stake discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 13) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 13,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tstakingMint: getNextAccount(),\n\t\t\tglobalConfig: getNextAccount(),\n\t\t\tstakingConfig: getNextAccount(),\n\t\t\tuserStakePosition: getNextAccount(),\n\t\t\tuserTokenAccount: getNextAccount(),\n\t\t\tpoolVault: getNextAccount(),\n\t\t\ttokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getStakeInstructionDataDecoder().decode(instruction.data),\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 {\n\taddress,\n\tassertIsInstructionForProgram,\n\tcombineCodec,\n\tcontainsBytes,\n\tfixDecoderSize,\n\tfixEncoderSize,\n\tgetAddressEncoder,\n\tgetBytesDecoder,\n\tgetBytesEncoder,\n\tgetProgramDerivedAddress,\n\tgetStructDecoder,\n\tgetStructEncoder,\n\tgetU64Decoder,\n\tgetU64Encoder,\n\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\tSolanaError,\n\ttransformEncoder,\n\ttype AccountMeta,\n\ttype AccountSignerMeta,\n\ttype Address,\n\ttype FixedSizeCodec,\n\ttype FixedSizeDecoder,\n\ttype FixedSizeEncoder,\n\ttype Instruction,\n\ttype InstructionWithAccounts,\n\ttype InstructionWithData,\n\ttype ReadonlyAccount,\n\ttype ReadonlySignerAccount,\n\ttype ReadonlyUint8Array,\n\ttype TransactionSigner,\n\ttype WritableAccount,\n\ttype WritableSignerAccount,\n} from '@solana/kit';\nimport {\n\tgetAccountMetaFactory,\n\tgetAddressFromResolvedInstructionAccount,\n\ttype ResolvedInstructionAccount,\n} from '@solana/program-client-core';\nimport {\n\tEVENT_AUTHORITY_PDA_ADDRESS,\n\tfindUserStakePositionPda,\n\tSTAKING_CONFIG_PDA_ADDRESS,\n} from '../pdas/index.js';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\n\nexport const UNSTAKE_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([\n\t90, 95, 107, 42, 205, 124, 50, 225,\n]);\n\nexport function getUnstakeDiscriminatorBytes(): ReadonlyUint8Array {\n\treturn fixEncoderSize(getBytesEncoder(), 8).encode(UNSTAKE_DISCRIMINATOR);\n}\n\nexport type UnstakeInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser extends string | AccountMeta<string> = string,\n\tTAccountPayer extends string | AccountMeta<string> = string,\n\tTAccountStakingMint extends string | AccountMeta<string> = string,\n\tTAccountStakingConfig extends string | AccountMeta<string> =\n\t\t'9WUowYRb6KAWjWVB5KMmTngBidZXEXgQcQRTXbhxeGbF',\n\tTAccountUserStakePosition extends string | AccountMeta<string> = string,\n\tTAccountUserTokenAccount extends string | AccountMeta<string> = string,\n\tTAccountPoolVault extends string | AccountMeta<string> = string,\n\tTAccountTokenProgram extends string | AccountMeta<string> =\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\tTAccountAssociatedTokenProgram extends string | AccountMeta<string> =\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\tTAccountSystemProgram extends string | AccountMeta<string> =\n\t\t'11111111111111111111111111111111',\n\tTAccountEventAuthority extends string | AccountMeta<string> =\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\tTAccountProgram extends string | AccountMeta<string> =\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n\tTRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n\tInstructionWithData<ReadonlyUint8Array> &\n\tInstructionWithAccounts<\n\t\t[\n\t\t\tTAccountUser extends string\n\t\t\t\t? ReadonlySignerAccount<TAccountUser> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountUser>\n\t\t\t\t: TAccountUser,\n\t\t\tTAccountPayer extends string\n\t\t\t\t? WritableSignerAccount<TAccountPayer> &\n\t\t\t\t\t\tAccountSignerMeta<TAccountPayer>\n\t\t\t\t: TAccountPayer,\n\t\t\tTAccountStakingMint extends string\n\t\t\t\t? ReadonlyAccount<TAccountStakingMint>\n\t\t\t\t: TAccountStakingMint,\n\t\t\tTAccountStakingConfig extends string\n\t\t\t\t? WritableAccount<TAccountStakingConfig>\n\t\t\t\t: TAccountStakingConfig,\n\t\t\tTAccountUserStakePosition extends string\n\t\t\t\t? WritableAccount<TAccountUserStakePosition>\n\t\t\t\t: TAccountUserStakePosition,\n\t\t\tTAccountUserTokenAccount extends string\n\t\t\t\t? WritableAccount<TAccountUserTokenAccount>\n\t\t\t\t: TAccountUserTokenAccount,\n\t\t\tTAccountPoolVault extends string\n\t\t\t\t? WritableAccount<TAccountPoolVault>\n\t\t\t\t: TAccountPoolVault,\n\t\t\tTAccountTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountTokenProgram>\n\t\t\t\t: TAccountTokenProgram,\n\t\t\tTAccountAssociatedTokenProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountAssociatedTokenProgram>\n\t\t\t\t: TAccountAssociatedTokenProgram,\n\t\t\tTAccountSystemProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountSystemProgram>\n\t\t\t\t: TAccountSystemProgram,\n\t\t\tTAccountEventAuthority extends string\n\t\t\t\t? ReadonlyAccount<TAccountEventAuthority>\n\t\t\t\t: TAccountEventAuthority,\n\t\t\tTAccountProgram extends string\n\t\t\t\t? ReadonlyAccount<TAccountProgram>\n\t\t\t\t: TAccountProgram,\n\t\t\t...TRemainingAccounts,\n\t\t]\n\t>;\n\nexport type UnstakeInstructionData = {\n\tdiscriminator: ReadonlyUint8Array;\n\tamount: bigint;\n};\n\nexport type UnstakeInstructionDataArgs = { amount: number | bigint };\n\nexport function getUnstakeInstructionDataEncoder(): FixedSizeEncoder<UnstakeInstructionDataArgs> {\n\treturn transformEncoder(\n\t\tgetStructEncoder([\n\t\t\t['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n\t\t\t['amount', getU64Encoder()],\n\t\t]),\n\t\t(value) => ({ ...value, discriminator: UNSTAKE_DISCRIMINATOR }),\n\t);\n}\n\nexport function getUnstakeInstructionDataDecoder(): FixedSizeDecoder<UnstakeInstructionData> {\n\treturn getStructDecoder([\n\t\t['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n\t\t['amount', getU64Decoder()],\n\t]);\n}\n\nexport function getUnstakeInstructionDataCodec(): FixedSizeCodec<\n\tUnstakeInstructionDataArgs,\n\tUnstakeInstructionData\n> {\n\treturn combineCodec(\n\t\tgetUnstakeInstructionDataEncoder(),\n\t\tgetUnstakeInstructionDataDecoder(),\n\t);\n}\n\nexport type UnstakeAsyncInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserTokenAccount extends string = string,\n\tTAccountPoolVault extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition?: Address<TAccountUserStakePosition>;\n\tuserTokenAccount?: Address<TAccountUserTokenAccount>;\n\tpoolVault?: Address<TAccountPoolVault>;\n\tamount: UnstakeInstructionDataArgs['amount'];\n};\n\nexport async function getUnstakeInstructionAsync<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserTokenAccount extends string,\n\tTAccountPoolVault extends string,\n>(\n\tinput: UnstakeAsyncInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault\n\t>,\n): Promise<\n\tUnstakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\tstakingConfig: { value: input.stakingConfig ?? null, isWritable: true },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserTokenAccount: {\n\t\t\tvalue: input.userTokenAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolVault: { value: input.poolVault ?? null, isWritable: true },\n\t\ttokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.userStakePosition.value) {\n\t\taccounts.userStakePosition.value = await findUserStakePositionPda({\n\t\t\tuser: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'user',\n\t\t\t\taccounts.user.value,\n\t\t\t),\n\t\t\tstakingMint: getAddressFromResolvedInstructionAccount(\n\t\t\t\t'stakingMint',\n\t\t\t\taccounts.stakingMint.value,\n\t\t\t),\n\t\t});\n\t}\n\tif (!accounts.userTokenAccount.value) {\n\t\taccounts.userTokenAccount.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'user',\n\t\t\t\t\t\taccounts.user.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingMint',\n\t\t\t\t\t\taccounts.stakingMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.poolVault.value) {\n\t\taccounts.poolVault.value = await getProgramDerivedAddress({\n\t\t\tprogramAddress:\n\t\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n\t\t\tseeds: [\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingConfig',\n\t\t\t\t\t\taccounts.stakingConfig.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\taddress('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'),\n\t\t\t\t),\n\t\t\t\tgetAddressEncoder().encode(\n\t\t\t\t\tgetAddressFromResolvedInstructionAccount(\n\t\t\t\t\t\t'stakingMint',\n\t\t\t\t\t\taccounts.stakingMint.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t],\n\t\t});\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userTokenAccount', accounts.userTokenAccount),\n\t\t\tgetAccountMeta('poolVault', accounts.poolVault),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getUnstakeInstructionDataEncoder().encode(\n\t\t\targs as UnstakeInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as UnstakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type UnstakeInput<\n\tTAccountUser extends string = string,\n\tTAccountPayer extends string = string,\n\tTAccountStakingMint extends string = string,\n\tTAccountStakingConfig extends string = string,\n\tTAccountUserStakePosition extends string = string,\n\tTAccountUserTokenAccount extends string = string,\n\tTAccountPoolVault extends string = string,\n> = {\n\tuser: TransactionSigner<TAccountUser>;\n\tpayer: TransactionSigner<TAccountPayer>;\n\tstakingMint: Address<TAccountStakingMint>;\n\tstakingConfig?: Address<TAccountStakingConfig>;\n\tuserStakePosition: Address<TAccountUserStakePosition>;\n\tuserTokenAccount: Address<TAccountUserTokenAccount>;\n\tpoolVault: Address<TAccountPoolVault>;\n\tamount: UnstakeInstructionDataArgs['amount'];\n};\n\nexport function getUnstakeInstruction<\n\tTAccountUser extends string,\n\tTAccountPayer extends string,\n\tTAccountStakingMint extends string,\n\tTAccountStakingConfig extends string,\n\tTAccountUserStakePosition extends string,\n\tTAccountUserTokenAccount extends string,\n\tTAccountPoolVault extends string,\n>(\n\tinput: UnstakeInput<\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault\n\t>,\n): UnstakeInstruction<\n\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountUser,\n\tTAccountPayer,\n\tTAccountStakingMint,\n\tTAccountStakingConfig,\n\tTAccountUserStakePosition,\n\tTAccountUserTokenAccount,\n\tTAccountPoolVault,\n\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t'11111111111111111111111111111111',\n\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n> {\n\t// Program address.\n\tconst programAddress = SEND_NEXUS_PROGRAM_ADDRESS;\n\n\t// Original accounts.\n\tconst originalAccounts = {\n\t\tuser: { value: input.user ?? null, isWritable: false },\n\t\tpayer: { value: input.payer ?? null, isWritable: true },\n\t\tstakingMint: { value: input.stakingMint ?? null, isWritable: false },\n\t\tstakingConfig: { value: input.stakingConfig ?? null, isWritable: true },\n\t\tuserStakePosition: {\n\t\t\tvalue: input.userStakePosition ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tuserTokenAccount: {\n\t\t\tvalue: input.userTokenAccount ?? null,\n\t\t\tisWritable: true,\n\t\t},\n\t\tpoolVault: { value: input.poolVault ?? null, isWritable: true },\n\t\ttokenProgram: { value: null, isWritable: false },\n\t\tassociatedTokenProgram: { value: null, isWritable: false },\n\t\tsystemProgram: { value: null, isWritable: false },\n\t\teventAuthority: { value: null, isWritable: false },\n\t\tprogram: { value: null, isWritable: false },\n\t};\n\tconst accounts = originalAccounts as Record<\n\t\tkeyof typeof originalAccounts,\n\t\tResolvedInstructionAccount\n\t>;\n\n\t// Original args.\n\tconst args = { ...input };\n\n\t// Resolve default values.\n\tif (!accounts.stakingConfig.value) {\n\t\taccounts.stakingConfig.value = STAKING_CONFIG_PDA_ADDRESS;\n\t}\n\tif (!accounts.tokenProgram.value) {\n\t\taccounts.tokenProgram.value =\n\t\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n\t}\n\tif (!accounts.associatedTokenProgram.value) {\n\t\taccounts.associatedTokenProgram.value =\n\t\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n\t}\n\tif (!accounts.systemProgram.value) {\n\t\taccounts.systemProgram.value =\n\t\t\t'11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n\t}\n\tif (!accounts.eventAuthority.value) {\n\t\taccounts.eventAuthority.value = EVENT_AUTHORITY_PDA_ADDRESS;\n\t}\n\tif (!accounts.program.value) {\n\t\taccounts.program.value =\n\t\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX' as Address<'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'>;\n\t}\n\n\tconst getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n\treturn Object.freeze({\n\t\taccounts: [\n\t\t\tgetAccountMeta('user', accounts.user),\n\t\t\tgetAccountMeta('payer', accounts.payer),\n\t\t\tgetAccountMeta('stakingMint', accounts.stakingMint),\n\t\t\tgetAccountMeta('stakingConfig', accounts.stakingConfig),\n\t\t\tgetAccountMeta('userStakePosition', accounts.userStakePosition),\n\t\t\tgetAccountMeta('userTokenAccount', accounts.userTokenAccount),\n\t\t\tgetAccountMeta('poolVault', accounts.poolVault),\n\t\t\tgetAccountMeta('tokenProgram', accounts.tokenProgram),\n\t\t\tgetAccountMeta(\n\t\t\t\t'associatedTokenProgram',\n\t\t\t\taccounts.associatedTokenProgram,\n\t\t\t),\n\t\t\tgetAccountMeta('systemProgram', accounts.systemProgram),\n\t\t\tgetAccountMeta('eventAuthority', accounts.eventAuthority),\n\t\t\tgetAccountMeta('program', accounts.program),\n\t\t],\n\t\tdata: getUnstakeInstructionDataEncoder().encode(\n\t\t\targs as UnstakeInstructionDataArgs,\n\t\t),\n\t\tprogramAddress,\n\t} as UnstakeInstruction<\n\t\ttypeof SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tTAccountUser,\n\t\tTAccountPayer,\n\t\tTAccountStakingMint,\n\t\tTAccountStakingConfig,\n\t\tTAccountUserStakePosition,\n\t\tTAccountUserTokenAccount,\n\t\tTAccountPoolVault,\n\t\t'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n\t\t'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n\t\t'11111111111111111111111111111111',\n\t\t'BxA56yuUugqREwSEFVr117VKJ6JmVdPA7jm7MCXzDNJr',\n\t\t'7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX'\n\t>);\n}\n\nexport type ParsedUnstakeInstruction<\n\tTProgram extends string = typeof SEND_NEXUS_PROGRAM_ADDRESS,\n\tTAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n\tprogramAddress: Address<TProgram>;\n\taccounts: {\n\t\tuser: TAccountMetas[0];\n\t\tpayer: TAccountMetas[1];\n\t\tstakingMint: TAccountMetas[2];\n\t\tstakingConfig: TAccountMetas[3];\n\t\tuserStakePosition: TAccountMetas[4];\n\t\tuserTokenAccount: TAccountMetas[5];\n\t\tpoolVault: TAccountMetas[6];\n\t\ttokenProgram: TAccountMetas[7];\n\t\tassociatedTokenProgram: TAccountMetas[8];\n\t\tsystemProgram: TAccountMetas[9];\n\t\teventAuthority: TAccountMetas[10];\n\t\tprogram: TAccountMetas[11];\n\t};\n\tdata: UnstakeInstructionData;\n};\n\nexport function parseUnstakeInstruction<\n\tTProgram extends string,\n\tTAccountMetas extends readonly AccountMeta[],\n>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithAccounts<TAccountMetas> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedUnstakeInstruction<TProgram, TAccountMetas> {\n\tassertIsInstructionForProgram(instruction, SEND_NEXUS_PROGRAM_ADDRESS);\n\tif (!containsBytes(instruction.data, UNSTAKE_DISCRIMINATOR, 0)) {\n\t\tconst error = new Error(\n\t\t\t`parseUnstakeInstruction: instruction data does not match the Unstake discriminator`,\n\t\t);\n\t\terror.name = 'InstructionDiscriminatorMismatchError';\n\t\tthrow error;\n\t}\n\tif (instruction.accounts.length < 12) {\n\t\tthrow new SolanaError(\n\t\t\tSOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,\n\t\t\t{\n\t\t\t\tactualAccountMetas: instruction.accounts.length,\n\t\t\t\texpectedAccountMetas: 12,\n\t\t\t},\n\t\t);\n\t}\n\tlet accountIndex = 0;\n\tconst getNextAccount = () => {\n\t\tconst accountMeta = (instruction.accounts as TAccountMetas)[\n\t\t\taccountIndex\n\t\t]!;\n\t\taccountIndex += 1;\n\t\treturn accountMeta;\n\t};\n\treturn {\n\t\tprogramAddress: instruction.programAddress,\n\t\taccounts: {\n\t\t\tuser: getNextAccount(),\n\t\t\tpayer: getNextAccount(),\n\t\t\tstakingMint: getNextAccount(),\n\t\t\tstakingConfig: getNextAccount(),\n\t\t\tuserStakePosition: getNextAccount(),\n\t\t\tuserTokenAccount: getNextAccount(),\n\t\t\tpoolVault: getNextAccount(),\n\t\t\ttokenProgram: getNextAccount(),\n\t\t\tassociatedTokenProgram: getNextAccount(),\n\t\t\tsystemProgram: getNextAccount(),\n\t\t\teventAuthority: getNextAccount(),\n\t\t\tprogram: getNextAccount(),\n\t\t},\n\t\tdata: getUnstakeInstructionDataDecoder().decode(instruction.data),\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 {\n\tassertIsInstructionWithAccounts,\n\tcontainsBytes,\n\ttype Address,\n\ttype Instruction,\n\ttype InstructionWithData,\n\ttype ReadonlyUint8Array,\n} from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from '../programs/index.js';\nimport {\n\tCLAIM_DISCRIMINATOR,\n\tparseClaimInstruction,\n\ttype ParsedClaimInstruction,\n} from './claim.js';\nimport {\n\tCREATE_USER_REWARD_DEBT_DISCRIMINATOR,\n\tparseCreateUserRewardDebtInstruction,\n\ttype ParsedCreateUserRewardDebtInstruction,\n} from './createUserRewardDebt.js';\nimport {\n\tparseSettleInstruction,\n\tSETTLE_DISCRIMINATOR,\n\ttype ParsedSettleInstruction,\n} from './settle.js';\nimport {\n\tparseStakeInstruction,\n\tSTAKE_DISCRIMINATOR,\n\ttype ParsedStakeInstruction,\n} from './stake.js';\nimport {\n\tparseUnstakeInstruction,\n\ttype ParsedUnstakeInstruction,\n\tUNSTAKE_DISCRIMINATOR,\n} from './unstake.js';\n\n/** Instruction kinds of the sendNexus program. */\nexport type SendNexusInstructionType =\n\t| 'claim'\n\t| 'createUserRewardDebt'\n\t| 'settle'\n\t| 'stake'\n\t| 'unstake';\n\n/**\n * Identifies sendNexus instruction data by its discriminators.\n * Returns `null` when the instruction is for another program or the data matches no known instruction.\n */\nexport function identifySendNexusInstruction(\n\tinstruction:\n\t\t| { data: ReadonlyUint8Array; programAddress: Address }\n\t\t| ReadonlyUint8Array,\n): SendNexusInstructionType | null {\n\tif (\n\t\t'data' in instruction &&\n\t\tinstruction.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS\n\t)\n\t\treturn null;\n\tconst data = 'data' in instruction ? instruction.data : instruction;\n\tif (containsBytes(data, CLAIM_DISCRIMINATOR, 0)) {\n\t\treturn 'claim';\n\t}\n\tif (containsBytes(data, CREATE_USER_REWARD_DEBT_DISCRIMINATOR, 0)) {\n\t\treturn 'createUserRewardDebt';\n\t}\n\tif (containsBytes(data, SETTLE_DISCRIMINATOR, 0)) {\n\t\treturn 'settle';\n\t}\n\tif (containsBytes(data, STAKE_DISCRIMINATOR, 0)) {\n\t\treturn 'stake';\n\t}\n\tif (containsBytes(data, UNSTAKE_DISCRIMINATOR, 0)) {\n\t\treturn 'unstake';\n\t}\n\treturn null;\n}\n\n/** Parsed sendNexus instruction: the instruction kind tag plus its parsed accounts and data. */\nexport type ParsedSendNexusInstruction<\n\tTProgram extends string = '7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX',\n> =\n\t| ({ instructionType: 'claim' } & ParsedClaimInstruction<TProgram>)\n\t| ({\n\t\t\tinstructionType: 'createUserRewardDebt';\n\t } & ParsedCreateUserRewardDebtInstruction<TProgram>)\n\t| ({ instructionType: 'settle' } & ParsedSettleInstruction<TProgram>)\n\t| ({ instructionType: 'stake' } & ParsedStakeInstruction<TProgram>)\n\t| ({ instructionType: 'unstake' } & ParsedUnstakeInstruction<TProgram>);\n\n/**\n * Parses a sendNexus instruction into its kind tag plus parsed accounts and data.\n * Returns `null` when the instruction is for another program or no known instruction matches;\n * throws if a matched instruction fails to parse.\n */\nexport function parseSendNexusInstruction<TProgram extends string>(\n\tinstruction: Instruction<TProgram> &\n\t\tInstructionWithData<ReadonlyUint8Array>,\n): ParsedSendNexusInstruction<TProgram> | null {\n\tif (instruction.programAddress !== SEND_NEXUS_PROGRAM_ADDRESS) return null;\n\tconst instructionType = identifySendNexusInstruction(instruction);\n\tif (instructionType === null) return null;\n\tswitch (instructionType) {\n\t\tcase 'claim': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'claim',\n\t\t\t\t...parseClaimInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'createUserRewardDebt': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'createUserRewardDebt',\n\t\t\t\t...parseCreateUserRewardDebtInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'settle': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'settle',\n\t\t\t\t...parseSettleInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'stake': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'stake',\n\t\t\t\t...parseStakeInstruction(instruction),\n\t\t\t};\n\t\t}\n\t\tcase 'unstake': {\n\t\t\tassertIsInstructionWithAccounts(instruction);\n\t\t\treturn {\n\t\t\t\tinstructionType: 'unstake',\n\t\t\t\t...parseUnstakeInstruction(instruction),\n\t\t\t};\n\t\t}\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\nexport * from './claim.js';\nexport * from './createUserRewardDebt.js';\nexport * from './sendNexus.instructions.js';\nexport * from './settle.js';\nexport * from './stake.js';\nexport * from './unstake.js';\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n\textendClient,\n\ttype ClientWithPayer,\n\ttype ClientWithRpc,\n\ttype ClientWithTransactionPlanning,\n\ttype ClientWithTransactionSending,\n\ttype ExtendedClient,\n\ttype GetAccountInfoApi,\n\ttype GetMultipleAccountsApi,\n} from '@solana/kit';\nimport {\n\taddSelfPlanAndSendFunctions,\n\ttype SelfFetchFunctions,\n\ttype SelfPlanAndSendFunctions,\n} from '@solana/program-client-core';\nimport {\n\tfetchAllAltRegistry,\n\tfetchAllCreatorFeeConfig,\n\tfetchAllFeePreset,\n\tfetchAllGlobalConfig,\n\tfetchAllMaybeAltRegistry,\n\tfetchAllMaybeCreatorFeeConfig,\n\tfetchAllMaybeFeePreset,\n\tfetchAllMaybeGlobalConfig,\n\tfetchAllMaybePartnerConfig,\n\tfetchAllMaybePartnerMetadata,\n\tfetchAllMaybeRewardState,\n\tfetchAllMaybeStakingConfig,\n\tfetchAllMaybeUserRewardDebt,\n\tfetchAllMaybeUserStakePosition,\n\tfetchAllPartnerConfig,\n\tfetchAllPartnerMetadata,\n\tfetchAllRewardState,\n\tfetchAllStakingConfig,\n\tfetchAllUserRewardDebt,\n\tfetchAllUserStakePosition,\n\tfetchAltRegistry,\n\tfetchCreatorFeeConfig,\n\tfetchFeePreset,\n\tfetchGlobalConfig,\n\tfetchMaybeAltRegistry,\n\tfetchMaybeCreatorFeeConfig,\n\tfetchMaybeFeePreset,\n\tfetchMaybeGlobalConfig,\n\tfetchMaybePartnerConfig,\n\tfetchMaybePartnerMetadata,\n\tfetchMaybeRewardState,\n\tfetchMaybeStakingConfig,\n\tfetchMaybeUserRewardDebt,\n\tfetchMaybeUserStakePosition,\n\tfetchPartnerConfig,\n\tfetchPartnerMetadata,\n\tfetchRewardState,\n\tfetchStakingConfig,\n\tfetchUserRewardDebt,\n\tfetchUserStakePosition,\n\tgetAltRegistryCodec,\n\tgetCreatorFeeConfigCodec,\n\tgetFeePresetCodec,\n\tgetGlobalConfigCodec,\n\tgetPartnerConfigCodec,\n\tgetPartnerMetadataCodec,\n\tgetRewardStateCodec,\n\tgetStakingConfigCodec,\n\tgetUserRewardDebtCodec,\n\tgetUserStakePositionCodec,\n\tidentifySendNexusAccount,\n\ttype AltRegistry,\n\ttype AltRegistryArgs,\n\ttype CreatorFeeConfig,\n\ttype CreatorFeeConfigArgs,\n\ttype FeePreset,\n\ttype FeePresetArgs,\n\ttype GlobalConfig,\n\ttype GlobalConfigArgs,\n\ttype PartnerConfig,\n\ttype PartnerConfigArgs,\n\ttype PartnerMetadata,\n\ttype PartnerMetadataArgs,\n\ttype RewardState,\n\ttype RewardStateArgs,\n\ttype StakingConfig,\n\ttype StakingConfigArgs,\n\ttype UserRewardDebt,\n\ttype UserRewardDebtArgs,\n\ttype UserStakePosition,\n\ttype UserStakePositionArgs,\n} from '../accounts/index.js';\nimport {\n\tgetClaimEventDecoder,\n\tgetStakeEventDecoder,\n\tgetUnstakeEventDecoder,\n} from '../events/index.js';\nimport {\n\tgetClaimInstructionAsync,\n\tgetCreateUserRewardDebtInstructionAsync,\n\tgetSettleInstructionAsync,\n\tgetStakeInstructionAsync,\n\tgetUnstakeInstructionAsync,\n\tidentifySendNexusInstruction,\n\tparseSendNexusInstruction,\n\ttype ClaimAsyncInput,\n\ttype CreateUserRewardDebtAsyncInput,\n\ttype SettleAsyncInput,\n\ttype StakeAsyncInput,\n\ttype UnstakeAsyncInput,\n} from '../instructions/index.js';\nimport {\n\tfindAltRegistryPda,\n\tfindCreatorFeeConfigPda,\n\tfindDefaultFeePresetPda,\n\tfindDefaultPartnerMetadataPda,\n\tfindDefaultPartnerPda,\n\tfindEventAuthorityPda,\n\tfindFeePresetPda,\n\tfindGlobalConfigPda,\n\tfindPartnerConfigPda,\n\tfindPartnerMetadataPda,\n\tfindRewardStatePda,\n\tfindStakingConfigPda,\n\tfindUserRewardDebtPda,\n\tfindUserStakePositionPda,\n} from '../pdas/index.js';\n\nexport type SendNexusPlugin = {\n\taccounts: SendNexusPluginAccounts;\n\tevents: SendNexusPluginEvents;\n\tinstructions: SendNexusPluginInstructions;\n\tpdas: SendNexusPluginPdas;\n\tidentifyAccount: typeof identifySendNexusAccount;\n\tidentifyInstruction: typeof identifySendNexusInstruction;\n\tparseInstruction: typeof parseSendNexusInstruction;\n};\n\nexport type SendNexusPluginAccounts = {\n\taltRegistry: ReturnType<typeof getAltRegistryCodec> &\n\t\tSelfFetchFunctions<AltRegistryArgs, AltRegistry>;\n\tcreatorFeeConfig: ReturnType<typeof getCreatorFeeConfigCodec> &\n\t\tSelfFetchFunctions<CreatorFeeConfigArgs, CreatorFeeConfig>;\n\tfeePreset: ReturnType<typeof getFeePresetCodec> &\n\t\tSelfFetchFunctions<FeePresetArgs, FeePreset>;\n\tglobalConfig: ReturnType<typeof getGlobalConfigCodec> &\n\t\tSelfFetchFunctions<GlobalConfigArgs, GlobalConfig>;\n\tpartnerConfig: ReturnType<typeof getPartnerConfigCodec> &\n\t\tSelfFetchFunctions<PartnerConfigArgs, PartnerConfig>;\n\tpartnerMetadata: ReturnType<typeof getPartnerMetadataCodec> &\n\t\tSelfFetchFunctions<PartnerMetadataArgs, PartnerMetadata>;\n\trewardState: ReturnType<typeof getRewardStateCodec> &\n\t\tSelfFetchFunctions<RewardStateArgs, RewardState>;\n\tstakingConfig: ReturnType<typeof getStakingConfigCodec> &\n\t\tSelfFetchFunctions<StakingConfigArgs, StakingConfig>;\n\tuserRewardDebt: ReturnType<typeof getUserRewardDebtCodec> &\n\t\tSelfFetchFunctions<UserRewardDebtArgs, UserRewardDebt>;\n\tuserStakePosition: ReturnType<typeof getUserStakePositionCodec> &\n\t\tSelfFetchFunctions<UserStakePositionArgs, UserStakePosition>;\n};\n\nexport type SendNexusPluginEvents = {\n\tclaimEvent: ReturnType<typeof getClaimEventDecoder>;\n\tstakeEvent: ReturnType<typeof getStakeEventDecoder>;\n\tunstakeEvent: ReturnType<typeof getUnstakeEventDecoder>;\n};\n\nexport type SendNexusPluginInstructions = {\n\tclaim: (\n\t\tinput: MakeOptional<ClaimAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getClaimInstructionAsync> & SelfPlanAndSendFunctions;\n\tcreateUserRewardDebt: (\n\t\tinput: MakeOptional<CreateUserRewardDebtAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getCreateUserRewardDebtInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tsettle: (\n\t\tinput: MakeOptional<SettleAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getSettleInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n\tstake: (\n\t\tinput: MakeOptional<StakeAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getStakeInstructionAsync> & SelfPlanAndSendFunctions;\n\tunstake: (\n\t\tinput: MakeOptional<UnstakeAsyncInput, 'payer'>,\n\t) => ReturnType<typeof getUnstakeInstructionAsync> &\n\t\tSelfPlanAndSendFunctions;\n};\n\nexport type SendNexusPluginPdas = {\n\tglobalConfig: typeof findGlobalConfigPda;\n\tfeePreset: typeof findFeePresetPda;\n\tpartnerConfig: typeof findPartnerConfigPda;\n\tpartnerMetadata: typeof findPartnerMetadataPda;\n\tdefaultFeePreset: typeof findDefaultFeePresetPda;\n\tdefaultPartner: typeof findDefaultPartnerPda;\n\tdefaultPartnerMetadata: typeof findDefaultPartnerMetadataPda;\n\tstakingConfig: typeof findStakingConfigPda;\n\trewardState: typeof findRewardStatePda;\n\tuserStakePosition: typeof findUserStakePositionPda;\n\tuserRewardDebt: typeof findUserRewardDebtPda;\n\teventAuthority: typeof findEventAuthorityPda;\n\tcreatorFeeConfig: typeof findCreatorFeeConfigPda;\n\taltRegistry: typeof findAltRegistryPda;\n};\n\nexport type SendNexusPluginRequirements = ClientWithRpc<\n\tGetAccountInfoApi & GetMultipleAccountsApi\n> &\n\tClientWithPayer &\n\tClientWithTransactionPlanning &\n\tClientWithTransactionSending;\n\nexport function sendNexusProgram() {\n\treturn <T extends SendNexusPluginRequirements>(\n\t\tclient: T,\n\t): ExtendedClient<T, { sendNexus: SendNexusPlugin }> => {\n\t\treturn extendClient(client, {\n\t\t\tsendNexus: <SendNexusPlugin>{\n\t\t\t\taccounts: {\n\t\t\t\t\taltRegistry: Object.freeze({\n\t\t\t\t\t\t...getAltRegistryCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchAltRegistry(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllAltRegistry(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeAltRegistry(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeAltRegistry(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tcreatorFeeConfig: Object.freeze({\n\t\t\t\t\t\t...getCreatorFeeConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchCreatorFeeConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllCreatorFeeConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeCreatorFeeConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeCreatorFeeConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t\tfeePreset: Object.freeze({\n\t\t\t\t\t\t...getFeePresetCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchFeePreset(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllFeePreset(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeFeePreset(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeFeePreset(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tglobalConfig: Object.freeze({\n\t\t\t\t\t\t...getGlobalConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllGlobalConfig(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeGlobalConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeGlobalConfig(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tpartnerConfig: Object.freeze({\n\t\t\t\t\t\t...getPartnerConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchPartnerConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllPartnerConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybePartnerConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybePartnerConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t\tpartnerMetadata: Object.freeze({\n\t\t\t\t\t\t...getPartnerMetadataCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchPartnerMetadata(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllPartnerMetadata(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybePartnerMetadata(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybePartnerMetadata(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t\trewardState: Object.freeze({\n\t\t\t\t\t\t...getRewardStateCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchRewardState(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllRewardState(client.rpc, addresses, config),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeRewardState(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeRewardState(client.rpc, address, config),\n\t\t\t\t\t}),\n\t\t\t\t\tstakingConfig: Object.freeze({\n\t\t\t\t\t\t...getStakingConfigCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchStakingConfig(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllStakingConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeStakingConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeStakingConfig(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t\tuserRewardDebt: Object.freeze({\n\t\t\t\t\t\t...getUserRewardDebtCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchUserRewardDebt(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllUserRewardDebt(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeUserRewardDebt(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeUserRewardDebt(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t\tuserStakePosition: Object.freeze({\n\t\t\t\t\t\t...getUserStakePositionCodec(),\n\t\t\t\t\t\tfetch: (address, config) =>\n\t\t\t\t\t\t\tfetchUserStakePosition(client.rpc, address, config),\n\t\t\t\t\t\tfetchAll: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllUserStakePosition(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchAllMaybe: (addresses, config) =>\n\t\t\t\t\t\t\tfetchAllMaybeUserStakePosition(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddresses,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tfetchMaybe: (address, config) =>\n\t\t\t\t\t\t\tfetchMaybeUserStakePosition(\n\t\t\t\t\t\t\t\tclient.rpc,\n\t\t\t\t\t\t\t\taddress,\n\t\t\t\t\t\t\t\tconfig,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tevents: {\n\t\t\t\t\tclaimEvent: getClaimEventDecoder(),\n\t\t\t\t\tstakeEvent: getStakeEventDecoder(),\n\t\t\t\t\tunstakeEvent: getUnstakeEventDecoder(),\n\t\t\t\t},\n\t\t\t\tinstructions: {\n\t\t\t\t\tclaim: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetClaimInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tcreateUserRewardDebt: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetCreateUserRewardDebtInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tsettle: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetSettleInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tstake: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetStakeInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\tunstake: (input) =>\n\t\t\t\t\t\taddSelfPlanAndSendFunctions(\n\t\t\t\t\t\t\tclient,\n\t\t\t\t\t\t\tgetUnstakeInstructionAsync({\n\t\t\t\t\t\t\t\t...input,\n\t\t\t\t\t\t\t\tpayer: input.payer ?? client.payer,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\tpdas: {\n\t\t\t\t\tglobalConfig: findGlobalConfigPda,\n\t\t\t\t\tfeePreset: findFeePresetPda,\n\t\t\t\t\tpartnerConfig: findPartnerConfigPda,\n\t\t\t\t\tpartnerMetadata: findPartnerMetadataPda,\n\t\t\t\t\tdefaultFeePreset: findDefaultFeePresetPda,\n\t\t\t\t\tdefaultPartner: findDefaultPartnerPda,\n\t\t\t\t\tdefaultPartnerMetadata: findDefaultPartnerMetadataPda,\n\t\t\t\t\tstakingConfig: findStakingConfigPda,\n\t\t\t\t\trewardState: findRewardStatePda,\n\t\t\t\t\tuserStakePosition: findUserStakePositionPda,\n\t\t\t\t\tuserRewardDebt: findUserRewardDebtPda,\n\t\t\t\t\teventAuthority: findEventAuthorityPda,\n\t\t\t\t\tcreatorFeeConfig: findCreatorFeeConfigPda,\n\t\t\t\t\taltRegistry: findAltRegistryPda,\n\t\t\t\t},\n\t\t\t\tidentifyAccount: identifySendNexusAccount,\n\t\t\t\tidentifyInstruction: identifySendNexusInstruction,\n\t\t\t\tparseInstruction: parseSendNexusInstruction,\n\t\t\t},\n\t\t});\n\t};\n}\n\ntype MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\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\nexport * from './sendNexus.js';\n","import type { Address, GetAccountInfoApi, Rpc } from '@solana/kit';\nimport { calculateFeeDecayPremium } from '../math/fee-decay.js';\nimport {\n\tfetchMaybePartnerConfig,\n\ttype PartnerConfig,\n} from './generated/accounts/partnerConfig.js';\nimport { findPartnerConfigPda } from './generated/pdas/partnerConfig.js';\nimport type { DexFees } from './generated/types/dexFees.js';\nimport type { LaunchpadFees } from './generated/types/launchpadFees.js';\n\n/** Throws if the pair is unregistered. Take `platformConfig` from the market being priced: a partner's fees differ per platform. */\nexport async function fetchPartnerFees(\n\trpc: Rpc<GetAccountInfoApi>,\n\tpartner: Address,\n\tplatformConfig: Address,\n): Promise<PartnerConfig> {\n\tconst [partnerPda] = await findPartnerConfigPda({\n\t\tpartner,\n\t\tplatformConfig,\n\t});\n\tconst maybeAccount = await fetchMaybePartnerConfig(rpc, partnerPda);\n\tif (!maybeAccount.exists) {\n\t\tthrow new Error(\n\t\t\t`No fee config for partner ${partner} on platform ${platformConfig}`,\n\t\t);\n\t}\n\treturn maybeAccount.data;\n}\n\n/** The `feeBps` a trade pays: the standard rate plus the decay premium from the market's\n * `createdAt`. Pass `fees.launchpad` for a curve, `fees.dex` for a pool; times in unix seconds. */\nexport function effectiveFeeBps(\n\tschedule: LaunchpadFees | DexFees,\n\tcreatedAt: bigint,\n\tnow: bigint,\n): number {\n\tconst standardFeeBps =\n\t\tschedule.protocolFeeBps +\n\t\tschedule.creatorFeeBps +\n\t\t('lpFeeBps' in schedule ? schedule.lpFeeBps : 0);\n\tconst premium = calculateFeeDecayPremium({\n\t\tcurrentTimestamp: now,\n\t\tcreatedAtTimestamp: createdAt,\n\t\tdecaySeconds: schedule.feeDecaySeconds,\n\t\tdecayStartBps: schedule.feeDecayStartBps,\n\t\tstandardFeeBps,\n\t});\n\treturn standardFeeBps + Number(premium);\n}\n","import type { Address } from '@solana/kit';\n\n/** RPCs reject a `getMultipleAccounts` call past this many addresses. */\nconst MAX_ACCOUNTS_PER_REQUEST = 100;\n\n/** Splits a multi-account read into 100-address calls; results follow `addresses` order. */\nexport async function fetchInChunks<T>(\n\taddresses: readonly Address[],\n\tread: (chunk: Address[]) => Promise<readonly T[]>,\n): Promise<T[]> {\n\tconst chunks: Address[][] = [];\n\tfor (\n\t\tlet start = 0;\n\t\tstart < addresses.length;\n\t\tstart += MAX_ACCOUNTS_PER_REQUEST\n\t) {\n\t\tchunks.push(addresses.slice(start, start + MAX_ACCOUNTS_PER_REQUEST));\n\t}\n\tconst results = await Promise.all(chunks.map((chunk) => read(chunk)));\n\treturn results.flat();\n}\n","import {\n\tcontainsBytes,\n\tfetchEncodedAccounts,\n\tgetAddressDecoder,\n\tgetBase64Encoder,\n\ttype Address,\n\ttype Instruction,\n\ttype Rpc,\n\ttype GetAccountInfoApi,\n\ttype GetMultipleAccountsApi,\n\ttype GetProgramAccountsApi,\n\ttype TransactionSigner,\n} from '@solana/kit';\nimport {\n\tSEND_NEXUS_PROGRAM_ADDRESS,\n\tSYSTEM_PROGRAM_ADDRESS,\n} from '../constants.js';\nimport { fetchInChunks } from '../utils/chunk.js';\nimport { findAssociatedTokenPda } from '../utils/pda.js';\nimport { fetchStakingConfig } from './generated/accounts/stakingConfig.js';\nimport {\n\tfetchMaybeUserStakePosition,\n\ttype UserStakePosition,\n} from './generated/accounts/userStakePosition.js';\nimport { getUserRewardDebtDecoder } from './generated/accounts/userRewardDebt.js';\nimport {\n\tgetRewardStateDecoder,\n\tgetRewardStateSize,\n\tREWARD_STATE_DISCRIMINATOR,\n} from './generated/accounts/rewardState.js';\nimport type { StakingConfig } from './generated/accounts/stakingConfig.js';\nimport { getStakeInstructionAsync } from './generated/instructions/stake.js';\nimport { getUnstakeInstructionAsync } from './generated/instructions/unstake.js';\nimport { getClaimInstructionAsync } from './generated/instructions/claim.js';\nimport { getSettleInstructionAsync } from './generated/instructions/settle.js';\nimport { getCreateUserRewardDebtInstructionAsync } from './generated/instructions/createUserRewardDebt.js';\nimport { findRewardStatePda } from './generated/pdas/rewardState.js';\nimport { findStakingConfigPda } from './generated/pdas/stakingConfig.js';\nimport { findUserRewardDebtPda } from './generated/pdas/userRewardDebt.js';\nimport { findUserStakePositionPda } from './generated/pdas/userStakePosition.js';\nimport { findRewardAccrualPda as findLaunchpadRewardAccrualPda } from '../launchpad/generated/pdas/rewardAccrual.js';\nimport { getRewardAccrualDecoder } from '../launchpad/generated/accounts/rewardAccrual.js';\nimport { findRewardAccrualPda as findDexRewardAccrualPda } from '../dex/generated/pdas/rewardAccrual.js';\n\n// 1e12 scale of `RewardAccrual.accPerToken` on both programs; must match send_shared `PRECISION`.\nconst PRECISION = 1_000_000_000_000n;\n\n/** `getProgramAccounts` is optional: many providers restrict it and LiteSVM lacks it, so pass `rewardMints` there. */\nexport type RewardMintRpc = Rpc<GetAccountInfoApi> &\n\tPartial<Rpc<GetProgramAccountsApi>>;\n\nfunction hasProgramAccounts(\n\trpc: RewardMintRpc,\n): rpc is Rpc<GetAccountInfoApi> & Rpc<GetProgramAccountsApi> {\n\treturn typeof rpc.getProgramAccounts === 'function';\n}\n\n// On-chain body offsets + 8 for the discriminator; pinned by tests/staking.test.ts.\nconst REWARD_STATE_STAKING_CONFIG_OFFSET = 10n;\nconst REWARD_STATE_REWARD_MINT_OFFSET = 42;\n\nfunction compareAddresses(a: Address, b: Address): number {\n\tif (a < b) return -1;\n\tif (a > b) return 1;\n\treturn 0;\n}\n\n/** Registered reward mints, sorted by address. Includes disabled mints: their accrued balance is\n * still owed and the settle gate still counts them. Throws when the sweep disagrees with\n * `StakingConfig.rewardCount` rather than settle a short list. */\nexport async function getRewardMints(\n\trpc: Rpc<GetAccountInfoApi> & Rpc<GetProgramAccountsApi>,\n): Promise<readonly Address[]> {\n\tconst [stakingConfig] = findStakingConfigPda();\n\n\tconst [accounts, config] = await Promise.all([\n\t\trpc\n\t\t\t.getProgramAccounts(SEND_NEXUS_PROGRAM_ADDRESS, {\n\t\t\t\tencoding: 'base64',\n\t\t\t\tfilters: [\n\t\t\t\t\t{ dataSize: BigInt(getRewardStateSize()) },\n\t\t\t\t\t{\n\t\t\t\t\t\tmemcmp: {\n\t\t\t\t\t\t\tbytes: stakingConfig,\n\t\t\t\t\t\t\tencoding: 'base58',\n\t\t\t\t\t\t\toffset: REWARD_STATE_STAKING_CONFIG_OFFSET,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t})\n\t\t\t.send(),\n\t\tfetchStakingConfigData(rpc),\n\t]);\n\n\tconst base64 = getBase64Encoder();\n\tconst addressDecoder = getAddressDecoder();\n\n\tconst mints: Address[] = [];\n\tfor (const { account } of accounts) {\n\t\tconst data = base64.encode(account.data[0]);\n\t\t// Another nexus account of the same size could pass both filters.\n\t\tif (!containsBytes(data, REWARD_STATE_DISCRIMINATOR, 0)) continue;\n\t\tmints.push(\n\t\t\taddressDecoder.decode(data, REWARD_STATE_REWARD_MINT_OFFSET),\n\t\t);\n\t}\n\n\tif (mints.length !== config.rewardCount) {\n\t\tthrow new Error(\n\t\t\t`getProgramAccounts returned ${mints.length} RewardState accounts but StakingConfig.rewardCount is ${config.rewardCount}. Settling a short list forfeits rewards, so this refuses to guess -- retry, or pass rewardMints explicitly if the RPC restricts getProgramAccounts.`,\n\t\t);\n\t}\n\n\treturn mints.toSorted(compareAddresses);\n}\n\nexport type RewardMintSource = readonly Address[] | RewardMintRpc;\n\nfunction isRewardMintList(\n\tsource: RewardMintSource,\n): source is readonly Address[] {\n\treturn Array.isArray(source);\n}\n\nasync function resolveRewardMints(\n\trpc: RewardMintRpc,\n\trewardMints: readonly Address[] | undefined,\n): Promise<readonly Address[]> {\n\tif (rewardMints !== undefined) return rewardMints;\n\tif (!hasProgramAccounts(rpc)) {\n\t\tthrow new Error(\n\t\t\t'This RPC has no getProgramAccounts, so the reward registry cannot be read from chain. Pass rewardMints explicitly.',\n\t\t);\n\t}\n\treturn await getRewardMints(rpc);\n}\n\nexport interface SettleParams {\n\t/** `settle` is permissionless: the user does not sign. */\n\tuser: Address;\n\tpayer: TransactionSigner;\n\tstakingMint: Address;\n}\n\n/** One idempotent `settle` per mint; a partial mint list leaves `stake` and `unstake` failing `RewardsNotSettled`. */\nexport async function buildSettleInstructions(\n\tsource: RewardMintSource,\n\tparams: SettleParams,\n): Promise<Instruction[]> {\n\tconst rewardMints = isRewardMintList(source)\n\t\t? source\n\t\t: await resolveRewardMints(source, undefined);\n\treturn Promise.all(\n\t\trewardMints.map((rewardMint) =>\n\t\t\tgetSettleInstructionAsync({\n\t\t\t\tuser: params.user,\n\t\t\t\tpayer: params.payer,\n\t\t\t\tstakingMint: params.stakingMint,\n\t\t\t\trewardMint,\n\t\t\t}),\n\t\t),\n\t);\n}\n\nexport async function fetchMissingUserRewardDebts(\n\trpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>,\n\tuser: Address,\n\tstakingMint: Address,\n\tknownRewardMints?: readonly Address[],\n): Promise<Address[]> {\n\tconst rewardMints = await resolveRewardMints(rpc, knownRewardMints);\n\n\tconst debtPdas = await Promise.all(\n\t\trewardMints.map(async (mint) => {\n\t\t\tconst [addr] = await findUserRewardDebtPda({\n\t\t\t\tuser,\n\t\t\t\tstakingMint,\n\t\t\t\trewardMint: mint,\n\t\t\t});\n\t\t\treturn addr;\n\t\t}),\n\t);\n\n\tconst encodedAccounts = await fetchInChunks(debtPdas, (chunk) =>\n\t\tfetchEncodedAccounts(rpc, chunk),\n\t);\n\n\tconst missingMints: Address[] = [];\n\tfor (const [index, rewardMint] of rewardMints.entries()) {\n\t\tif (!encodedAccounts[index].exists) {\n\t\t\tmissingMints.push(rewardMint);\n\t\t}\n\t}\n\n\treturn missingMints;\n}\n\nexport interface PrepareStakingParams {\n\tuser: Address;\n\tpayer: TransactionSigner;\n\tstakingMint: Address;\n\t/** Must be the full registry when supplied; a subset leaves `stake` and `unstake` blocked. */\n\trewardMints?: readonly Address[];\n}\n\n/** Opens missing `UserRewardDebt`s, then settles every mint; the user never signs, so the stake or unstake after is one wallet prompt. */\nexport async function buildStakingPreflightInstructions(\n\trpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>,\n\tparams: PrepareStakingParams,\n): Promise<Instruction[]> {\n\t// One sweep for both halves: two sweeps can disagree.\n\tconst rewardMints = await resolveRewardMints(rpc, params.rewardMints);\n\n\tconst missingMints = await fetchMissingUserRewardDebts(\n\t\trpc,\n\t\tparams.user,\n\t\tparams.stakingMint,\n\t\trewardMints,\n\t);\n\n\tconst createIxs = await Promise.all(\n\t\tmissingMints.map((rewardMint) =>\n\t\t\tgetCreateUserRewardDebtInstructionAsync({\n\t\t\t\tuser: params.user,\n\t\t\t\tpayer: params.payer,\n\t\t\t\tstakingMint: params.stakingMint,\n\t\t\t\trewardMint,\n\t\t\t}),\n\t\t),\n\t);\n\n\tconst settleIxs = await buildSettleInstructions(rewardMints, params);\n\n\treturn [...createIxs, ...settleIxs];\n}\n\n/** True once `stake` and `unstake` will pass the `settledCount == rewardCount` gate. */\nexport async function isFullySettled(\n\trpc: Rpc<GetAccountInfoApi>,\n\tuser: Address,\n\tstakingMint: Address,\n): Promise<boolean> {\n\tconst [config, position] = await Promise.all([\n\t\tfetchStakingConfigData(rpc),\n\t\tfetchUserStakePositionData(rpc, user, stakingMint),\n\t]);\n\tif (position === null) return config.rewardCount === 0;\n\treturn position.settledCount === config.rewardCount;\n}\n\nexport interface StakeParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tstakingMint: Address;\n\tamount: bigint;\n}\n\n/** Fails `RewardsNotSettled` until every mint is settled at the current `stakeVersion`; run `buildStakingPreflightInstructions` first. */\nexport async function buildStakeInstruction(\n\tparams: StakeParams,\n): Promise<Instruction> {\n\treturn getStakeInstructionAsync({\n\t\tuser: params.user,\n\t\tpayer: params.payer ?? params.user,\n\t\tstakingMint: params.stakingMint,\n\t\tamount: params.amount,\n\t});\n}\n\nexport interface UnstakeParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tstakingMint: Address;\n\tamount: bigint;\n}\n\n/** Settle immediately before via `buildStakingPreflightInstructions`: the gate passes on a stale settle,\n * and the window since it is then paid at the post-unstake amount, forfeiting accrual. */\nexport async function buildUnstakeInstruction(\n\tparams: UnstakeParams,\n): Promise<Instruction> {\n\treturn getUnstakeInstructionAsync({\n\t\tuser: params.user,\n\t\tpayer: params.payer ?? params.user,\n\t\tstakingMint: params.stakingMint,\n\t\tamount: params.amount,\n\t});\n}\n\nexport interface ClaimRewardsParams {\n\tuser: TransactionSigner;\n\tpayer?: TransactionSigner;\n\tstakingMint: Address;\n\t/** Defaults to every registered mint; each claim settles its own mint, so a subset needs no preflight. */\n\trewardMints?: readonly Address[];\n}\n\n/** One `claim` per mint, preceded by `create_user_reward_debt` where the debt is missing:\n * `Claim` requires the account to exist, so one missing debt fails the whole transaction. */\nexport async function buildClaimRewardsInstructions(\n\trpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>,\n\tparams: ClaimRewardsParams,\n): Promise<Instruction[]> {\n\tconst [stakingConfigAddr] = findStakingConfigPda();\n\tconst rewardMints = await resolveRewardMints(rpc, params.rewardMints);\n\tif (rewardMints.length === 0) return [];\n\n\tconst [rewardStatePdas, debtPdas] = await Promise.all([\n\t\tPromise.all(\n\t\t\trewardMints.map(async (rewardMint) => {\n\t\t\t\tconst [pda] = await findRewardStatePda({\n\t\t\t\t\tstakingConfig: stakingConfigAddr,\n\t\t\t\t\trewardMint,\n\t\t\t\t});\n\t\t\t\treturn pda;\n\t\t\t}),\n\t\t),\n\t\tPromise.all(\n\t\t\trewardMints.map(async (rewardMint) => {\n\t\t\t\tconst [pda] = await findUserRewardDebtPda({\n\t\t\t\t\tuser: params.user.address,\n\t\t\t\t\tstakingMint: params.stakingMint,\n\t\t\t\t\trewardMint,\n\t\t\t\t});\n\t\t\t\treturn pda;\n\t\t\t}),\n\t\t),\n\t]);\n\n\tconst fetched = await fetchInChunks(\n\t\t[...rewardStatePdas, ...rewardMints, ...debtPdas],\n\t\t(chunk) => fetchEncodedAccounts(rpc, chunk),\n\t);\n\tconst rewardStateDecoder = getRewardStateDecoder();\n\tconst payer = params.payer ?? params.user;\n\n\tconst perMint = await Promise.all(\n\t\trewardMints.map(async (rewardMint, index) => {\n\t\t\tconst encodedRewardState = fetched[index];\n\t\t\tif (!encodedRewardState.exists) {\n\t\t\t\tthrow new Error(`RewardState not found for mint ${rewardMint}`);\n\t\t\t}\n\t\t\tconst { vault } = rewardStateDecoder.decode(\n\t\t\t\tencodedRewardState.data,\n\t\t\t);\n\n\t\t\tconst encodedMint = fetched[rewardMints.length + index];\n\t\t\tconst tokenProgram = encodedMint.exists\n\t\t\t\t? encodedMint.programAddress\n\t\t\t\t: undefined;\n\t\t\tconst [destination] = await findAssociatedTokenPda(\n\t\t\t\tparams.user.address,\n\t\t\t\trewardMint,\n\t\t\t\ttokenProgram,\n\t\t\t);\n\n\t\t\tconst instructions: Instruction[] = [];\n\n\t\t\t// Directly before its own `claim`, so slicing the list by mint keeps each pair together.\n\t\t\tif (!fetched[rewardMints.length * 2 + index].exists) {\n\t\t\t\tinstructions.push(\n\t\t\t\t\tawait getCreateUserRewardDebtInstructionAsync({\n\t\t\t\t\t\tuser: params.user.address,\n\t\t\t\t\t\tpayer,\n\t\t\t\t\t\tstakingMint: params.stakingMint,\n\t\t\t\t\t\trewardMint,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tinstructions.push(\n\t\t\t\tawait getClaimInstructionAsync({\n\t\t\t\t\tuser: params.user,\n\t\t\t\t\tpayer,\n\t\t\t\t\tstakingMint: params.stakingMint,\n\t\t\t\t\trewardMint,\n\t\t\t\t\tvault,\n\t\t\t\t\tdestination,\n\t\t\t\t\ttokenProgram,\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\treturn instructions;\n\t\t}),\n\t);\n\n\treturn perMint.flat();\n}\n\nexport interface WithdrawFeesAccounts {\n\trewardState: Address;\n\tvault: Address;\n\trewardMint: Address;\n\tdestinationTokenAccount: Address;\n\ttokenProgram: Address;\n}\n\n/** Accounts for one mint's `withdraw_fees`; call once per mint. */\nexport async function buildWithdrawFeesAccounts(\n\trpc: Rpc<GetAccountInfoApi>,\n\tparams: {\n\t\trewardMint: Address;\n\t\t/** Wallet, not token account: its ATA is derived. */\n\t\tdestination: Address;\n\t\ttokenProgram?: Address;\n\t},\n): Promise<WithdrawFeesAccounts> {\n\tconst [stakingConfigAddr] = findStakingConfigPda();\n\n\tconst tokenProgram =\n\t\tparams.tokenProgram ??\n\t\t(\n\t\t\tawait rpc\n\t\t\t\t.getAccountInfo(params.rewardMint, { encoding: 'base64' })\n\t\t\t\t.send()\n\t\t).value?.owner;\n\n\tconst [[rewardState], [vault], [destinationTokenAccount]] =\n\t\tawait Promise.all([\n\t\t\tfindRewardStatePda({\n\t\t\t\tstakingConfig: stakingConfigAddr,\n\t\t\t\trewardMint: params.rewardMint,\n\t\t\t}),\n\t\t\tfindAssociatedTokenPda(\n\t\t\t\tstakingConfigAddr,\n\t\t\t\tparams.rewardMint,\n\t\t\t\ttokenProgram,\n\t\t\t),\n\t\t\tfindAssociatedTokenPda(\n\t\t\t\tparams.destination,\n\t\t\t\tparams.rewardMint,\n\t\t\t\ttokenProgram,\n\t\t\t),\n\t\t]);\n\n\tif (tokenProgram === undefined) {\n\t\tthrow new Error(`Mint ${params.rewardMint} not found`);\n\t}\n\n\treturn {\n\t\trewardState,\n\t\tvault,\n\t\trewardMint: params.rewardMint,\n\t\tdestinationTokenAccount,\n\t\ttokenProgram,\n\t};\n}\n\nexport async function fetchStakingConfigData(\n\trpc: Rpc<GetAccountInfoApi>,\n): Promise<StakingConfig> {\n\tconst [stakingConfigAddr] = findStakingConfigPda();\n\tconst config = await fetchStakingConfig(rpc, stakingConfigAddr);\n\treturn config.data;\n}\n\nexport async function fetchUserStakePositionData(\n\trpc: Rpc<GetAccountInfoApi>,\n\tuser: Address,\n\tstakingMint: Address,\n): Promise<UserStakePosition | null> {\n\tconst [positionAddr] = await findUserStakePositionPda({\n\t\tuser,\n\t\tstakingMint,\n\t});\n\tconst maybePosition = await fetchMaybeUserStakePosition(rpc, positionAddr);\n\treturn maybePosition.exists ? maybePosition.data : null;\n}\n\n/** Unbound reads as `Pubkey::default()` (the system program address), which `bind_staking_mint`\n * can never store: it requires a token mint. */\nexport function isStakingMintBound(stakingMint: Address): boolean {\n\treturn stakingMint !== SYSTEM_PROGRAM_ADDRESS;\n}\n\n/** The staking mint is immutable once bound, so this result is safe to cache. */\nexport async function fetchSendMint(\n\trpc: Rpc<GetAccountInfoApi>,\n): Promise<Address> {\n\tconst { stakingMint } = await fetchStakingConfigData(rpc);\n\tif (!isStakingMintBound(stakingMint)) {\n\t\tthrow new Error(\n\t\t\t'Staking mint not yet bound -- nexus not fully initialized',\n\t\t);\n\t}\n\treturn stakingMint;\n}\n\nexport interface PendingReward {\n\trewardMint: Address;\n\t/** Base units of `rewardMint`. */\n\tpending: bigint;\n}\n\n/** One entry per reward mint, in `knownRewardMints` order, else sorted by address. Each amount is in\n * its own mint's base units, so never sum them. */\nexport async function fetchPendingRewards(\n\trpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>,\n\tuser: Address,\n\tstakingMint: Address,\n\tknownRewardMints?: readonly Address[],\n): Promise<PendingReward[]> {\n\tconst rewardMints = await resolveRewardMints(rpc, knownRewardMints);\n\tif (rewardMints.length === 0) return [];\n\n\tconst [userPositionPda] = await findUserStakePositionPda({\n\t\tuser,\n\t\tstakingMint,\n\t});\n\tconst maybePosition = await fetchMaybeUserStakePosition(\n\t\trpc,\n\t\tuserPositionPda,\n\t);\n\n\tif (!maybePosition.exists) {\n\t\treturn rewardMints.map((rewardMint) => ({ rewardMint, pending: 0n }));\n\t}\n\n\tconst stakeAmount = maybePosition.data.amount;\n\n\tconst pdas = await Promise.all(\n\t\trewardMints.map(async (rewardMint) => {\n\t\t\tconst [[debtPda], [launchpadAccrualPda], [dexAccrualPda]] =\n\t\t\t\tawait Promise.all([\n\t\t\t\t\tfindUserRewardDebtPda({ user, stakingMint, rewardMint }),\n\t\t\t\t\tfindLaunchpadRewardAccrualPda({ quoteMint: rewardMint }),\n\t\t\t\t\tfindDexRewardAccrualPda({ quoteMint: rewardMint }),\n\t\t\t\t]);\n\t\t\treturn { rewardMint, debtPda, launchpadAccrualPda, dexAccrualPda };\n\t\t}),\n\t);\n\n\tconst encodedAccounts = await fetchInChunks(\n\t\tpdas.flatMap((p) => [\n\t\t\tp.debtPda,\n\t\t\tp.launchpadAccrualPda,\n\t\t\tp.dexAccrualPda,\n\t\t]),\n\t\t(chunk) => fetchEncodedAccounts(rpc, chunk),\n\t);\n\n\tconst userRewardDebtDecoder = getUserRewardDebtDecoder();\n\t// One decoder for both: the two `RewardAccrual` types share shape and discriminator.\n\tconst rewardAccrualDecoder = getRewardAccrualDecoder();\n\n\treturn pdas.map(({ rewardMint }, index) => {\n\t\tconst base = index * 3;\n\n\t\tconst encodedDebt = encodedAccounts[base];\n\t\t// A missing debt is not zero owed: `create_user_reward_debt` opens it at\n\t\t// `accSnapshot = 0`, `amountSnapshot = position.amount`, and the claim pays that.\n\t\tconst debt = encodedDebt.exists\n\t\t\t? userRewardDebtDecoder.decode(encodedDebt.data)\n\t\t\t: { owed: 0n, accSnapshot: 0n, amountSnapshot: stakeAmount };\n\n\t\tconst encodedLaunchpadAccrual = encodedAccounts[base + 1];\n\t\tconst launchpadAcc = encodedLaunchpadAccrual.exists\n\t\t\t? rewardAccrualDecoder.decode(encodedLaunchpadAccrual.data)\n\t\t\t\t\t.accPerToken\n\t\t\t: 0n;\n\n\t\tconst encodedDexAccrual = encodedAccounts[base + 2];\n\t\tconst dexAcc = encodedDexAccrual.exists\n\t\t\t? rewardAccrualDecoder.decode(encodedDexAccrual.data).accPerToken\n\t\t\t: 0n;\n\n\t\t// Mirrors `settle_debt`: basis is the smaller amount (`amountSnapshot` alone over-quotes\n\t\t// after an unstake), floored once over the summed accumulators. A negative delta quotes 0\n\t\t// where the program would fail.\n\t\tconst basis =\n\t\t\tdebt.amountSnapshot < stakeAmount\n\t\t\t\t? debt.amountSnapshot\n\t\t\t\t: stakeAmount;\n\t\tconst combined = launchpadAcc + dexAcc;\n\t\tconst delta =\n\t\t\tcombined > debt.accSnapshot ? combined - debt.accSnapshot : 0n;\n\t\tconst accrued = (basis * delta) / PRECISION;\n\n\t\treturn { rewardMint, pending: debt.owed + accrued };\n\t});\n}\n","export * as accounts from './generated/accounts/index.js';\nexport * as types from './generated/types/index.js';\nexport * as events from './generated/events/index.js';\nexport * as errors from './generated/errors/index.js';\nexport * as instructions from './generated/instructions/index.js';\nexport * as pda from './generated/pdas/index.js';\nexport * as plugins from './generated/plugins/index.js';\nexport * as feeHelpers from './fee-helpers.js';\nexport * as staking from './staking.js';\n","import { getProgramDerivedAddress } from '@solana/kit';\nimport type { ProgramDerivedAddress } from '@solana/kit';\nimport { SEND_NEXUS_PROGRAM_ADDRESS } from './nexus/generated/programs/index.js';\n\n/** A platform is only a key, with no on-chain account; it is a PDA so a platform account can later `init` at it. */\nexport const PLATFORM_SEED = 'platform';\n\n/** The name is the platform's identity: renaming one orphans every market and partner config under the old key. */\nexport async function findPlatformAddress(\n\tname: string,\n): Promise<ProgramDerivedAddress> {\n\treturn await getProgramDerivedAddress({\n\t\tprogramAddress: SEND_NEXUS_PROGRAM_ADDRESS,\n\t\tseeds: [\n\t\t\tnew TextEncoder().encode(PLATFORM_SEED),\n\t\t\tnew TextEncoder().encode(name),\n\t\t],\n\t});\n}\n","// Hand-parsed so consumers don't inherit `@solana-program/token-2022`. The programs\n// price every leg on what lands after the mint's cut; a quote without it fails slippage.\n\nimport {\n\tgetAddressDecoder,\n\tgetBase64Encoder,\n\ttype Address,\n\ttype Commitment,\n\ttype GetEpochInfoApi,\n\ttype GetMultipleAccountsApi,\n\ttype Rpc,\n} from '@solana/kit';\n\nimport {\n\tTOKEN_2022_PROGRAM_ADDRESS,\n\tTOKEN_PROGRAM_ADDRESS,\n} from './constants.js';\nimport type { MintFee } from './math/amm.js';\nimport { fetchInChunks } from './utils/chunk.js';\n\nconst MINT_BASE_LENGTH = 82;\n\n// Token-2022 pads the base mint to the 165-byte token-account length so the two\n// never share a prefix, then stamps the type byte; TLV entries follow it.\nconst ACCOUNT_TYPE_OFFSET = 165;\n\nconst ACCOUNT_TYPE_MINT = 1;\n\nconst TLV_START = 166;\n\nconst TLV_HEADER = 4;\n\nconst TRANSFER_FEE_CONFIG_TYPE = 1;\n\n// Trailing rent slack reads as `ExtensionType::Uninitialized`, ending the list.\nconst UNINITIALIZED_TYPE = 0;\n\n// Config authority, withdraw authority, `withheld_amount` u64, then older and\n// newer `TransferFee` (epoch u64, maximum_fee u64, bps u16).\nconst TRANSFER_FEE_CONFIG_LENGTH = 108;\n\nconst PUBKEY_LENGTH = 32;\n\nconst OLDER_FEE = 72;\nconst NEWER_FEE = 90;\n\nconst FEE_MAXIMUM = 8;\nconst FEE_BASIS_POINTS = 16;\n\nconst addressDecoder = getAddressDecoder();\nconst base64Encoder = getBase64Encoder();\n\nexport interface TransferFeeEntry {\n\treadonly epoch: bigint;\n\treadonly maximumFee: bigint;\n\treadonly basisPoints: number;\n}\n\nexport interface TransferFeeConfig {\n\t/** `undefined` when the authority is unset: the schedule is frozen forever. */\n\treadonly authority: Address | undefined;\n\treadonly older: TransferFeeEntry;\n\treadonly newer: TransferFeeEntry;\n}\n\n// `OptionalNonZeroPubkey` has no tag byte: all zeros is `None`.\nfunction readAuthority(data: Uint8Array, start: number): Address | undefined {\n\tconst bytes = data.subarray(start, start + PUBKEY_LENGTH);\n\treturn bytes.some((byte) => byte !== 0)\n\t\t? addressDecoder.decode(bytes)\n\t\t: undefined;\n}\n\nfunction readEntry(view: DataView, start: number): TransferFeeEntry {\n\treturn {\n\t\tepoch: view.getBigUint64(start, true),\n\t\tmaximumFee: view.getBigUint64(start + FEE_MAXIMUM, true),\n\t\tbasisPoints: view.getUint16(start + FEE_BASIS_POINTS, true),\n\t};\n}\n\n/** `owner` is the account's program. `undefined` means no fee extension; anything\n * unparseable throws `RangeError` rather than pricing a charging mint free. */\nexport function decodeTransferFeeConfig(\n\tdata: Uint8Array,\n\towner: Address,\n): TransferFeeConfig | undefined {\n\t// Classic SPL can never gain an extension, so this result is permanent.\n\tif (owner === TOKEN_PROGRAM_ADDRESS) return undefined;\n\tif (owner !== TOKEN_2022_PROGRAM_ADDRESS) {\n\t\tthrow new RangeError(\n\t\t\t`decodeTransferFeeConfig: ${owner} is not a token program`,\n\t\t);\n\t}\n\n\t// Token-2022 leaves a mint with no extensions unpadded at 82 bytes.\n\tif (data.length === MINT_BASE_LENGTH) return undefined;\n\tif (data.length < TLV_START) {\n\t\tthrow new RangeError(\n\t\t\t`decodeTransferFeeConfig: a Token-2022 mint holds ${data.length} bytes, expected ${MINT_BASE_LENGTH} or at least ${TLV_START}`,\n\t\t);\n\t}\n\t// Token accounts share this TLV layout with different extension types.\n\tif (data[ACCOUNT_TYPE_OFFSET] !== ACCOUNT_TYPE_MINT) {\n\t\tthrow new RangeError(\n\t\t\t`decodeTransferFeeConfig: account type ${data[ACCOUNT_TYPE_OFFSET]} is not a mint`,\n\t\t);\n\t}\n\n\tconst view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\n\tlet offset = TLV_START;\n\twhile (offset < data.length) {\n\t\tif (offset + TLV_HEADER > data.length) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'decodeTransferFeeConfig: a TLV entry header runs past the end of the account',\n\t\t\t);\n\t\t}\n\n\t\tconst extensionType = view.getUint16(offset, true);\n\t\tif (extensionType === UNINITIALIZED_TYPE) return undefined;\n\n\t\tconst length = view.getUint16(offset + 2, true);\n\t\tconst payload = offset + TLV_HEADER;\n\t\tconst next = payload + length;\n\t\tif (next > data.length) {\n\t\t\tthrow new RangeError(\n\t\t\t\t'decodeTransferFeeConfig: a TLV entry runs past the end of the account',\n\t\t\t);\n\t\t}\n\n\t\tif (extensionType === TRANSFER_FEE_CONFIG_TYPE) {\n\t\t\t// Exactly 108 or throw: the extension never writes a wider config.\n\t\t\tif (length !== TRANSFER_FEE_CONFIG_LENGTH) {\n\t\t\t\tthrow new RangeError(\n\t\t\t\t\t`decodeTransferFeeConfig: TransferFeeConfig holds ${length} bytes, expected ${TRANSFER_FEE_CONFIG_LENGTH}`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tauthority: readAuthority(data, payload),\n\t\t\t\tolder: readEntry(view, payload + OLDER_FEE),\n\t\t\t\tnewer: readEntry(view, payload + NEWER_FEE),\n\t\t\t};\n\t\t}\n\n\t\toffset = next;\n\t}\n\n\treturn undefined;\n}\n\n/** Mirrors SPL `get_epoch_fee`: the newer entry is live from its own epoch on. */\nexport function transferFeeAtEpoch(\n\tconfig: TransferFeeConfig,\n\tepoch: bigint,\n): MintFee {\n\tconst entry = epoch >= config.newer.epoch ? config.newer : config.older;\n\treturn { bps: entry.basisPoints, maximumFee: entry.maximumFee };\n}\n\nexport function mintFeeAtEpoch(\n\tdata: Uint8Array,\n\towner: Address,\n\tepoch: bigint,\n): MintFee | undefined {\n\tconst config = decodeTransferFeeConfig(data, owner);\n\treturn config === undefined ? undefined : transferFeeAtEpoch(config, epoch);\n}\n\n// Omit the config, never `{ commitment: undefined }`: Kit strips the falsy key and\n// the server's `finalized` wins, where an absent key gets the client's default.\nfunction currentEpoch(\n\trpc: Rpc<GetEpochInfoApi>,\n\tcommitment: Commitment | undefined,\n): Promise<bigint> {\n\treturn rpc\n\t\t.getEpochInfo(commitment === undefined ? undefined : { commitment })\n\t\t.send()\n\t\t.then((info) => info.epoch);\n}\n\n/** A missing account throws, never reads as fee-free. Valid only for `epoch`, which defaults to\n * the cluster's (a second call). */\nexport async function fetchMintFees(\n\trpc: Rpc<GetMultipleAccountsApi & GetEpochInfoApi>,\n\tmints: readonly Address[],\n\toptions?: { epoch?: bigint; commitment?: Commitment },\n): Promise<Map<Address, MintFee | undefined>> {\n\tconst commitment = options?.commitment;\n\n\tconst [epoch, accounts] = await Promise.all([\n\t\toptions?.epoch ?? currentEpoch(rpc, commitment),\n\t\tfetchInChunks(mints, (chunk) =>\n\t\t\trpc\n\t\t\t\t.getMultipleAccounts(\n\t\t\t\t\tchunk,\n\t\t\t\t\tcommitment === undefined\n\t\t\t\t\t\t? { encoding: 'base64' }\n\t\t\t\t\t\t: { commitment, encoding: 'base64' },\n\t\t\t\t)\n\t\t\t\t.send()\n\t\t\t\t.then(({ value }) => value),\n\t\t),\n\t]);\n\n\tconst fees = new Map<Address, MintFee | undefined>();\n\tfor (const [index, mint] of mints.entries()) {\n\t\tconst account = accounts.at(index);\n\t\tif (!account) {\n\t\t\tthrow new Error(`fetchMintFees: no account at ${mint}`);\n\t\t}\n\t\tconst data = new Uint8Array(base64Encoder.encode(account.data[0]));\n\t\tfees.set(mint, mintFeeAtEpoch(data, account.owner, epoch));\n\t}\n\treturn fees;\n}\n","// Read off the mint, never tabulated: a stale `tokenProgram` derives an ATA the\n// transfer cannot reach.\nimport {\n\tgetBase64Encoder,\n\ttype Address,\n\ttype Commitment,\n\ttype GetAccountInfoApi,\n\ttype GetMultipleAccountsApi,\n\ttype Rpc,\n} from '@solana/kit';\n\nimport {\n\tTOKEN_2022_PROGRAM_ADDRESS,\n\tTOKEN_PROGRAM_ADDRESS,\n} from '../constants.js';\nimport { fetchInChunks } from './chunk.js';\n\n// Both token programs share the base mint: 36-byte `COption<Pubkey>` authority,\n// u64 supply, then decimals.\nconst MINT_BASE_LENGTH = 82;\nconst MINT_DECIMALS_OFFSET = 44;\n\nexport interface QuoteMintInfo {\n\tmint: Address;\n\t/** Immutable: safe to cache. */\n\tdecimals: number;\n\t/** The account's owner: `TOKEN_PROGRAM_ADDRESS` or `TOKEN_2022_PROGRAM_ADDRESS`. */\n\ttokenProgram: Address;\n}\n\nfunction decodeMintInfo(\n\tmint: Address,\n\tdata: Uint8Array,\n\towner: Address,\n): QuoteMintInfo {\n\tif (\n\t\towner !== TOKEN_PROGRAM_ADDRESS &&\n\t\towner !== TOKEN_2022_PROGRAM_ADDRESS\n\t) {\n\t\tthrow new Error(\n\t\t\t`fetchQuoteMintInfo: ${mint} is owned by ${owner}, which is not a token program`,\n\t\t);\n\t}\n\t// A floor, not an equality: Token-2022 mints with extensions run longer.\n\tif (data.length < MINT_BASE_LENGTH) {\n\t\tthrow new Error(\n\t\t\t`fetchQuoteMintInfo: ${mint} holds ${data.length} bytes, too short for a mint`,\n\t\t);\n\t}\n\treturn { mint, decimals: data[MINT_DECIMALS_OFFSET], tokenProgram: owner };\n}\n\n/** Throws when the mint does not exist or is not owned by a token program. */\nexport async function fetchQuoteMintInfo(\n\trpc: Rpc<GetAccountInfoApi>,\n\tmint: Address,\n\tcommitment?: Commitment,\n): Promise<QuoteMintInfo> {\n\tconst { value } = await rpc\n\t\t.getAccountInfo(\n\t\t\tmint,\n\t\t\tcommitment === undefined\n\t\t\t\t? { encoding: 'base64' }\n\t\t\t\t: { commitment, encoding: 'base64' },\n\t\t)\n\t\t.send();\n\tif (!value) {\n\t\tthrow new Error(`fetchQuoteMintInfo: no account at ${mint}`);\n\t}\n\tconst data = new Uint8Array(getBase64Encoder().encode(value.data[0]));\n\treturn decodeMintInfo(mint, data, value.owner);\n}\n\n/** One round trip per 100 mints; results follow `mints` order. */\nexport async function fetchQuoteMintInfos(\n\trpc: Rpc<GetMultipleAccountsApi>,\n\tmints: readonly Address[],\n\tcommitment?: Commitment,\n): Promise<QuoteMintInfo[]> {\n\tif (mints.length === 0) return [];\n\tconst value = await fetchInChunks(mints, (chunk) =>\n\t\trpc\n\t\t\t.getMultipleAccounts(\n\t\t\t\tchunk,\n\t\t\t\tcommitment === undefined\n\t\t\t\t\t? { encoding: 'base64' }\n\t\t\t\t\t: { commitment, encoding: 'base64' },\n\t\t\t)\n\t\t\t.send()\n\t\t\t.then((response) => response.value),\n\t);\n\n\tconst base64Encoder = getBase64Encoder();\n\treturn mints.map((mint, index) => {\n\t\tconst account = value.at(index);\n\t\tif (!account) {\n\t\t\tthrow new Error(`fetchQuoteMintInfo: no account at ${mint}`);\n\t\t}\n\t\tconst data = new Uint8Array(base64Encoder.encode(account.data[0]));\n\t\treturn decodeMintInfo(mint, data, account.owner);\n\t});\n}\n","export {\n\tcreatorHashFromId,\n\tdecodeCreatorId,\n\tencodeCreatorId,\n} from './creator-hash.js';\nexport { fetchQuoteMintInfo, fetchQuoteMintInfos } from './mint-info.js';\nexport type { QuoteMintInfo } from './mint-info.js';\nexport type { PartnerInput } from './partner.js';\nexport { findAssociatedTokenPda } from './pda.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAUA,MAAa,2BACZ;;;ACDD,MAAa,iCACZ;;;ACDD,MAAa,6BACZ;;;;;;;;;;;;;;;;;ACCD,MAAa,0BAAA,GACZA,YAAAA,QAAAA,CAAQ,kCAAkC;AAE3C,MAAa,yBAAA,GACZA,YAAAA,QAAAA,CAAQ,6CAA6C;AAEtD,MAAa,8BAAA,GACZA,YAAAA,QAAAA,CAAQ,6CAA6C;AAEtD,MAAa,oCAAA,GACZA,YAAAA,QAAAA,CAAQ,8CAA8C;AAEvD,MAAa,aAAA,GAAqBA,YAAAA,QAAAA,CACjC,6CACD;AAEA,MAAa,aAAA,GAAqBA,YAAAA,QAAAA,CACjC,8CACD;AAEA,MAAa,kBACZ;AAED,MAAa,8BAAA,GAAsCA,YAAAA,QAAAA,CAClD,8CACD;;;;;;;;;;ACMA,MAAaC,gCAAkD,IAAI,WAAW;CAC7E;C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