@send-fun/sdk 1.1.0 → 2.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 (80) hide show
  1. package/README.md +8 -9
  2. package/dist/index.cjs +777 -433
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +678 -217
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.mts +678 -217
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +777 -433
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +7 -7
  11. package/src/dex/generated/accounts/globalConfig.ts +39 -2
  12. package/src/dex/generated/accounts/pool.ts +60 -9
  13. package/src/dex/generated/accounts/rewardAccrual.ts +39 -2
  14. package/src/dex/generated/errors/sendDex.ts +16 -8
  15. package/src/dex/generated/events/creatorClaimEvent.ts +3 -2
  16. package/src/dex/generated/events/poolCreateEvent.ts +8 -2
  17. package/src/dex/generated/events/tokenCreateEvent.ts +8 -9
  18. package/src/dex/generated/events/tradeEvent.ts +9 -2
  19. package/src/dex/generated/index.ts +1 -0
  20. package/src/dex/generated/instructions/claimCreatorFees.ts +21 -5
  21. package/src/{nexus → dex}/generated/pdas/creatorFeeConfig.ts +6 -6
  22. package/src/dex/generated/pdas/index.ts +1 -0
  23. package/src/dex/generated/plugins/sendDex.ts +3 -0
  24. package/src/dex/generated/shared/index.ts +52 -0
  25. package/src/dex/trade.ts +12 -13
  26. package/src/launchpad/create.ts +13 -38
  27. package/src/launchpad/generated/accounts/bondingCurve.ts +62 -9
  28. package/src/launchpad/generated/accounts/globalConfig.ts +39 -2
  29. package/src/launchpad/generated/accounts/rewardAccrual.ts +39 -2
  30. package/src/launchpad/generated/errors/sendLaunchpad.ts +12 -4
  31. package/src/launchpad/generated/events/completeEvent.ts +3 -2
  32. package/src/launchpad/generated/events/creatorClaimEvent.ts +3 -2
  33. package/src/launchpad/generated/events/migrateEvent.ts +3 -2
  34. package/src/launchpad/generated/events/tokenCreateEvent.ts +10 -9
  35. package/src/launchpad/generated/events/tradeEvent.ts +9 -2
  36. package/src/launchpad/generated/index.ts +1 -0
  37. package/src/launchpad/generated/instructions/claimCreatorFees.ts +17 -4
  38. package/src/launchpad/generated/instructions/createToken.ts +32 -50
  39. package/src/launchpad/generated/instructions/migrate.ts +79 -12
  40. package/src/launchpad/generated/pdas/creatorFeeConfig.ts +39 -0
  41. package/src/launchpad/generated/pdas/index.ts +1 -0
  42. package/src/launchpad/generated/plugins/sendLaunchpad.ts +3 -0
  43. package/src/launchpad/generated/shared/index.ts +52 -0
  44. package/src/launchpad/migrate.ts +7 -4
  45. package/src/launchpad/trade.ts +15 -15
  46. package/src/math/amm.ts +40 -33
  47. package/src/math/fee-decay.ts +3 -2
  48. package/src/math/fees.ts +4 -2
  49. package/src/math/internal.ts +1 -1
  50. package/src/nexus/fee-helpers.ts +10 -5
  51. package/src/nexus/generated/accounts/altRegistry.ts +41 -2
  52. package/src/nexus/generated/accounts/feePreset.ts +43 -4
  53. package/src/nexus/generated/accounts/globalConfig.ts +39 -2
  54. package/src/nexus/generated/accounts/index.ts +0 -1
  55. package/src/nexus/generated/accounts/partnerConfig.ts +48 -5
  56. package/src/nexus/generated/accounts/partnerMetadata.ts +39 -2
  57. package/src/nexus/generated/accounts/rewardState.ts +41 -2
  58. package/src/nexus/generated/accounts/sendNexus.accounts.ts +0 -5
  59. package/src/nexus/generated/accounts/stakingConfig.ts +39 -2
  60. package/src/nexus/generated/accounts/userRewardDebt.ts +42 -5
  61. package/src/nexus/generated/accounts/userStakePosition.ts +42 -5
  62. package/src/nexus/generated/errors/sendNexus.ts +12 -4
  63. package/src/nexus/generated/index.ts +1 -0
  64. package/src/nexus/generated/pdas/index.ts +0 -1
  65. package/src/nexus/generated/plugins/sendNexus.ts +0 -35
  66. package/src/nexus/generated/shared/index.ts +52 -0
  67. package/src/nexus/generated/types/dexFees.ts +4 -4
  68. package/src/nexus/generated/types/index.ts +0 -1
  69. package/src/nexus/generated/types/launchpadFees.ts +4 -4
  70. package/src/nexus/staking.ts +45 -41
  71. package/src/platform.ts +2 -2
  72. package/src/transfer-fee.ts +19 -17
  73. package/src/utils/chunk.ts +1 -1
  74. package/src/utils/index.ts +2 -5
  75. package/src/utils/mint-info.ts +8 -7
  76. package/src/utils/partner.ts +1 -1
  77. package/src/utils/pda.ts +1 -1
  78. package/src/nexus/generated/accounts/creatorFeeConfig.ts +0 -200
  79. package/src/nexus/generated/types/callerType.ts +0 -38
  80. package/src/utils/creator-hash.ts +0 -57
package/dist/index.d.cts CHANGED
@@ -48,11 +48,39 @@ declare function getGlobalConfigEncoder$2(): FixedSizeEncoder<GlobalConfigArgs$2
48
48
  declare function getGlobalConfigDecoder$2(): FixedSizeDecoder<GlobalConfig$2>;
49
49
  /** Gets the codec for {@link GlobalConfig} account data. */
50
50
  declare function getGlobalConfigCodec$2(): FixedSizeCodec<GlobalConfigArgs$2, GlobalConfig$2>;
51
+ /**
52
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
53
+ * does not match.
54
+ *
55
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
56
+ * than returning the non-existing variant: an account passed as existing must never come back as that
57
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
58
+ */
51
59
  declare function decodeGlobalConfig$2<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<GlobalConfig$2, TAddress>;
60
+ /**
61
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
62
+ * does not match.
63
+ *
64
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
65
+ * than returning the non-existing variant: an account passed as existing must never come back as that
66
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
67
+ */
52
68
  declare function decodeGlobalConfig$2<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<GlobalConfig$2, TAddress>;
69
+ /** Fetches a `GlobalConfig` account, throwing when it does not exist or only holds lamports. */
53
70
  declare function fetchGlobalConfig$2<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<GlobalConfig$2, TAddress>>;
71
+ /**
72
+ * Fetches a `GlobalConfig` account, or the non-existing variant when the address holds no
73
+ * account or only lamports (see {@link accountIsCreated}).
74
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
75
+ */
54
76
  declare function fetchMaybeGlobalConfig$2<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<GlobalConfig$2, TAddress>>;
