@gabox-labs/sdk 0.2.0 → 0.7.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.
- package/CHANGELOG.md +310 -0
- package/README.md +173 -438
- package/dist/{gaboxV2-CV2XltqC.js → gabox-DGTCh34U.js} +575 -1584
- package/dist/gabox-DGTCh34U.js.map +1 -0
- package/dist/generated/index.d.ts +384 -752
- package/dist/generated/index.js +116 -338
- package/dist/generated/index.js.map +1 -1
- package/dist/index-C4at2cZ_.d.ts +1184 -0
- package/dist/index.d.ts +474 -432
- package/dist/index.js +1186 -1374
- package/dist/index.js.map +1 -1
- package/dist/raydium/index.d.ts +2 -0
- package/dist/raydium/index.js +2 -0
- package/dist/raydium-CU-tZzIk.js +3282 -0
- package/dist/raydium-CU-tZzIk.js.map +1 -0
- package/llms.txt +7 -3
- package/package.json +11 -16
- package/skills/gabox-sdk/SKILL.md +57 -146
- package/skills/gabox-sdk/references/api.md +155 -145
- package/dist/gaboxV2-CV2XltqC.js.map +0 -1
- package/dist/index-BxvSkzCO.d.ts +0 -471
- package/dist/pump/index.d.ts +0 -2
- package/dist/pump/index.js +0 -2
- package/dist/pump-D0K_0uiC.js +0 -1531
- package/dist/pump-D0K_0uiC.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,316 @@
|
|
|
3
3
|
All notable changes to `@gabox-labs/sdk`. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
4
4
|
and the project uses [Semantic Versioning](https://semver.org/) with the `0.x` rule from `CONTRIBUTING.md`.
|
|
5
5
|
|
|
6
|
+
## [0.7.0] - 2026-09-18
|
|
7
|
+
|
|
8
|
+
Any quote token Raydium enabled, a price shown in SOL, and payment in SOL through a swap that runs
|
|
9
|
+
in the same transaction as `buy_pack`. It matches the devnet program deployed at slot `500297753`,
|
|
10
|
+
and a live devnet run exercised both a SOL-quoted coin and a USDC-quoted one paid for in SOL.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Breaking.** A machine is priced in one quote asset, chosen at creation. It still defaults to
|
|
15
|
+
wrapped SOL, and any quote Raydium enabled on LaunchLab now works too. `createMachine` takes
|
|
16
|
+
`quote: { mint }` and `raise`; `initialize_pool` takes the quote's LaunchLab `GlobalConfig`
|
|
17
|
+
account, which is what proves the quote, and the quote's own token program.
|
|
18
|
+
- **Breaking.** `Pool` gained `quoteConfig` and `quoteTokenProgram`, and a new discriminator. A pool
|
|
19
|
+
from the first LaunchLab build now fails to decode instead of being read with shifted fields.
|
|
20
|
+
- **Breaking.** `raise` is the client's choice for every quote but wrapped SOL, where the program
|
|
21
|
+
still pins it: 85 SOL on mainnet, 3 SOL on devnet. A non-SOL pool has no default, because the same
|
|
22
|
+
number means a different amount in every token. `createMachine` refuses a raise below
|
|
23
|
+
`min_quote_fund_raising` in the quote's own config, before it builds anything.
|
|
24
|
+
- **Breaking.** `RaydiumClusterIds` lost `solGlobalConfig`. Nothing pins a quote config any more:
|
|
25
|
+
derive it from the quote mint with `raydium.launchlabGlobalConfig`, or read it with
|
|
26
|
+
`raydium.fetchQuoteConfig`.
|
|
27
|
+
- **Breaking.** `fetchCurveSettings(client, quoteConfig, ids?)` takes the quote's config address.
|
|
28
|
+
`newCurveBuyCost(client, tokens, { quoteConfig, raise })` and `newCurveReserves(raise, migrateFee)`
|
|
29
|
+
take the raise, because the starting reserves follow it.
|
|
30
|
+
- **Breaking.** `fetchCreatorFees` takes `quoteMint` and answers
|
|
31
|
+
`{ quoteMint, curveQuote, cpmmQuote, cpmmTokens }`. `curveLamports` and `cpmmLamports` are gone:
|
|
32
|
+
the amounts are in the quote token, which is not always SOL. `claimCreatorFee` takes `quoteMint`
|
|
33
|
+
too, because LaunchLab keeps one vault per wallet per quote asset.
|
|
34
|
+
- **Breaking.** `getLaunchInstruction` takes `quoteMint`, `quoteConfig`, `quoteTokenProgram` and
|
|
35
|
+
`raise`. `LaunchlabTradeAccountsInput` takes `quoteTokenProgram`, and `CpmmTradeAccountsInput`
|
|
36
|
+
takes `baseTokenProgram` and `quoteTokenProgram`; a migrated CPMM pool records both in its own
|
|
37
|
+
data, and the program checks them.
|
|
38
|
+
- `GaboxClient` gained `route`, and `createClient` gained a `route` option. Mainnet defaults to
|
|
39
|
+
`jupiterRoute()`; devnet and localnet default to `null`.
|
|
40
|
+
- `PackOffer` gained `quoteDecimals`, `quoteSymbol` and `solAmount`. `quoteAmount` is still the whole
|
|
41
|
+
pack price, now in the pool's quote token. `SeedCostEstimate` gained the same three plus `raise`.
|
|
42
|
+
- `resolveVenue` takes an optional `quote` binding and reads the Gabox pool for it otherwise. It also
|
|
43
|
+
reports `quoteTokenProgram` and `userQuoteToken`.
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- `payWith: 'sol' | 'quote'` on `buyPack` and `createMachine`, and `receive: 'sol' | 'quote'` on
|
|
48
|
+
`sellTokens`. Both default to `'sol'`. On a pool that is not quoted in SOL, the default prepends a
|
|
49
|
+
swap before `buy_pack` and appends one after `sell_tokens`, in the same transaction. The SDK never
|
|
50
|
+
splits the two: a message over the 1,232-byte limit fails with a clear error instead.
|
|
51
|
+
- `src/route/`: `Route`, `RouteProvider`, `jupiterRoute(options)` for mainnet and
|
|
52
|
+
`raydiumCpmmRoute(poolAddress)` for devnet, plus `routeQuoteIn`, `routeQuoteOut`, `solPriceOf` and
|
|
53
|
+
`assertRouteIsSafe`. Neither provider adds a package: Jupiter is plain HTTP and JSON, and the CPMM
|
|
54
|
+
provider reuses this SDK's own swap builders and price math.
|
|
55
|
+
- Exact-out first, exact-in as the fallback. Jupiter answers `NO_ROUTES_FOUND` for exact-out whenever
|
|
56
|
+
the best route has more than one hop, which is the normal case for a stock token. The fallback
|
|
57
|
+
works out the SOL that buys the amount at the exact-in price, adds a margin, and leaves the change
|
|
58
|
+
in the buyer's own quote account. A `Route` reports which mode it used.
|
|
59
|
+
- `raydium.fetchQuoteConfig`, `raydium.isQuoteSupported`, `raydium.fetchQuoteAsset` and
|
|
60
|
+
`raydium.fetchQuoteDisplay`: whether Raydium enabled a quote, and its token program, decimals and
|
|
61
|
+
symbol. The symbol comes from the Token-2022 metadata extension when the mint has one, and from
|
|
62
|
+
Metaplex otherwise.
|
|
63
|
+
- `raydium.quoteAccountFor(user, quoteMint, quoteTokenProgram)`: the account both venues settle in,
|
|
64
|
+
derived under the quote's own token program. A Token-2022 quote has a different ATA from a classic
|
|
65
|
+
one, and the program pins the one the pool records.
|
|
66
|
+
- `TOKEN_2022_PROGRAM_ADDRESS`, generated from Raydium's own IDL.
|
|
67
|
+
- `fetchAddressLookupTables(client, addresses)`: a route names its tables by address, and the message
|
|
68
|
+
has to carry them.
|
|
69
|
+
- `Route.computeUnits`. A swap runs on the same compute budget as the Gabox instruction, so a
|
|
70
|
+
builder with a swap leg adds the route's own figure to its limit: Jupiter's `SetComputeUnitLimit`
|
|
71
|
+
from its `swap-instructions` response (400,000 when absent), or the measured 75,000 of the
|
|
72
|
+
Raydium CPMM route. The sum is capped at the 1,400,000 ceiling; a caller's `computeUnitLimit`
|
|
73
|
+
still wins.
|
|
74
|
+
- Cluster-neutral `initializePool`. The program pins `venue` to LaunchLab's address, which differs
|
|
75
|
+
between the mainnet and devnet builds, so the generated builder no longer carries a default for
|
|
76
|
+
it and `createMachine` passes the cluster's address. `check:program` treats the two IDLs as in
|
|
77
|
+
sync.
|
|
78
|
+
|
|
79
|
+
### Security
|
|
80
|
+
|
|
81
|
+
- A route is built outside this SDK and runs with the buyer's signature, so every leg is checked
|
|
82
|
+
before it is composed: no instruction may name the Gabox program or any Gabox account the
|
|
83
|
+
transaction uses, and the swap has to settle in the user's own quote associated token account,
|
|
84
|
+
which is the account the program binds and measures the delta in.
|
|
85
|
+
- A route's instructions carry account roles and no signer objects. Kit refuses to sign a message
|
|
86
|
+
that holds two distinct signer objects for one address, and the wallet paying for the transaction
|
|
87
|
+
is the same wallet a route names, so a signer object there would make every such message
|
|
88
|
+
unsignable. Both providers and both new test suites check it.
|
|
89
|
+
|
|
90
|
+
## [0.6.0] - 2026-09-18
|
|
91
|
+
|
|
92
|
+
The venue moved from Pump and PumpSwap to Raydium LaunchLab and Raydium CPMM. The program changed
|
|
93
|
+
with it, so the IDL changed: this is a breaking release for every caller. It matches the devnet
|
|
94
|
+
program deployed at slot `500223264`, and a live devnet run exercised the whole life of one coin.
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
|
|
98
|
+
- **Breaking.** A Gabox coin is now created on Raydium LaunchLab and graduates into a Raydium CPMM
|
|
99
|
+
pool. `createMachine` builds LaunchLab's `initialize_v2` instead of Pump's `create_v2`, with the
|
|
100
|
+
pinned launch shape: 6 decimals, 1,000,000,000 coins, 793,100,000 sold on the curve, 85 SOL raised
|
|
101
|
+
on mainnet or 3 SOL on devnet, migrate into CPMM, no vesting, the CPMM creator fee paid in WSOL.
|
|
102
|
+
The creator picks only the name, the symbol, the URI and the prize table.
|
|
103
|
+
- **Breaking.** Both venues settle in wrapped SOL, and no flow settles in native SOL any more. Every
|
|
104
|
+
builder now creates the wallet's WSOL account, wraps the lamports its trade needs, and closes the
|
|
105
|
+
account afterwards. That close also unwraps any WSOL the wallet already held.
|
|
106
|
+
- **Breaking.** `buyPack` takes `{ mint, purchaser, maxQuoteIn, minMaximum, maxNativeDebit, venue?,
|
|
107
|
+
seq? }`. `maxTotalQuoteDebit` is gone, because there is no Gabox fee to cover.
|
|
108
|
+
- **Breaking.** `createMachine` lost `feeBps`, `quote`, `feeRecipientIndex` and
|
|
109
|
+
`buybackRecipientIndex`. `initialize_pool` takes `(tiers, max_seed_quote_in,
|
|
110
|
+
max_seed_native_debit, extra_seed_tokens)`.
|
|
111
|
+
- **Breaking.** `Pool` lost `tokenProgram`, `quoteTokenProgram` and `feeBps`. Both venues use classic
|
|
112
|
+
SPL Token, and Gabox charges nothing. `Pool` also has a new discriminator, so a pool from the Pump
|
|
113
|
+
build now fails to decode rather than being read with shifted fields.
|
|
114
|
+
- **Breaking.** `PoolCreated`, `PackBought` and `TokensSold` lost every fee field.
|
|
115
|
+
- **Breaking.** `vaultAddress(mint)` and `associatedTokenAddress(owner, mint)` no longer take a token
|
|
116
|
+
program. `fetchVaultBalance(client, mint)` lost its third argument.
|
|
117
|
+
- `PackOffer` lost `feeBps`, `creatorFeeQuote`, `packFeeQuote`, `quoteTokenProgram` and
|
|
118
|
+
`nativeOnPumpCurve`. `quoteAmount` is the whole pack price, the venue's fees included, and `venue`
|
|
119
|
+
is now `'launchlab'` or `'cpmm'`.
|
|
120
|
+
- `createClient({ cluster })` now decides every Raydium address. Mainnet and devnet run different
|
|
121
|
+
Raydium deployments, so nothing Raydium is a module constant any more; `raydiumIds(cluster)` gives
|
|
122
|
+
one cluster's set.
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
|
|
126
|
+
- `src/raydium/`, replacing `src/pump/`, exported as the `raydium` namespace and as
|
|
127
|
+
`@gabox-labs/sdk/raydium`.
|
|
128
|
+
- `raydium.curve`: exact bigint ports of Raydium's own price math, for both venues. `initialCurve`
|
|
129
|
+
reproduces the starting reserves Raydium publishes for the Gabox launch shape, to the base unit.
|
|
130
|
+
- `raydium.claimCreatorFee(client, { creator })` collects the LaunchLab creator fee for every coin a
|
|
131
|
+
wallet launched, and `raydium.collectCreatorFee(client, { mint, creator })` collects one graduated
|
|
132
|
+
coin's CPMM creator fee. Both close the WSOL account, so the creator receives SOL.
|
|
133
|
+
`raydium.fetchCreatorFees` reads what is owed in both places.
|
|
134
|
+
- `raydium.cpmmCreatorFeeShare(cpmm, creator, ammConfig)` derives
|
|
135
|
+
`PDA(["creator_fee_share", creator, amm_config])`. `collect_creator_fee` takes that account after
|
|
136
|
+
the fourteen Raydium's mainnet IDL lists. The IDL snapshot is CPMM 0.2.0 and predates it, while
|
|
137
|
+
the devnet build declares it and stops with `AccountNotEnoughKeys` (3005) without it. Raydium's
|
|
138
|
+
own SDK appends it unconditionally, and a program that does not declare it ignores a trailing
|
|
139
|
+
account, so the SDK sends it on both clusters.
|
|
140
|
+
- `raydium.findCpmmPool`: a migrated CPMM pool does not have to sit at a derived address, so this
|
|
141
|
+
tries the derived one and falls back to a filtered scan. Either way the pool proves itself from its
|
|
142
|
+
own data, including `enable_creator_fee`, which only Raydium's permissioned migration can set.
|
|
143
|
+
- `raydium.getCurveBuyExactInInstruction`: a plain curve buy, which Gabox never makes itself. The
|
|
144
|
+
devnet end-to-end test uses it to buy a curve out and force graduation.
|
|
145
|
+
- `fundWsol` and `unwrapWsol` in `src/tx/wsol.ts`, for a caller building its own transaction.
|
|
146
|
+
|
|
147
|
+
### Removed
|
|
148
|
+
|
|
149
|
+
- **Breaking.** Everything Pump: `src/pump/`, the `pump` namespace, the `./pump` export,
|
|
150
|
+
`getPumpCreateInstruction`, `resolvePumpQuote`, `fetchPumpSupportedQuoteMints`,
|
|
151
|
+
`assertPumpQuoteSupported`, `venueBuyInstruction`, `venueSellInstruction`, and every `PUMP_*`,
|
|
152
|
+
`AMM_*` and `MAYHEM_*` constant.
|
|
153
|
+
- **Breaking.** `packFee`, `maxTotalQuoteDebitFor`, `share`, `shareCeil`, `PROTOCOL_FEE_BPS`,
|
|
154
|
+
`PROTOCOL_FEE_COLLECTOR`, `MAX_FEE_BPS`, `TOKEN_2022_PROGRAM_ADDRESS` and `DEVNET_USDC_MINT`.
|
|
155
|
+
Gabox charges no fee, and WSOL is the only quote.
|
|
156
|
+
- The `@pump-fun/pump-sdk`, `@pump-fun/pump-swap-sdk`, `@solana/spl-token`, `bn.js` and `buffer`
|
|
157
|
+
dependencies. `@solana/web3.js` moved to a development dependency; only the lookup-table script
|
|
158
|
+
uses it. The public surface is `@solana/kit` and nothing else.
|
|
159
|
+
|
|
160
|
+
## [0.5.0] - 2026-09-17
|
|
161
|
+
|
|
162
|
+
Program commit `e1666f8`: referrals removed. The IDL changed, so this is a minor bump. 0.4.x buys
|
|
163
|
+
fail against this build.
|
|
164
|
+
|
|
165
|
+
### Removed
|
|
166
|
+
|
|
167
|
+
- **Breaking.** `bindReferrer`, `fetchReferralLink`, `listReferralLinks`, `linkAddress`,
|
|
168
|
+
`findLinkPda`, `splitPackFee`, `shareFloor`, `REFERRAL_FEE_BPS`, the `ReferralBound` event and
|
|
169
|
+
`BuyPackInput.referralLink`. `buyPack` no longer passes a link or a referrer destination.
|
|
170
|
+
- `PackBought.referrer`, `referralFee*` and `collectorFee*`; the pack fee is reported as
|
|
171
|
+
`protocolFeeQuote` / `protocolFeeNative` again.
|
|
172
|
+
|
|
173
|
+
### Unchanged
|
|
174
|
+
|
|
175
|
+
- The 70 bps Gabox pack fee (`PROTOCOL_FEE_BPS`, `packFee`, `maxTotalQuoteDebitFor`,
|
|
176
|
+
`PackOffer.packFeeQuote`) stays and goes to `PROTOCOL_FEE_COLLECTOR` in full.
|
|
177
|
+
|
|
178
|
+
## [0.4.0] - 2026-09-15
|
|
179
|
+
|
|
180
|
+
Program commit `3605925`: the 70 bps Gabox pack fee and instant referral payouts. The IDL changed,
|
|
181
|
+
so this is a minor bump. `buyPack` transactions built with 0.3.x no longer pass the program.
|
|
182
|
+
|
|
183
|
+
### Added
|
|
184
|
+
|
|
185
|
+
- `bindReferrer(client, { referee, referrer })`: bind a wallet to a referrer once, in a permanent
|
|
186
|
+
`ReferralLink` PDA (`linkAddress(wallet)`, `findLinkPda`). `fetchReferralLink(client, wallet)`
|
|
187
|
+
and `listReferralLinks(client, referrer)` read the links. `ReferralBound` event.
|
|
188
|
+
- `PROTOCOL_FEE_BPS` (70) and `REFERRAL_FEE_BPS` (50); `packFee`, `splitPackFee`, `shareFloor`
|
|
189
|
+
and `maxTotalQuoteDebitFor` in the math module; `PackOffer.packFeeQuote`.
|
|
190
|
+
- `PackBought` carries `collectorFeeQuote`, `collectorFeeNative`, `referrer`, `referralFeeQuote`
|
|
191
|
+
and `referralFeeNative`. Collector plus referral is the whole pack fee.
|
|
192
|
+
|
|
193
|
+
### Changed
|
|
194
|
+
|
|
195
|
+
- **Breaking.** `buy_pack` charges a 70 bps Gabox pack fee again, on top of the creator fee, in
|
|
196
|
+
the pool's quote asset. `maxTotalQuoteDebit` must cover it; build it with
|
|
197
|
+
`maxTotalQuoteDebitFor(maxQuoteIn, feeBps)`. A referral splits the fee (50 bps to the referrer,
|
|
198
|
+
20 to the collector); it never changes the total.
|
|
199
|
+
- **Breaking.** `buyPack` passes the collector's quote destination again, the buyer's
|
|
200
|
+
`ReferralLink` PDA on every buy (the program reads it and enforces the referral), and the
|
|
201
|
+
referrer's destination when the link exists. It fetches the link itself; `referralLink: null`
|
|
202
|
+
skips the lookup. It uses the sync generated instruction so nothing is derived behind its back.
|
|
203
|
+
- `sellTokens` still charges nothing.
|
|
204
|
+
|
|
205
|
+
## [0.3.2] - 2026-09-14
|
|
206
|
+
|
|
207
|
+
### Fixed
|
|
208
|
+
|
|
209
|
+
- `decodeBondingCurve` reports `WSOL_MINT` for a curve that quotes in plain SOL. Pump stores an
|
|
210
|
+
all-zero key there, and its own SDK treats that value as SOL. Before this fix `resolveVenue`
|
|
211
|
+
compared the pool's WSOL quote against the zero key and threw
|
|
212
|
+
`pool quote So1111… does not match Pump curve quote 1111…` for every SOL machine once its curve
|
|
213
|
+
existed. That broke indexing and pack buys for those machines.
|
|
214
|
+
|
|
215
|
+
## [0.3.1] - 2026-09-14
|
|
216
|
+
|
|
217
|
+
### Fixed
|
|
218
|
+
|
|
219
|
+
- The shared devnet lookup table now holds the fixed accounts of a token-quoted machine: the
|
|
220
|
+
USDC mint, Pump's quote-control PDA, the protocol creator vault, and the USDC and WSOL ATAs of
|
|
221
|
+
that vault and of every Pump fee recipient. A USDC create was 1,243 bytes or more and failed in
|
|
222
|
+
`buildMessage`; it is now about 120 bytes smaller. The table grew from 74 to 103 addresses.
|
|
223
|
+
Existing indices did not move.
|
|
224
|
+
- `scripts/deploy-lookup-table.ts` extends the live table instead of creating a new one each run,
|
|
225
|
+
and `--dry-run` prints the plan.
|
|
226
|
+
|
|
227
|
+
## [0.3.0] - 2026-09-14
|
|
228
|
+
|
|
229
|
+
### Breaking
|
|
230
|
+
|
|
231
|
+
- Replaced the legacy ABI surface with Gabox-only builders, accounts, events, and generated
|
|
232
|
+
codecs. Legacy pools, markets, referrals, claims, and prize-sale helpers are not supported.
|
|
233
|
+
- `createMachine` now resolves a Pump quote mint, its owning token program, and QuoteControl
|
|
234
|
+
admission from live Pump state. Callers provide only `{ kind: 'sol' }` or `{ kind: 'token', mint }`.
|
|
235
|
+
- Pack buys use separate quote and native debit caps; fee previews now use the program's ceiling
|
|
236
|
+
rounding so `maxTotalQuoteDebit` can safely be built from an offer.
|
|
237
|
+
- The program crate and module are renamed `gabox-v2`/`gabox_v2` -> `gabox`. The program id is
|
|
238
|
+
unchanged. The IDL snapshot moved from `idl/gabox_v2.json` to `idl/gabox.json`.
|
|
239
|
+
- Every generated `V2`-suffixed name lost the suffix: instructions (`initializePoolV2` ->
|
|
240
|
+
`initializePool`, `buyPackV2` -> `buyPack`, `sellTokensV2` -> `sellTokens`), events
|
|
241
|
+
(`PoolCreatedV2` -> `PoolCreated`, `PackBoughtV2` -> `PackBought`, `TokensSoldV2` -> `TokensSold`),
|
|
242
|
+
and their decoders, discriminators, and input types. The error `CoinNotCreatedHere` is now
|
|
243
|
+
`InvalidPumpCreate`.
|
|
244
|
+
- Holder rewards are gone. `initialize_pool` no longer takes an `expectedHolderReward` argument,
|
|
245
|
+
`createMachine`/`getPumpCreateInstruction` no longer take a `holderReward` option, and Gabox's
|
|
246
|
+
Pump `create_v2` builder always sends the standard launch: no trailing holder-reward flag set to
|
|
247
|
+
`true`. The program itself now refuses a `create_v2` with that flag on.
|
|
248
|
+
- The `Pool` account dropped `holderReward`, `seedTokens`, `seedNativeDebit`, and
|
|
249
|
+
`nativeOnPumpCurve`. A pool's curve settles natively in SOL exactly when `pool.quoteMint` equals
|
|
250
|
+
`WSOL_MINT`; there is no separate stored flag any more. `PackOffer.seedTokens` is now derived
|
|
251
|
+
from the live tier table instead of read from the account, and `PackOffer.seedNativeDebit` is
|
|
252
|
+
removed (the account no longer stores it). The `PoolCreated` event still carries `seedTokens` and
|
|
253
|
+
`seedNativeDebit` as a one-time creation record, but lost `holderReward`.
|
|
254
|
+
- Pool account size changed to match the smaller layout. `check:program` and `codegen` read the
|
|
255
|
+
IDL at its new path automatically.
|
|
256
|
+
- `Pool` and `Draw` now use fixed custom discriminators instead of Anchor's default
|
|
257
|
+
name-derived ones, so an account from the previous, shorter layout fails a discriminator check
|
|
258
|
+
instead of being decoded with its fields shifted into the wrong meaning. `fetchPoolByMint`,
|
|
259
|
+
`fetchDraw`, `listPools`, and `listDraws` all read the new discriminators from the generated
|
|
260
|
+
client; nothing in the SDK hard-codes the old bytes.
|
|
261
|
+
- Gabox charges no protocol fee any more. `buyPack` only adds the pool creator's own fee on top of
|
|
262
|
+
the venue spend, and `sellTokens` keeps the full venue proceeds for the seller. The `fee_collector`
|
|
263
|
+
and `fee_collector_quote_destination` accounts are gone from both `buyPack` and `sellTokens`, and
|
|
264
|
+
`sellTokens` also lost its `system_program` account; `buyPack`/`sellTokens` callers that built the
|
|
265
|
+
account list by hand must drop them. The `PackBought` and `TokensSold` events lost
|
|
266
|
+
`protocolFeeQuote` and `protocolFeeNative`. `PROTOCOL_FEE_BPS` is removed and `PackOffer` no
|
|
267
|
+
longer has a `protocolFeeQuote` field.
|
|
268
|
+
- `PROTOCOL_FEE_COLLECTOR` no longer collects a fee. It is now the address every Gabox coin's Pump
|
|
269
|
+
`create_v2` names as the coin creator, so Pump's own per-trade creator fee for the coin pays out
|
|
270
|
+
there. `getPumpCreateInstruction` and `createMachine` no longer take a `creator` or
|
|
271
|
+
`creatorFeeBps` option: the creator is always `PROTOCOL_FEE_COLLECTOR` and its Pump creator fee
|
|
272
|
+
bps is always zero.
|
|
273
|
+
- The error `InvalidFeeCollector` is removed, so the numeric codes of `InvalidPumpCreate`,
|
|
274
|
+
`InvalidQuote`, and `InvalidQuoteAccount` (and any later variant) each shifted down by one. Do
|
|
275
|
+
not hard-code the old numbers.
|
|
276
|
+
- The mandatory seed a pool creation buys now has a minimum instead of always matching the top
|
|
277
|
+
tier exactly: it makes a 3x top prize payable on the first pack, or the table's full top prize
|
|
278
|
+
when that pays less than 3x. `math.seedTokens` carries the rule; `MIN_SEED_MULTIPLIER_BPS`
|
|
279
|
+
(`30_000`) is exported. A jackpot above 3x still shows in full once later packs grow the free
|
|
280
|
+
vault; `math::quote` already caps every prize at what the vault holds. A creator adds more seed
|
|
281
|
+
up front through `extraSeedTokens` (below).
|
|
282
|
+
- `validateTiers` now refuses a ticketed tier's `multiplierBps` above `MAX_MULTIPLIER_BPS`
|
|
283
|
+
(`200_000`, 20x) with `InvalidDistribution`. A table's top tier can be at most 20x; seed beyond
|
|
284
|
+
what a 20x prize needs stays in the vault as backup for the draws after a top-tier hit.
|
|
285
|
+
- `initializePool` (the generated instruction and `createMachine`) takes a new last argument,
|
|
286
|
+
`extraSeedTokens: bigint`, so a creator can buy more seed on top of the mandatory amount in the
|
|
287
|
+
same trade. `createMachine`'s `CreateMachineInput` gained the matching optional
|
|
288
|
+
`extraSeedTokens` (default `0n`, must not be negative), and `maxSeedQuoteIn`/`maxSeedNativeDebit`
|
|
289
|
+
now bound `mandatory + extraSeedTokens` together. `seedCostEstimate` takes the same option and
|
|
290
|
+
now returns `seedTokens` (mandatory), `extraSeedTokens`, and `totalSeedTokens` as separate
|
|
291
|
+
fields, instead of one combined `seedTokens`. `PoolCreated` gained `extraSeedTokens`, right after
|
|
292
|
+
`seedTokens`.
|
|
293
|
+
- `buyPack` (the generated instruction) takes a new writable account, `activity`, right after
|
|
294
|
+
`draw`: the buyer's `WalletActivity` PDA, `init_if_needed`. The generated async builder resolves
|
|
295
|
+
it itself from `purchaser`, so `buyPack` needed no change and existing callers are unaffected.
|
|
296
|
+
The new error `WalletActivityMismatch` is appended after `InvalidQuoteAccount`, so later error
|
|
297
|
+
codes each shifted down by one; do not hard-code the old numbers.
|
|
298
|
+
|
|
299
|
+
### Added
|
|
300
|
+
|
|
301
|
+
- SOL, Pump-supported token quote, custom QuoteControl quote, and quote-aware seed estimation
|
|
302
|
+
support. The new estimate returns quote base units and resolved quote metadata.
|
|
303
|
+
- Exact Pump and PumpSwap account routing, including quote-aware canonical PumpSwap PDAs.
|
|
304
|
+
- `WalletActivity`: a per-wallet account tracking lifetime `packsBought` and `nativeSpent`
|
|
305
|
+
(SOL-quoted pools only). Read it with `fetchWalletActivity(client, wallet)` (`null` before a
|
|
306
|
+
wallet's first purchase) or `fetchMaybeWalletActivity`/`decodeWalletActivity` from `generated`.
|
|
307
|
+
Its PDA is `findActivityPda({ purchaser })`, also exported as `activityAddress(wallet)`.
|
|
308
|
+
|
|
309
|
+
### Security
|
|
310
|
+
|
|
311
|
+
- Pool inventory and reservations now use one RPC snapshot, quote admission cannot be supplied by
|
|
312
|
+
Jupiter metadata, and resolved-draw events are bound to the queried draw PDA.
|
|
313
|
+
- Pump SDK dependencies are exact-pinned because their PDA, decoder, and fee-math behavior is in
|
|
314
|
+
the transaction trust boundary.
|
|
315
|
+
|
|
6
316
|
## [0.2.0] - 2026-09-13
|
|
7
317
|
|
|
8
318
|
### Breaking
|