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