77
+ /** Fetches `GlobalConfig` accounts, throwing when any does not exist or only holds lamports. */
55
78
  declare function fetchAllGlobalConfig$2(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<GlobalConfig$2>[]>;
79
+ /**
80
+ * Fetches `GlobalConfig` accounts, with the non-existing variant for each address that holds
81
+ * no account or only lamports (see {@link accountIsCreated}).
82
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
83
+ */
56
84
  declare function fetchAllMaybeGlobalConfig$2(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<GlobalConfig$2>[]>;
57
85
  declare function getGlobalConfigSize$1(): number;
58
86
  //#endregion
@@ -92,7 +120,7 @@ type Pool = {
92
120
  quoteMint: Address;
93
121
  quoteDecimals: number;
94
122
  coinCreator: Address;
95
- creatorFeeConfig: Address;
123
+ padding0: Array<bigint>;
96
124
  baseVault: Address;
97
125
  quoteVault: Address;
98
126
  lpMint: Address;
@@ -104,6 +132,8 @@ type Pool = {
104
132
  protocolOwed: bigint;
105
133
  creatorOwed: bigint;
106
134
  platformConfig: Address;
135
+ creatorFeeMode: number;
136
+ creatorFeeBps: number;
107
137
  reserved: ReadonlyUint8Array;
108
138
  };
109
139
  type PoolArgs = {
@@ -115,7 +145,7 @@ type PoolArgs = {
115
145
  quoteMint: Address;
116
146
  quoteDecimals: number;
117
147
  coinCreator: Address;
118
- creatorFeeConfig: Address;
148
+ padding0: Array<number | bigint>;
119
149
  baseVault: Address;
120
150
  quoteVault: Address;
121
151
  lpMint: Address;
@@ -127,6 +157,8 @@ type PoolArgs = {
127
157
  protocolOwed: number | bigint;
128
158
  creatorOwed: number | bigint;
129
159
  platformConfig: Address;
160
+ creatorFeeMode: number;
161
+ creatorFeeBps: number;
130
162
  reserved: ReadonlyUint8Array;
131
163
  };
132
164
  /** Gets the encoder for {@link PoolArgs} account data. */
@@ -135,11 +167,39 @@ declare function getPoolEncoder(): FixedSizeEncoder<PoolArgs>;
135
167
  declare function getPoolDecoder(): FixedSizeDecoder<Pool>;
136
168
  /** Gets the codec for {@link Pool} account data. */
137
169
  declare function getPoolCodec(): FixedSizeCodec<PoolArgs, Pool>;
170
+ /**
171
+ * Decodes a `Pool` account, throwing when another program owns it or its discriminator
172
+ * does not match.
173
+ *
174
+ * Unlike {@link fetchMaybePool}, this throws for an address that only holds lamports rather
175
+ * than returning the non-existing variant: an account passed as existing must never come back as that
176
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
177
+ */
138
178
  declare function decodePool<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Pool, TAddress>;
179
+ /**
180
+ * Decodes a `Pool` account, throwing when another program owns it or its discriminator
181
+ * does not match.
182
+ *
183
+ * Unlike {@link fetchMaybePool}, this throws for an address that only holds lamports rather
184
+ * than returning the non-existing variant: an account passed as existing must never come back as that
185
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
186
+ */
139
187
  declare function decodePool<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Pool, TAddress>;
188
+ /** Fetches a `Pool` account, throwing when it does not exist or only holds lamports. */
140
189
  declare function fetchPool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Pool, TAddress>>;
190
+ /**
191
+ * Fetches a `Pool` account, or the non-existing variant when the address holds no
192
+ * account or only lamports (see {@link accountIsCreated}).
193
+ * {@link decodePool} throws for a lamports-only account instead.
194
+ */
141
195
  declare function fetchMaybePool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Pool, TAddress>>;
196
+ /** Fetches `Pool` accounts, throwing when any does not exist or only holds lamports. */
142
197
  declare function fetchAllPool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Pool>[]>;
198
+ /**
199
+ * Fetches `Pool` accounts, with the non-existing variant for each address that holds
200
+ * no account or only lamports (see {@link accountIsCreated}).
201
+ * {@link decodePool} throws for a lamports-only account instead.
202
+ */
143
203
  declare function fetchAllMaybePool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Pool>[]>;
144
204
  declare function getPoolSize(): number;
145
205
  //#endregion
@@ -169,11 +229,39 @@ declare function getRewardAccrualEncoder$1(): FixedSizeEncoder<RewardAccrualArgs
169
229
  declare function getRewardAccrualDecoder$1(): FixedSizeDecoder<RewardAccrual$1>;
170
230
  /** Gets the codec for {@link RewardAccrual} account data. */
171
231
  declare function getRewardAccrualCodec$1(): FixedSizeCodec<RewardAccrualArgs$1, RewardAccrual$1>;
232
+ /**
233
+ * Decodes a `RewardAccrual` account, throwing when another program owns it or its discriminator
234
+ * does not match.
235
+ *
236
+ * Unlike {@link fetchMaybeRewardAccrual}, this throws for an address that only holds lamports rather
237
+ * than returning the non-existing variant: an account passed as existing must never come back as that
238
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
239
+ */
172
240
  declare function decodeRewardAccrual$1<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RewardAccrual$1, TAddress>;
241
+ /**
242
+ * Decodes a `RewardAccrual` account, throwing when another program owns it or its discriminator
243
+ * does not match.
244
+ *
245
+ * Unlike {@link fetchMaybeRewardAccrual}, this throws for an address that only holds lamports rather
246
+ * than returning the non-existing variant: an account passed as existing must never come back as that
247
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
248
+ */
173
249
  declare function decodeRewardAccrual$1<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RewardAccrual$1, TAddress>;
250
+ /** Fetches a `RewardAccrual` account, throwing when it does not exist or only holds lamports. */
174
251
  declare function fetchRewardAccrual$1<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RewardAccrual$1, TAddress>>;
252
+ /**
253
+ * Fetches a `RewardAccrual` account, or the non-existing variant when the address holds no
254
+ * account or only lamports (see {@link accountIsCreated}).
255
+ * {@link decodeRewardAccrual} throws for a lamports-only account instead.
256
+ */
175
257
  declare function fetchMaybeRewardAccrual$1<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RewardAccrual$1, TAddress>>;
258
+ /** Fetches `RewardAccrual` accounts, throwing when any does not exist or only holds lamports. */
176
259
  declare function fetchAllRewardAccrual$1(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RewardAccrual$1>[]>;
260
+ /**
261
+ * Fetches `RewardAccrual` accounts, with the non-existing variant for each address that holds
262
+ * no account or only lamports (see {@link accountIsCreated}).
263
+ * {@link decodeRewardAccrual} throws for a lamports-only account instead.
264
+ */
177
265
  declare function fetchAllMaybeRewardAccrual$1(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RewardAccrual$1>[]>;
178
266
  declare function getRewardAccrualSize$1(): number;
179
267
  //#endregion
@@ -215,8 +303,8 @@ declare const SEND_DEX_ERROR__INVALID_POOL_BALANCE = 6008;
215
303
  declare const SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE = 6009;
216
304
  /** InvalidAuthority: Invalid authority */
217
305
  declare const SEND_DEX_ERROR__INVALID_AUTHORITY = 6010;
218
- /** InvalidCreatorHash: creator_hash does not match (creator_platform, creator_id) */
219
- declare const SEND_DEX_ERROR__INVALID_CREATOR_HASH = 6011;
306
+ /** InvalidCoinCreator: Invalid coin creator */
307
+ declare const SEND_DEX_ERROR__INVALID_COIN_CREATOR = 6011;
220
308
  /** InvalidPlatformConfig: Platform config cannot be the default address */
221
309
  declare const SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG = 6012;
222
310
  /** ProgramPaused: Program is paused */
@@ -243,17 +331,21 @@ declare const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 7009;
243
331
  declare const SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 7010;
244
332
  /** NothingToClaim: Nothing to claim */
245
333
  declare const SEND_DEX_ERROR__NOTHING_TO_CLAIM = 7011;
246
- /** InvalidCreatorId: Creator identity is not a decodable wallet address */
247
- declare const SEND_DEX_ERROR__INVALID_CREATOR_ID = 7012;
334
+ /** Unused7012: Unused */
335
+ declare const SEND_DEX_ERROR__UNUSED7012 = 7012;
248
336
  /** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */
249
337
  declare const SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET = 7013;
250
338
  /** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */
251
339
  declare const SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 7014;
340
+ /** CreatorFeeTooHigh: Creator fee exceeds the partner's maximum */
341
+ declare const SEND_DEX_ERROR__CREATOR_FEE_TOO_HIGH = 7015;
342
+ /** CreatorFeeModeNotAllowed: Creator fee mode is not allowed by the partner config */
343
+ declare const SEND_DEX_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED = 7016;
252
344
  /** InsufficientLiquidity: Insufficient liquidity */
253
345
  declare const SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY = 7100;
254
346
  /** InvalidAmount: Invalid amount */
255
347
  declare const SEND_DEX_ERROR__INVALID_AMOUNT = 7101;
256
- type SendDexError = typeof SEND_DEX_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_DEX_ERROR__INSUFFICIENT_BALANCE | typeof SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE | typeof SEND_DEX_ERROR__INVALID_AMOUNT | typeof SEND_DEX_ERROR__INVALID_AUTHORITY | typeof SEND_DEX_ERROR__INVALID_BASE_MINT | typeof SEND_DEX_ERROR__INVALID_CREATOR_HASH | typeof SEND_DEX_ERROR__INVALID_CREATOR_ID | typeof SEND_DEX_ERROR__INVALID_DEPOSIT | typeof SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG | typeof SEND_DEX_ERROR__INVALID_POOL_BALANCE | typeof SEND_DEX_ERROR__INVALID_POOL_STATE | typeof SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_DEX_ERROR__INVALID_PYTH_FEED | typeof SEND_DEX_ERROR__INVALID_QUOTE_MINT | typeof SEND_DEX_ERROR__INVALID_SLUG | typeof SEND_DEX_ERROR__NOTHING_TO_CLAIM | typeof SEND_DEX_ERROR__POOL_CREATION_DISABLED | typeof SEND_DEX_ERROR__POOL_PAUSED | typeof SEND_DEX_ERROR__PROGRAM_PAUSED | typeof SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_DEX_ERROR__SLIPPAGE_EXCEEDED | typeof SEND_DEX_ERROR__TEXT_TOO_LONG | typeof SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_DEX_ERROR__UNAUTHORIZED | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
348
+ type SendDexError = typeof SEND_DEX_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_DEX_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED | typeof SEND_DEX_ERROR__CREATOR_FEE_TOO_HIGH | typeof SEND_DEX_ERROR__INSUFFICIENT_BALANCE | typeof SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE | typeof SEND_DEX_ERROR__INVALID_AMOUNT | typeof SEND_DEX_ERROR__INVALID_AUTHORITY | typeof SEND_DEX_ERROR__INVALID_BASE_MINT | typeof SEND_DEX_ERROR__INVALID_COIN_CREATOR | typeof SEND_DEX_ERROR__INVALID_DEPOSIT | typeof SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG | typeof SEND_DEX_ERROR__INVALID_POOL_BALANCE | typeof SEND_DEX_ERROR__INVALID_POOL_STATE | typeof SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_DEX_ERROR__INVALID_PYTH_FEED | typeof SEND_DEX_ERROR__INVALID_QUOTE_MINT | typeof SEND_DEX_ERROR__INVALID_SLUG | typeof SEND_DEX_ERROR__NOTHING_TO_CLAIM | typeof SEND_DEX_ERROR__POOL_CREATION_DISABLED | typeof SEND_DEX_ERROR__POOL_PAUSED | typeof SEND_DEX_ERROR__PROGRAM_PAUSED | typeof SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_DEX_ERROR__SLIPPAGE_EXCEEDED | typeof SEND_DEX_ERROR__TEXT_TOO_LONG | typeof SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_DEX_ERROR__UNAUTHORIZED | typeof SEND_DEX_ERROR__UNUSED7012 | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
257
349
  declare const sendDexErrorMessages: Record<SendDexError, string>;
258
350
  declare function getSendDexErrorMessage(code: SendDexError): string;
259
351
  declare function isSendDexError<TProgramErrorCode extends SendDexError>(error: unknown, transactionMessage: {
@@ -266,9 +358,16 @@ declare function isSendDexError<TProgramErrorCode extends SendDexError>(error: u
266
358
  }>;
267
359
  }>;
268
360
  declare namespace index_d_exports$23 {
269
- export { SEND_DEX_ERROR__ARITHMETIC_OVERFLOW, SEND_DEX_ERROR__INSUFFICIENT_BALANCE, SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY, SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE, SEND_DEX_ERROR__INVALID_AMOUNT, SEND_DEX_ERROR__INVALID_AUTHORITY, SEND_DEX_ERROR__INVALID_BASE_MINT, SEND_DEX_ERROR__INVALID_CREATOR_HASH, SEND_DEX_ERROR__INVALID_CREATOR_ID, SEND_DEX_ERROR__INVALID_DEPOSIT, SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG, SEND_DEX_ERROR__INVALID_POOL_BALANCE, SEND_DEX_ERROR__INVALID_POOL_STATE, SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT, SEND_DEX_ERROR__INVALID_PYTH_FEED, SEND_DEX_ERROR__INVALID_QUOTE_MINT, SEND_DEX_ERROR__INVALID_SLUG, SEND_DEX_ERROR__NOTHING_TO_CLAIM, SEND_DEX_ERROR__POOL_CREATION_DISABLED, SEND_DEX_ERROR__POOL_PAUSED, SEND_DEX_ERROR__PROGRAM_PAUSED, SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_DEX_ERROR__SLIPPAGE_EXCEEDED, SEND_DEX_ERROR__TEXT_TOO_LONG, SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_DEX_ERROR__UNAUTHORIZED, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendDexError, getSendDexErrorMessage, isSendDexError, sendDexErrorMessages };
361
+ export { SEND_DEX_ERROR__ARITHMETIC_OVERFLOW, SEND_DEX_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED, SEND_DEX_ERROR__CREATOR_FEE_TOO_HIGH, SEND_DEX_ERROR__INSUFFICIENT_BALANCE, SEND_DEX_ERROR__INSUFFICIENT_LIQUIDITY, SEND_DEX_ERROR__INSUFFICIENT_POOL_BALANCE, SEND_DEX_ERROR__INVALID_AMOUNT, SEND_DEX_ERROR__INVALID_AUTHORITY, SEND_DEX_ERROR__INVALID_BASE_MINT, SEND_DEX_ERROR__INVALID_COIN_CREATOR, SEND_DEX_ERROR__INVALID_DEPOSIT, SEND_DEX_ERROR__INVALID_PLATFORM_CONFIG, SEND_DEX_ERROR__INVALID_POOL_BALANCE, SEND_DEX_ERROR__INVALID_POOL_STATE, SEND_DEX_ERROR__INVALID_PYTH_ACCOUNT, SEND_DEX_ERROR__INVALID_PYTH_FEED, SEND_DEX_ERROR__INVALID_QUOTE_MINT, SEND_DEX_ERROR__INVALID_SLUG, SEND_DEX_ERROR__NOTHING_TO_CLAIM, SEND_DEX_ERROR__POOL_CREATION_DISABLED, SEND_DEX_ERROR__POOL_PAUSED, SEND_DEX_ERROR__PROGRAM_PAUSED, SEND_DEX_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_DEX_ERROR__SLIPPAGE_EXCEEDED, SEND_DEX_ERROR__TEXT_TOO_LONG, SEND_DEX_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_DEX_ERROR__UNAUTHORIZED, SEND_DEX_ERROR__UNUSED7012, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_DEX_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendDexError, getSendDexErrorMessage, isSendDexError, sendDexErrorMessages };
270
362
  }
271
363
  //#endregion
364
+ //#region src/dex/generated/pdas/creatorFeeConfig.d.ts
365
+ type CreatorFeeConfigSeeds$1 = {
366
+ baseMint: Address;
367
+ quoteMint: Address;
368
+ };
369
+ declare function findCreatorFeeConfigPda$1(seeds: CreatorFeeConfigSeeds$1): Promise<ProgramDerivedAddress>;
370
+ //#endregion
272
371
  //#region src/dex/generated/pdas/eventAuthority.d.ts
273
372
  declare const EVENT_AUTHORITY_PDA_ADDRESS$2: Address<"4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t">;
274
373
  declare function findEventAuthorityPda$2(): ProgramDerivedAddress;
@@ -301,7 +400,7 @@ declare function findRewardAccrualPda$1(seeds: RewardAccrualSeeds$1): Promise<Pr
301
400
  declare const WSOL_REWARD_ACCRUAL_PDA_ADDRESS$1: Address<"3AvcBtMajsyeNufVwkxV7UNXWo6G1qkJmCpiXx1HcFg8">;
302
401
  declare function findWsolRewardAccrualPda$1(): ProgramDerivedAddress;
303
402
  declare namespace index_d_exports$22 {
304
- export { EVENT_AUTHORITY_PDA_ADDRESS$2 as EVENT_AUTHORITY_PDA_ADDRESS, GLOBAL_CONFIG_PDA_ADDRESS$2 as GLOBAL_CONFIG_PDA_ADDRESS, LpMintSeeds, PoolSeeds, RewardAccrualSeeds$1 as RewardAccrualSeeds, WSOL_REWARD_ACCRUAL_PDA_ADDRESS$1 as WSOL_REWARD_ACCRUAL_PDA_ADDRESS, findEventAuthorityPda$2 as findEventAuthorityPda, findGlobalConfigPda$2 as findGlobalConfigPda, findLpMintPda, findPoolPda, findRewardAccrualPda$1 as findRewardAccrualPda, findWsolRewardAccrualPda$1 as findWsolRewardAccrualPda };
403
+ export { CreatorFeeConfigSeeds$1 as CreatorFeeConfigSeeds, EVENT_AUTHORITY_PDA_ADDRESS$2 as EVENT_AUTHORITY_PDA_ADDRESS, GLOBAL_CONFIG_PDA_ADDRESS$2 as GLOBAL_CONFIG_PDA_ADDRESS, LpMintSeeds, PoolSeeds, RewardAccrualSeeds$1 as RewardAccrualSeeds, WSOL_REWARD_ACCRUAL_PDA_ADDRESS$1 as WSOL_REWARD_ACCRUAL_PDA_ADDRESS, findCreatorFeeConfigPda$1 as findCreatorFeeConfigPda, findEventAuthorityPda$2 as findEventAuthorityPda, findGlobalConfigPda$2 as findGlobalConfigPda, findLpMintPda, findPoolPda, findRewardAccrualPda$1 as findRewardAccrualPda, findWsolRewardAccrualPda$1 as findWsolRewardAccrualPda };
305
404
  }
306
405
  //#endregion
307
406
  //#region src/dex/generated/events/anchorEventCpiDiscriminator.framing.d.ts
@@ -323,7 +422,7 @@ type CreatorClaimEvent$1 = {
323
422
  quoteMint: Address;
324
423
  platformConfig: Address;
325
424
  coinCreator: Address;
326
- creatorFeeConfig: Address;
425
+ padding0: Array<bigint>;
327
426
  claimer: Address;
328
427
  destinationOwner: Address;
329
428
  amount: bigint;
@@ -414,7 +513,7 @@ type PoolCreateEvent = {
414
513
  quoteMint: Address;
415
514
  quoteDecimals: number;
416
515
  coinCreator: Address;
417
- creatorFeeConfig: Address;
516
+ padding0: Array<bigint>;
418
517
  platformConfig: Address;
419
518
  baseVault: Address;
420
519
  quoteVault: Address;
@@ -423,6 +522,8 @@ type PoolCreateEvent = {
423
522
  baseReserves: bigint;
424
523
  quoteReserves: bigint;
425
524
  timestamp: bigint;
525
+ creatorFeeMode: number;
526
+ creatorFeeBps: number;
426
527
  };
427
528
  declare function getPoolCreateEventDecoder(): FixedSizeDecoder<PoolCreateEvent>;
428
529
  /**
@@ -507,9 +608,7 @@ type TokenCreateEvent$1 = {
507
608
  quoteMint: Address;
508
609
  quoteDecimals: number;
509
610
  coinCreator: Address;
510
- creatorPlatform: string;
511
- creatorId: string;
512
- creatorFeeConfig: Address;
611
+ padding0: Array<bigint>;
513
612
  platformConfig: Address;
514
613
  name: string;
515
614
  symbol: string;
@@ -520,6 +619,8 @@ type TokenCreateEvent$1 = {
520
619
  baseReserves: bigint;
521
620
  quoteReserves: bigint;
522
621
  timestamp: bigint;
622
+ creatorFeeMode: number;
623
+ creatorFeeBps: number;
523
624
  };
524
625
  declare function getTokenCreateEventDecoder$1(): Decoder<TokenCreateEvent$1>;
525
626
  /**
@@ -560,7 +661,7 @@ type TradeEvent$1 = {
560
661
  quoteMint: Address;
561
662
  user: Address;
562
663
  coinCreator: Address;
563
- creatorFeeConfig: Address;
664
+ padding0: Array<bigint>;
564
665
  platformConfig: Address;
565
666
  baseAmount: bigint;
566
667
  quoteAmountGross: bigint;
@@ -576,6 +677,8 @@ type TradeEvent$1 = {
576
677
  baseReserves: bigint;
577
678
  quoteReserves: bigint;
578
679
  timestamp: bigint;
680
+ creatorFeeMode: number;
681
+ creatorFeeBps: number;
579
682
  };
580
683
  declare function getTradeEventDecoder$1(): FixedSizeDecoder<TradeEvent$1>;
581
684
  /**
@@ -837,7 +940,7 @@ declare function parseBuyExactOutInstruction$1<TProgram extends string, TAccount
837
940
  //#region src/dex/generated/instructions/claimCreatorFees.d.ts
838
941
  declare const CLAIM_CREATOR_FEES_DISCRIMINATOR$1: ReadonlyUint8Array;
839
942
  declare function getClaimCreatorFeesDiscriminatorBytes$1(): ReadonlyUint8Array;
840
- type ClaimCreatorFeesInstruction$1<TProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS, TAccountClaimer extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountNexusGlobalConfig extends string | AccountMeta<string> = "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDestinationOwner extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", TAccountProgram extends string | AccountMeta<string> = "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountClaimer extends string ? ReadonlySignerAccount<TAccountClaimer> & AccountSignerMeta<TAccountClaimer> : TAccountClaimer, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountCreatorFeeConfig extends string ? ReadonlyAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountNexusGlobalConfig extends string ? ReadonlyAccount<TAccountNexusGlobalConfig> : TAccountNexusGlobalConfig, TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDestinationOwner extends string ? ReadonlyAccount<TAccountDestinationOwner> : TAccountDestinationOwner, TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
943
+ type ClaimCreatorFeesInstruction$1<TProgram extends string = typeof SEND_DEX_PROGRAM_ADDRESS, TAccountClaimer extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountNexusGlobalConfig extends string | AccountMeta<string> = "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDestinationOwner extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", TAccountProgram extends string | AccountMeta<string> = "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountClaimer extends string ? ReadonlySignerAccount<TAccountClaimer> & AccountSignerMeta<TAccountClaimer> : TAccountClaimer, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountCreatorFeeConfig extends string ? WritableAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountNexusGlobalConfig extends string ? ReadonlyAccount<TAccountNexusGlobalConfig> : TAccountNexusGlobalConfig, TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDestinationOwner extends string ? ReadonlyAccount<TAccountDestinationOwner> : TAccountDestinationOwner, TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
841
944
  type ClaimCreatorFeesInstructionData$1 = {
842
945
  discriminator: ReadonlyUint8Array;
843
946
  };
@@ -849,7 +952,7 @@ type ClaimCreatorFeesAsyncInput$1<TAccountClaimer extends string = string, TAcco
849
952
  claimer: TransactionSigner<TAccountClaimer>;
850
953
  payer: TransactionSigner<TAccountPayer>;
851
954
  pool?: Address<TAccountPool>;
852
- creatorFeeConfig: Address<TAccountCreatorFeeConfig>;
955
+ creatorFeeConfig?: Address<TAccountCreatorFeeConfig>;
853
956
  baseMint: Address<TAccountBaseMint>;
854
957
  quoteMint: Address<TAccountQuoteMint>;
855
958
  quoteVault?: Address<TAccountQuoteVault>;
@@ -1199,6 +1302,7 @@ type SendDexPluginInstructions = {
1199
1302
  type SendDexPluginPdas = {
1200
1303
  pool: typeof findPoolPda;
1201
1304
  eventAuthority: typeof findEventAuthorityPda$2;
1305
+ creatorFeeConfig: typeof findCreatorFeeConfigPda$1;
1202
1306
  rewardAccrual: typeof findRewardAccrualPda$1;
1203
1307
  globalConfig: typeof findGlobalConfigPda$2;
1204
1308
  lpMint: typeof findLpMintPda;
@@ -1215,27 +1319,29 @@ declare namespace index_d_exports$19 {
1215
1319
  declare namespace amm_d_exports {
1216
1320
  export { BuyQuote, MintFee, SellQuote, TradeQuote, TransferFeeNotSettleableError, amountAfterFee, buyExactIn$2 as buyExactIn, buyExactOut$2 as buyExactOut, calculateInitialLp, calculateInputForOutput, calculateMarketCap, calculateOutput, calculatePrice, calculateSlippageDown, calculateSlippageUp, feeOn, grossUp, sellExactIn$2 as sellExactIn, sellExactOut$2 as sellExactOut };
1217
1321
  }
1218
- /** Token-2022 `TransferFeeConfig` for the epoch the trade lands in; a stale one misprices the trade. */
1322
+ /** A Token-2022 transfer fee for one epoch. Use the fee for the epoch the trade lands in. */
1219
1323
  interface MintFee {
1220
1324
  /** 0 to 10_000. */
1221
1325
  bps: number;
1222
- /** Cap on the withheld amount, in the mint's raw units. */
1326
+ /** Maximum fee per transfer, in the mint's raw units. */
1223
1327
  maximumFee: bigint;
1224
1328
  }
1225
- /** No transfer lands exactly the requested amount; approximating one hands the program a bound it rejects. */
1329
+ /** Thrown when no transfer delivers exactly `amount` after the transfer fee. */
1226
1330
  declare class TransferFeeNotSettleableError extends RangeError {
1227
1331
  readonly amount: bigint;
1228
1332
  readonly mintFee: MintFee;
1229
1333
  constructor(amount: bigint, mintFee: MintFee);
1230
1334
  }
1231
- /** Rounds up, then caps (SPL's order); swapping them lets a split booking over-credit. */
1335
+ /** Returns the transfer fee on `amount`. Rounds up, then caps at `maximumFee`, in SPL's order.
1336
+ * Returns 0 without `fee`. Throws `RangeError` if `fee` is out of range. */
1232
1337
  declare function feeOn(amount: bigint, fee?: MintFee): bigint;
1233
- /** What lands when `amount` is sent; use `grossUp` to land an exact amount. */
1338
+ /** Returns what the recipient receives when `amount` is sent. `grossUp` is the inverse. */
1234
1339
  declare function amountAfterFee(amount: bigint, fee?: MintFee): bigint;
1235
- /** What must be sent for exactly `amount` to land; throws {@link TransferFeeNotSettleableError} if none does. */
1340
+ /** Returns the amount to send so that exactly `amount` arrives. Returns `amount` without `fee`.
1341
+ * Throws {@link TransferFeeNotSettleableError} if no such amount exists. */
1236
1342
  declare function grossUp(amount: bigint, fee?: MintFee): bigint;
1237
- /** `baseAmount`/`quoteAmount` are the user's transfers, as in on-chain `TradeResult`. Read the net
1238
- * fields on {@link BuyQuote}/{@link SellQuote}; re-deriving them drifts from the program by a rounding step. */
1343
+ /** `baseAmount` and `quoteAmount` are the user's transfers.
1344
+ * Read the net amounts from the fields of {@link BuyQuote} and {@link SellQuote}. Do not calculate them again. */
1239
1345
  interface TradeQuote {
1240
1346
  /** Base sent: vault to user on a buy, user to vault on a sell. */
1241
1347
  baseAmount: bigint;
@@ -1247,24 +1353,26 @@ interface TradeQuote {
1247
1353
  quoteTransferFee: bigint;
1248
1354
  }
1249
1355
  interface BuyQuote extends TradeQuote {
1250
- /** Priced on the quote reaching the vault. */
1356
+ /** Priced on the quote that reaches the vault. */
1251
1357
  fee: bigint;
1252
- /** Base credited to the buyer, after the base mint's cut. */
1358
+ /** Base the buyer receives, after the base mint's transfer fee. */
1253
1359
  baseToUser: bigint;
1254
1360
  /** Equals `quoteAmount`. */
1255
1361
  quoteFromUser: bigint;
1256
1362
  }
1257
1363
  interface SellQuote extends TradeQuote {
1258
- /** Priced on the quote leaving the vault. */
1364
+ /** Priced on the AMM's quote output, before this fee. */
1259
1365
  fee: bigint;
1260
1366
  /** Equals `baseAmount`. */
1261
1367
  baseFromUser: bigint;
1262
- /** Quote credited to the seller, after the quote mint's cut. */
1368
+ /** Quote the seller receives, after the quote mint's transfer fee. */
1263
1369
  quoteToUser: bigint;
1264
1370
  }
1265
- /** Output rounds down (the new reserve rounds up), so `k` never shrinks. */
1371
+ /** Returns the constant-product output for `amountIn`, rounded down. Throws `RangeError` on a zero
1372
+ * reserve, a zero `amountIn`, a zero output, or an output past u64. */
1266
1373
  declare function calculateOutput(reserveIn: bigint, reserveOut: bigint, amountIn: bigint): bigint;
1267
- /** Required input rounds up so the user pays enough. */
1374
+ /** Returns the input needed for `amountOut`, rounded up. Throws `RangeError` on a zero reserve, a zero
1375
+ * `amountOut`, an `amountOut` not below `reserveOut`, or an input past u64. */
1268
1376
  declare function calculateInputForOutput(reserveIn: bigint, reserveOut: bigint, amountOut: bigint): bigint;
1269
1377
  interface BaseQuoteParams {
1270
1378
  reserveQuote: bigint;
@@ -1273,38 +1381,42 @@ interface BaseQuoteParams {
1273
1381
  quoteFee?: MintFee;
1274
1382
  baseFee?: MintFee;
1275
1383
  }
1276
- /** Launchpad only: `bondingCurve.realBaseReserves`. A DEX pool has no cap. */
1384
+ /** `baseReserveCap` is `bondingCurve.realBaseReserves`. A DEX pool has no cap. */
1277
1385
  interface BaseReserveCap {
1278
1386
  baseReserveCap?: bigint;
1279
1387
  }
1280
- /** Guard with `calculateSlippageUp(quoteAmount, bps)`; it already carries the quote mint's cut. */
1388
+ /** Quotes a buy where the buyer receives `baseAmountOut`. With `baseReserveCap`, the vault sends at
1389
+ * most the cap. Guard with `calculateSlippageUp(quoteAmount, bps)`. `quoteAmount` includes the quote
1390
+ * mint's transfer fee. */
1281
1391
  declare function buyExactOut$2(params: BaseQuoteParams & BaseReserveCap & {
1282
1392
  baseAmountOut: bigint;
1283
1393
  }): BuyQuote;
1284
- /** Guard with `calculateSlippageDown(baseToUser, bps)`, not `baseAmount`: the program bounds what the buyer nets. */
1394
+ /** Quotes a buy that spends `quoteAmountIn`. Guard with `calculateSlippageDown(baseToUser, bps)`, not
1395
+ * `baseAmount`. The program checks the minimum against what the buyer receives. */
1285
1396
  declare function buyExactIn$2(params: BaseQuoteParams & BaseReserveCap & {
1286
1397
  quoteAmountIn: bigint;
1287
1398
  }): BuyQuote;
1288
- /** Guard with `calculateSlippageDown(quoteToUser, bps)`, not `quoteAmount`. */
1399
+ /** Quotes a sell of `baseAmountIn`. Guard with `calculateSlippageDown(quoteToUser, bps)`, not `quoteAmount`. */
1289
1400
  declare function sellExactIn$2(params: BaseQuoteParams & {
1290
1401
  baseAmountIn: bigint;
1291
1402
  }): SellQuote;
1292
- /** Guard with `calculateSlippageUp(baseFromUser, bps)`, which already carries the base mint's cut. */
1403
+ /** Quotes a sell where the seller receives `quoteAmountOut`. Guard with
1404
+ * `calculateSlippageUp(baseFromUser, bps)`. `baseFromUser` includes the base mint's transfer fee. */
1293
1405
  declare function sellExactOut$2(params: BaseQuoteParams & {
1294
1406
  quoteAmountOut: bigint;
1295
1407
  }): SellQuote;
1296
1408
  declare function calculateSlippageUp(amount: bigint, slippageBps: number): bigint;
1297
1409
  declare function calculateSlippageDown(amount: bigint, slippageBps: number): bigint;
1298
- /** Floors, as the program's `isqrt` does. */
1410
+ /** Returns `sqrt(quoteAmount * baseAmount)`, rounded down. */
1299
1411
  declare function calculateInitialLp(quoteAmount: bigint, baseAmount: bigint): bigint;
1300
- /** Floating-point quote per base, for display only. */
1412
+ /** Returns the price of one base token in quote tokens, as a float. For display only. */
1301
1413
  declare function calculatePrice(params: {
1302
1414
  quoteReserves: bigint;
1303
1415
  baseReserves: bigint;
1304
1416
  quoteDecimals: number;
1305
1417
  baseDecimals: number;
1306
1418
  }): number;
1307
- /** Market cap in raw quote-token units. */
1419
+ /** Returns the market cap in raw quote units. */
1308
1420
  declare function calculateMarketCap(params: {
1309
1421
  quoteReserves: bigint;
1310
1422
  baseReserves: bigint;
@@ -1312,7 +1424,7 @@ declare function calculateMarketCap(params: {
1312
1424
  }): bigint;
1313
1425
  //#endregion
1314
1426
  //#region src/utils/partner.d.ts
1315
- /** Non-default partners must sign; only `DEFAULT_PARTNER` is valid as a bare address. */
1427
+ /** A partner signer, or `DEFAULT_PARTNER` as a bare address. Any other partner must sign. */
1316
1428
  type PartnerInput = TransactionSigner | typeof DEFAULT_PARTNER;
1317
1429
  declare namespace trade_d_exports$1 {
1318
1430
  export { DexInstructionParams, DexTradeParams, buildBuyExactInInstruction$1 as buildBuyExactInInstruction, buildBuyExactOutInstruction$1 as buildBuyExactOutInstruction, buildSellExactInInstruction$1 as buildSellExactInInstruction, buildSellExactOutInstruction$1 as buildSellExactOutInstruction, buyExactIn$1 as buyExactIn, buyExactOut$1 as buyExactOut, sellExactIn$1 as sellExactIn, sellExactOut$1 as sellExactOut };
@@ -1329,7 +1441,7 @@ interface DexTradeParams {
1329
1441
  partner: PartnerInput;
1330
1442
  platformConfig: Address;
1331
1443
  quoteTokenProgram: Address;
1332
- /** Token-2022 schedule for the epoch the trade lands in; stale or missing skews the slippage bounds. */
1444
+ /** The quote mint's transfer fee for the epoch the trade lands in. A missing or old fee gives wrong slippage bounds. */
1333
1445
  quoteFee?: MintFee;
1334
1446
  baseFee?: MintFee;
1335
1447
  /** {@inheritDoc DexInstructionParams.userQuoteAccount} */
@@ -1345,15 +1457,14 @@ interface DexInstructionParams {
1345
1457
  partner: PartnerInput;
1346
1458
  platformConfig: Address;
1347
1459
  quoteTokenProgram: Address;
1348
- /** Any user-owned quote-mint account. Defaults to the ATA, created mid-trade
1349
- * if missing (payer funds rent), which only rescues a sell. For WSOL,
1350
- * a throwaway `createAccountWithSeed` account is cheaper. */
1460
+ /** Any quote-mint token account that `user` owns. Defaults to the user's ATA.
1461
+ * The program creates a missing ATA, and `payer` pays the rent. */
1351
1462
  userQuoteAccount?: Address;
1352
- /** Any user-owned base-mint account. Defaults to the ATA, created mid-trade
1353
- * if missing (payer funds rent), which only rescues a buy. */
1463
+ /** Any base-mint token account that `user` owns. Defaults to the user's ATA.
1464
+ * The program creates a missing ATA, and `payer` pays the rent. */
1354
1465
  userBaseAccount?: Address;
1355
1466
  }
1356
- /** `baseAmountOut` is net to the buyer: the program reads `amount` as `base_to_user`. */
1467
+ /** `baseAmountOut` is the base the buyer receives, after the base mint's transfer fee. */
1357
1468
  declare function buyExactOut$1(params: DexTradeParams & {
1358
1469
  baseAmountOut: bigint;
1359
1470
  }): Promise<{
@@ -1372,7 +1483,7 @@ declare function sellExactIn$1(params: DexTradeParams & {
1372
1483
  instruction: Instruction;
1373
1484
  quote: SellQuote;
1374
1485
  }>;
1375
- /** `quoteAmountOut` is net to the seller: the program reads `amount` as `quote_to_user`. */
1486
+ /** `quoteAmountOut` is the quote the seller receives, after the quote mint's transfer fee. */
1376
1487
  declare function sellExactOut$1(params: DexTradeParams & {
1377
1488
  quoteAmountOut: bigint;
1378
1489
  }): Promise<{
@@ -1441,7 +1552,7 @@ type BondingCurve = {
1441
1552
  quoteMint: Address;
1442
1553
  quoteDecimals: number;
1443
1554
  coinCreator: Address;
1444
- creatorFeeConfig: Address;
1555
+ padding0: Array<bigint>;
1445
1556
  partner: Address;
1446
1557
  baseVault: Address;
1447
1558
  quoteVault: Address;
@@ -1453,6 +1564,9 @@ type BondingCurve = {
1453
1564
  protocolOwed: bigint;
1454
1565
  creatorOwed: bigint;
1455
1566
  platformConfig: Address;
1567
+ creatorFeeMode: number;
1568
+ creatorFeeBps: number;
1569
+ dexCreatorFeeBps: number;
1456
1570
  reserved: ReadonlyUint8Array;
1457
1571
  };
1458
1572
  type BondingCurveArgs = {
@@ -1468,7 +1582,7 @@ type BondingCurveArgs = {
1468
1582
  quoteMint: Address;
1469
1583
  quoteDecimals: number;
1470
1584
  coinCreator: Address;
1471
- creatorFeeConfig: Address;
1585
+ padding0: Array<number | bigint>;
1472
1586
  partner: Address;
1473
1587
  baseVault: Address;
1474
1588
  quoteVault: Address;
@@ -1480,6 +1594,9 @@ type BondingCurveArgs = {
1480
1594
  protocolOwed: number | bigint;
1481
1595
  creatorOwed: number | bigint;
1482
1596
  platformConfig: Address;
1597
+ creatorFeeMode: number;
1598
+ creatorFeeBps: number;
1599
+ dexCreatorFeeBps: number;
1483
1600
  reserved: ReadonlyUint8Array;
1484
1601
  };
1485
1602
  /** Gets the encoder for {@link BondingCurveArgs} account data. */
@@ -1488,11 +1605,39 @@ declare function getBondingCurveEncoder(): FixedSizeEncoder<BondingCurveArgs>;
1488
1605
  declare function getBondingCurveDecoder(): FixedSizeDecoder<BondingCurve>;
1489
1606
  /** Gets the codec for {@link BondingCurve} account data. */
1490
1607
  declare function getBondingCurveCodec(): FixedSizeCodec<BondingCurveArgs, BondingCurve>;
1608
+ /**
1609
+ * Decodes a `BondingCurve` account, throwing when another program owns it or its discriminator
1610
+ * does not match.
1611
+ *
1612
+ * Unlike {@link fetchMaybeBondingCurve}, this throws for an address that only holds lamports rather
1613
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1614
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1615
+ */
1491
1616
  declare function decodeBondingCurve<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<BondingCurve, TAddress>;
1617
+ /**
1618
+ * Decodes a `BondingCurve` account, throwing when another program owns it or its discriminator
1619
+ * does not match.
1620
+ *
1621
+ * Unlike {@link fetchMaybeBondingCurve}, this throws for an address that only holds lamports rather
1622
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1623
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1624
+ */
1492
1625
  declare function decodeBondingCurve<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<BondingCurve, TAddress>;
1626
+ /** Fetches a `BondingCurve` account, throwing when it does not exist or only holds lamports. */
1493
1627
  declare function fetchBondingCurve<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<BondingCurve, TAddress>>;
1628
+ /**
1629
+ * Fetches a `BondingCurve` account, or the non-existing variant when the address holds no
1630
+ * account or only lamports (see {@link accountIsCreated}).
1631
+ * {@link decodeBondingCurve} throws for a lamports-only account instead.
1632
+ */
1494
1633
  declare function fetchMaybeBondingCurve<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<BondingCurve, TAddress>>;
1634
+ /** Fetches `BondingCurve` accounts, throwing when any does not exist or only holds lamports. */
1495
1635
  declare function fetchAllBondingCurve(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<BondingCurve>[]>;
1636
+ /**
1637
+ * Fetches `BondingCurve` accounts, with the non-existing variant for each address that holds
1638
+ * no account or only lamports (see {@link accountIsCreated}).
1639
+ * {@link decodeBondingCurve} throws for a lamports-only account instead.
1640
+ */
1496
1641
  declare function fetchAllMaybeBondingCurve(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<BondingCurve>[]>;
1497
1642
  declare function getBondingCurveSize(): number;
1498
1643
  //#endregion
@@ -1532,11 +1677,39 @@ declare function getGlobalConfigEncoder$1(): FixedSizeEncoder<GlobalConfigArgs$1
1532
1677
  declare function getGlobalConfigDecoder$1(): FixedSizeDecoder<GlobalConfig$1>;
1533
1678
  /** Gets the codec for {@link GlobalConfig} account data. */
1534
1679
  declare function getGlobalConfigCodec$1(): FixedSizeCodec<GlobalConfigArgs$1, GlobalConfig$1>;
1680
+ /**
1681
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
1682
+ * does not match.
1683
+ *
1684
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
1685
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1686
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1687
+ */
1535
1688
  declare function decodeGlobalConfig$1<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<GlobalConfig$1, TAddress>;
1689
+ /**
1690
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
1691
+ * does not match.
1692
+ *
1693
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
1694
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1695
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1696
+ */
1536
1697
  declare function decodeGlobalConfig$1<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<GlobalConfig$1, TAddress>;
1698
+ /** Fetches a `GlobalConfig` account, throwing when it does not exist or only holds lamports. */
1537
1699
  declare function fetchGlobalConfig$1<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<GlobalConfig$1, TAddress>>;
1700
+ /**
1701
+ * Fetches a `GlobalConfig` account, or the non-existing variant when the address holds no
1702
+ * account or only lamports (see {@link accountIsCreated}).
1703
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
1704
+ */
1538
1705
  declare function fetchMaybeGlobalConfig$1<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<GlobalConfig$1, TAddress>>;
1706
+ /** Fetches `GlobalConfig` accounts, throwing when any does not exist or only holds lamports. */
1539
1707
  declare function fetchAllGlobalConfig$1(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<GlobalConfig$1>[]>;
1708
+ /**
1709
+ * Fetches `GlobalConfig` accounts, with the non-existing variant for each address that holds
1710
+ * no account or only lamports (see {@link accountIsCreated}).
1711
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
1712
+ */
1540
1713
  declare function fetchAllMaybeGlobalConfig$1(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<GlobalConfig$1>[]>;
1541
1714
  declare function getGlobalConfigSize(): number;
1542
1715
  //#endregion
@@ -1566,11 +1739,39 @@ declare function getRewardAccrualEncoder(): FixedSizeEncoder<RewardAccrualArgs>;
1566
1739
  declare function getRewardAccrualDecoder(): FixedSizeDecoder<RewardAccrual>;
1567
1740
  /** Gets the codec for {@link RewardAccrual} account data. */
1568
1741
  declare function getRewardAccrualCodec(): FixedSizeCodec<RewardAccrualArgs, RewardAccrual>;
1742
+ /**
1743
+ * Decodes a `RewardAccrual` account, throwing when another program owns it or its discriminator
1744
+ * does not match.
1745
+ *
1746
+ * Unlike {@link fetchMaybeRewardAccrual}, this throws for an address that only holds lamports rather
1747
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1748
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1749
+ */
1569
1750
  declare function decodeRewardAccrual<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RewardAccrual, TAddress>;
1751
+ /**
1752
+ * Decodes a `RewardAccrual` account, throwing when another program owns it or its discriminator
1753
+ * does not match.
1754
+ *
1755
+ * Unlike {@link fetchMaybeRewardAccrual}, this throws for an address that only holds lamports rather
1756
+ * than returning the non-existing variant: an account passed as existing must never come back as that
1757
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
1758
+ */
1570
1759
  declare function decodeRewardAccrual<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RewardAccrual, TAddress>;
1760
+ /** Fetches a `RewardAccrual` account, throwing when it does not exist or only holds lamports. */
1571
1761
  declare function fetchRewardAccrual<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RewardAccrual, TAddress>>;
1762
+ /**
1763
+ * Fetches a `RewardAccrual` account, or the non-existing variant when the address holds no
1764
+ * account or only lamports (see {@link accountIsCreated}).
1765
+ * {@link decodeRewardAccrual} throws for a lamports-only account instead.
1766
+ */
1572
1767
  declare function fetchMaybeRewardAccrual<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RewardAccrual, TAddress>>;
1768
+ /** Fetches `RewardAccrual` accounts, throwing when any does not exist or only holds lamports. */
1573
1769
  declare function fetchAllRewardAccrual(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RewardAccrual>[]>;
1770
+ /**
1771
+ * Fetches `RewardAccrual` accounts, with the non-existing variant for each address that holds
1772
+ * no account or only lamports (see {@link accountIsCreated}).
1773
+ * {@link decodeRewardAccrual} throws for a lamports-only account instead.
1774
+ */
1574
1775
  declare function fetchAllMaybeRewardAccrual(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RewardAccrual>[]>;
1575
1776
  declare function getRewardAccrualSize(): number;
1576
1777
  //#endregion
@@ -1646,17 +1847,21 @@ declare const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 7009;
1646
1847
  declare const SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 7010;
1647
1848
  /** NothingToClaim: Nothing to claim */
1648
1849
  declare const SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM = 7011;
1649
- /** InvalidCreatorId: Creator identity is not a decodable wallet address */
1650
- declare const SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID = 7012;
1850
+ /** Unused7012: Unused */
1851
+ declare const SEND_LAUNCHPAD_ERROR__UNUSED7012 = 7012;
1651
1852
  /** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */
1652
1853
  declare const SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET = 7013;
1653
1854
  /** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */
1654
1855
  declare const SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 7014;
1856
+ /** CreatorFeeTooHigh: Creator fee exceeds the partner's maximum */
1857
+ declare const SEND_LAUNCHPAD_ERROR__CREATOR_FEE_TOO_HIGH = 7015;
1858
+ /** CreatorFeeModeNotAllowed: Creator fee mode is not allowed by the partner config */
1859
+ declare const SEND_LAUNCHPAD_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED = 7016;
1655
1860
  /** InsufficientLiquidity: Insufficient liquidity */
1656
1861
  declare const SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY = 7100;
1657
1862
  /** InvalidAmount: Invalid amount */
1658
1863
  declare const SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT = 7101;
1659
- type SendLaunchpadError = typeof SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED | typeof SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND | typeof SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY | typeof SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE | typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE | typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT | typeof SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY | typeof SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT | typeof SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR | typeof SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID | typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED | typeof SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT | typeof SEND_LAUNCHPAD_ERROR__INVALID_SLUG | typeof SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION | typeof SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM | typeof SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE | typeof SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING | typeof SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED | typeof SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED | typeof SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG | typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED | typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED | typeof SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED | typeof SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_LAUNCHPAD_ERROR__UNAUTHORIZED | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
1864
+ type SendLaunchpadError = typeof SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED | typeof SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND | typeof SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY | typeof SEND_LAUNCHPAD_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED | typeof SEND_LAUNCHPAD_ERROR__CREATOR_FEE_TOO_HIGH | typeof SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE | typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE | typeof SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT | typeof SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY | typeof SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT | typeof SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR | typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED | typeof SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT | typeof SEND_LAUNCHPAD_ERROR__INVALID_SLUG | typeof SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION | typeof SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM | typeof SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE | typeof SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING | typeof SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED | typeof SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED | typeof SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG | typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED | typeof SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED | typeof SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED | typeof SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_LAUNCHPAD_ERROR__UNAUTHORIZED | typeof SEND_LAUNCHPAD_ERROR__UNUSED7012 | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
1660
1865
  declare const sendLaunchpadErrorMessages: Record<SendLaunchpadError, string>;
1661
1866
  declare function getSendLaunchpadErrorMessage(code: SendLaunchpadError): string;
1662
1867
  declare function isSendLaunchpadError<TProgramErrorCode extends SendLaunchpadError>(error: unknown, transactionMessage: {
@@ -1669,7 +1874,7 @@ declare function isSendLaunchpadError<TProgramErrorCode extends SendLaunchpadErr
1669
1874
  }>;
1670
1875
  }>;
1671
1876
  declare namespace index_d_exports$16 {
1672
- export { SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED, SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW, SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND, SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY, SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE, SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE, SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY, SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT, SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY, SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT, SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR, SEND_LAUNCHPAD_ERROR__INVALID_CREATOR_ID, SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT, SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED, SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT, SEND_LAUNCHPAD_ERROR__INVALID_SLUG, SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION, SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM, SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE, SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING, SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED, SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED, SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG, SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED, SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED, SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED, SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_LAUNCHPAD_ERROR__UNAUTHORIZED, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendLaunchpadError, getSendLaunchpadErrorMessage, isSendLaunchpadError, sendLaunchpadErrorMessages };
1877
+ export { SEND_LAUNCHPAD_ERROR__ALREADY_MIGRATED, SEND_LAUNCHPAD_ERROR__ARITHMETIC_OVERFLOW, SEND_LAUNCHPAD_ERROR__BASE_MINT_NOT_FOUND, SEND_LAUNCHPAD_ERROR__BLOCKED_BY_HELD_SUPPLY, SEND_LAUNCHPAD_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED, SEND_LAUNCHPAD_ERROR__CREATOR_FEE_TOO_HIGH, SEND_LAUNCHPAD_ERROR__CURVE_IS_LIVE, SEND_LAUNCHPAD_ERROR__INSUFFICIENT_BALANCE, SEND_LAUNCHPAD_ERROR__INSUFFICIENT_LIQUIDITY, SEND_LAUNCHPAD_ERROR__INVALID_AMOUNT, SEND_LAUNCHPAD_ERROR__INVALID_AUTHORITY, SEND_LAUNCHPAD_ERROR__INVALID_BASE_MINT, SEND_LAUNCHPAD_ERROR__INVALID_COIN_CREATOR, SEND_LAUNCHPAD_ERROR__INVALID_PYTH_ACCOUNT, SEND_LAUNCHPAD_ERROR__INVALID_PYTH_FEED, SEND_LAUNCHPAD_ERROR__INVALID_QUOTE_MINT, SEND_LAUNCHPAD_ERROR__INVALID_SLUG, SEND_LAUNCHPAD_ERROR__INVALID_STATUS_TRANSITION, SEND_LAUNCHPAD_ERROR__NOTHING_TO_CLAIM, SEND_LAUNCHPAD_ERROR__NOT_TRADEABLE, SEND_LAUNCHPAD_ERROR__POOL_FEES_OUTSTANDING, SEND_LAUNCHPAD_ERROR__PROGRAM_PAUSED, SEND_LAUNCHPAD_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_LAUNCHPAD_ERROR__SLIPPAGE_EXCEEDED, SEND_LAUNCHPAD_ERROR__TEXT_TOO_LONG, SEND_LAUNCHPAD_ERROR__THRESHOLD_NOT_REACHED, SEND_LAUNCHPAD_ERROR__THRESHOLD_REACHED, SEND_LAUNCHPAD_ERROR__TOKEN_CREATION_DISABLED, SEND_LAUNCHPAD_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_LAUNCHPAD_ERROR__UNAUTHORIZED, SEND_LAUNCHPAD_ERROR__UNUSED7012, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_LAUNCHPAD_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendLaunchpadError, getSendLaunchpadErrorMessage, isSendLaunchpadError, sendLaunchpadErrorMessages };
1673
1878
  }
1674
1879
  //#endregion
1675
1880
  //#region src/launchpad/generated/pdas/bondingCurve.d.ts
@@ -1679,6 +1884,13 @@ type BondingCurveSeeds = {
1679
1884
  };
1680
1885
  declare function findBondingCurvePda(seeds: BondingCurveSeeds): Promise<ProgramDerivedAddress>;
1681
1886
  //#endregion
1887
+ //#region src/launchpad/generated/pdas/creatorFeeConfig.d.ts
1888
+ type CreatorFeeConfigSeeds = {
1889
+ baseMint: Address;
1890
+ quoteMint: Address;
1891
+ };
1892
+ declare function findCreatorFeeConfigPda(seeds: CreatorFeeConfigSeeds): Promise<ProgramDerivedAddress>;
1893
+ //#endregion
1682
1894
  //#region src/launchpad/generated/pdas/eventAuthority.d.ts
1683
1895
  declare const EVENT_AUTHORITY_PDA_ADDRESS$1: Address<"FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T">;
1684
1896
  declare function findEventAuthorityPda$1(): ProgramDerivedAddress;
@@ -1701,7 +1913,7 @@ declare function findRewardAccrualPda(seeds: RewardAccrualSeeds): Promise<Progra
1701
1913
  declare const WSOL_REWARD_ACCRUAL_PDA_ADDRESS: Address<"91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH">;
1702
1914
  declare function findWsolRewardAccrualPda(): ProgramDerivedAddress;
1703
1915
  declare namespace index_d_exports$15 {
1704
- export { BondingCurveSeeds, EVENT_AUTHORITY_PDA_ADDRESS$1 as EVENT_AUTHORITY_PDA_ADDRESS, GLOBAL_CONFIG_PDA_ADDRESS$1 as GLOBAL_CONFIG_PDA_ADDRESS, MIGRATION_AUTHORITY_PDA_ADDRESS, RewardAccrualSeeds, WSOL_REWARD_ACCRUAL_PDA_ADDRESS, findBondingCurvePda, findEventAuthorityPda$1 as findEventAuthorityPda, findGlobalConfigPda$1 as findGlobalConfigPda, findMigrationAuthorityPda, findRewardAccrualPda, findWsolRewardAccrualPda };
1916
+ export { BondingCurveSeeds, CreatorFeeConfigSeeds, EVENT_AUTHORITY_PDA_ADDRESS$1 as EVENT_AUTHORITY_PDA_ADDRESS, GLOBAL_CONFIG_PDA_ADDRESS$1 as GLOBAL_CONFIG_PDA_ADDRESS, MIGRATION_AUTHORITY_PDA_ADDRESS, RewardAccrualSeeds, WSOL_REWARD_ACCRUAL_PDA_ADDRESS, findBondingCurvePda, findCreatorFeeConfigPda, findEventAuthorityPda$1 as findEventAuthorityPda, findGlobalConfigPda$1 as findGlobalConfigPda, findMigrationAuthorityPda, findRewardAccrualPda, findWsolRewardAccrualPda };
1705
1917
  }
1706
1918
  declare namespace create_d_exports {
1707
1919
  export { CreateAndBuyParams, CreateTokenParams, buildCreateAndBuyInstructions, buildCreateTokenInstruction };
@@ -1709,19 +1921,20 @@ declare namespace create_d_exports {
1709
1921
  interface CreateTokenParams {
1710
1922
  user: TransactionSigner;
1711
1923
  payer?: TransactionSigner;
1924
+ /** The wallet that claims the creator fees. */
1712
1925
  coinCreator: Address;
1713
1926
  baseMint: TransactionSigner;
1714
1927
  quoteMint: Address;
1715
1928
  name: string;
1716
1929
  symbol: string;
1717
1930
  uri: string;
1718
- /** An enabled nexus auth platform (e.g. "wallet"), max 32 bytes; hashed with
1719
- * `creatorId` into the creator fee identity. Unrelated to `platformConfig`. */
1720
- creatorPlatform: string;
1721
- creatorId: string;
1722
1931
  partner: PartnerInput;
1723
1932
  platformConfig: Address;
1724
1933
  quoteTokenProgram: Address;
1934
+ creatorFeeMode: number;
1935
+ creatorFeeBps: number;
1936
+ /** The creator fee of the pool after migration, in bps. */
1937
+ dexCreatorFeeBps: number;
1725
1938
  }
1726
1939
  interface CreateAndBuyParams extends CreateTokenParams {
1727
1940
  buyQuoteAmount: bigint;
@@ -1729,11 +1942,11 @@ interface CreateAndBuyParams extends CreateTokenParams {
1729
1942
  slippageBps: number;
1730
1943
  initialVirtualQuoteReserves: bigint;
1731
1944
  initialVirtualBaseReserves: bigint;
1732
- /** `globalConfig.initialRealBaseReserves`: caps the appended buy. */
1945
+ /** `globalConfig.initialRealBaseReserves`. Caps the buy. */
1733
1946
  initialRealBaseReserves: bigint;
1734
- /** Quote mint's Token-2022 schedule for the launch epoch; without it `minAmountOut`
1735
- * ignores the mint's cut, and a cut above `slippageBps` can revert the buy. No
1736
- * `baseFee`: this transaction creates the base mint without the extension. */
1947
+ /** The quote mint's transfer fee for the epoch the launch lands in. Without it, `minAmountOut`
1948
+ * ignores the mint's cut, and a cut above `slippageBps` can make the buy fail. The new base
1949
+ * mint has no transfer fee. */
1737
1950
  quoteFee?: MintFee;
1738
1951
  }
1739
1952
  declare function buildCreateTokenInstruction(params: CreateTokenParams): Promise<Instruction>;
@@ -1760,7 +1973,7 @@ type CompleteEvent = {
1760
1973
  baseMint: Address;
1761
1974
  quoteMint: Address;
1762
1975
  coinCreator: Address;
1763
- creatorFeeConfig: Address;
1976
+ padding0: Array<bigint>;
1764
1977
  platformConfig: Address;
1765
1978
  curvePartner: Address;
1766
1979
  isPartner: boolean;
@@ -1806,7 +2019,7 @@ type CreatorClaimEvent = {
1806
2019
  quoteMint: Address;
1807
2020
  platformConfig: Address;
1808
2021
  coinCreator: Address;
1809
- creatorFeeConfig: Address;
2022
+ padding0: Array<bigint>;
1810
2023
  claimer: Address;
1811
2024
  destinationOwner: Address;
1812
2025
  amount: bigint;
@@ -1852,7 +2065,7 @@ type MigrateEvent = {
1852
2065
  quoteMint: Address;
1853
2066
  pool: Address;
1854
2067
  coinCreator: Address;
1855
- creatorFeeConfig: Address;
2068
+ padding0: Array<bigint>;
1856
2069
  platformConfig: Address;
1857
2070
  baseAmount: bigint;
1858
2071
  quoteAmount: bigint;
@@ -1987,9 +2200,7 @@ type TokenCreateEvent = {
1987
2200
  quoteMint: Address;
1988
2201
  quoteDecimals: number;
1989
2202
  coinCreator: Address;
1990
- creatorPlatform: string;
1991
- creatorId: string;
1992
- creatorFeeConfig: Address;
2203
+ padding0: Array<bigint>;
1993
2204
  platformConfig: Address;
1994
2205
  name: string;
1995
2206
  symbol: string;
@@ -2002,6 +2213,9 @@ type TokenCreateEvent = {
2002
2213
  realBaseReserves: bigint;
2003
2214
  realQuoteReserves: bigint;
2004
2215
  timestamp: bigint;
2216
+ creatorFeeMode: number;
2217
+ creatorFeeBps: number;
2218
+ dexCreatorFeeBps: number;
2005
2219
  };
2006
2220
  declare function getTokenCreateEventDecoder(): Decoder<TokenCreateEvent>;
2007
2221
  /**
@@ -2042,7 +2256,7 @@ type TradeEvent = {
2042
2256
  quoteMint: Address;
2043
2257
  user: Address;
2044
2258
  coinCreator: Address;
2045
- creatorFeeConfig: Address;
2259
+ padding0: Array<bigint>;
2046
2260
  platformConfig: Address;
2047
2261
  baseAmount: bigint;
2048
2262
  quoteAmountGross: bigint;
@@ -2059,6 +2273,8 @@ type TradeEvent = {
2059
2273
  realBaseReserves: bigint;
2060
2274
  realQuoteReserves: bigint;
2061
2275
  timestamp: bigint;
2276
+ creatorFeeMode: number;
2277
+ creatorFeeBps: number;
2062
2278
  };
2063
2279
  declare function getTradeEventDecoder(): FixedSizeDecoder<TradeEvent>;
2064
2280
  /**
@@ -2323,7 +2539,7 @@ declare function parseBuyExactOutInstruction<TProgram extends string, TAccountMe
2323
2539
  //#region src/launchpad/generated/instructions/claimCreatorFees.d.ts
2324
2540
  declare const CLAIM_CREATOR_FEES_DISCRIMINATOR: ReadonlyUint8Array;
2325
2541
  declare function getClaimCreatorFeesDiscriminatorBytes(): ReadonlyUint8Array;
2326
- type ClaimCreatorFeesInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountClaimer extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountBondingCurve extends string | AccountMeta<string> = string, TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountNexusGlobalConfig extends string | AccountMeta<string> = "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDestinationOwner extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", TAccountProgram extends string | AccountMeta<string> = "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountClaimer extends string ? ReadonlySignerAccount<TAccountClaimer> & AccountSignerMeta<TAccountClaimer> : TAccountClaimer, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountBondingCurve extends string ? WritableAccount<TAccountBondingCurve> : TAccountBondingCurve, TAccountCreatorFeeConfig extends string ? ReadonlyAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountNexusGlobalConfig extends string ? ReadonlyAccount<TAccountNexusGlobalConfig> : TAccountNexusGlobalConfig, TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDestinationOwner extends string ? ReadonlyAccount<TAccountDestinationOwner> : TAccountDestinationOwner, TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
2542
+ type ClaimCreatorFeesInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountClaimer extends string | AccountMeta<string> = string, TAccountPayer extends string | AccountMeta<string> = string, TAccountBondingCurve extends string | AccountMeta<string> = string, TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountNexusGlobalConfig extends string | AccountMeta<string> = "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDestinationOwner extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", TAccountProgram extends string | AccountMeta<string> = "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountClaimer extends string ? ReadonlySignerAccount<TAccountClaimer> & AccountSignerMeta<TAccountClaimer> : TAccountClaimer, TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountBondingCurve extends string ? WritableAccount<TAccountBondingCurve> : TAccountBondingCurve, TAccountCreatorFeeConfig extends string ? WritableAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountNexusGlobalConfig extends string ? ReadonlyAccount<TAccountNexusGlobalConfig> : TAccountNexusGlobalConfig, TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDestinationOwner extends string ? ReadonlyAccount<TAccountDestinationOwner> : TAccountDestinationOwner, TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
2327
2543
  type ClaimCreatorFeesInstructionData = {
2328
2544
  discriminator: ReadonlyUint8Array;
2329
2545
  };
@@ -2335,7 +2551,7 @@ type ClaimCreatorFeesAsyncInput<TAccountClaimer extends string = string, TAccoun
2335
2551
  claimer: TransactionSigner<TAccountClaimer>;
2336
2552
  payer: TransactionSigner<TAccountPayer>;
2337
2553
  bondingCurve?: Address<TAccountBondingCurve>;
2338
- creatorFeeConfig: Address<TAccountCreatorFeeConfig>;
2554
+ creatorFeeConfig?: Address<TAccountCreatorFeeConfig>;
2339
2555
  baseMint: Address<TAccountBaseMint>;
2340
2556
  quoteMint: Address<TAccountQuoteMint>;
2341
2557
  quoteVault?: Address<TAccountQuoteVault>;
@@ -2445,21 +2661,21 @@ type CreateTokenInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROG
2445
2661
  type CreateTokenInstructionData = {
2446
2662
  discriminator: ReadonlyUint8Array;
2447
2663
  platformConfig: Address;
2448
- creatorPlatform: string;
2449
- creatorId: string;
2450
- creatorHash: Address;
2451
2664
  name: string;
2452
2665
  symbol: string;
2453
2666
  uri: string;
2667
+ creatorFeeMode: number;
2668
+ creatorFeeBps: number;
2669
+ dexCreatorFeeBps: number;
2454
2670
  };
2455
2671
  type CreateTokenInstructionDataArgs = {
2456
2672
  platformConfig: Address;
2457
- creatorPlatform: string;
2458
- creatorId: string;
2459
- creatorHash: Address;
2460
2673
  name: string;
2461
2674
  symbol: string;
2462
2675
  uri: string;
2676
+ creatorFeeMode: number;
2677
+ creatorFeeBps: number;
2678
+ dexCreatorFeeBps: number;
2463
2679
  };
2464
2680
  declare function getCreateTokenInstructionDataEncoder(): Encoder<CreateTokenInstructionDataArgs>;
2465
2681
  declare function getCreateTokenInstructionDataDecoder(): Decoder<CreateTokenInstructionData>;
@@ -2483,12 +2699,12 @@ type CreateTokenAsyncInput<TAccountUser extends string = string, TAccountPayer e
2483
2699
  stakingVault?: Address<TAccountStakingVault>;
2484
2700
  quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
2485
2701
  platformConfig: CreateTokenInstructionDataArgs["platformConfig"];
2486
- creatorPlatform: CreateTokenInstructionDataArgs["creatorPlatform"];
2487
- creatorId: CreateTokenInstructionDataArgs["creatorId"];
2488
- creatorHash: CreateTokenInstructionDataArgs["creatorHash"];
2489
2702
  name: CreateTokenInstructionDataArgs["name"];
2490
2703
  symbol: CreateTokenInstructionDataArgs["symbol"];
2491
2704
  uri: CreateTokenInstructionDataArgs["uri"];
2705
+ creatorFeeMode: CreateTokenInstructionDataArgs["creatorFeeMode"];
2706
+ creatorFeeBps: CreateTokenInstructionDataArgs["creatorFeeBps"];
2707
+ dexCreatorFeeBps: CreateTokenInstructionDataArgs["dexCreatorFeeBps"];
2492
2708
  };
2493
2709
  declare function getCreateTokenInstructionAsync<TAccountUser extends string, TAccountPayer extends string, TAccountCoinCreator extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBondingCurve extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountCreatorFeeConfig extends string, TAccountPartner extends string, TAccountPartnerConfig extends string, TAccountNexusStakingConfig extends string, TAccountStakingRewardState extends string, TAccountRewardAccrual extends string, TAccountStakingVault extends string, TAccountQuoteTokenProgram extends string>(input: CreateTokenAsyncInput<TAccountUser, TAccountPayer, TAccountCoinCreator, TAccountBaseMint, TAccountQuoteMint, TAccountBondingCurve, TAccountBaseVault, TAccountQuoteVault, TAccountCreatorFeeConfig, TAccountPartner, TAccountPartnerConfig, TAccountNexusStakingConfig, TAccountStakingRewardState, TAccountRewardAccrual, TAccountStakingVault, TAccountQuoteTokenProgram>): Promise<CreateTokenInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountUser, TAccountPayer, TAccountCoinCreator, "H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq", TAccountBaseMint, TAccountQuoteMint, TAccountBondingCurve, TAccountBaseVault, TAccountQuoteVault, TAccountCreatorFeeConfig, "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", (typeof input)["partner"] extends TransactionSigner<TAccountPartner> ? ReadonlySignerAccount<TAccountPartner> & AccountSignerMeta<TAccountPartner> : TAccountPartner, TAccountPartnerConfig, TAccountNexusStakingConfig, TAccountStakingRewardState, TAccountRewardAccrual, TAccountStakingVault, "AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz", "91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH", "7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE", "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP">>;
2494
2710
  type CreateTokenInput<TAccountUser extends string = string, TAccountPayer extends string = string, TAccountCoinCreator extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountBondingCurve extends string = string, TAccountBaseVault extends string = string, TAccountQuoteVault extends string = string, TAccountCreatorFeeConfig extends string = string, TAccountPartner extends string = string, TAccountPartnerConfig extends string = string, TAccountNexusStakingConfig extends string = string, TAccountStakingRewardState extends string = string, TAccountRewardAccrual extends string = string, TAccountStakingVault extends string = string, TAccountQuoteTokenProgram extends string = string> = {
@@ -2510,12 +2726,12 @@ type CreateTokenInput<TAccountUser extends string = string, TAccountPayer extend
2510
2726
  stakingVault: Address<TAccountStakingVault>;
2511
2727
  quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
2512
2728
  platformConfig: CreateTokenInstructionDataArgs["platformConfig"];
2513
- creatorPlatform: CreateTokenInstructionDataArgs["creatorPlatform"];
2514
- creatorId: CreateTokenInstructionDataArgs["creatorId"];
2515
- creatorHash: CreateTokenInstructionDataArgs["creatorHash"];
2516
2729
  name: CreateTokenInstructionDataArgs["name"];
2517
2730
  symbol: CreateTokenInstructionDataArgs["symbol"];
2518
2731
  uri: CreateTokenInstructionDataArgs["uri"];
2732
+ creatorFeeMode: CreateTokenInstructionDataArgs["creatorFeeMode"];
2733
+ creatorFeeBps: CreateTokenInstructionDataArgs["creatorFeeBps"];
2734
+ dexCreatorFeeBps: CreateTokenInstructionDataArgs["dexCreatorFeeBps"];
2519
2735
  };
2520
2736
  declare function getCreateTokenInstruction<TAccountUser extends string, TAccountPayer extends string, TAccountCoinCreator extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBondingCurve extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountCreatorFeeConfig extends string, TAccountPartner extends string, TAccountPartnerConfig extends string, TAccountNexusStakingConfig extends string, TAccountStakingRewardState extends string, TAccountRewardAccrual extends string, TAccountStakingVault extends string, TAccountQuoteTokenProgram extends string>(input: CreateTokenInput<TAccountUser, TAccountPayer, TAccountCoinCreator, TAccountBaseMint, TAccountQuoteMint, TAccountBondingCurve, TAccountBaseVault, TAccountQuoteVault, TAccountCreatorFeeConfig, TAccountPartner, TAccountPartnerConfig, TAccountNexusStakingConfig, TAccountStakingRewardState, TAccountRewardAccrual, TAccountStakingVault, TAccountQuoteTokenProgram>): CreateTokenInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountUser, TAccountPayer, TAccountCoinCreator, "H3csa1cgR7zPJdxCzNbS5chYymHMKS3XivDA5nRx4Bdq", TAccountBaseMint, TAccountQuoteMint, TAccountBondingCurve, TAccountBaseVault, TAccountQuoteVault, TAccountCreatorFeeConfig, "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", "3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr", (typeof input)["partner"] extends TransactionSigner<TAccountPartner> ? ReadonlySignerAccount<TAccountPartner> & AccountSignerMeta<TAccountPartner> : TAccountPartner, TAccountPartnerConfig, TAccountNexusStakingConfig, TAccountStakingRewardState, TAccountRewardAccrual, TAccountStakingVault, "AyisZJxXz9ywXhMwR3sb3oePxBB6UBvixXycAQCdSgrz", "91AVurtPdUC2yG3joLoujzC216KAfH5HEKnZEELFMmVH", "7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE", "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP">;
2521
2737
  type ParsedCreateTokenInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
@@ -2558,7 +2774,7 @@ declare function parseCreateTokenInstruction<TProgram extends string, TAccountMe
2558
2774
  //#region src/launchpad/generated/instructions/migrate.d.ts
2559
2775
  declare const MIGRATE_DISCRIMINATOR: ReadonlyUint8Array;
2560
2776
  declare function getMigrateDiscriminatorBytes(): ReadonlyUint8Array;
2561
- type MigrateInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller extends string | AccountMeta<string> = string, TAccountBondingCurve extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountBaseVault extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDexProgram extends string | AccountMeta<string> = "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", TAccountMigrationAuthority extends string | AccountMeta<string> = "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountPoolBaseVault extends string | AccountMeta<string> = string, TAccountPoolQuoteVault extends string | AccountMeta<string> = string, TAccountPoolLpAccount extends string | AccountMeta<string> = string, TAccountDexEventAuthority extends string | AccountMeta<string> = "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", TAccountNexusProgram extends string | AccountMeta<string> = "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountBaseTokenProgram extends string | AccountMeta<string> = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", TAccountProgram extends string | AccountMeta<string> = "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountCaller extends string ? WritableSignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller, TAccountBondingCurve extends string ? WritableAccount<TAccountBondingCurve> : TAccountBondingCurve, TAccountBaseMint extends string ? WritableAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountBaseVault extends string ? WritableAccount<TAccountBaseVault> : TAccountBaseVault, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDexProgram extends string ? ReadonlyAccount<TAccountDexProgram> : TAccountDexProgram, TAccountMigrationAuthority extends string ? ReadonlyAccount<TAccountMigrationAuthority> : TAccountMigrationAuthority, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint, TAccountPoolBaseVault extends string ? WritableAccount<TAccountPoolBaseVault> : TAccountPoolBaseVault, TAccountPoolQuoteVault extends string ? WritableAccount<TAccountPoolQuoteVault> : TAccountPoolQuoteVault, TAccountPoolLpAccount extends string ? WritableAccount<TAccountPoolLpAccount> : TAccountPoolLpAccount, TAccountDexEventAuthority extends string ? ReadonlyAccount<TAccountDexEventAuthority> : TAccountDexEventAuthority, TAccountNexusProgram extends string ? ReadonlyAccount<TAccountNexusProgram> : TAccountNexusProgram, TAccountCreatorFeeConfig extends string ? ReadonlyAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountBaseTokenProgram extends string ? ReadonlyAccount<TAccountBaseTokenProgram> : TAccountBaseTokenProgram, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
2777
+ type MigrateInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller extends string | AccountMeta<string> = string, TAccountBondingCurve extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountBaseVault extends string | AccountMeta<string> = string, TAccountQuoteVault extends string | AccountMeta<string> = string, TAccountDexProgram extends string | AccountMeta<string> = "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", TAccountMigrationAuthority extends string | AccountMeta<string> = "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountPoolBaseVault extends string | AccountMeta<string> = string, TAccountPoolQuoteVault extends string | AccountMeta<string> = string, TAccountPoolLpAccount extends string | AccountMeta<string> = string, TAccountDexEventAuthority extends string | AccountMeta<string> = "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", TAccountNexusProgram extends string | AccountMeta<string> = "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig extends string | AccountMeta<string> = string, TAccountBaseTokenProgram extends string | AccountMeta<string> = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountEventAuthority extends string | AccountMeta<string> = "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", TAccountProgram extends string | AccountMeta<string> = "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TAccountDexCreatorFeeConfig extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountCaller extends string ? WritableSignerAccount<TAccountCaller> & AccountSignerMeta<TAccountCaller> : TAccountCaller, TAccountBondingCurve extends string ? WritableAccount<TAccountBondingCurve> : TAccountBondingCurve, TAccountBaseMint extends string ? WritableAccount<TAccountBaseMint> : TAccountBaseMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountBaseVault extends string ? WritableAccount<TAccountBaseVault> : TAccountBaseVault, TAccountQuoteVault extends string ? WritableAccount<TAccountQuoteVault> : TAccountQuoteVault, TAccountDexProgram extends string ? ReadonlyAccount<TAccountDexProgram> : TAccountDexProgram, TAccountMigrationAuthority extends string ? ReadonlyAccount<TAccountMigrationAuthority> : TAccountMigrationAuthority, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint, TAccountPoolBaseVault extends string ? WritableAccount<TAccountPoolBaseVault> : TAccountPoolBaseVault, TAccountPoolQuoteVault extends string ? WritableAccount<TAccountPoolQuoteVault> : TAccountPoolQuoteVault, TAccountPoolLpAccount extends string ? WritableAccount<TAccountPoolLpAccount> : TAccountPoolLpAccount, TAccountDexEventAuthority extends string ? ReadonlyAccount<TAccountDexEventAuthority> : TAccountDexEventAuthority, TAccountNexusProgram extends string ? ReadonlyAccount<TAccountNexusProgram> : TAccountNexusProgram, TAccountCreatorFeeConfig extends string ? WritableAccount<TAccountCreatorFeeConfig> : TAccountCreatorFeeConfig, TAccountBaseTokenProgram extends string ? ReadonlyAccount<TAccountBaseTokenProgram> : TAccountBaseTokenProgram, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, TAccountDexCreatorFeeConfig extends string ? WritableAccount<TAccountDexCreatorFeeConfig> : TAccountDexCreatorFeeConfig, ...TRemainingAccounts]>;
2562
2778
  type MigrateInstructionData = {
2563
2779
  discriminator: ReadonlyUint8Array;
2564
2780
  };
@@ -2566,7 +2782,7 @@ type MigrateInstructionDataArgs = {};
2566
2782
  declare function getMigrateInstructionDataEncoder(): FixedSizeEncoder<MigrateInstructionDataArgs>;
2567
2783
  declare function getMigrateInstructionDataDecoder(): FixedSizeDecoder<MigrateInstructionData>;
2568
2784
  declare function getMigrateInstructionDataCodec(): FixedSizeCodec<MigrateInstructionDataArgs, MigrateInstructionData>;
2569
- type MigrateAsyncInput<TAccountCaller extends string = string, TAccountBondingCurve extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountBaseVault extends string = string, TAccountQuoteVault extends string = string, TAccountPool extends string = string, TAccountLpMint extends string = string, TAccountPoolBaseVault extends string = string, TAccountPoolQuoteVault extends string = string, TAccountPoolLpAccount extends string = string, TAccountCreatorFeeConfig extends string = string, TAccountQuoteTokenProgram extends string = string> = {
2785
+ type MigrateAsyncInput<TAccountCaller extends string = string, TAccountBondingCurve extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountBaseVault extends string = string, TAccountQuoteVault extends string = string, TAccountPool extends string = string, TAccountLpMint extends string = string, TAccountPoolBaseVault extends string = string, TAccountPoolQuoteVault extends string = string, TAccountPoolLpAccount extends string = string, TAccountCreatorFeeConfig extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountDexCreatorFeeConfig extends string = string> = {
2570
2786
  caller: TransactionSigner<TAccountCaller>;
2571
2787
  bondingCurve?: Address<TAccountBondingCurve>;
2572
2788
  baseMint: Address<TAccountBaseMint>;
@@ -2578,11 +2794,12 @@ type MigrateAsyncInput<TAccountCaller extends string = string, TAccountBondingCu
2578
2794
  poolBaseVault: Address<TAccountPoolBaseVault>;
2579
2795
  poolQuoteVault: Address<TAccountPoolQuoteVault>;
2580
2796
  poolLpAccount: Address<TAccountPoolLpAccount>;
2581
- creatorFeeConfig: Address<TAccountCreatorFeeConfig>;
2797
+ creatorFeeConfig?: Address<TAccountCreatorFeeConfig>;
2582
2798
  quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
2799
+ dexCreatorFeeConfig?: Address<TAccountDexCreatorFeeConfig>;
2583
2800
  };
2584
- declare function getMigrateInstructionAsync<TAccountCaller extends string, TAccountBondingCurve extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountPool extends string, TAccountLpMint extends string, TAccountPoolBaseVault extends string, TAccountPoolQuoteVault extends string, TAccountPoolLpAccount extends string, TAccountCreatorFeeConfig extends string, TAccountQuoteTokenProgram extends string>(input: MigrateAsyncInput<TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, TAccountCreatorFeeConfig, TAccountQuoteTokenProgram>): Promise<MigrateInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig, "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP">>;
2585
- type MigrateInput<TAccountCaller extends string = string, TAccountBondingCurve extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountBaseVault extends string = string, TAccountQuoteVault extends string = string, TAccountPool extends string = string, TAccountLpMint extends string = string, TAccountPoolBaseVault extends string = string, TAccountPoolQuoteVault extends string = string, TAccountPoolLpAccount extends string = string, TAccountCreatorFeeConfig extends string = string, TAccountQuoteTokenProgram extends string = string> = {
2801
+ declare function getMigrateInstructionAsync<TAccountCaller extends string, TAccountBondingCurve extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountPool extends string, TAccountLpMint extends string, TAccountPoolBaseVault extends string, TAccountPoolQuoteVault extends string, TAccountPoolLpAccount extends string, TAccountCreatorFeeConfig extends string, TAccountQuoteTokenProgram extends string, TAccountDexCreatorFeeConfig extends string>(input: MigrateAsyncInput<TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, TAccountCreatorFeeConfig, TAccountQuoteTokenProgram, TAccountDexCreatorFeeConfig>): Promise<MigrateInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig, "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TAccountDexCreatorFeeConfig>>;
2802
+ type MigrateInput<TAccountCaller extends string = string, TAccountBondingCurve extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountBaseVault extends string = string, TAccountQuoteVault extends string = string, TAccountPool extends string = string, TAccountLpMint extends string = string, TAccountPoolBaseVault extends string = string, TAccountPoolQuoteVault extends string = string, TAccountPoolLpAccount extends string = string, TAccountCreatorFeeConfig extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountDexCreatorFeeConfig extends string = string> = {
2586
2803
  caller: TransactionSigner<TAccountCaller>;
2587
2804
  bondingCurve: Address<TAccountBondingCurve>;
2588
2805
  baseMint: Address<TAccountBaseMint>;
@@ -2596,8 +2813,9 @@ type MigrateInput<TAccountCaller extends string = string, TAccountBondingCurve e
2596
2813
  poolLpAccount: Address<TAccountPoolLpAccount>;
2597
2814
  creatorFeeConfig: Address<TAccountCreatorFeeConfig>;
2598
2815
  quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
2816
+ dexCreatorFeeConfig: Address<TAccountDexCreatorFeeConfig>;
2599
2817
  };
2600
- declare function getMigrateInstruction<TAccountCaller extends string, TAccountBondingCurve extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountPool extends string, TAccountLpMint extends string, TAccountPoolBaseVault extends string, TAccountPoolQuoteVault extends string, TAccountPoolLpAccount extends string, TAccountCreatorFeeConfig extends string, TAccountQuoteTokenProgram extends string>(input: MigrateInput<TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, TAccountCreatorFeeConfig, TAccountQuoteTokenProgram>): MigrateInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig, "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP">;
2818
+ declare function getMigrateInstruction<TAccountCaller extends string, TAccountBondingCurve extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountBaseVault extends string, TAccountQuoteVault extends string, TAccountPool extends string, TAccountLpMint extends string, TAccountPoolBaseVault extends string, TAccountPoolQuoteVault extends string, TAccountPoolLpAccount extends string, TAccountCreatorFeeConfig extends string, TAccountQuoteTokenProgram extends string, TAccountDexCreatorFeeConfig extends string>(input: MigrateInput<TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, TAccountCreatorFeeConfig, TAccountQuoteTokenProgram, TAccountDexCreatorFeeConfig>): MigrateInstruction<typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountCaller, TAccountBondingCurve, TAccountBaseMint, TAccountQuoteMint, TAccountBaseVault, TAccountQuoteVault, "84qj5FPZZdXkQy8mfowyg6RBZ3XKuTds6XS4ZYT1sfDX", "932vp5VTARoqoAKNgLSawfCsAx43jUJ5YURggmXBX6V", TAccountPool, TAccountLpMint, TAccountPoolBaseVault, TAccountPoolQuoteVault, TAccountPoolLpAccount, "4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t", "7rrCurqdWFesbzwtYPo95fM8waTtVXgXwCom45x1sfNX", TAccountCreatorFeeConfig, "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", TAccountQuoteTokenProgram, "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "11111111111111111111111111111111", "FJVebqCthxH6JM8vvkJb7yRYA7Emsib1C1vu4ZePSP3T", "5R1uFyEE4oxqkm7hJDqHq6gXaLVF9dxeF3LF4yz1sfLP", TAccountDexCreatorFeeConfig>;
2601
2819
  type ParsedMigrateInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
2602
2820
  programAddress: Address<TProgram>;
2603
2821
  accounts: {
@@ -2623,6 +2841,7 @@ type ParsedMigrateInstruction<TProgram extends string = typeof SEND_LAUNCHPAD_PR
2623
2841
  systemProgram: TAccountMetas[19];
2624
2842
  eventAuthority: TAccountMetas[20];
2625
2843
  program: TAccountMetas[21];
2844
+ dexCreatorFeeConfig: TAccountMetas[22];
2626
2845
  };
2627
2846
  data: MigrateInstructionData;
2628
2847
  };
@@ -2882,6 +3101,7 @@ type SendLaunchpadPluginInstructions = {
2882
3101
  type SendLaunchpadPluginPdas = {
2883
3102
  bondingCurve: typeof findBondingCurvePda;
2884
3103
  eventAuthority: typeof findEventAuthorityPda$1;
3104
+ creatorFeeConfig: typeof findCreatorFeeConfigPda;
2885
3105
  rewardAccrual: typeof findRewardAccrualPda;
2886
3106
  globalConfig: typeof findGlobalConfigPda$1;
2887
3107
  wsolRewardAccrual: typeof findWsolRewardAccrualPda;
@@ -2902,8 +3122,6 @@ interface MigrateParams {
2902
3122
  caller: TransactionSigner;
2903
3123
  baseMint: Address;
2904
3124
  quoteMint: Address;
2905
- /** `bondingCurve.creatorFeeConfig`; `migrate` rejects any other address. */
2906
- creatorFeeConfig: Address;
2907
3125
  quoteTokenProgram: Address;
2908
3126
  }
2909
3127
  declare function buildMigrateInstruction(params: MigrateParams): Promise<Instruction>;
@@ -2922,7 +3140,7 @@ interface LaunchpadTradeParams {
2922
3140
  partner: PartnerInput;
2923
3141
  platformConfig: Address;
2924
3142
  quoteTokenProgram: Address;
2925
- /** Token-2022 schedule for the epoch the trade lands in; stale or missing skews the slippage bounds. */
3143
+ /** The quote mint's transfer fee for the epoch the trade lands in. A missing or old fee gives wrong slippage bounds. */
2926
3144
  quoteFee?: MintFee;
2927
3145
  baseFee?: MintFee;
2928
3146
  /** {@inheritDoc LaunchpadInstructionParams.userQuoteAccount} */
@@ -2941,15 +3159,15 @@ interface LaunchpadInstructionParams {
2941
3159
  partner: PartnerInput;
2942
3160
  platformConfig: Address;
2943
3161
  quoteTokenProgram: Address;
2944
- /** Any user-owned quote-mint account. Defaults to the ATA, created mid-trade
2945
- * if missing (payer funds rent), which only rescues a sell. For WSOL,
2946
- * a throwaway `createAccountWithSeed` account is cheaper. */
3162
+ /** Any quote-mint token account that `user` owns. Defaults to the user's ATA.
3163
+ * The program creates a missing ATA, and `payer` pays the rent. */
2947
3164
  userQuoteAccount?: Address;
2948
- /** Any user-owned base-mint account. Defaults to the ATA, created mid-trade
2949
- * if missing (payer funds rent), which only rescues a buy. */
3165
+ /** Any base-mint token account that `user` owns. Defaults to the user's ATA.
3166
+ * The program creates a missing ATA, and `payer` pays the rent. */
2950
3167
  userBaseAccount?: Address;
2951
3168
  }
2952
- /** `baseAmountOut` is net to the buyer: the program reads `amount` as `base_to_user`. */
3169
+ /** `baseAmountOut` is the base the buyer receives, after the base mint's transfer fee.
3170
+ * The buy is capped at the curve's supply left. Read the result from `quote.baseToUser`. */
2953
3171
  declare function buyExactOut(params: LaunchpadBuyParams & {
2954
3172
  baseAmountOut: bigint;
2955
3173
  }): Promise<{
@@ -2968,7 +3186,7 @@ declare function sellExactIn(params: LaunchpadTradeParams & {
2968
3186
  instruction: Instruction;
2969
3187
  quote: SellQuote;
2970
3188
  }>;
2971
- /** `quoteAmountOut` is net to the seller: the program reads `amount` as `quote_to_user`. */
3189
+ /** `quoteAmountOut` is the quote the seller receives, after the quote mint's transfer fee. */
2972
3190
  declare function sellExactOut(params: LaunchpadTradeParams & {
2973
3191
  quoteAmountOut: bigint;
2974
3192
  }): Promise<{
@@ -2991,7 +3209,7 @@ declare function buildSellExactOutInstruction(params: LaunchpadInstructionParams
2991
3209
  amountOut: bigint;
2992
3210
  maxAmountIn: bigint;
2993
3211
  }): Promise<Instruction>;
2994
- /** Percent of the curve's real base sold (0-100); 100 is the migration threshold. */
3212
+ /** Returns the percent of the curve's real base sold, from 0 to 100. At 100 the curve can migrate. */
2995
3213
  declare function calculateBondingCurveProgress(params: {
2996
3214
  realBaseReserves: bigint;
2997
3215
  initialRealBase: bigint;
@@ -3002,7 +3220,8 @@ declare namespace index_d_exports$1 {
3002
3220
  declare namespace fee_decay_d_exports {
3003
3221
  export { calculateFeeDecayPremium };
3004
3222
  }
3005
- /** Premium in bps, rounded up. */
3223
+ /** Returns the fee decay premium in bps, rounded up. The premium falls quadratically from
3224
+ * `decayStartBps - standardFeeBps` at creation to 0 after `decaySeconds`. */
3006
3225
  declare function calculateFeeDecayPremium(params: {
3007
3226
  currentTimestamp: bigint;
3008
3227
  createdAtTimestamp: bigint;
@@ -3024,10 +3243,12 @@ interface FeeSplit {
3024
3243
  protocol: bigint;
3025
3244
  lp: bigint;
3026
3245
  creator: bigint;
3027
- /** Decay share already included in `protocol`, not a separate payout. */
3246
+ /** The decay premium share. `protocol` includes it. It is not a separate payout. */
3028
3247
  sniper: bigint;
3029
3248
  }
3030
- /** LP/creator round down; protocol absorbs the decay premium and all remainders. */
3249
+ /** Splits `feeAmount` into protocol, LP and creator shares. LP and creator round down. Protocol gets
3250
+ * the decay premium and all remainders. Throws `RangeError` on a negative or non-integer input,
3251
+ * a zero total bps, or `protocolBps + lpBps` above `baseTotalBps`. */
3031
3252
  declare function splitFeeAmount(args: FeeSplitArgs): FeeSplit;
3032
3253
  declare namespace index_d_exports$2 {
3033
3254
  export { amm_d_exports as amm, fee_decay_d_exports as feeDecay, fees_d_exports as fees };
@@ -3055,48 +3276,42 @@ declare function getAltRegistryEncoder(): FixedSizeEncoder<AltRegistryArgs>;
3055
3276
  declare function getAltRegistryDecoder(): FixedSizeDecoder<AltRegistry>;
3056
3277
  /** Gets the codec for {@link AltRegistry} account data. */
3057
3278
  declare function getAltRegistryCodec(): FixedSizeCodec<AltRegistryArgs, AltRegistry>;
3279
+ /**
3280
+ * Decodes a `AltRegistry` account, throwing when another program owns it or its discriminator
3281
+ * does not match.
3282
+ *
3283
+ * Unlike {@link fetchMaybeAltRegistry}, this throws for an address that only holds lamports rather
3284
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3285
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3286
+ */
3058
3287
  declare function decodeAltRegistry<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<AltRegistry, TAddress>;
3288
+ /**
3289
+ * Decodes a `AltRegistry` account, throwing when another program owns it or its discriminator
3290
+ * does not match.
3291
+ *
3292
+ * Unlike {@link fetchMaybeAltRegistry}, this throws for an address that only holds lamports rather
3293
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3294
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3295
+ */
3059
3296
  declare function decodeAltRegistry<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<AltRegistry, TAddress>;
3297
+ /** Fetches a `AltRegistry` account, throwing when it does not exist or only holds lamports. */
3060
3298
  declare function fetchAltRegistry<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<AltRegistry, TAddress>>;
3299
+ /**
3300
+ * Fetches a `AltRegistry` account, or the non-existing variant when the address holds no
3301
+ * account or only lamports (see {@link accountIsCreated}).
3302
+ * {@link decodeAltRegistry} throws for a lamports-only account instead.
3303
+ */
3061
3304
  declare function fetchMaybeAltRegistry<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<AltRegistry, TAddress>>;
3305
+ /** Fetches `AltRegistry` accounts, throwing when any does not exist or only holds lamports. */
3062
3306
  declare function fetchAllAltRegistry(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<AltRegistry>[]>;
3307
+ /**
3308
+ * Fetches `AltRegistry` accounts, with the non-existing variant for each address that holds
3309
+ * no account or only lamports (see {@link accountIsCreated}).
3310
+ * {@link decodeAltRegistry} throws for a lamports-only account instead.
3311
+ */
3063
3312
  declare function fetchAllMaybeAltRegistry(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<AltRegistry>[]>;
3064
3313
  declare function getAltRegistrySize(): number;
3065
3314
  //#endregion
3066
- //#region src/nexus/generated/accounts/creatorFeeConfig.d.ts
3067
- declare const CREATOR_FEE_CONFIG_DISCRIMINATOR: ReadonlyUint8Array;
3068
- declare function getCreatorFeeConfigDiscriminatorBytes(): ReadonlyUint8Array;
3069
- type CreatorFeeConfig = {
3070
- discriminator: ReadonlyUint8Array;
3071
- version: number;
3072
- bump: number;
3073
- platformIndex: number;
3074
- platformId: ReadonlyUint8Array;
3075
- quoteMint: Address;
3076
- reserved: ReadonlyUint8Array;
3077
- };
3078
- type CreatorFeeConfigArgs = {
3079
- version: number;
3080
- bump: number;
3081
- platformIndex: number;
3082
- platformId: ReadonlyUint8Array;
3083
- quoteMint: Address;
3084
- reserved: ReadonlyUint8Array;
3085
- };
3086
- /** Gets the encoder for {@link CreatorFeeConfigArgs} account data. */
3087
- declare function getCreatorFeeConfigEncoder(): FixedSizeEncoder<CreatorFeeConfigArgs>;
3088
- /** Gets the decoder for {@link CreatorFeeConfig} account data. */
3089
- declare function getCreatorFeeConfigDecoder(): FixedSizeDecoder<CreatorFeeConfig>;
3090
- /** Gets the codec for {@link CreatorFeeConfig} account data. */
3091
- declare function getCreatorFeeConfigCodec(): FixedSizeCodec<CreatorFeeConfigArgs, CreatorFeeConfig>;
3092
- declare function decodeCreatorFeeConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<CreatorFeeConfig, TAddress>;
3093
- declare function decodeCreatorFeeConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<CreatorFeeConfig, TAddress>;
3094
- declare function fetchCreatorFeeConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<CreatorFeeConfig, TAddress>>;
3095
- declare function fetchMaybeCreatorFeeConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<CreatorFeeConfig, TAddress>>;
3096
- declare function fetchAllCreatorFeeConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<CreatorFeeConfig>[]>;
3097
- declare function fetchAllMaybeCreatorFeeConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<CreatorFeeConfig>[]>;
3098
- declare function getCreatorFeeConfigSize(): number;
3099
- //#endregion
3100
3315
  //#region src/nexus/generated/types/authPlatformEntry.d.ts
3101
3316
  type AuthPlatformEntry = {
3102
3317
  name: string;
@@ -3107,22 +3322,12 @@ declare function getAuthPlatformEntryEncoder(): Encoder<AuthPlatformEntryArgs>;
3107
3322
  declare function getAuthPlatformEntryDecoder(): Decoder<AuthPlatformEntry>;
3108
3323
  declare function getAuthPlatformEntryCodec(): Codec<AuthPlatformEntryArgs, AuthPlatformEntry>;
3109
3324
  //#endregion
3110
- //#region src/nexus/generated/types/callerType.d.ts
3111
- declare enum CallerType {
3112
- PlatformBondingCurve = 0,
3113
- PlatformPool = 1
3114
- }
3115
- type CallerTypeArgs = CallerType;
3116
- declare function getCallerTypeEncoder(): FixedSizeEncoder<CallerTypeArgs>;
3117
- declare function getCallerTypeDecoder(): FixedSizeDecoder<CallerType>;
3118
- declare function getCallerTypeCodec(): FixedSizeCodec<CallerTypeArgs, CallerType>;
3119
- //#endregion
3120
3325
  //#region src/nexus/generated/types/dexFees.d.ts
3121
3326
  type DexFees = {
3122
3327
  creationFeeCents: bigint;
3123
3328
  protocolFeeBps: number;
3124
3329
  lpFeeBps: number;
3125
- creatorFeeBps: number;
3330
+ maxCreatorFeeBps: number;
3126
3331
  feeDecaySeconds: number;
3127
3332
  feeDecayStartBps: number;
3128
3333
  };
@@ -3130,7 +3335,7 @@ type DexFeesArgs = {
3130
3335
  creationFeeCents: number | bigint;
3131
3336
  protocolFeeBps: number;
3132
3337
  lpFeeBps: number;
3133
- creatorFeeBps: number;
3338
+ maxCreatorFeeBps: number;
3134
3339
  feeDecaySeconds: number;
3135
3340
  feeDecayStartBps: number;
3136
3341
  };
@@ -3159,14 +3364,14 @@ declare function getFeeConfigCodec(): Codec<FeeConfigArgs, FeeConfig>;
3159
3364
  type LaunchpadFees = {
3160
3365
  creationFeeCents: bigint;
3161
3366
  protocolFeeBps: number;
3162
- creatorFeeBps: number;
3367
+ maxCreatorFeeBps: number;
3163
3368
  feeDecaySeconds: number;
3164
3369
  feeDecayStartBps: number;
3165
3370
  };
3166
3371
  type LaunchpadFeesArgs = {
3167
3372
  creationFeeCents: number | bigint;
3168
3373
  protocolFeeBps: number;
3169
- creatorFeeBps: number;
3374
+ maxCreatorFeeBps: number;
3170
3375
  feeDecaySeconds: number;
3171
3376
  feeDecayStartBps: number;
3172
3377
  };
@@ -3174,7 +3379,7 @@ declare function getLaunchpadFeesEncoder(): FixedSizeEncoder<LaunchpadFeesArgs>;
3174
3379
  declare function getLaunchpadFeesDecoder(): FixedSizeDecoder<LaunchpadFees>;
3175
3380
  declare function getLaunchpadFeesCodec(): FixedSizeCodec<LaunchpadFeesArgs, LaunchpadFees>;
3176
3381
  declare namespace index_d_exports$11 {
3177
- export { AuthPlatformEntry, AuthPlatformEntryArgs, CallerType, CallerTypeArgs, DexFees, DexFeesArgs, FeeConfig, FeeConfigArgs, LaunchpadFees, LaunchpadFeesArgs, getAuthPlatformEntryCodec, getAuthPlatformEntryDecoder, getAuthPlatformEntryEncoder, getCallerTypeCodec, getCallerTypeDecoder, getCallerTypeEncoder, getDexFeesCodec, getDexFeesDecoder, getDexFeesEncoder, getFeeConfigCodec, getFeeConfigDecoder, getFeeConfigEncoder, getLaunchpadFeesCodec, getLaunchpadFeesDecoder, getLaunchpadFeesEncoder };
3382
+ export { AuthPlatformEntry, AuthPlatformEntryArgs, DexFees, DexFeesArgs, FeeConfig, FeeConfigArgs, LaunchpadFees, LaunchpadFeesArgs, getAuthPlatformEntryCodec, getAuthPlatformEntryDecoder, getAuthPlatformEntryEncoder, getDexFeesCodec, getDexFeesDecoder, getDexFeesEncoder, getFeeConfigCodec, getFeeConfigDecoder, getFeeConfigEncoder, getLaunchpadFeesCodec, getLaunchpadFeesDecoder, getLaunchpadFeesEncoder };
3178
3383
  }
3179
3384
  //#endregion
3180
3385
  //#region src/nexus/generated/accounts/feePreset.d.ts
@@ -3207,11 +3412,39 @@ declare function getFeePresetEncoder(): Encoder<FeePresetArgs>;
3207
3412
  declare function getFeePresetDecoder(): Decoder<FeePreset>;
3208
3413
  /** Gets the codec for {@link FeePreset} account data. */
3209
3414
  declare function getFeePresetCodec(): Codec<FeePresetArgs, FeePreset>;
3415
+ /**
3416
+ * Decodes a `FeePreset` account, throwing when another program owns it or its discriminator
3417
+ * does not match.
3418
+ *
3419
+ * Unlike {@link fetchMaybeFeePreset}, this throws for an address that only holds lamports rather
3420
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3421
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3422
+ */
3210
3423
  declare function decodeFeePreset<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<FeePreset, TAddress>;
3424
+ /**
3425
+ * Decodes a `FeePreset` account, throwing when another program owns it or its discriminator
3426
+ * does not match.
3427
+ *
3428
+ * Unlike {@link fetchMaybeFeePreset}, this throws for an address that only holds lamports rather
3429
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3430
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3431
+ */
3211
3432
  declare function decodeFeePreset<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<FeePreset, TAddress>;
3433
+ /** Fetches a `FeePreset` account, throwing when it does not exist or only holds lamports. */
3212
3434
  declare function fetchFeePreset<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<FeePreset, TAddress>>;
3435
+ /**
3436
+ * Fetches a `FeePreset` account, or the non-existing variant when the address holds no
3437
+ * account or only lamports (see {@link accountIsCreated}).
3438
+ * {@link decodeFeePreset} throws for a lamports-only account instead.
3439
+ */
3213
3440
  declare function fetchMaybeFeePreset<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<FeePreset, TAddress>>;
3441
+ /** Fetches `FeePreset` accounts, throwing when any does not exist or only holds lamports. */
3214
3442
  declare function fetchAllFeePreset(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<FeePreset>[]>;
3443
+ /**
3444
+ * Fetches `FeePreset` accounts, with the non-existing variant for each address that holds
3445
+ * no account or only lamports (see {@link accountIsCreated}).
3446
+ * {@link decodeFeePreset} throws for a lamports-only account instead.
3447
+ */
3215
3448
  declare function fetchAllMaybeFeePreset(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<FeePreset>[]>;
3216
3449
  //#endregion
3217
3450
  //#region src/nexus/generated/accounts/globalConfig.d.ts
@@ -3240,11 +3473,39 @@ declare function getGlobalConfigEncoder(): Encoder<GlobalConfigArgs>;
3240
3473
  declare function getGlobalConfigDecoder(): Decoder<GlobalConfig>;
3241
3474
  /** Gets the codec for {@link GlobalConfig} account data. */
3242
3475
  declare function getGlobalConfigCodec(): Codec<GlobalConfigArgs, GlobalConfig>;
3476
+ /**
3477
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
3478
+ * does not match.
3479
+ *
3480
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
3481
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3482
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3483
+ */
3243
3484
  declare function decodeGlobalConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<GlobalConfig, TAddress>;
3485
+ /**
3486
+ * Decodes a `GlobalConfig` account, throwing when another program owns it or its discriminator
3487
+ * does not match.
3488
+ *
3489
+ * Unlike {@link fetchMaybeGlobalConfig}, this throws for an address that only holds lamports rather
3490
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3491
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3492
+ */
3244
3493
  declare function decodeGlobalConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<GlobalConfig, TAddress>;
3494
+ /** Fetches a `GlobalConfig` account, throwing when it does not exist or only holds lamports. */
3245
3495
  declare function fetchGlobalConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<GlobalConfig, TAddress>>;
3496
+ /**
3497
+ * Fetches a `GlobalConfig` account, or the non-existing variant when the address holds no
3498
+ * account or only lamports (see {@link accountIsCreated}).
3499
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
3500
+ */
3246
3501
  declare function fetchMaybeGlobalConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<GlobalConfig, TAddress>>;
3502
+ /** Fetches `GlobalConfig` accounts, throwing when any does not exist or only holds lamports. */
3247
3503
  declare function fetchAllGlobalConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<GlobalConfig>[]>;
3504
+ /**
3505
+ * Fetches `GlobalConfig` accounts, with the non-existing variant for each address that holds
3506
+ * no account or only lamports (see {@link accountIsCreated}).
3507
+ * {@link decodeGlobalConfig} throws for a lamports-only account instead.
3508
+ */
3248
3509
  declare function fetchAllMaybeGlobalConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<GlobalConfig>[]>;
3249
3510
  //#endregion
3250
3511
  //#region src/nexus/generated/accounts/partnerConfig.d.ts
@@ -3260,6 +3521,7 @@ type PartnerConfig = {
3260
3521
  launchpad: LaunchpadFees;
3261
3522
  dex: DexFees;
3262
3523
  platformConfig: Address;
3524
+ allowedCreatorFeeModes: number;
3263
3525
  reserved: ReadonlyUint8Array;
3264
3526
  };
3265
3527
  type PartnerConfigArgs = {
@@ -3271,6 +3533,7 @@ type PartnerConfigArgs = {
3271
3533
  launchpad: LaunchpadFeesArgs;
3272
3534
  dex: DexFeesArgs;
3273
3535
  platformConfig: Address;
3536
+ allowedCreatorFeeModes: number;
3274
3537
  reserved: ReadonlyUint8Array;
3275
3538
  };
3276
3539
  /** Gets the encoder for {@link PartnerConfigArgs} account data. */
@@ -3279,11 +3542,39 @@ declare function getPartnerConfigEncoder(): FixedSizeEncoder<PartnerConfigArgs>;
3279
3542
  declare function getPartnerConfigDecoder(): FixedSizeDecoder<PartnerConfig>;
3280
3543
  /** Gets the codec for {@link PartnerConfig} account data. */
3281
3544
  declare function getPartnerConfigCodec(): FixedSizeCodec<PartnerConfigArgs, PartnerConfig>;
3545
+ /**
3546
+ * Decodes a `PartnerConfig` account, throwing when another program owns it or its discriminator
3547
+ * does not match.
3548
+ *
3549
+ * Unlike {@link fetchMaybePartnerConfig}, this throws for an address that only holds lamports rather
3550
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3551
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3552
+ */
3282
3553
  declare function decodePartnerConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<PartnerConfig, TAddress>;
3554
+ /**
3555
+ * Decodes a `PartnerConfig` account, throwing when another program owns it or its discriminator
3556
+ * does not match.
3557
+ *
3558
+ * Unlike {@link fetchMaybePartnerConfig}, this throws for an address that only holds lamports rather
3559
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3560
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3561
+ */
3283
3562
  declare function decodePartnerConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<PartnerConfig, TAddress>;
3563
+ /** Fetches a `PartnerConfig` account, throwing when it does not exist or only holds lamports. */
3284
3564
  declare function fetchPartnerConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<PartnerConfig, TAddress>>;
3565
+ /**
3566
+ * Fetches a `PartnerConfig` account, or the non-existing variant when the address holds no
3567
+ * account or only lamports (see {@link accountIsCreated}).
3568
+ * {@link decodePartnerConfig} throws for a lamports-only account instead.
3569
+ */
3285
3570
  declare function fetchMaybePartnerConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<PartnerConfig, TAddress>>;
3571
+ /** Fetches `PartnerConfig` accounts, throwing when any does not exist or only holds lamports. */
3286
3572
  declare function fetchAllPartnerConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<PartnerConfig>[]>;
3573
+ /**
3574
+ * Fetches `PartnerConfig` accounts, with the non-existing variant for each address that holds
3575
+ * no account or only lamports (see {@link accountIsCreated}).
3576
+ * {@link decodePartnerConfig} throws for a lamports-only account instead.
3577
+ */
3287
3578
  declare function fetchAllMaybePartnerConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<PartnerConfig>[]>;
3288
3579
  declare function getPartnerConfigSize(): number;
3289
3580
  //#endregion
@@ -3319,11 +3610,39 @@ declare function getPartnerMetadataEncoder(): Encoder<PartnerMetadataArgs>;
3319
3610
  declare function getPartnerMetadataDecoder(): Decoder<PartnerMetadata>;
3320
3611
  /** Gets the codec for {@link PartnerMetadata} account data. */
3321
3612
  declare function getPartnerMetadataCodec(): Codec<PartnerMetadataArgs, PartnerMetadata>;
3613
+ /**
3614
+ * Decodes a `PartnerMetadata` account, throwing when another program owns it or its discriminator
3615
+ * does not match.
3616
+ *
3617
+ * Unlike {@link fetchMaybePartnerMetadata}, this throws for an address that only holds lamports rather
3618
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3619
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3620
+ */
3322
3621
  declare function decodePartnerMetadata<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<PartnerMetadata, TAddress>;
3622
+ /**
3623
+ * Decodes a `PartnerMetadata` account, throwing when another program owns it or its discriminator
3624
+ * does not match.
3625
+ *
3626
+ * Unlike {@link fetchMaybePartnerMetadata}, this throws for an address that only holds lamports rather
3627
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3628
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3629
+ */
3323
3630
  declare function decodePartnerMetadata<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<PartnerMetadata, TAddress>;
3631
+ /** Fetches a `PartnerMetadata` account, throwing when it does not exist or only holds lamports. */
3324
3632
  declare function fetchPartnerMetadata<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<PartnerMetadata, TAddress>>;
3633
+ /**
3634
+ * Fetches a `PartnerMetadata` account, or the non-existing variant when the address holds no
3635
+ * account or only lamports (see {@link accountIsCreated}).
3636
+ * {@link decodePartnerMetadata} throws for a lamports-only account instead.
3637
+ */
3325
3638
  declare function fetchMaybePartnerMetadata<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<PartnerMetadata, TAddress>>;
3639
+ /** Fetches `PartnerMetadata` accounts, throwing when any does not exist or only holds lamports. */
3326
3640
  declare function fetchAllPartnerMetadata(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<PartnerMetadata>[]>;
3641
+ /**
3642
+ * Fetches `PartnerMetadata` accounts, with the non-existing variant for each address that holds
3643
+ * no account or only lamports (see {@link accountIsCreated}).
3644
+ * {@link decodePartnerMetadata} throws for a lamports-only account instead.
3645
+ */
3327
3646
  declare function fetchAllMaybePartnerMetadata(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<PartnerMetadata>[]>;
3328
3647
  //#endregion
3329
3648
  //#region src/nexus/generated/accounts/rewardState.d.ts
@@ -3362,17 +3681,45 @@ declare function getRewardStateEncoder(): FixedSizeEncoder<RewardStateArgs>;
3362
3681
  declare function getRewardStateDecoder(): FixedSizeDecoder<RewardState>;
3363
3682
  /** Gets the codec for {@link RewardState} account data. */
3364
3683
  declare function getRewardStateCodec(): FixedSizeCodec<RewardStateArgs, RewardState>;
3684
+ /**
3685
+ * Decodes a `RewardState` account, throwing when another program owns it or its discriminator
3686
+ * does not match.
3687
+ *
3688
+ * Unlike {@link fetchMaybeRewardState}, this throws for an address that only holds lamports rather
3689
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3690
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3691
+ */
3365
3692
  declare function decodeRewardState<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RewardState, TAddress>;
3693
+ /**
3694
+ * Decodes a `RewardState` account, throwing when another program owns it or its discriminator
3695
+ * does not match.
3696
+ *
3697
+ * Unlike {@link fetchMaybeRewardState}, this throws for an address that only holds lamports rather
3698
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3699
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3700
+ */
3366
3701
  declare function decodeRewardState<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RewardState, TAddress>;
3702
+ /** Fetches a `RewardState` account, throwing when it does not exist or only holds lamports. */
3367
3703
  declare function fetchRewardState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RewardState, TAddress>>;
3704
+ /**
3705
+ * Fetches a `RewardState` account, or the non-existing variant when the address holds no
3706
+ * account or only lamports (see {@link accountIsCreated}).
3707
+ * {@link decodeRewardState} throws for a lamports-only account instead.
3708
+ */
3368
3709
  declare function fetchMaybeRewardState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RewardState, TAddress>>;
3710
+ /** Fetches `RewardState` accounts, throwing when any does not exist or only holds lamports. */
3369
3711
  declare function fetchAllRewardState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RewardState>[]>;
3712
+ /**
3713
+ * Fetches `RewardState` accounts, with the non-existing variant for each address that holds
3714
+ * no account or only lamports (see {@link accountIsCreated}).
3715
+ * {@link decodeRewardState} throws for a lamports-only account instead.
3716
+ */
3370
3717
  declare function fetchAllMaybeRewardState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RewardState>[]>;
3371
3718
  declare function getRewardStateSize(): number;
3372
3719
  //#endregion
3373
3720
  //#region src/nexus/generated/accounts/sendNexus.accounts.d.ts
3374
3721
  /** Account kinds of the sendNexus program. */
3375
- type SendNexusAccountType = "altRegistry" | "creatorFeeConfig" | "feePreset" | "globalConfig" | "partnerConfig" | "partnerMetadata" | "rewardState" | "stakingConfig" | "userRewardDebt" | "userStakePosition";
3722
+ type SendNexusAccountType = "altRegistry" | "feePreset" | "globalConfig" | "partnerConfig" | "partnerMetadata" | "rewardState" | "stakingConfig" | "userRewardDebt" | "userStakePosition";
3376
3723
  /**
3377
3724
  * Identifies sendNexus account data by its discriminators.
3378
3725
  * Returns `null` when the account belongs to another program or the data matches no known account.
@@ -3410,11 +3757,39 @@ declare function getStakingConfigEncoder(): FixedSizeEncoder<StakingConfigArgs>;
3410
3757
  declare function getStakingConfigDecoder(): FixedSizeDecoder<StakingConfig>;
3411
3758
  /** Gets the codec for {@link StakingConfig} account data. */
3412
3759
  declare function getStakingConfigCodec(): FixedSizeCodec<StakingConfigArgs, StakingConfig>;
3760
+ /**
3761
+ * Decodes a `StakingConfig` account, throwing when another program owns it or its discriminator
3762
+ * does not match.
3763
+ *
3764
+ * Unlike {@link fetchMaybeStakingConfig}, this throws for an address that only holds lamports rather
3765
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3766
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3767
+ */
3413
3768
  declare function decodeStakingConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<StakingConfig, TAddress>;
3769
+ /**
3770
+ * Decodes a `StakingConfig` account, throwing when another program owns it or its discriminator
3771
+ * does not match.
3772
+ *
3773
+ * Unlike {@link fetchMaybeStakingConfig}, this throws for an address that only holds lamports rather
3774
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3775
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3776
+ */
3414
3777
  declare function decodeStakingConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<StakingConfig, TAddress>;
3778
+ /** Fetches a `StakingConfig` account, throwing when it does not exist or only holds lamports. */
3415
3779
  declare function fetchStakingConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<StakingConfig, TAddress>>;
3780
+ /**
3781
+ * Fetches a `StakingConfig` account, or the non-existing variant when the address holds no
3782
+ * account or only lamports (see {@link accountIsCreated}).
3783
+ * {@link decodeStakingConfig} throws for a lamports-only account instead.
3784
+ */
3416
3785
  declare function fetchMaybeStakingConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<StakingConfig, TAddress>>;
3786
+ /** Fetches `StakingConfig` accounts, throwing when any does not exist or only holds lamports. */
3417
3787
  declare function fetchAllStakingConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<StakingConfig>[]>;
3788
+ /**
3789
+ * Fetches `StakingConfig` accounts, with the non-existing variant for each address that holds
3790
+ * no account or only lamports (see {@link accountIsCreated}).
3791
+ * {@link decodeStakingConfig} throws for a lamports-only account instead.
3792
+ */
3418
3793
  declare function fetchAllMaybeStakingConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<StakingConfig>[]>;
3419
3794
  declare function getStakingConfigSize(): number;
3420
3795
  //#endregion
@@ -3454,11 +3829,39 @@ declare function getUserRewardDebtEncoder(): FixedSizeEncoder<UserRewardDebtArgs
3454
3829
  declare function getUserRewardDebtDecoder(): FixedSizeDecoder<UserRewardDebt>;
3455
3830
  /** Gets the codec for {@link UserRewardDebt} account data. */
3456
3831
  declare function getUserRewardDebtCodec(): FixedSizeCodec<UserRewardDebtArgs, UserRewardDebt>;
3832
+ /**
3833
+ * Decodes a `UserRewardDebt` account, throwing when another program owns it or its discriminator
3834
+ * does not match.
3835
+ *
3836
+ * Unlike {@link fetchMaybeUserRewardDebt}, this throws for an address that only holds lamports rather
3837
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3838
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3839
+ */
3457
3840
  declare function decodeUserRewardDebt<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<UserRewardDebt, TAddress>;
3841
+ /**
3842
+ * Decodes a `UserRewardDebt` account, throwing when another program owns it or its discriminator
3843
+ * does not match.
3844
+ *
3845
+ * Unlike {@link fetchMaybeUserRewardDebt}, this throws for an address that only holds lamports rather
3846
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3847
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3848
+ */
3458
3849
  declare function decodeUserRewardDebt<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<UserRewardDebt, TAddress>;
3850
+ /** Fetches a `UserRewardDebt` account, throwing when it does not exist or only holds lamports. */
3459
3851
  declare function fetchUserRewardDebt<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<UserRewardDebt, TAddress>>;
3852
+ /**
3853
+ * Fetches a `UserRewardDebt` account, or the non-existing variant when the address holds no
3854
+ * account or only lamports (see {@link accountIsCreated}).
3855
+ * {@link decodeUserRewardDebt} throws for a lamports-only account instead.
3856
+ */
3460
3857
  declare function fetchMaybeUserRewardDebt<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<UserRewardDebt, TAddress>>;
3858
+ /** Fetches `UserRewardDebt` accounts, throwing when any does not exist or only holds lamports. */
3461
3859
  declare function fetchAllUserRewardDebt(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<UserRewardDebt>[]>;
3860
+ /**
3861
+ * Fetches `UserRewardDebt` accounts, with the non-existing variant for each address that holds
3862
+ * no account or only lamports (see {@link accountIsCreated}).
3863
+ * {@link decodeUserRewardDebt} throws for a lamports-only account instead.
3864
+ */
3462
3865
  declare function fetchAllMaybeUserRewardDebt(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<UserRewardDebt>[]>;
3463
3866
  declare function getUserRewardDebtSize(): number;
3464
3867
  //#endregion
@@ -3492,15 +3895,43 @@ declare function getUserStakePositionEncoder(): FixedSizeEncoder<UserStakePositi
3492
3895
  declare function getUserStakePositionDecoder(): FixedSizeDecoder<UserStakePosition>;
3493
3896
  /** Gets the codec for {@link UserStakePosition} account data. */
3494
3897
  declare function getUserStakePositionCodec(): FixedSizeCodec<UserStakePositionArgs, UserStakePosition>;
3898
+ /**
3899
+ * Decodes a `UserStakePosition` account, throwing when another program owns it or its discriminator
3900
+ * does not match.
3901
+ *
3902
+ * Unlike {@link fetchMaybeUserStakePosition}, this throws for an address that only holds lamports rather
3903
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3904
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3905
+ */
3495
3906
  declare function decodeUserStakePosition<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<UserStakePosition, TAddress>;
3907
+ /**
3908
+ * Decodes a `UserStakePosition` account, throwing when another program owns it or its discriminator
3909
+ * does not match.
3910
+ *
3911
+ * Unlike {@link fetchMaybeUserStakePosition}, this throws for an address that only holds lamports rather
3912
+ * than returning the non-existing variant: an account passed as existing must never come back as that
3913
+ * variant typed as an `Account`. Apply {@link accountIsCreated} first to accounts fetched another way.
3914
+ */
3496
3915
  declare function decodeUserStakePosition<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<UserStakePosition, TAddress>;
3916
+ /** Fetches a `UserStakePosition` account, throwing when it does not exist or only holds lamports. */
3497
3917
  declare function fetchUserStakePosition<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<UserStakePosition, TAddress>>;
3918
+ /**
3919
+ * Fetches a `UserStakePosition` account, or the non-existing variant when the address holds no
3920
+ * account or only lamports (see {@link accountIsCreated}).
3921
+ * {@link decodeUserStakePosition} throws for a lamports-only account instead.
3922
+ */
3498
3923
  declare function fetchMaybeUserStakePosition<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<UserStakePosition, TAddress>>;
3924
+ /** Fetches `UserStakePosition` accounts, throwing when any does not exist or only holds lamports. */
3499
3925
  declare function fetchAllUserStakePosition(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<UserStakePosition>[]>;
3926
+ /**
3927
+ * Fetches `UserStakePosition` accounts, with the non-existing variant for each address that holds
3928
+ * no account or only lamports (see {@link accountIsCreated}).
3929
+ * {@link decodeUserStakePosition} throws for a lamports-only account instead.
3930
+ */
3500
3931
  declare function fetchAllMaybeUserStakePosition(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<UserStakePosition>[]>;
3501
3932
  declare function getUserStakePositionSize(): number;
3502
3933
  declare namespace index_d_exports$10 {
3503
- export { ALT_REGISTRY_DISCRIMINATOR, AltRegistry, AltRegistryArgs, CREATOR_FEE_CONFIG_DISCRIMINATOR, CreatorFeeConfig, CreatorFeeConfigArgs, FEE_PRESET_DISCRIMINATOR, FeePreset, FeePresetArgs, GLOBAL_CONFIG_DISCRIMINATOR, GlobalConfig, GlobalConfigArgs, PARTNER_CONFIG_DISCRIMINATOR, PARTNER_METADATA_DISCRIMINATOR, PartnerConfig, PartnerConfigArgs, PartnerMetadata, PartnerMetadataArgs, REWARD_STATE_DISCRIMINATOR, RewardState, RewardStateArgs, STAKING_CONFIG_DISCRIMINATOR, SendNexusAccountType, StakingConfig, StakingConfigArgs, USER_REWARD_DEBT_DISCRIMINATOR, USER_STAKE_POSITION_DISCRIMINATOR, UserRewardDebt, UserRewardDebtArgs, UserStakePosition, UserStakePositionArgs, decodeAltRegistry, decodeCreatorFeeConfig, decodeFeePreset, decodeGlobalConfig, decodePartnerConfig, decodePartnerMetadata, decodeRewardState, decodeStakingConfig, decodeUserRewardDebt, decodeUserStakePosition, fetchAllAltRegistry, fetchAllCreatorFeeConfig, fetchAllFeePreset, fetchAllGlobalConfig, fetchAllMaybeAltRegistry, fetchAllMaybeCreatorFeeConfig, fetchAllMaybeFeePreset, fetchAllMaybeGlobalConfig, fetchAllMaybePartnerConfig, fetchAllMaybePartnerMetadata, fetchAllMaybeRewardState, fetchAllMaybeStakingConfig, fetchAllMaybeUserRewardDebt, fetchAllMaybeUserStakePosition, fetchAllPartnerConfig, fetchAllPartnerMetadata, fetchAllRewardState, fetchAllStakingConfig, fetchAllUserRewardDebt, fetchAllUserStakePosition, fetchAltRegistry, fetchCreatorFeeConfig, fetchFeePreset, fetchGlobalConfig, fetchMaybeAltRegistry, fetchMaybeCreatorFeeConfig, fetchMaybeFeePreset, fetchMaybeGlobalConfig, fetchMaybePartnerConfig, fetchMaybePartnerMetadata, fetchMaybeRewardState, fetchMaybeStakingConfig, fetchMaybeUserRewardDebt, fetchMaybeUserStakePosition, fetchPartnerConfig, fetchPartnerMetadata, fetchRewardState, fetchStakingConfig, fetchUserRewardDebt, fetchUserStakePosition, getAltRegistryCodec, getAltRegistryDecoder, getAltRegistryDiscriminatorBytes, getAltRegistryEncoder, getAltRegistrySize, getCreatorFeeConfigCodec, getCreatorFeeConfigDecoder, getCreatorFeeConfigDiscriminatorBytes, getCreatorFeeConfigEncoder, getCreatorFeeConfigSize, getFeePresetCodec, getFeePresetDecoder, getFeePresetDiscriminatorBytes, getFeePresetEncoder, getGlobalConfigCodec, getGlobalConfigDecoder, getGlobalConfigDiscriminatorBytes, getGlobalConfigEncoder, getPartnerConfigCodec, getPartnerConfigDecoder, getPartnerConfigDiscriminatorBytes, getPartnerConfigEncoder, getPartnerConfigSize, getPartnerMetadataCodec, getPartnerMetadataDecoder, getPartnerMetadataDiscriminatorBytes, getPartnerMetadataEncoder, getRewardStateCodec, getRewardStateDecoder, getRewardStateDiscriminatorBytes, getRewardStateEncoder, getRewardStateSize, getStakingConfigCodec, getStakingConfigDecoder, getStakingConfigDiscriminatorBytes, getStakingConfigEncoder, getStakingConfigSize, getUserRewardDebtCodec, getUserRewardDebtDecoder, getUserRewardDebtDiscriminatorBytes, getUserRewardDebtEncoder, getUserRewardDebtSize, getUserStakePositionCodec, getUserStakePositionDecoder, getUserStakePositionDiscriminatorBytes, getUserStakePositionEncoder, getUserStakePositionSize, identifySendNexusAccount };
3934
+ export { ALT_REGISTRY_DISCRIMINATOR, AltRegistry, AltRegistryArgs, FEE_PRESET_DISCRIMINATOR, FeePreset, FeePresetArgs, GLOBAL_CONFIG_DISCRIMINATOR, GlobalConfig, GlobalConfigArgs, PARTNER_CONFIG_DISCRIMINATOR, PARTNER_METADATA_DISCRIMINATOR, PartnerConfig, PartnerConfigArgs, PartnerMetadata, PartnerMetadataArgs, REWARD_STATE_DISCRIMINATOR, RewardState, RewardStateArgs, STAKING_CONFIG_DISCRIMINATOR, SendNexusAccountType, StakingConfig, StakingConfigArgs, USER_REWARD_DEBT_DISCRIMINATOR, USER_STAKE_POSITION_DISCRIMINATOR, UserRewardDebt, UserRewardDebtArgs, UserStakePosition, UserStakePositionArgs, decodeAltRegistry, decodeFeePreset, decodeGlobalConfig, decodePartnerConfig, decodePartnerMetadata, decodeRewardState, decodeStakingConfig, decodeUserRewardDebt, decodeUserStakePosition, fetchAllAltRegistry, fetchAllFeePreset, fetchAllGlobalConfig, fetchAllMaybeAltRegistry, fetchAllMaybeFeePreset, fetchAllMaybeGlobalConfig, fetchAllMaybePartnerConfig, fetchAllMaybePartnerMetadata, fetchAllMaybeRewardState, fetchAllMaybeStakingConfig, fetchAllMaybeUserRewardDebt, fetchAllMaybeUserStakePosition, fetchAllPartnerConfig, fetchAllPartnerMetadata, fetchAllRewardState, fetchAllStakingConfig, fetchAllUserRewardDebt, fetchAllUserStakePosition, fetchAltRegistry, fetchFeePreset, fetchGlobalConfig, fetchMaybeAltRegistry, fetchMaybeFeePreset, fetchMaybeGlobalConfig, fetchMaybePartnerConfig, fetchMaybePartnerMetadata, fetchMaybeRewardState, fetchMaybeStakingConfig, fetchMaybeUserRewardDebt, fetchMaybeUserStakePosition, fetchPartnerConfig, fetchPartnerMetadata, fetchRewardState, fetchStakingConfig, fetchUserRewardDebt, fetchUserStakePosition, getAltRegistryCodec, getAltRegistryDecoder, getAltRegistryDiscriminatorBytes, getAltRegistryEncoder, getAltRegistrySize, getFeePresetCodec, getFeePresetDecoder, getFeePresetDiscriminatorBytes, getFeePresetEncoder, getGlobalConfigCodec, getGlobalConfigDecoder, getGlobalConfigDiscriminatorBytes, getGlobalConfigEncoder, getPartnerConfigCodec, getPartnerConfigDecoder, getPartnerConfigDiscriminatorBytes, getPartnerConfigEncoder, getPartnerConfigSize, getPartnerMetadataCodec, getPartnerMetadataDecoder, getPartnerMetadataDiscriminatorBytes, getPartnerMetadataEncoder, getRewardStateCodec, getRewardStateDecoder, getRewardStateDiscriminatorBytes, getRewardStateEncoder, getRewardStateSize, getStakingConfigCodec, getStakingConfigDecoder, getStakingConfigDiscriminatorBytes, getStakingConfigEncoder, getStakingConfigSize, getUserRewardDebtCodec, getUserRewardDebtDecoder, getUserRewardDebtDiscriminatorBytes, getUserRewardDebtEncoder, getUserRewardDebtSize, getUserStakePositionCodec, getUserStakePositionDecoder, getUserStakePositionDiscriminatorBytes, getUserStakePositionEncoder, getUserStakePositionSize, identifySendNexusAccount };
3504
3935
  }
3505
3936
  //#endregion
3506
3937
  //#region src/nexus/generated/events/anchorEventCpiDiscriminator.framing.d.ts
@@ -3758,17 +4189,21 @@ declare const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT = 7009;
3758
4189
  declare const SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY = 7010;
3759
4190
  /** NothingToClaim: Nothing to claim */
3760
4191
  declare const SEND_NEXUS_ERROR__NOTHING_TO_CLAIM = 7011;
3761
- /** InvalidCreatorId: Creator identity is not a decodable wallet address */
3762
- declare const SEND_NEXUS_ERROR__INVALID_CREATOR_ID = 7012;
4192
+ /** Unused7012: Unused */
4193
+ declare const SEND_NEXUS_ERROR__UNUSED7012 = 7012;
3763
4194
  /** QuoteMintPriceUnset: Quote mint has no USDC price on its nexus reward state */
3764
4195
  declare const SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET = 7013;
3765
4196
  /** TransferFeeNotSettleable: Token-2022 transfer fee schedule cannot settle the exact amount */
3766
4197
  declare const SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE = 7014;
4198
+ /** CreatorFeeTooHigh: Creator fee exceeds the partner's maximum */
4199
+ declare const SEND_NEXUS_ERROR__CREATOR_FEE_TOO_HIGH = 7015;
4200
+ /** CreatorFeeModeNotAllowed: Creator fee mode is not allowed by the partner config */
4201
+ declare const SEND_NEXUS_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED = 7016;
3767
4202
  /** InsufficientLiquidity: Insufficient liquidity */
3768
4203
  declare const SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY = 7100;
3769
4204
  /** InvalidAmount: Invalid amount */
3770
4205
  declare const SEND_NEXUS_ERROR__INVALID_AMOUNT = 7101;
3771
- type SendNexusError = typeof SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE | typeof SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME | typeof SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_NEXUS_ERROR__INSUFFICIENT_STAKE | typeof SEND_NEXUS_ERROR__INVALID_AMOUNT | typeof SEND_NEXUS_ERROR__INVALID_AUTHORITY | typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX | typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME | typeof SEND_NEXUS_ERROR__INVALID_CREATOR_ID | typeof SEND_NEXUS_ERROR__INVALID_DESTINATION | typeof SEND_NEXUS_ERROR__INVALID_FEE_PRESET | typeof SEND_NEXUS_ERROR__INVALID_MINT | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NAME | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE | typeof SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG | typeof SEND_NEXUS_ERROR__INVALID_PRESET_INDEX | typeof SEND_NEXUS_ERROR__INVALID_PRESET_NAME | typeof SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_NEXUS_ERROR__INVALID_PYTH_FEED | typeof SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL | typeof SEND_NEXUS_ERROR__INVALID_REWARD_MINT | typeof SEND_NEXUS_ERROR__INVALID_REWARD_STATE | typeof SEND_NEXUS_ERROR__INVALID_SLUG | typeof SEND_NEXUS_ERROR__INVALID_STAKING_MINT | typeof SEND_NEXUS_ERROR__INVALID_USDC_PRICE | typeof SEND_NEXUS_ERROR__INVALID_VAULT | typeof SEND_NEXUS_ERROR__MISSING_FEE_SOURCE | typeof SEND_NEXUS_ERROR__NOTHING_TO_CLAIM | typeof SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET | typeof SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH | typeof SEND_NEXUS_ERROR__PROGRAM_PAUSED | typeof SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_NEXUS_ERROR__RESERVED_PARTNER | typeof SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED | typeof SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED | typeof SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND | typeof SEND_NEXUS_ERROR__STAKING_NOT_ENABLED | typeof SEND_NEXUS_ERROR__TEXT_TOO_LONG | typeof SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS | typeof SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_NEXUS_ERROR__UNAUTHORIZED | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
4206
+ type SendNexusError = typeof SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE | typeof SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW | typeof SEND_NEXUS_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED | typeof SEND_NEXUS_ERROR__CREATOR_FEE_TOO_HIGH | typeof SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME | typeof SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY | typeof SEND_NEXUS_ERROR__INSUFFICIENT_STAKE | typeof SEND_NEXUS_ERROR__INVALID_AMOUNT | typeof SEND_NEXUS_ERROR__INVALID_AUTHORITY | typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX | typeof SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME | typeof SEND_NEXUS_ERROR__INVALID_DESTINATION | typeof SEND_NEXUS_ERROR__INVALID_FEE_PRESET | typeof SEND_NEXUS_ERROR__INVALID_MINT | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NAME | typeof SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE | typeof SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG | typeof SEND_NEXUS_ERROR__INVALID_PRESET_INDEX | typeof SEND_NEXUS_ERROR__INVALID_PRESET_NAME | typeof SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT | typeof SEND_NEXUS_ERROR__INVALID_PYTH_FEED | typeof SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL | typeof SEND_NEXUS_ERROR__INVALID_REWARD_MINT | typeof SEND_NEXUS_ERROR__INVALID_REWARD_STATE | typeof SEND_NEXUS_ERROR__INVALID_SLUG | typeof SEND_NEXUS_ERROR__INVALID_STAKING_MINT | typeof SEND_NEXUS_ERROR__INVALID_USDC_PRICE | typeof SEND_NEXUS_ERROR__INVALID_VAULT | typeof SEND_NEXUS_ERROR__MISSING_FEE_SOURCE | typeof SEND_NEXUS_ERROR__NOTHING_TO_CLAIM | typeof SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET | typeof SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH | typeof SEND_NEXUS_ERROR__PROGRAM_PAUSED | typeof SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET | typeof SEND_NEXUS_ERROR__RESERVED_PARTNER | typeof SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED | typeof SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED | typeof SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND | typeof SEND_NEXUS_ERROR__STAKING_NOT_ENABLED | typeof SEND_NEXUS_ERROR__TEXT_TOO_LONG | typeof SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS | typeof SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE | typeof SEND_NEXUS_ERROR__UNAUTHORIZED | typeof SEND_NEXUS_ERROR__UNUSED7012 | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT | typeof SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM;
3772
4207
  declare const sendNexusErrorMessages: Record<SendNexusError, string>;
3773
4208
  declare function getSendNexusErrorMessage(code: SendNexusError): string;
3774
4209
  declare function isSendNexusError<TProgramErrorCode extends SendNexusError>(error: unknown, transactionMessage: {
@@ -3781,7 +4216,7 @@ declare function isSendNexusError<TProgramErrorCode extends SendNexusError>(erro
3781
4216
  }>;
3782
4217
  }>;
3783
4218
  declare namespace index_d_exports$8 {
3784
- export { SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE, SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW, SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME, SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY, SEND_NEXUS_ERROR__INSUFFICIENT_STAKE, SEND_NEXUS_ERROR__INVALID_AMOUNT, SEND_NEXUS_ERROR__INVALID_AUTHORITY, SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX, SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME, SEND_NEXUS_ERROR__INVALID_CREATOR_ID, SEND_NEXUS_ERROR__INVALID_DESTINATION, SEND_NEXUS_ERROR__INVALID_FEE_PRESET, SEND_NEXUS_ERROR__INVALID_MINT, SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG, SEND_NEXUS_ERROR__INVALID_PARTNER_NAME, SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE, SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG, SEND_NEXUS_ERROR__INVALID_PRESET_INDEX, SEND_NEXUS_ERROR__INVALID_PRESET_NAME, SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT, SEND_NEXUS_ERROR__INVALID_PYTH_FEED, SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL, SEND_NEXUS_ERROR__INVALID_REWARD_MINT, SEND_NEXUS_ERROR__INVALID_REWARD_STATE, SEND_NEXUS_ERROR__INVALID_SLUG, SEND_NEXUS_ERROR__INVALID_STAKING_MINT, SEND_NEXUS_ERROR__INVALID_USDC_PRICE, SEND_NEXUS_ERROR__INVALID_VAULT, SEND_NEXUS_ERROR__MISSING_FEE_SOURCE, SEND_NEXUS_ERROR__NOTHING_TO_CLAIM, SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET, SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH, SEND_NEXUS_ERROR__PROGRAM_PAUSED, SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_NEXUS_ERROR__RESERVED_PARTNER, SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED, SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED, SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND, SEND_NEXUS_ERROR__STAKING_NOT_ENABLED, SEND_NEXUS_ERROR__TEXT_TOO_LONG, SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS, SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_NEXUS_ERROR__UNAUTHORIZED, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendNexusError, getSendNexusErrorMessage, isSendNexusError, sendNexusErrorMessages };
4219
+ export { SEND_NEXUS_ERROR__AMBIGUOUS_FEE_SOURCE, SEND_NEXUS_ERROR__ARITHMETIC_OVERFLOW, SEND_NEXUS_ERROR__CREATOR_FEE_MODE_NOT_ALLOWED, SEND_NEXUS_ERROR__CREATOR_FEE_TOO_HIGH, SEND_NEXUS_ERROR__DUPLICATE_AUTH_PLATFORM_NAME, SEND_NEXUS_ERROR__INSUFFICIENT_LIQUIDITY, SEND_NEXUS_ERROR__INSUFFICIENT_STAKE, SEND_NEXUS_ERROR__INVALID_AMOUNT, SEND_NEXUS_ERROR__INVALID_AUTHORITY, SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_INDEX, SEND_NEXUS_ERROR__INVALID_AUTH_PLATFORM_NAME, SEND_NEXUS_ERROR__INVALID_DESTINATION, SEND_NEXUS_ERROR__INVALID_FEE_PRESET, SEND_NEXUS_ERROR__INVALID_MINT, SEND_NEXUS_ERROR__INVALID_PARTNER_CONFIG, SEND_NEXUS_ERROR__INVALID_PARTNER_NAME, SEND_NEXUS_ERROR__INVALID_PARTNER_NOTE, SEND_NEXUS_ERROR__INVALID_PLATFORM_CONFIG, SEND_NEXUS_ERROR__INVALID_PRESET_INDEX, SEND_NEXUS_ERROR__INVALID_PRESET_NAME, SEND_NEXUS_ERROR__INVALID_PYTH_ACCOUNT, SEND_NEXUS_ERROR__INVALID_PYTH_FEED, SEND_NEXUS_ERROR__INVALID_REWARD_ACCRUAL, SEND_NEXUS_ERROR__INVALID_REWARD_MINT, SEND_NEXUS_ERROR__INVALID_REWARD_STATE, SEND_NEXUS_ERROR__INVALID_SLUG, SEND_NEXUS_ERROR__INVALID_STAKING_MINT, SEND_NEXUS_ERROR__INVALID_USDC_PRICE, SEND_NEXUS_ERROR__INVALID_VAULT, SEND_NEXUS_ERROR__MISSING_FEE_SOURCE, SEND_NEXUS_ERROR__NOTHING_TO_CLAIM, SEND_NEXUS_ERROR__PARTNER_NOT_ON_PRESET, SEND_NEXUS_ERROR__PRESET_PLATFORM_MISMATCH, SEND_NEXUS_ERROR__PROGRAM_PAUSED, SEND_NEXUS_ERROR__QUOTE_MINT_PRICE_UNSET, SEND_NEXUS_ERROR__RESERVED_PARTNER, SEND_NEXUS_ERROR__REWARDS_NOT_SETTLED, SEND_NEXUS_ERROR__STAKING_ALREADY_ENABLED, SEND_NEXUS_ERROR__STAKING_MINT_ALREADY_BOUND, SEND_NEXUS_ERROR__STAKING_NOT_ENABLED, SEND_NEXUS_ERROR__TEXT_TOO_LONG, SEND_NEXUS_ERROR__TOO_MANY_AUTH_PLATFORMS, SEND_NEXUS_ERROR__TRANSFER_FEE_NOT_SETTLEABLE, SEND_NEXUS_ERROR__UNAUTHORIZED, SEND_NEXUS_ERROR__UNUSED7012, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_INVALID, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_AUTHORITY, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_MINT, SEND_NEXUS_ERROR__USER_TOKEN_ACCOUNT_WRONG_PROGRAM, SendNexusError, getSendNexusErrorMessage, isSendNexusError, sendNexusErrorMessages };
3785
4220
  }
3786
4221
  //#endregion
3787
4222
  //#region src/nexus/generated/instructions/claim.d.ts
@@ -4102,13 +4537,6 @@ declare namespace index_d_exports$7 {
4102
4537
  declare const ALT_REGISTRY_PDA_ADDRESS: Address<"8QbgorUFZXo6Nv6CTn3Xgf1bYiu8yy5NsJNvxr19JA9H">;
4103
4538
  declare function findAltRegistryPda(): ProgramDerivedAddress;
4104
4539
  //#endregion
4105
- //#region src/nexus/generated/pdas/creatorFeeConfig.d.ts
4106
- type CreatorFeeConfigSeeds = {
4107
- creatorHash: Address;
4108
- quoteMint: Address;
4109
- };
4110
- declare function findCreatorFeeConfigPda(seeds: CreatorFeeConfigSeeds): Promise<ProgramDerivedAddress>;
4111
- //#endregion
4112
4540
  //#region src/nexus/generated/pdas/defaultFeePreset.d.ts
4113
4541
  type DefaultFeePresetSeeds = {
4114
4542
  platformConfig: Address;
@@ -4182,7 +4610,7 @@ type UserStakePositionSeeds = {
4182
4610
  };
4183
4611
  declare function findUserStakePositionPda(seeds: UserStakePositionSeeds): Promise<ProgramDerivedAddress>;
4184
4612
  declare namespace index_d_exports$6 {
4185
- export { ALT_REGISTRY_PDA_ADDRESS, CreatorFeeConfigSeeds, DefaultFeePresetSeeds, DefaultPartnerMetadataSeeds, DefaultPartnerSeeds, EVENT_AUTHORITY_PDA_ADDRESS, FeePresetSeeds, GLOBAL_CONFIG_PDA_ADDRESS, PartnerConfigSeeds, PartnerMetadataSeeds, RewardStateSeeds, STAKING_CONFIG_PDA_ADDRESS, UserRewardDebtSeeds, UserStakePositionSeeds, findAltRegistryPda, findCreatorFeeConfigPda, findDefaultFeePresetPda, findDefaultPartnerMetadataPda, findDefaultPartnerPda, findEventAuthorityPda, findFeePresetPda, findGlobalConfigPda, findPartnerConfigPda, findPartnerMetadataPda, findRewardStatePda, findStakingConfigPda, findUserRewardDebtPda, findUserStakePositionPda };
4613
+ export { ALT_REGISTRY_PDA_ADDRESS, DefaultFeePresetSeeds, DefaultPartnerMetadataSeeds, DefaultPartnerSeeds, EVENT_AUTHORITY_PDA_ADDRESS, FeePresetSeeds, GLOBAL_CONFIG_PDA_ADDRESS, PartnerConfigSeeds, PartnerMetadataSeeds, RewardStateSeeds, STAKING_CONFIG_PDA_ADDRESS, UserRewardDebtSeeds, UserStakePositionSeeds, findAltRegistryPda, findDefaultFeePresetPda, findDefaultPartnerMetadataPda, findDefaultPartnerPda, findEventAuthorityPda, findFeePresetPda, findGlobalConfigPda, findPartnerConfigPda, findPartnerMetadataPda, findRewardStatePda, findStakingConfigPda, findUserRewardDebtPda, findUserStakePositionPda };
4186
4614
  }
4187
4615
  //#endregion
4188
4616
  //#region src/nexus/generated/plugins/sendNexus.d.ts
@@ -4197,7 +4625,6 @@ type SendNexusPlugin = {
4197
4625
  };
4198
4626
  type SendNexusPluginAccounts = {
4199
4627
  altRegistry: ReturnType<typeof getAltRegistryCodec> & SelfFetchFunctions<AltRegistryArgs, AltRegistry>;
4200
- creatorFeeConfig: ReturnType<typeof getCreatorFeeConfigCodec> & SelfFetchFunctions<CreatorFeeConfigArgs, CreatorFeeConfig>;
4201
4628
  feePreset: ReturnType<typeof getFeePresetCodec> & SelfFetchFunctions<FeePresetArgs, FeePreset>;
4202
4629
  globalConfig: ReturnType<typeof getGlobalConfigCodec> & SelfFetchFunctions<GlobalConfigArgs, GlobalConfig>;
4203
4630
  partnerConfig: ReturnType<typeof getPartnerConfigCodec> & SelfFetchFunctions<PartnerConfigArgs, PartnerConfig>;
@@ -4232,7 +4659,6 @@ type SendNexusPluginPdas = {
4232
4659
  userStakePosition: typeof findUserStakePositionPda;
4233
4660
  userRewardDebt: typeof findUserRewardDebtPda;
4234
4661
  eventAuthority: typeof findEventAuthorityPda;
4235
- creatorFeeConfig: typeof findCreatorFeeConfigPda;
4236
4662
  altRegistry: typeof findAltRegistryPda;
4237
4663
  };
4238
4664
  type SendNexusPluginRequirements = ClientWithRpc<GetAccountInfoApi & GetMultipleAccountsApi> & ClientWithPayer & ClientWithTransactionPlanning & ClientWithTransactionSending;
@@ -4246,40 +4672,45 @@ declare namespace index_d_exports$5 {
4246
4672
  declare namespace fee_helpers_d_exports {
4247
4673
  export { effectiveFeeBps, fetchPartnerFees };
4248
4674
  }
4249
- /** Throws if the pair is unregistered. Take `platformConfig` from the market being priced: a partner's fees differ per platform. */
4675
+ /** Fetches the `PartnerConfig` of `partner` on `platformConfig`. Throws if it does not exist.
4676
+ * Use the `platformConfig` of the market you price. A partner's fees differ per platform. */
4250
4677
  declare function fetchPartnerFees(rpc: Rpc<GetAccountInfoApi>, partner: Address, platformConfig: Address): Promise<PartnerConfig>;
4251
- /** The `feeBps` a trade pays: the standard rate plus the decay premium from the market's
4252
- * `createdAt`. Pass `fees.launchpad` for a curve, `fees.dex` for a pool; times in unix seconds. */
4253
- declare function effectiveFeeBps(schedule: LaunchpadFees | DexFees, createdAt: bigint, now: bigint): number;
4678
+ /** Returns the `feeBps` a trade pays: the standard rate plus the decay premium. The standard rate
4679
+ * is the protocol and LP rates of `schedule` plus `creatorFeeBps`. `schedule` is the
4680
+ * `PartnerConfig`'s `launchpad` for a curve or `dex` for a pool. `creatorFeeBps` and `createdAt`
4681
+ * are the curve's or pool's. `schedule.maxCreatorFeeBps` has no effect. `createdAt` and `now`
4682
+ * are in unix seconds. */
4683
+ declare function effectiveFeeBps(schedule: LaunchpadFees | DexFees, createdAt: bigint, now: bigint, creatorFeeBps: number): number;
4254
4684
  declare namespace staking_d_exports {
4255
4685
  export { ClaimRewardsParams, PendingReward, PrepareStakingParams, RewardMintRpc, RewardMintSource, SettleParams, StakeParams, UnstakeParams, WithdrawFeesAccounts, buildClaimRewardsInstructions, buildSettleInstructions, buildStakeInstruction, buildStakingPreflightInstructions, buildUnstakeInstruction, buildWithdrawFeesAccounts, fetchMissingUserRewardDebts, fetchPendingRewards, fetchSendMint, fetchStakingConfigData, fetchUserStakePositionData, getRewardMints, isFullySettled, isStakingMintBound };
4256
4686
  }
4257
- /** `getProgramAccounts` is optional: many providers restrict it and LiteSVM lacks it, so pass `rewardMints` there. */
4687
+ /** An RPC with `getAccountInfo` and, optionally, `getProgramAccounts`. Without `getProgramAccounts`, pass `rewardMints`. */
4258
4688
  type RewardMintRpc = Rpc<GetAccountInfoApi> & Partial<Rpc<GetProgramAccountsApi>>;
4259
- /** Registered reward mints, sorted by address. Includes disabled mints: their accrued balance is
4260
- * still owed and the settle gate still counts them. Throws when the sweep disagrees with
4261
- * `StakingConfig.rewardCount` rather than settle a short list. */
4689
+ /** Returns every registered reward mint, disabled mints included, sorted by address.
4690
+ * Throws if the count differs from `StakingConfig.rewardCount`. */
4262
4691
  declare function getRewardMints(rpc: Rpc<GetAccountInfoApi> & Rpc<GetProgramAccountsApi>): Promise<readonly Address[]>;
4263
4692
  type RewardMintSource = readonly Address[] | RewardMintRpc;
4264
4693
  interface SettleParams {
4265
- /** `settle` is permissionless: the user does not sign. */
4694
+ /** Does not sign. `settle` is permissionless. */
4266
4695
  user: Address;
4267
4696
  payer: TransactionSigner;
4268
4697
  stakingMint: Address;
4269
4698
  }
4270
- /** One idempotent `settle` per mint; a partial mint list leaves `stake` and `unstake` failing `RewardsNotSettled`. */
4699
+ /** Builds one `settle` per reward mint. `source` is the mint list, or an RPC to read it from.
4700
+ * `settle` is idempotent. With a partial list, `stake` and `unstake` fail with `RewardsNotSettled`. */
4271
4701
  declare function buildSettleInstructions(source: RewardMintSource, params: SettleParams): Promise<Instruction[]>;
4272
4702
  declare function fetchMissingUserRewardDebts(rpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>, user: Address, stakingMint: Address, knownRewardMints?: readonly Address[]): Promise<Address[]>;
4273
4703
  interface PrepareStakingParams {
4274
4704
  user: Address;
4275
4705
  payer: TransactionSigner;
4276
4706
  stakingMint: Address;
4277
- /** Must be the full registry when supplied; a subset leaves `stake` and `unstake` blocked. */
4707
+ /** If given, must hold every registered mint. With a subset, `stake` and `unstake` fail. */
4278
4708
  rewardMints?: readonly Address[];
4279
4709
  }
4280
- /** Opens missing `UserRewardDebt`s, then settles every mint; the user never signs, so the stake or unstake after is one wallet prompt. */
4710
+ /** Builds a `create_user_reward_debt` for each missing `UserRewardDebt`, then a `settle` for every
4711
+ * reward mint. The user does not sign these instructions. */
4281
4712
  declare function buildStakingPreflightInstructions(rpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>, params: PrepareStakingParams): Promise<Instruction[]>;
4282
- /** True once `stake` and `unstake` will pass the `settledCount == rewardCount` gate. */
4713
+ /** Returns true if `stake` and `unstake` pass the `settledCount == rewardCount` check. */
4283
4714
  declare function isFullySettled(rpc: Rpc<GetAccountInfoApi>, user: Address, stakingMint: Address): Promise<boolean>;
4284
4715
  interface StakeParams {
4285
4716
  user: TransactionSigner;
@@ -4287,7 +4718,8 @@ interface StakeParams {
4287
4718
  stakingMint: Address;
4288
4719
  amount: bigint;
4289
4720
  }
4290
- /** Fails `RewardsNotSettled` until every mint is settled at the current `stakeVersion`; run `buildStakingPreflightInstructions` first. */
4721
+ /** The instruction fails with `RewardsNotSettled` until every mint is settled at the current
4722
+ * `stakeVersion`. Run `buildStakingPreflightInstructions` first. */
4291
4723
  declare function buildStakeInstruction(params: StakeParams): Promise<Instruction>;
4292
4724
  interface UnstakeParams {
4293
4725
  user: TransactionSigner;
@@ -4295,18 +4727,19 @@ interface UnstakeParams {
4295
4727
  stakingMint: Address;
4296
4728
  amount: bigint;
4297
4729
  }
4298
- /** Settle immediately before via `buildStakingPreflightInstructions`: the gate passes on a stale settle,
4299
- * and the window since it is then paid at the post-unstake amount, forfeiting accrual. */
4730
+ /** Run `buildStakingPreflightInstructions` immediately before. The check also passes on an older
4731
+ * settle. Rewards since that settle then accrue on the smaller post-unstake amount, and the
4732
+ * difference is lost. */
4300
4733
  declare function buildUnstakeInstruction(params: UnstakeParams): Promise<Instruction>;
4301
4734
  interface ClaimRewardsParams {
4302
4735
  user: TransactionSigner;
4303
4736
  payer?: TransactionSigner;
4304
4737
  stakingMint: Address;
4305
- /** Defaults to every registered mint; each claim settles its own mint, so a subset needs no preflight. */
4738
+ /** Defaults to every registered mint. A subset needs no preflight: each `claim` settles its own mint. */
4306
4739
  rewardMints?: readonly Address[];
4307
4740
  }
4308
- /** One `claim` per mint, preceded by `create_user_reward_debt` where the debt is missing:
4309
- * `Claim` requires the account to exist, so one missing debt fails the whole transaction. */
4741
+ /** Builds one `claim` per reward mint. A `create_user_reward_debt` comes before each `claim` whose
4742
+ * `UserRewardDebt` is missing: `claim` fails without it. Throws if a mint has no `RewardState`. */
4310
4743
  declare function buildClaimRewardsInstructions(rpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>, params: ClaimRewardsParams): Promise<Instruction[]>;
4311
4744
  interface WithdrawFeesAccounts {
4312
4745
  rewardState: Address;
@@ -4315,28 +4748,29 @@ interface WithdrawFeesAccounts {
4315
4748
  destinationTokenAccount: Address;
4316
4749
  tokenProgram: Address;
4317
4750
  }
4318
- /** Accounts for one mint's `withdraw_fees`; call once per mint. */
4751
+ /** Returns the accounts of `withdraw_fees` for one reward mint. Without `tokenProgram`, reads it
4752
+ * from the mint account. Throws if that account does not exist. */
4319
4753
  declare function buildWithdrawFeesAccounts(rpc: Rpc<GetAccountInfoApi>, params: {
4320
4754
  rewardMint: Address;
4321
- /** Wallet, not token account: its ATA is derived. */
4755
+ /** A wallet, not a token account. The SDK derives its ATA. */
4322
4756
  destination: Address;
4323
4757
  tokenProgram?: Address;
4324
4758
  }): Promise<WithdrawFeesAccounts>;
4325
4759
  declare function fetchStakingConfigData(rpc: Rpc<GetAccountInfoApi>): Promise<StakingConfig>;
4326
4760
  declare function fetchUserStakePositionData(rpc: Rpc<GetAccountInfoApi>, user: Address, stakingMint: Address): Promise<UserStakePosition | null>;
4327
- /** Unbound reads as `Pubkey::default()` (the system program address), which `bind_staking_mint`
4328
- * can never store: it requires a token mint. */
4761
+ /** Returns false for the system program address, the value of an unbound staking mint. */
4329
4762
  declare function isStakingMintBound(stakingMint: Address): boolean;
4330
- /** The staking mint is immutable once bound, so this result is safe to cache. */
4763
+ /** Returns the staking mint. Throws if no staking mint is bound. A bound staking mint cannot change. */
4331
4764
  declare function fetchSendMint(rpc: Rpc<GetAccountInfoApi>): Promise<Address>;
4332
4765
  interface PendingReward {
4333
4766
  rewardMint: Address;
4334
- /** Base units of `rewardMint` debited at the vault (matches `ClaimEvent.amount`); a
4335
- * `TransferFeeConfig` mint delivers less -- net it with `transferFee.fetchMintFees`. */
4767
+ /** Amount the vault sends, in raw units of `rewardMint`. Equals `ClaimEvent.amount`. A mint with a
4768
+ * transfer fee delivers less. Get the fee with `transferFee.fetchMintFees`. */
4336
4769
  pending: bigint;
4337
4770
  }
4338
- /** One entry per reward mint, in `knownRewardMints` order, else sorted by address. Each amount is in
4339
- * its own mint's base units, so never sum them, and is the vault's debit, not the claimant's credit. */
4771
+ /** Returns one entry per reward mint, in `knownRewardMints` order, else sorted by address. Each amount
4772
+ * is in the raw units of its own mint. Do not add them together. Each amount is what the vault sends,
4773
+ * before the mint's transfer fee. */
4340
4774
  declare function fetchPendingRewards(rpc: RewardMintRpc & Rpc<GetMultipleAccountsApi>, user: Address, stakingMint: Address, knownRewardMints?: readonly Address[]): Promise<PendingReward[]>;
4341
4775
  declare namespace index_d_exports$3 {
4342
4776
  export { index_d_exports$10 as accounts, index_d_exports$8 as errors, index_d_exports$9 as events, fee_helpers_d_exports as feeHelpers, index_d_exports$7 as instructions, index_d_exports$6 as pda, index_d_exports$5 as plugins, staking_d_exports as staking, index_d_exports$11 as types };
@@ -4344,9 +4778,9 @@ declare namespace index_d_exports$3 {
4344
4778
  declare namespace platform_d_exports {
4345
4779
  export { PLATFORM_SEED, findPlatformAddress };
4346
4780
  }
4347
- /** A platform is only a key, with no on-chain account; it is a PDA so a platform account can later `init` at it. */
4781
+ /** Seed of the platform PDA. A platform has no on-chain account. */
4348
4782
  declare const PLATFORM_SEED = "platform";
4349
- /** The name is the platform's identity: renaming one orphans every market and partner config under the old key. */
4783
+ /** Derives the platform key for `name` under the nexus program. Each name gives a different platform. */
4350
4784
  declare function findPlatformAddress(name: string): Promise<ProgramDerivedAddress>;
4351
4785
  declare namespace transfer_fee_d_exports {
4352
4786
  export { TransferFeeConfig, TransferFeeEntry, decodeTransferFeeConfig, fetchMintFees, mintFeeAtEpoch, transferFeeAtEpoch };
@@ -4357,50 +4791,77 @@ interface TransferFeeEntry {
4357
4791
  readonly basisPoints: number;
4358
4792
  }
4359
4793
  interface TransferFeeConfig {
4360
- /** `undefined` when the authority is unset: the schedule is frozen forever. */
4794
+ /** `undefined` if the config has no authority. Then the schedule cannot change. */
4361
4795
  readonly authority: Address | undefined;
4362
4796
  readonly older: TransferFeeEntry;
4363
4797
  readonly newer: TransferFeeEntry;
4364
4798
  }
4365
- /** `owner` is the account's program. `undefined` means no fee extension; anything
4366
- * unparseable throws `RangeError` rather than pricing a charging mint free. */
4799
+ /** Decodes the `TransferFeeConfig` extension of a mint. `owner` is the program that owns the account.
4800
+ * Returns `undefined` if the mint has no such extension. Throws `RangeError` if `owner` is not a
4801
+ * token program or `data` is not a valid mint. */
4367
4802
  declare function decodeTransferFeeConfig(data: Uint8Array, owner: Address): TransferFeeConfig | undefined;
4368
- /** Mirrors SPL `get_epoch_fee`: the newer entry is live from its own epoch on. */
4803
+ /** Returns the fee for `epoch`, as SPL `get_epoch_fee` does. The newer entry applies from its own epoch on. */
4369
4804
  declare function transferFeeAtEpoch(config: TransferFeeConfig, epoch: bigint): MintFee;
4370
4805
  declare function mintFeeAtEpoch(data: Uint8Array, owner: Address, epoch: bigint): MintFee | undefined;
4371
- /** A missing account throws, never reads as fee-free. Valid only for `epoch`, which defaults to
4372
- * the cluster's (a second call). */
4806
+ /** Reads the transfer fee of each mint for `epoch`. The result is valid only for that epoch.
4807
+ * `epoch` defaults to the current cluster epoch, read with `getEpochInfo`. A mint without a
4808
+ * transfer fee maps to `undefined`. Throws if a mint account is missing or does not decode. */
4373
4809
  declare function fetchMintFees(rpc: Rpc<GetMultipleAccountsApi & GetEpochInfoApi>, mints: readonly Address[], options?: {
4374
4810
  epoch?: bigint;
4375
4811
  commitment?: Commitment;
4376
4812
  }): Promise<Map<Address, MintFee | undefined>>;
4377
4813
  //#endregion
4378
- //#region src/utils/creator-hash.d.ts
4379
- /** SHA-256 of the LE-u32-length-prefixed platform and id. Frozen: it seeds live PDAs. */
4380
- declare function creatorHashFromId(creatorPlatform: string, creatorId: string): Promise<Address>;
4381
- /** NUL-pads `text` to `length` bytes, the on-chain `CreatorFeeConfig.platformId` form; throws RangeError if longer. */
4382
- declare function encodeCreatorId(text: string, length: number): Uint8Array;
4383
- /** Strips NUL padding. Pass this, never the padded array, to {@link creatorHashFromId}: the hash is length-prefixed. */
4384
- declare function decodeCreatorId(bytes: ReadonlyUint8Array): string;
4814
+ //#region src/nexus/generated/shared/index.d.ts
4815
+ /**
4816
+ * Whether an encoded account was created on-chain, rather than merely sent lamports.
4817
+ *
4818
+ * Anyone can send lamports to an address before its account is created, which leaves it on-chain,
4819
+ * owned by the System Program, with no data. This returns `false` for that shape, as it does for an
4820
+ * account that does not exist. Any other existing account counts as created, whoever owns it; the
4821
+ * `decode*` functions still check the owner.
4822
+ *
4823
+ * The generated `fetchMaybe*` and `fetchAllMaybe*` helpers apply this rule themselves. Apply it to
4824
+ * accounts you fetch or receive another way (subscriptions, batch loaders, caches) before passing
4825
+ * them to a `decode*` function, which throws for a lamports-only account: an account passed to it as
4826
+ * existing must never come back as the non-existing variant typed as an `Account`.
4827
+ *
4828
+ * Only a `true` result narrows the type. A lamports-only account is still `exists: true` at runtime,
4829
+ * so a `false` result leaves the type unchanged instead of narrowing it to the non-existing variant.
4830
+ * The `uncreated` property in the narrowed type is never present; it exists only to prevent that.
4831
+ *
4832
+ * @example
4833
+ * ```ts
4834
+ * const maybeAccount = decodeMyAccount(
4835
+ * accountIsCreated(encodedAccount) ? encodedAccount : { address: encodedAccount.address, exists: false },
4836
+ * );
4837
+ * ```
4838
+ */
4839
+ declare function accountIsCreated<TAccount extends EncodedAccount | MaybeEncodedAccount>(account: TAccount): account is Exclude<TAccount, {
4840
+ readonly exists: false;
4841
+ }> & {
4842
+ readonly uncreated?: never;
4843
+ };
4385
4844
  //#endregion
4386
4845
  //#region src/utils/mint-info.d.ts
4387
4846
  interface QuoteMintInfo {
4388
4847
  mint: Address;
4389
- /** Immutable: safe to cache. */
4848
+ /** Cannot change after the mint is created. */
4390
4849
  decimals: number;
4391
4850
  /** The account's owner: `TOKEN_PROGRAM_ADDRESS` or `TOKEN_2022_PROGRAM_ADDRESS`. */
4392
4851
  tokenProgram: Address;
4393
4852
  }
4394
- /** Throws when the mint does not exist or is not owned by a token program. */
4853
+ /** Reads the decimals and token program of `mint`. Throws if the account does not exist, a token
4854
+ * program does not own it, or it is too short for a mint. */
4395
4855
  declare function fetchQuoteMintInfo(rpc: Rpc<GetAccountInfoApi>, mint: Address, commitment?: Commitment): Promise<QuoteMintInfo>;
4396
- /** One round trip per 100 mints; results follow `mints` order. */
4856
+ /** Reads the decimals and token program of each mint. Results follow `mints` order. Throws as
4857
+ * {@link fetchQuoteMintInfo} does. */
4397
4858
  declare function fetchQuoteMintInfos(rpc: Rpc<GetMultipleAccountsApi>, mints: readonly Address[], commitment?: Commitment): Promise<QuoteMintInfo[]>;
4398
4859
  //#endregion
4399
4860
  //#region src/utils/pda.d.ts
4400
- /** Seed order is [wallet, tokenProgram, mint], not the parameter order. */
4861
+ /** Derives the associated token account of `wallet` for `mint` under `tokenProgram`. */
4401
4862
  declare function findAssociatedTokenPda(wallet: Address, mint: Address, tokenProgram?: Address): Promise<ProgramDerivedAddress>;
4402
4863
  declare namespace index_d_exports$4 {
4403
- export { PartnerInput, QuoteMintInfo, creatorHashFromId, decodeCreatorId, encodeCreatorId, fetchQuoteMintInfo, fetchQuoteMintInfos, findAssociatedTokenPda };
4864
+ export { PartnerInput, QuoteMintInfo, accountIsCreated, fetchQuoteMintInfo, fetchQuoteMintInfos, findAssociatedTokenPda };
4404
4865
  }
4405
4866
  //#endregion
4406
4867
  export { constants_d_exports as constants, index_d_exports as dex, index_d_exports$1 as launchpad, index_d_exports$2 as math, index_d_exports$3 as nexus, platform_d_exports as platform, transfer_fee_d_exports as transferFee, index_d_exports$4 as utils };