@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/dist/generated/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { combineCodec, containsBytes, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder,
|
|
2
|
+
import { $ as getDeliverDrawInstructionAsync, $t as getPrizeDecoder, A as getInitializePoolInstructionDataCodec, At as fetchAllPool, B as getFundPrizesInstructionDataEncoder, Bt as fetchAllDraw, C as getRetryDrawInstructionDataDecoder, Ct as getWalletActivityDecoder, D as getInitializePoolDiscriminatorBytes, Dt as POOL_DISCRIMINATOR, E as INITIALIZE_POOL_DISCRIMINATOR, Et as getWalletActivitySize, F as getFundPrizesDiscriminatorBytes, Ft as getPoolDiscriminatorBytes, G as getExpireDrawInstructionAsync, Gt as getDrawDecoder, H as EXPIRE_DRAW_DISCRIMINATOR, Ht as fetchDraw, I as getFundPrizesInstruction, It as getPoolEncoder, J as getExpireDrawInstructionDataEncoder, Jt as getDrawSize, K as getExpireDrawInstructionDataCodec, Kt as getDrawDiscriminatorBytes, L as getFundPrizesInstructionAsync, Lt as getPoolSize, M as getInitializePoolInstructionDataEncoder, Mt as fetchPool, N as parseInitializePoolInstruction, Nt as getPoolCodec, O as getInitializePoolInstruction, Ot as decodePool, P as FUND_PRIZES_DISCRIMINATOR, Pt as getPoolDecoder, Q as getDeliverDrawInstruction, Qt as getPrizeCodec, R as getFundPrizesInstructionDataCodec, Rt as DRAW_DISCRIMINATOR, S as getRetryDrawInstructionDataCodec, St as getWalletActivityCodec, T as parseRetryDrawInstruction, Tt as getWalletActivityEncoder, U as getExpireDrawDiscriminatorBytes, Ut as fetchMaybeDraw, V as parseFundPrizesInstruction, Vt as fetchAllMaybeDraw, W as getExpireDrawInstruction, Wt as getDrawCodec, X as DELIVER_DRAW_DISCRIMINATOR, Xt as getTierDecoder, Y as parseExpireDrawInstruction, Yt as getTierCodec, Z as getDeliverDrawDiscriminatorBytes, Zt as getTierEncoder, _ as parseSellTokensInstruction, _t as decodeWalletActivity, a as gaboxProgram, at as getBuyPackDiscriminatorBytes, b as getRetryDrawInstruction, bt as fetchMaybeWalletActivity, c as identifyGaboxInstruction, ct as getBuyPackInstructionDataCodec, d as getSellTokensDiscriminatorBytes, dt as parseBuyPackInstruction, en as getPrizeEncoder, et as getDeliverDrawInstructionDataCodec, f as getSellTokensInstruction, ft as findPoolPda, g as getSellTokensInstructionDataEncoder, gt as WALLET_ACTIVITY_DISCRIMINATOR, h as getSellTokensInstructionDataDecoder, ht as findActivityPda, i as GaboxInstruction, it as BUY_PACK_DISCRIMINATOR, j as getInitializePoolInstructionDataDecoder, jt as fetchMaybePool, k as getInitializePoolInstructionAsync, kt as fetchAllMaybePool, l as parseGaboxInstruction, lt as getBuyPackInstructionDataDecoder, m as getSellTokensInstructionDataCodec, mt as findDrawPda, n as GaboxAccount, nt as getDeliverDrawInstructionDataEncoder, o as identifyGaboxAccount, ot as getBuyPackInstruction, p as getSellTokensInstructionAsync, pt as findIdentityPda, q as getExpireDrawInstructionDataDecoder, qt as getDrawEncoder, r as GaboxEvent, rt as parseDeliverDrawInstruction, s as identifyGaboxEvent, st as getBuyPackInstructionAsync, t as GABOX_PROGRAM_ADDRESS, tt as getDeliverDrawInstructionDataDecoder, u as SELL_TOKENS_DISCRIMINATOR, ut as getBuyPackInstructionDataEncoder, v as RETRY_DRAW_DISCRIMINATOR, vt as fetchAllMaybeWalletActivity, w as getRetryDrawInstructionDataEncoder, wt as getWalletActivityDiscriminatorBytes, x as getRetryDrawInstructionAsync, xt as fetchWalletActivity, y as getRetryDrawDiscriminatorBytes, yt as fetchAllWalletActivity, z as getFundPrizesInstructionDataDecoder, zt as decodeDraw } from "../gabox-DGTCh34U.js";
|
|
3
|
+
import { combineCodec, containsBytes, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, isProgramError } from "@solana/kit";
|
|
4
4
|
//#region src/generated/events/drawResolved.ts
|
|
5
5
|
/**
|
|
6
6
|
* This code was AUTOGENERATED using the Codama library.
|
|
@@ -82,12 +82,12 @@ function getPackBoughtEventEncoder() {
|
|
|
82
82
|
["seq", getU64Encoder()],
|
|
83
83
|
["purchaser", getAddressEncoder()],
|
|
84
84
|
["venue", getAddressEncoder()],
|
|
85
|
+
["quoteMint", getAddressEncoder()],
|
|
85
86
|
["tokensBought", getU64Encoder()],
|
|
86
|
-
["
|
|
87
|
-
["
|
|
88
|
-
["
|
|
89
|
-
["
|
|
90
|
-
["vrfDebit", getU64Encoder()],
|
|
87
|
+
["quoteDebit", getU64Encoder()],
|
|
88
|
+
["nativeDebit", getU64Encoder()],
|
|
89
|
+
["vrfNativeDebit", getU64Encoder()],
|
|
90
|
+
["totalNativeDebit", getU64Encoder()],
|
|
91
91
|
["prizes", getArrayEncoder(getPrizeEncoder(), { size: 8 })]
|
|
92
92
|
]), [getConstantEncoder(PACK_BOUGHT_EVENT_DISCRIMINATOR)]);
|
|
93
93
|
}
|
|
@@ -98,12 +98,12 @@ function getPackBoughtEventDecoder() {
|
|
|
98
98
|
["seq", getU64Decoder()],
|
|
99
99
|
["purchaser", getAddressDecoder()],
|
|
100
100
|
["venue", getAddressDecoder()],
|
|
101
|
+
["quoteMint", getAddressDecoder()],
|
|
101
102
|
["tokensBought", getU64Decoder()],
|
|
102
|
-
["
|
|
103
|
-
["
|
|
104
|
-
["
|
|
105
|
-
["
|
|
106
|
-
["vrfDebit", getU64Decoder()],
|
|
103
|
+
["quoteDebit", getU64Decoder()],
|
|
104
|
+
["nativeDebit", getU64Decoder()],
|
|
105
|
+
["vrfNativeDebit", getU64Decoder()],
|
|
106
|
+
["totalNativeDebit", getU64Decoder()],
|
|
107
107
|
["prizes", getArrayDecoder(getPrizeDecoder(), { size: 8 })]
|
|
108
108
|
]), [getConstantDecoder(PACK_BOUGHT_EVENT_DISCRIMINATOR)]);
|
|
109
109
|
}
|
|
@@ -145,10 +145,12 @@ function getPoolCreatedEventEncoder() {
|
|
|
145
145
|
["mint", getAddressEncoder()],
|
|
146
146
|
["creator", getAddressEncoder()],
|
|
147
147
|
["packTokens", getU64Encoder()],
|
|
148
|
-
["feeBps", getU16Encoder()],
|
|
149
148
|
["tiers", getArrayEncoder(getTierEncoder(), { size: 8 })],
|
|
150
149
|
["seedTokens", getU64Encoder()],
|
|
151
|
-
["
|
|
150
|
+
["extraSeedTokens", getU64Encoder()],
|
|
151
|
+
["quoteMint", getAddressEncoder()],
|
|
152
|
+
["seedQuoteAmount", getU64Encoder()],
|
|
153
|
+
["seedNativeDebit", getU64Encoder()]
|
|
152
154
|
]), [getConstantEncoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);
|
|
153
155
|
}
|
|
154
156
|
/** Gets the decoder for {@link PoolCreatedEvent} event data. */
|
|
@@ -158,10 +160,12 @@ function getPoolCreatedEventDecoder() {
|
|
|
158
160
|
["mint", getAddressDecoder()],
|
|
159
161
|
["creator", getAddressDecoder()],
|
|
160
162
|
["packTokens", getU64Decoder()],
|
|
161
|
-
["feeBps", getU16Decoder()],
|
|
162
163
|
["tiers", getArrayDecoder(getTierDecoder(), { size: 8 })],
|
|
163
164
|
["seedTokens", getU64Decoder()],
|
|
164
|
-
["
|
|
165
|
+
["extraSeedTokens", getU64Decoder()],
|
|
166
|
+
["quoteMint", getAddressDecoder()],
|
|
167
|
+
["seedQuoteAmount", getU64Decoder()],
|
|
168
|
+
["seedNativeDebit", getU64Decoder()]
|
|
165
169
|
]), [getConstantDecoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);
|
|
166
170
|
}
|
|
167
171
|
/** Gets the codec for {@link PoolCreatedEvent} event data. */
|
|
@@ -174,57 +178,6 @@ function parsePoolCreatedEvent(data) {
|
|
|
174
178
|
throw new Error("The provided data does not match the \"PoolCreatedEvent\" event discriminators.");
|
|
175
179
|
}
|
|
176
180
|
//#endregion
|
|
177
|
-
//#region src/generated/events/prizeRedeemed.ts
|
|
178
|
-
/**
|
|
179
|
-
* This code was AUTOGENERATED using the Codama library.
|
|
180
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
181
|
-
* to add features, then rerun Codama to update it.
|
|
182
|
-
*
|
|
183
|
-
* @see https://github.com/codama-idl/codama
|
|
184
|
-
*/
|
|
185
|
-
const PRIZE_REDEEMED_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
186
|
-
243,
|
|
187
|
-
193,
|
|
188
|
-
245,
|
|
189
|
-
166,
|
|
190
|
-
160,
|
|
191
|
-
101,
|
|
192
|
-
182,
|
|
193
|
-
207
|
|
194
|
-
]);
|
|
195
|
-
function getPrizeRedeemedEventDiscriminatorBytes() {
|
|
196
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(PRIZE_REDEEMED_EVENT_DISCRIMINATOR);
|
|
197
|
-
}
|
|
198
|
-
/** Gets the encoder for {@link PrizeRedeemedEventArgs} event data. */
|
|
199
|
-
function getPrizeRedeemedEventEncoder() {
|
|
200
|
-
return getHiddenPrefixEncoder(getStructEncoder([
|
|
201
|
-
["pool", getAddressEncoder()],
|
|
202
|
-
["seq", getU64Encoder()],
|
|
203
|
-
["purchaser", getAddressEncoder()],
|
|
204
|
-
["amount", getU64Encoder()],
|
|
205
|
-
["sold", getBooleanEncoder()]
|
|
206
|
-
]), [getConstantEncoder(PRIZE_REDEEMED_EVENT_DISCRIMINATOR)]);
|
|
207
|
-
}
|
|
208
|
-
/** Gets the decoder for {@link PrizeRedeemedEvent} event data. */
|
|
209
|
-
function getPrizeRedeemedEventDecoder() {
|
|
210
|
-
return getHiddenPrefixDecoder(getStructDecoder([
|
|
211
|
-
["pool", getAddressDecoder()],
|
|
212
|
-
["seq", getU64Decoder()],
|
|
213
|
-
["purchaser", getAddressDecoder()],
|
|
214
|
-
["amount", getU64Decoder()],
|
|
215
|
-
["sold", getBooleanDecoder()]
|
|
216
|
-
]), [getConstantDecoder(PRIZE_REDEEMED_EVENT_DISCRIMINATOR)]);
|
|
217
|
-
}
|
|
218
|
-
/** Gets the codec for {@link PrizeRedeemedEvent} event data. */
|
|
219
|
-
function getPrizeRedeemedEventCodec() {
|
|
220
|
-
return combineCodec(getPrizeRedeemedEventEncoder(), getPrizeRedeemedEventDecoder());
|
|
221
|
-
}
|
|
222
|
-
/** Parses the provided bytes into {@link PrizeRedeemedEvent} event data. */
|
|
223
|
-
function parsePrizeRedeemedEvent(data) {
|
|
224
|
-
if (containsBytes(data, PRIZE_REDEEMED_EVENT_DISCRIMINATOR, 0)) return getPrizeRedeemedEventDecoder().decode(data);
|
|
225
|
-
throw new Error("The provided data does not match the \"PrizeRedeemedEvent\" event discriminators.");
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
181
|
//#region src/generated/events/prizesFunded.ts
|
|
229
182
|
/**
|
|
230
183
|
* This code was AUTOGENERATED using the Codama library.
|
|
@@ -346,9 +299,10 @@ function getTokensSoldEventEncoder() {
|
|
|
346
299
|
["pool", getAddressEncoder()],
|
|
347
300
|
["seller", getAddressEncoder()],
|
|
348
301
|
["venue", getAddressEncoder()],
|
|
302
|
+
["quoteMint", getAddressEncoder()],
|
|
349
303
|
["amount", getU64Encoder()],
|
|
350
|
-
["
|
|
351
|
-
["
|
|
304
|
+
["quoteProceeds", getU64Encoder()],
|
|
305
|
+
["nativeDebit", getU64Encoder()]
|
|
352
306
|
]), [getConstantEncoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);
|
|
353
307
|
}
|
|
354
308
|
/** Gets the decoder for {@link TokensSoldEvent} event data. */
|
|
@@ -357,9 +311,10 @@ function getTokensSoldEventDecoder() {
|
|
|
357
311
|
["pool", getAddressDecoder()],
|
|
358
312
|
["seller", getAddressDecoder()],
|
|
359
313
|
["venue", getAddressDecoder()],
|
|
314
|
+
["quoteMint", getAddressDecoder()],
|
|
360
315
|
["amount", getU64Decoder()],
|
|
361
|
-
["
|
|
362
|
-
["
|
|
316
|
+
["quoteProceeds", getU64Decoder()],
|
|
317
|
+
["nativeDebit", getU64Decoder()]
|
|
363
318
|
]), [getConstantDecoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);
|
|
364
319
|
}
|
|
365
320
|
/** Gets the codec for {@link TokensSoldEvent} event data. */
|
|
@@ -372,7 +327,7 @@ function parseTokensSoldEvent(data) {
|
|
|
372
327
|
throw new Error("The provided data does not match the \"TokensSoldEvent\" event discriminators.");
|
|
373
328
|
}
|
|
374
329
|
//#endregion
|
|
375
|
-
//#region src/generated/errors/
|
|
330
|
+
//#region src/generated/errors/gabox.ts
|
|
376
331
|
/**
|
|
377
332
|
* This code was AUTOGENERATED using the Codama library.
|
|
378
333
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -381,274 +336,136 @@ function parseTokensSoldEvent(data) {
|
|
|
381
336
|
* @see https://github.com/codama-idl/codama
|
|
382
337
|
*/
|
|
383
338
|
/** Arithmetic: Arithmetic overflow or inconsistent accounting */
|
|
384
|
-
const
|
|
339
|
+
const GABOX_ERROR__ARITHMETIC = 6e3;
|
|
385
340
|
/** InvalidDistribution: Invalid prize distribution */
|
|
386
|
-
const
|
|
341
|
+
const GABOX_ERROR__INVALID_DISTRIBUTION = 6001;
|
|
387
342
|
/** UnfundedExpectation: Expected token award exceeds tokens purchased */
|
|
388
|
-
const
|
|
389
|
-
/** UnsupportedMint: Mint must have no mint
|
|
390
|
-
const
|
|
343
|
+
const GABOX_ERROR__UNFUNDED_EXPECTATION = 6002;
|
|
344
|
+
/** UnsupportedMint: Mint must have 6 decimals and no mint or freeze authority */
|
|
345
|
+
const GABOX_ERROR__UNSUPPORTED_MINT = 6003;
|
|
391
346
|
/** InsolventInventory: Prize inventory does not cover reservations */
|
|
392
|
-
const
|
|
347
|
+
const GABOX_ERROR__INSOLVENT_INVENTORY = 6004;
|
|
393
348
|
/** PrizeCapChanged: Top prize is below the signed minimum; refresh the offer */
|
|
394
|
-
const
|
|
349
|
+
const GABOX_ERROR__PRIZE_CAP_CHANGED = 6005;
|
|
395
350
|
/** PackTooSmall: A pack pays zero tokens on some tier */
|
|
396
|
-
const
|
|
351
|
+
const GABOX_ERROR__PACK_TOO_SMALL = 6006;
|
|
397
352
|
/** JackpotBelowOnePack: The largest tier must pay at least one pack */
|
|
398
|
-
const
|
|
353
|
+
const GABOX_ERROR__JACKPOT_BELOW_ONE_PACK = 6007;
|
|
399
354
|
/** InvalidVenue: Incorrect trade program, account order, or token binding */
|
|
400
|
-
const
|
|
355
|
+
const GABOX_ERROR__INVALID_VENUE = 6008;
|
|
401
356
|
/** IncorrectTokenDelta: Trade did not move the exact token amount */
|
|
402
|
-
const
|
|
357
|
+
const GABOX_ERROR__INCORRECT_TOKEN_DELTA = 6009;
|
|
403
358
|
/** SlippageExceeded: Spend exceeds the signed limit */
|
|
404
|
-
const
|
|
405
|
-
/** NotPending: Draw is not awaiting randomness */
|
|
406
|
-
const GABOX_V2_ERROR__NOT_PENDING = 6011;
|
|
407
|
-
/** NotReady: Draw has not resolved */
|
|
408
|
-
const GABOX_V2_ERROR__NOT_READY = 6012;
|
|
359
|
+
const GABOX_ERROR__SLIPPAGE_EXCEEDED = 6010;
|
|
409
360
|
/** RetryTooSoon: Retry interval has not elapsed */
|
|
410
|
-
const
|
|
361
|
+
const GABOX_ERROR__RETRY_TOO_SOON = 6011;
|
|
411
362
|
/** RetryUnavailable: Retry limit reached or draw expired */
|
|
412
|
-
const
|
|
363
|
+
const GABOX_ERROR__RETRY_UNAVAILABLE = 6012;
|
|
413
364
|
/** NotExpired: Oracle timeout has not elapsed */
|
|
414
|
-
const
|
|
365
|
+
const GABOX_ERROR__NOT_EXPIRED = 6013;
|
|
415
366
|
/** ZeroAmount: Amount must be positive */
|
|
416
|
-
const
|
|
417
|
-
/**
|
|
418
|
-
const
|
|
419
|
-
/**
|
|
420
|
-
const
|
|
421
|
-
/**
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
[
|
|
430
|
-
[
|
|
431
|
-
[
|
|
432
|
-
[
|
|
433
|
-
[
|
|
434
|
-
[
|
|
435
|
-
[
|
|
436
|
-
[
|
|
437
|
-
[
|
|
438
|
-
[
|
|
439
|
-
[
|
|
440
|
-
[
|
|
441
|
-
[
|
|
442
|
-
[
|
|
443
|
-
[GABOX_V2_ERROR__PACK_TOO_SMALL]: `A pack pays zero tokens on some tier`,
|
|
444
|
-
[GABOX_V2_ERROR__PRIZE_CAP_CHANGED]: `Top prize is below the signed minimum; refresh the offer`,
|
|
445
|
-
[GABOX_V2_ERROR__RETRY_TOO_SOON]: `Retry interval has not elapsed`,
|
|
446
|
-
[GABOX_V2_ERROR__RETRY_UNAVAILABLE]: `Retry limit reached or draw expired`,
|
|
447
|
-
[GABOX_V2_ERROR__SLIPPAGE_EXCEEDED]: `Spend exceeds the signed limit`,
|
|
448
|
-
[GABOX_V2_ERROR__UNFUNDED_EXPECTATION]: `Expected token award exceeds tokens purchased`,
|
|
449
|
-
[GABOX_V2_ERROR__UNSUPPORTED_MINT]: `Mint must have no mint/freeze authority and only supported extensions`,
|
|
450
|
-
[GABOX_V2_ERROR__ZERO_AMOUNT]: `Amount must be positive`
|
|
367
|
+
const GABOX_ERROR__ZERO_AMOUNT = 6014;
|
|
368
|
+
/** InvalidLaunch: LaunchLab create instruction is malformed or missing before this instruction */
|
|
369
|
+
const GABOX_ERROR__INVALID_LAUNCH = 6015;
|
|
370
|
+
/** InvalidQuote: Quote mint or quote token program is unsupported */
|
|
371
|
+
const GABOX_ERROR__INVALID_QUOTE = 6016;
|
|
372
|
+
/** WalletActivityMismatch: Wallet activity account belongs to a different wallet */
|
|
373
|
+
const GABOX_ERROR__WALLET_ACTIVITY_MISMATCH = 6017;
|
|
374
|
+
let gaboxErrorMessages;
|
|
375
|
+
if (process.env["NODE_ENV"] !== "production") gaboxErrorMessages = {
|
|
376
|
+
[GABOX_ERROR__ARITHMETIC]: `Arithmetic overflow or inconsistent accounting`,
|
|
377
|
+
[GABOX_ERROR__INCORRECT_TOKEN_DELTA]: `Trade did not move the exact token amount`,
|
|
378
|
+
[GABOX_ERROR__INSOLVENT_INVENTORY]: `Prize inventory does not cover reservations`,
|
|
379
|
+
[GABOX_ERROR__INVALID_DISTRIBUTION]: `Invalid prize distribution`,
|
|
380
|
+
[GABOX_ERROR__INVALID_LAUNCH]: `LaunchLab create instruction is malformed or missing before this instruction`,
|
|
381
|
+
[GABOX_ERROR__INVALID_QUOTE]: `Quote mint or quote token program is unsupported`,
|
|
382
|
+
[GABOX_ERROR__INVALID_VENUE]: `Incorrect trade program, account order, or token binding`,
|
|
383
|
+
[GABOX_ERROR__JACKPOT_BELOW_ONE_PACK]: `The largest tier must pay at least one pack`,
|
|
384
|
+
[GABOX_ERROR__NOT_EXPIRED]: `Oracle timeout has not elapsed`,
|
|
385
|
+
[GABOX_ERROR__PACK_TOO_SMALL]: `A pack pays zero tokens on some tier`,
|
|
386
|
+
[GABOX_ERROR__PRIZE_CAP_CHANGED]: `Top prize is below the signed minimum; refresh the offer`,
|
|
387
|
+
[GABOX_ERROR__RETRY_TOO_SOON]: `Retry interval has not elapsed`,
|
|
388
|
+
[GABOX_ERROR__RETRY_UNAVAILABLE]: `Retry limit reached or draw expired`,
|
|
389
|
+
[GABOX_ERROR__SLIPPAGE_EXCEEDED]: `Spend exceeds the signed limit`,
|
|
390
|
+
[GABOX_ERROR__UNFUNDED_EXPECTATION]: `Expected token award exceeds tokens purchased`,
|
|
391
|
+
[GABOX_ERROR__UNSUPPORTED_MINT]: `Mint must have 6 decimals and no mint or freeze authority`,
|
|
392
|
+
[GABOX_ERROR__WALLET_ACTIVITY_MISMATCH]: `Wallet activity account belongs to a different wallet`,
|
|
393
|
+
[GABOX_ERROR__ZERO_AMOUNT]: `Amount must be positive`
|
|
451
394
|
};
|
|
452
|
-
function
|
|
453
|
-
if (process.env["NODE_ENV"] !== "production") return
|
|
395
|
+
function getGaboxErrorMessage(code) {
|
|
396
|
+
if (process.env["NODE_ENV"] !== "production") return gaboxErrorMessages[code];
|
|
454
397
|
return "Error message not available in production bundles.";
|
|
455
398
|
}
|
|
456
|
-
function
|
|
457
|
-
return isProgramError(error, transactionMessage,
|
|
458
|
-
}
|
|
459
|
-
//#endregion
|
|
460
|
-
//#region src/generated/events/referralBound.ts
|
|
461
|
-
/**
|
|
462
|
-
* This code was AUTOGENERATED using the Codama library.
|
|
463
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
464
|
-
* to add features, then rerun Codama to update it.
|
|
465
|
-
*
|
|
466
|
-
* @see https://github.com/codama-idl/codama
|
|
467
|
-
*/
|
|
468
|
-
const REFERRAL_BOUND_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
469
|
-
12,
|
|
470
|
-
28,
|
|
471
|
-
152,
|
|
472
|
-
148,
|
|
473
|
-
55,
|
|
474
|
-
210,
|
|
475
|
-
102,
|
|
476
|
-
190
|
|
477
|
-
]);
|
|
478
|
-
function getReferralBoundEventDiscriminatorBytes() {
|
|
479
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(REFERRAL_BOUND_EVENT_DISCRIMINATOR);
|
|
480
|
-
}
|
|
481
|
-
/** Gets the encoder for {@link ReferralBoundEventArgs} event data. */
|
|
482
|
-
function getReferralBoundEventEncoder() {
|
|
483
|
-
return getHiddenPrefixEncoder(getStructEncoder([["referee", getAddressEncoder()], ["referrer", getAddressEncoder()]]), [getConstantEncoder(REFERRAL_BOUND_EVENT_DISCRIMINATOR)]);
|
|
484
|
-
}
|
|
485
|
-
/** Gets the decoder for {@link ReferralBoundEvent} event data. */
|
|
486
|
-
function getReferralBoundEventDecoder() {
|
|
487
|
-
return getHiddenPrefixDecoder(getStructDecoder([["referee", getAddressDecoder()], ["referrer", getAddressDecoder()]]), [getConstantDecoder(REFERRAL_BOUND_EVENT_DISCRIMINATOR)]);
|
|
488
|
-
}
|
|
489
|
-
/** Gets the codec for {@link ReferralBoundEvent} event data. */
|
|
490
|
-
function getReferralBoundEventCodec() {
|
|
491
|
-
return combineCodec(getReferralBoundEventEncoder(), getReferralBoundEventDecoder());
|
|
492
|
-
}
|
|
493
|
-
/** Parses the provided bytes into {@link ReferralBoundEvent} event data. */
|
|
494
|
-
function parseReferralBoundEvent(data) {
|
|
495
|
-
if (containsBytes(data, REFERRAL_BOUND_EVENT_DISCRIMINATOR, 0)) return getReferralBoundEventDecoder().decode(data);
|
|
496
|
-
throw new Error("The provided data does not match the \"ReferralBoundEvent\" event discriminators.");
|
|
497
|
-
}
|
|
498
|
-
//#endregion
|
|
499
|
-
//#region src/generated/events/referralClaimed.ts
|
|
500
|
-
/**
|
|
501
|
-
* This code was AUTOGENERATED using the Codama library.
|
|
502
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
503
|
-
* to add features, then rerun Codama to update it.
|
|
504
|
-
*
|
|
505
|
-
* @see https://github.com/codama-idl/codama
|
|
506
|
-
*/
|
|
507
|
-
const REFERRAL_CLAIMED_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
508
|
-
195,
|
|
509
|
-
109,
|
|
510
|
-
77,
|
|
511
|
-
196,
|
|
512
|
-
134,
|
|
513
|
-
226,
|
|
514
|
-
78,
|
|
515
|
-
108
|
|
516
|
-
]);
|
|
517
|
-
function getReferralClaimedEventDiscriminatorBytes() {
|
|
518
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(REFERRAL_CLAIMED_EVENT_DISCRIMINATOR);
|
|
519
|
-
}
|
|
520
|
-
/** Gets the encoder for {@link ReferralClaimedEventArgs} event data. */
|
|
521
|
-
function getReferralClaimedEventEncoder() {
|
|
522
|
-
return getHiddenPrefixEncoder(getStructEncoder([
|
|
523
|
-
["pool", getAddressEncoder()],
|
|
524
|
-
["referrer", getAddressEncoder()],
|
|
525
|
-
["amount", getU64Encoder()]
|
|
526
|
-
]), [getConstantEncoder(REFERRAL_CLAIMED_EVENT_DISCRIMINATOR)]);
|
|
527
|
-
}
|
|
528
|
-
/** Gets the decoder for {@link ReferralClaimedEvent} event data. */
|
|
529
|
-
function getReferralClaimedEventDecoder() {
|
|
530
|
-
return getHiddenPrefixDecoder(getStructDecoder([
|
|
531
|
-
["pool", getAddressDecoder()],
|
|
532
|
-
["referrer", getAddressDecoder()],
|
|
533
|
-
["amount", getU64Decoder()]
|
|
534
|
-
]), [getConstantDecoder(REFERRAL_CLAIMED_EVENT_DISCRIMINATOR)]);
|
|
535
|
-
}
|
|
536
|
-
/** Gets the codec for {@link ReferralClaimedEvent} event data. */
|
|
537
|
-
function getReferralClaimedEventCodec() {
|
|
538
|
-
return combineCodec(getReferralClaimedEventEncoder(), getReferralClaimedEventDecoder());
|
|
539
|
-
}
|
|
540
|
-
/** Parses the provided bytes into {@link ReferralClaimedEvent} event data. */
|
|
541
|
-
function parseReferralClaimedEvent(data) {
|
|
542
|
-
if (containsBytes(data, REFERRAL_CLAIMED_EVENT_DISCRIMINATOR, 0)) return getReferralClaimedEventDecoder().decode(data);
|
|
543
|
-
throw new Error("The provided data does not match the \"ReferralClaimedEvent\" event discriminators.");
|
|
399
|
+
function isGaboxError(error, transactionMessage, code) {
|
|
400
|
+
return isProgramError(error, transactionMessage, GABOX_PROGRAM_ADDRESS, code);
|
|
544
401
|
}
|
|
545
402
|
//#endregion
|
|
546
403
|
//#region src/generated/index.ts
|
|
547
404
|
var generated_exports = /* @__PURE__ */ __exportAll({
|
|
548
|
-
BIND_REFERRER_DISCRIMINATOR: () => BIND_REFERRER_DISCRIMINATOR,
|
|
549
405
|
BUY_PACK_DISCRIMINATOR: () => BUY_PACK_DISCRIMINATOR,
|
|
550
|
-
CLAIM_PRIZE_DISCRIMINATOR: () => CLAIM_PRIZE_DISCRIMINATOR,
|
|
551
|
-
CLAIM_REFERRAL_DISCRIMINATOR: () => CLAIM_REFERRAL_DISCRIMINATOR,
|
|
552
406
|
DELIVER_DRAW_DISCRIMINATOR: () => DELIVER_DRAW_DISCRIMINATOR,
|
|
553
407
|
DRAW_DISCRIMINATOR: () => DRAW_DISCRIMINATOR,
|
|
554
408
|
DRAW_RESOLVED_EVENT_DISCRIMINATOR: () => DRAW_RESOLVED_EVENT_DISCRIMINATOR,
|
|
555
|
-
DrawStatus: () => DrawStatus,
|
|
556
409
|
EXPIRE_DRAW_DISCRIMINATOR: () => EXPIRE_DRAW_DISCRIMINATOR,
|
|
557
|
-
FULFILL_DRAW_DISCRIMINATOR: () => FULFILL_DRAW_DISCRIMINATOR,
|
|
558
410
|
FUND_PRIZES_DISCRIMINATOR: () => FUND_PRIZES_DISCRIMINATOR,
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
GABOX_V2_PROGRAM_ADDRESS: () => GABOX_V2_PROGRAM_ADDRESS,
|
|
582
|
-
GaboxV2Account: () => GaboxV2Account,
|
|
583
|
-
GaboxV2Event: () => GaboxV2Event,
|
|
584
|
-
GaboxV2Instruction: () => GaboxV2Instruction,
|
|
411
|
+
GABOX_ERROR__ARITHMETIC: () => GABOX_ERROR__ARITHMETIC,
|
|
412
|
+
GABOX_ERROR__INCORRECT_TOKEN_DELTA: () => GABOX_ERROR__INCORRECT_TOKEN_DELTA,
|
|
413
|
+
GABOX_ERROR__INSOLVENT_INVENTORY: () => GABOX_ERROR__INSOLVENT_INVENTORY,
|
|
414
|
+
GABOX_ERROR__INVALID_DISTRIBUTION: () => GABOX_ERROR__INVALID_DISTRIBUTION,
|
|
415
|
+
GABOX_ERROR__INVALID_LAUNCH: () => GABOX_ERROR__INVALID_LAUNCH,
|
|
416
|
+
GABOX_ERROR__INVALID_QUOTE: () => GABOX_ERROR__INVALID_QUOTE,
|
|
417
|
+
GABOX_ERROR__INVALID_VENUE: () => GABOX_ERROR__INVALID_VENUE,
|
|
418
|
+
GABOX_ERROR__JACKPOT_BELOW_ONE_PACK: () => GABOX_ERROR__JACKPOT_BELOW_ONE_PACK,
|
|
419
|
+
GABOX_ERROR__NOT_EXPIRED: () => GABOX_ERROR__NOT_EXPIRED,
|
|
420
|
+
GABOX_ERROR__PACK_TOO_SMALL: () => GABOX_ERROR__PACK_TOO_SMALL,
|
|
421
|
+
GABOX_ERROR__PRIZE_CAP_CHANGED: () => GABOX_ERROR__PRIZE_CAP_CHANGED,
|
|
422
|
+
GABOX_ERROR__RETRY_TOO_SOON: () => GABOX_ERROR__RETRY_TOO_SOON,
|
|
423
|
+
GABOX_ERROR__RETRY_UNAVAILABLE: () => GABOX_ERROR__RETRY_UNAVAILABLE,
|
|
424
|
+
GABOX_ERROR__SLIPPAGE_EXCEEDED: () => GABOX_ERROR__SLIPPAGE_EXCEEDED,
|
|
425
|
+
GABOX_ERROR__UNFUNDED_EXPECTATION: () => GABOX_ERROR__UNFUNDED_EXPECTATION,
|
|
426
|
+
GABOX_ERROR__UNSUPPORTED_MINT: () => GABOX_ERROR__UNSUPPORTED_MINT,
|
|
427
|
+
GABOX_ERROR__WALLET_ACTIVITY_MISMATCH: () => GABOX_ERROR__WALLET_ACTIVITY_MISMATCH,
|
|
428
|
+
GABOX_ERROR__ZERO_AMOUNT: () => GABOX_ERROR__ZERO_AMOUNT,
|
|
429
|
+
GABOX_PROGRAM_ADDRESS: () => GABOX_PROGRAM_ADDRESS,
|
|
430
|
+
GaboxAccount: () => GaboxAccount,
|
|
431
|
+
GaboxEvent: () => GaboxEvent,
|
|
432
|
+
GaboxInstruction: () => GaboxInstruction,
|
|
585
433
|
INITIALIZE_POOL_DISCRIMINATOR: () => INITIALIZE_POOL_DISCRIMINATOR,
|
|
586
434
|
PACK_BOUGHT_EVENT_DISCRIMINATOR: () => PACK_BOUGHT_EVENT_DISCRIMINATOR,
|
|
587
435
|
POOL_CREATED_EVENT_DISCRIMINATOR: () => POOL_CREATED_EVENT_DISCRIMINATOR,
|
|
588
436
|
POOL_DISCRIMINATOR: () => POOL_DISCRIMINATOR,
|
|
589
437
|
PRIZES_FUNDED_EVENT_DISCRIMINATOR: () => PRIZES_FUNDED_EVENT_DISCRIMINATOR,
|
|
590
|
-
PRIZE_REDEEMED_EVENT_DISCRIMINATOR: () => PRIZE_REDEEMED_EVENT_DISCRIMINATOR,
|
|
591
438
|
RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR: () => RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR,
|
|
592
|
-
REFERRAL_BOUND_EVENT_DISCRIMINATOR: () => REFERRAL_BOUND_EVENT_DISCRIMINATOR,
|
|
593
|
-
REFERRAL_CLAIMED_EVENT_DISCRIMINATOR: () => REFERRAL_CLAIMED_EVENT_DISCRIMINATOR,
|
|
594
|
-
REFERRAL_DISCRIMINATOR: () => REFERRAL_DISCRIMINATOR,
|
|
595
|
-
REFERRAL_LINK_DISCRIMINATOR: () => REFERRAL_LINK_DISCRIMINATOR,
|
|
596
439
|
RETRY_DRAW_DISCRIMINATOR: () => RETRY_DRAW_DISCRIMINATOR,
|
|
597
|
-
SELL_PRIZE_DISCRIMINATOR: () => SELL_PRIZE_DISCRIMINATOR,
|
|
598
440
|
SELL_TOKENS_DISCRIMINATOR: () => SELL_TOKENS_DISCRIMINATOR,
|
|
599
441
|
TOKENS_SOLD_EVENT_DISCRIMINATOR: () => TOKENS_SOLD_EVENT_DISCRIMINATOR,
|
|
442
|
+
WALLET_ACTIVITY_DISCRIMINATOR: () => WALLET_ACTIVITY_DISCRIMINATOR,
|
|
600
443
|
decodeDraw: () => decodeDraw,
|
|
601
444
|
decodePool: () => decodePool,
|
|
602
|
-
|
|
603
|
-
decodeReferralLink: () => decodeReferralLink,
|
|
445
|
+
decodeWalletActivity: () => decodeWalletActivity,
|
|
604
446
|
fetchAllDraw: () => fetchAllDraw,
|
|
605
447
|
fetchAllMaybeDraw: () => fetchAllMaybeDraw,
|
|
606
448
|
fetchAllMaybePool: () => fetchAllMaybePool,
|
|
607
|
-
|
|
608
|
-
fetchAllMaybeReferralLink: () => fetchAllMaybeReferralLink,
|
|
449
|
+
fetchAllMaybeWalletActivity: () => fetchAllMaybeWalletActivity,
|
|
609
450
|
fetchAllPool: () => fetchAllPool,
|
|
610
|
-
|
|
611
|
-
fetchAllReferralLink: () => fetchAllReferralLink,
|
|
451
|
+
fetchAllWalletActivity: () => fetchAllWalletActivity,
|
|
612
452
|
fetchDraw: () => fetchDraw,
|
|
613
453
|
fetchMaybeDraw: () => fetchMaybeDraw,
|
|
614
454
|
fetchMaybePool: () => fetchMaybePool,
|
|
615
|
-
|
|
616
|
-
fetchMaybeReferralLink: () => fetchMaybeReferralLink,
|
|
455
|
+
fetchMaybeWalletActivity: () => fetchMaybeWalletActivity,
|
|
617
456
|
fetchPool: () => fetchPool,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
findClaimReferralReferralPda: () => findClaimReferralReferralPda,
|
|
457
|
+
fetchWalletActivity: () => fetchWalletActivity,
|
|
458
|
+
findActivityPda: () => findActivityPda,
|
|
621
459
|
findDrawPda: () => findDrawPda,
|
|
622
460
|
findIdentityPda: () => findIdentityPda,
|
|
623
|
-
findLinkPda: () => findLinkPda,
|
|
624
461
|
findPoolPda: () => findPoolPda,
|
|
625
|
-
|
|
626
|
-
findReferralPda: () => findReferralPda,
|
|
627
|
-
gaboxV2Program: () => gaboxV2Program,
|
|
628
|
-
getBindReferrerDiscriminatorBytes: () => getBindReferrerDiscriminatorBytes,
|
|
629
|
-
getBindReferrerInstruction: () => getBindReferrerInstruction,
|
|
630
|
-
getBindReferrerInstructionAsync: () => getBindReferrerInstructionAsync,
|
|
631
|
-
getBindReferrerInstructionDataCodec: () => getBindReferrerInstructionDataCodec,
|
|
632
|
-
getBindReferrerInstructionDataDecoder: () => getBindReferrerInstructionDataDecoder,
|
|
633
|
-
getBindReferrerInstructionDataEncoder: () => getBindReferrerInstructionDataEncoder,
|
|
462
|
+
gaboxProgram: () => gaboxProgram,
|
|
634
463
|
getBuyPackDiscriminatorBytes: () => getBuyPackDiscriminatorBytes,
|
|
635
464
|
getBuyPackInstruction: () => getBuyPackInstruction,
|
|
636
465
|
getBuyPackInstructionAsync: () => getBuyPackInstructionAsync,
|
|
637
466
|
getBuyPackInstructionDataCodec: () => getBuyPackInstructionDataCodec,
|
|
638
467
|
getBuyPackInstructionDataDecoder: () => getBuyPackInstructionDataDecoder,
|
|
639
468
|
getBuyPackInstructionDataEncoder: () => getBuyPackInstructionDataEncoder,
|
|
640
|
-
getClaimPrizeDiscriminatorBytes: () => getClaimPrizeDiscriminatorBytes,
|
|
641
|
-
getClaimPrizeInstruction: () => getClaimPrizeInstruction,
|
|
642
|
-
getClaimPrizeInstructionAsync: () => getClaimPrizeInstructionAsync,
|
|
643
|
-
getClaimPrizeInstructionDataCodec: () => getClaimPrizeInstructionDataCodec,
|
|
644
|
-
getClaimPrizeInstructionDataDecoder: () => getClaimPrizeInstructionDataDecoder,
|
|
645
|
-
getClaimPrizeInstructionDataEncoder: () => getClaimPrizeInstructionDataEncoder,
|
|
646
|
-
getClaimReferralDiscriminatorBytes: () => getClaimReferralDiscriminatorBytes,
|
|
647
|
-
getClaimReferralInstruction: () => getClaimReferralInstruction,
|
|
648
|
-
getClaimReferralInstructionAsync: () => getClaimReferralInstructionAsync,
|
|
649
|
-
getClaimReferralInstructionDataCodec: () => getClaimReferralInstructionDataCodec,
|
|
650
|
-
getClaimReferralInstructionDataDecoder: () => getClaimReferralInstructionDataDecoder,
|
|
651
|
-
getClaimReferralInstructionDataEncoder: () => getClaimReferralInstructionDataEncoder,
|
|
652
469
|
getDeliverDrawDiscriminatorBytes: () => getDeliverDrawDiscriminatorBytes,
|
|
653
470
|
getDeliverDrawInstruction: () => getDeliverDrawInstruction,
|
|
654
471
|
getDeliverDrawInstructionAsync: () => getDeliverDrawInstructionAsync,
|
|
@@ -664,27 +481,19 @@ var generated_exports = /* @__PURE__ */ __exportAll({
|
|
|
664
481
|
getDrawResolvedEventDiscriminatorBytes: () => getDrawResolvedEventDiscriminatorBytes,
|
|
665
482
|
getDrawResolvedEventEncoder: () => getDrawResolvedEventEncoder,
|
|
666
483
|
getDrawSize: () => getDrawSize,
|
|
667
|
-
getDrawStatusCodec: () => getDrawStatusCodec,
|
|
668
|
-
getDrawStatusDecoder: () => getDrawStatusDecoder,
|
|
669
|
-
getDrawStatusEncoder: () => getDrawStatusEncoder,
|
|
670
484
|
getExpireDrawDiscriminatorBytes: () => getExpireDrawDiscriminatorBytes,
|
|
671
485
|
getExpireDrawInstruction: () => getExpireDrawInstruction,
|
|
672
486
|
getExpireDrawInstructionAsync: () => getExpireDrawInstructionAsync,
|
|
673
487
|
getExpireDrawInstructionDataCodec: () => getExpireDrawInstructionDataCodec,
|
|
674
488
|
getExpireDrawInstructionDataDecoder: () => getExpireDrawInstructionDataDecoder,
|
|
675
489
|
getExpireDrawInstructionDataEncoder: () => getExpireDrawInstructionDataEncoder,
|
|
676
|
-
getFulfillDrawDiscriminatorBytes: () => getFulfillDrawDiscriminatorBytes,
|
|
677
|
-
getFulfillDrawInstruction: () => getFulfillDrawInstruction,
|
|
678
|
-
getFulfillDrawInstructionAsync: () => getFulfillDrawInstructionAsync,
|
|
679
|
-
getFulfillDrawInstructionDataCodec: () => getFulfillDrawInstructionDataCodec,
|
|
680
|
-
getFulfillDrawInstructionDataDecoder: () => getFulfillDrawInstructionDataDecoder,
|
|
681
|
-
getFulfillDrawInstructionDataEncoder: () => getFulfillDrawInstructionDataEncoder,
|
|
682
490
|
getFundPrizesDiscriminatorBytes: () => getFundPrizesDiscriminatorBytes,
|
|
683
491
|
getFundPrizesInstruction: () => getFundPrizesInstruction,
|
|
492
|
+
getFundPrizesInstructionAsync: () => getFundPrizesInstructionAsync,
|
|
684
493
|
getFundPrizesInstructionDataCodec: () => getFundPrizesInstructionDataCodec,
|
|
685
494
|
getFundPrizesInstructionDataDecoder: () => getFundPrizesInstructionDataDecoder,
|
|
686
495
|
getFundPrizesInstructionDataEncoder: () => getFundPrizesInstructionDataEncoder,
|
|
687
|
-
|
|
496
|
+
getGaboxErrorMessage: () => getGaboxErrorMessage,
|
|
688
497
|
getInitializePoolDiscriminatorBytes: () => getInitializePoolDiscriminatorBytes,
|
|
689
498
|
getInitializePoolInstruction: () => getInitializePoolInstruction,
|
|
690
499
|
getInitializePoolInstructionAsync: () => getInitializePoolInstructionAsync,
|
|
@@ -707,10 +516,6 @@ var generated_exports = /* @__PURE__ */ __exportAll({
|
|
|
707
516
|
getPrizeCodec: () => getPrizeCodec,
|
|
708
517
|
getPrizeDecoder: () => getPrizeDecoder,
|
|
709
518
|
getPrizeEncoder: () => getPrizeEncoder,
|
|
710
|
-
getPrizeRedeemedEventCodec: () => getPrizeRedeemedEventCodec,
|
|
711
|
-
getPrizeRedeemedEventDecoder: () => getPrizeRedeemedEventDecoder,
|
|
712
|
-
getPrizeRedeemedEventDiscriminatorBytes: () => getPrizeRedeemedEventDiscriminatorBytes,
|
|
713
|
-
getPrizeRedeemedEventEncoder: () => getPrizeRedeemedEventEncoder,
|
|
714
519
|
getPrizesFundedEventCodec: () => getPrizesFundedEventCodec,
|
|
715
520
|
getPrizesFundedEventDecoder: () => getPrizesFundedEventDecoder,
|
|
716
521
|
getPrizesFundedEventDiscriminatorBytes: () => getPrizesFundedEventDiscriminatorBytes,
|
|
@@ -719,36 +524,12 @@ var generated_exports = /* @__PURE__ */ __exportAll({
|
|
|
719
524
|
getRandomnessRetriedEventDecoder: () => getRandomnessRetriedEventDecoder,
|
|
720
525
|
getRandomnessRetriedEventDiscriminatorBytes: () => getRandomnessRetriedEventDiscriminatorBytes,
|
|
721
526
|
getRandomnessRetriedEventEncoder: () => getRandomnessRetriedEventEncoder,
|
|
722
|
-
getReferralBoundEventCodec: () => getReferralBoundEventCodec,
|
|
723
|
-
getReferralBoundEventDecoder: () => getReferralBoundEventDecoder,
|
|
724
|
-
getReferralBoundEventDiscriminatorBytes: () => getReferralBoundEventDiscriminatorBytes,
|
|
725
|
-
getReferralBoundEventEncoder: () => getReferralBoundEventEncoder,
|
|
726
|
-
getReferralClaimedEventCodec: () => getReferralClaimedEventCodec,
|
|
727
|
-
getReferralClaimedEventDecoder: () => getReferralClaimedEventDecoder,
|
|
728
|
-
getReferralClaimedEventDiscriminatorBytes: () => getReferralClaimedEventDiscriminatorBytes,
|
|
729
|
-
getReferralClaimedEventEncoder: () => getReferralClaimedEventEncoder,
|
|
730
|
-
getReferralCodec: () => getReferralCodec,
|
|
731
|
-
getReferralDecoder: () => getReferralDecoder,
|
|
732
|
-
getReferralDiscriminatorBytes: () => getReferralDiscriminatorBytes,
|
|
733
|
-
getReferralEncoder: () => getReferralEncoder,
|
|
734
|
-
getReferralLinkCodec: () => getReferralLinkCodec,
|
|
735
|
-
getReferralLinkDecoder: () => getReferralLinkDecoder,
|
|
736
|
-
getReferralLinkDiscriminatorBytes: () => getReferralLinkDiscriminatorBytes,
|
|
737
|
-
getReferralLinkEncoder: () => getReferralLinkEncoder,
|
|
738
|
-
getReferralLinkSize: () => getReferralLinkSize,
|
|
739
|
-
getReferralSize: () => getReferralSize,
|
|
740
527
|
getRetryDrawDiscriminatorBytes: () => getRetryDrawDiscriminatorBytes,
|
|
741
528
|
getRetryDrawInstruction: () => getRetryDrawInstruction,
|
|
742
529
|
getRetryDrawInstructionAsync: () => getRetryDrawInstructionAsync,
|
|
743
530
|
getRetryDrawInstructionDataCodec: () => getRetryDrawInstructionDataCodec,
|
|
744
531
|
getRetryDrawInstructionDataDecoder: () => getRetryDrawInstructionDataDecoder,
|
|
745
532
|
getRetryDrawInstructionDataEncoder: () => getRetryDrawInstructionDataEncoder,
|
|
746
|
-
getSellPrizeDiscriminatorBytes: () => getSellPrizeDiscriminatorBytes,
|
|
747
|
-
getSellPrizeInstruction: () => getSellPrizeInstruction,
|
|
748
|
-
getSellPrizeInstructionAsync: () => getSellPrizeInstructionAsync,
|
|
749
|
-
getSellPrizeInstructionDataCodec: () => getSellPrizeInstructionDataCodec,
|
|
750
|
-
getSellPrizeInstructionDataDecoder: () => getSellPrizeInstructionDataDecoder,
|
|
751
|
-
getSellPrizeInstructionDataEncoder: () => getSellPrizeInstructionDataEncoder,
|
|
752
533
|
getSellTokensDiscriminatorBytes: () => getSellTokensDiscriminatorBytes,
|
|
753
534
|
getSellTokensInstruction: () => getSellTokensInstruction,
|
|
754
535
|
getSellTokensInstructionAsync: () => getSellTokensInstructionAsync,
|
|
@@ -762,34 +543,31 @@ var generated_exports = /* @__PURE__ */ __exportAll({
|
|
|
762
543
|
getTokensSoldEventDecoder: () => getTokensSoldEventDecoder,
|
|
763
544
|
getTokensSoldEventDiscriminatorBytes: () => getTokensSoldEventDiscriminatorBytes,
|
|
764
545
|
getTokensSoldEventEncoder: () => getTokensSoldEventEncoder,
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
546
|
+
getWalletActivityCodec: () => getWalletActivityCodec,
|
|
547
|
+
getWalletActivityDecoder: () => getWalletActivityDecoder,
|
|
548
|
+
getWalletActivityDiscriminatorBytes: () => getWalletActivityDiscriminatorBytes,
|
|
549
|
+
getWalletActivityEncoder: () => getWalletActivityEncoder,
|
|
550
|
+
getWalletActivitySize: () => getWalletActivitySize,
|
|
551
|
+
identifyGaboxAccount: () => identifyGaboxAccount,
|
|
552
|
+
identifyGaboxEvent: () => identifyGaboxEvent,
|
|
553
|
+
identifyGaboxInstruction: () => identifyGaboxInstruction,
|
|
554
|
+
isGaboxError: () => isGaboxError,
|
|
770
555
|
parseBuyPackInstruction: () => parseBuyPackInstruction,
|
|
771
|
-
parseClaimPrizeInstruction: () => parseClaimPrizeInstruction,
|
|
772
|
-
parseClaimReferralInstruction: () => parseClaimReferralInstruction,
|
|
773
556
|
parseDeliverDrawInstruction: () => parseDeliverDrawInstruction,
|
|
774
557
|
parseDrawResolvedEvent: () => parseDrawResolvedEvent,
|
|
775
558
|
parseExpireDrawInstruction: () => parseExpireDrawInstruction,
|
|
776
|
-
parseFulfillDrawInstruction: () => parseFulfillDrawInstruction,
|
|
777
559
|
parseFundPrizesInstruction: () => parseFundPrizesInstruction,
|
|
778
|
-
|
|
560
|
+
parseGaboxInstruction: () => parseGaboxInstruction,
|
|
779
561
|
parseInitializePoolInstruction: () => parseInitializePoolInstruction,
|
|
780
562
|
parsePackBoughtEvent: () => parsePackBoughtEvent,
|
|
781
563
|
parsePoolCreatedEvent: () => parsePoolCreatedEvent,
|
|
782
|
-
parsePrizeRedeemedEvent: () => parsePrizeRedeemedEvent,
|
|
783
564
|
parsePrizesFundedEvent: () => parsePrizesFundedEvent,
|
|
784
565
|
parseRandomnessRetriedEvent: () => parseRandomnessRetriedEvent,
|
|
785
|
-
parseReferralBoundEvent: () => parseReferralBoundEvent,
|
|
786
|
-
parseReferralClaimedEvent: () => parseReferralClaimedEvent,
|
|
787
566
|
parseRetryDrawInstruction: () => parseRetryDrawInstruction,
|
|
788
|
-
parseSellPrizeInstruction: () => parseSellPrizeInstruction,
|
|
789
567
|
parseSellTokensInstruction: () => parseSellTokensInstruction,
|
|
790
568
|
parseTokensSoldEvent: () => parseTokensSoldEvent
|
|
791
569
|
});
|
|
792
570
|
//#endregion
|
|
793
|
-
export {
|
|
571
|
+
export { BUY_PACK_DISCRIMINATOR, DELIVER_DRAW_DISCRIMINATOR, DRAW_DISCRIMINATOR, DRAW_RESOLVED_EVENT_DISCRIMINATOR, EXPIRE_DRAW_DISCRIMINATOR, FUND_PRIZES_DISCRIMINATOR, GABOX_ERROR__ARITHMETIC, GABOX_ERROR__INCORRECT_TOKEN_DELTA, GABOX_ERROR__INSOLVENT_INVENTORY, GABOX_ERROR__INVALID_DISTRIBUTION, GABOX_ERROR__INVALID_LAUNCH, GABOX_ERROR__INVALID_QUOTE, GABOX_ERROR__INVALID_VENUE, GABOX_ERROR__JACKPOT_BELOW_ONE_PACK, GABOX_ERROR__NOT_EXPIRED, GABOX_ERROR__PACK_TOO_SMALL, GABOX_ERROR__PRIZE_CAP_CHANGED, GABOX_ERROR__RETRY_TOO_SOON, GABOX_ERROR__RETRY_UNAVAILABLE, GABOX_ERROR__SLIPPAGE_EXCEEDED, GABOX_ERROR__UNFUNDED_EXPECTATION, GABOX_ERROR__UNSUPPORTED_MINT, GABOX_ERROR__WALLET_ACTIVITY_MISMATCH, GABOX_ERROR__ZERO_AMOUNT, GABOX_PROGRAM_ADDRESS, GaboxAccount, GaboxEvent, GaboxInstruction, INITIALIZE_POOL_DISCRIMINATOR, PACK_BOUGHT_EVENT_DISCRIMINATOR, POOL_CREATED_EVENT_DISCRIMINATOR, POOL_DISCRIMINATOR, PRIZES_FUNDED_EVENT_DISCRIMINATOR, RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR, RETRY_DRAW_DISCRIMINATOR, SELL_TOKENS_DISCRIMINATOR, TOKENS_SOLD_EVENT_DISCRIMINATOR, WALLET_ACTIVITY_DISCRIMINATOR, decodeDraw, decodePool, decodeWalletActivity, fetchAllDraw, fetchAllMaybeDraw, fetchAllMaybePool, fetchAllMaybeWalletActivity, fetchAllPool, fetchAllWalletActivity, fetchDraw, fetchMaybeDraw, fetchMaybePool, fetchMaybeWalletActivity, fetchPool, fetchWalletActivity, findActivityPda, findDrawPda, findIdentityPda, findPoolPda, gaboxProgram, getBuyPackDiscriminatorBytes, getBuyPackInstruction, getBuyPackInstructionAsync, getBuyPackInstructionDataCodec, getBuyPackInstructionDataDecoder, getBuyPackInstructionDataEncoder, getDeliverDrawDiscriminatorBytes, getDeliverDrawInstruction, getDeliverDrawInstructionAsync, getDeliverDrawInstructionDataCodec, getDeliverDrawInstructionDataDecoder, getDeliverDrawInstructionDataEncoder, getDrawCodec, getDrawDecoder, getDrawDiscriminatorBytes, getDrawEncoder, getDrawResolvedEventCodec, getDrawResolvedEventDecoder, getDrawResolvedEventDiscriminatorBytes, getDrawResolvedEventEncoder, getDrawSize, getExpireDrawDiscriminatorBytes, getExpireDrawInstruction, getExpireDrawInstructionAsync, getExpireDrawInstructionDataCodec, getExpireDrawInstructionDataDecoder, getExpireDrawInstructionDataEncoder, getFundPrizesDiscriminatorBytes, getFundPrizesInstruction, getFundPrizesInstructionAsync, getFundPrizesInstructionDataCodec, getFundPrizesInstructionDataDecoder, getFundPrizesInstructionDataEncoder, getGaboxErrorMessage, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getPackBoughtEventCodec, getPackBoughtEventDecoder, getPackBoughtEventDiscriminatorBytes, getPackBoughtEventEncoder, getPoolCodec, getPoolCreatedEventCodec, getPoolCreatedEventDecoder, getPoolCreatedEventDiscriminatorBytes, getPoolCreatedEventEncoder, getPoolDecoder, getPoolDiscriminatorBytes, getPoolEncoder, getPoolSize, getPrizeCodec, getPrizeDecoder, getPrizeEncoder, getPrizesFundedEventCodec, getPrizesFundedEventDecoder, getPrizesFundedEventDiscriminatorBytes, getPrizesFundedEventEncoder, getRandomnessRetriedEventCodec, getRandomnessRetriedEventDecoder, getRandomnessRetriedEventDiscriminatorBytes, getRandomnessRetriedEventEncoder, getRetryDrawDiscriminatorBytes, getRetryDrawInstruction, getRetryDrawInstructionAsync, getRetryDrawInstructionDataCodec, getRetryDrawInstructionDataDecoder, getRetryDrawInstructionDataEncoder, getSellTokensDiscriminatorBytes, getSellTokensInstruction, getSellTokensInstructionAsync, getSellTokensInstructionDataCodec, getSellTokensInstructionDataDecoder, getSellTokensInstructionDataEncoder, getTierCodec, getTierDecoder, getTierEncoder, getTokensSoldEventCodec, getTokensSoldEventDecoder, getTokensSoldEventDiscriminatorBytes, getTokensSoldEventEncoder, getWalletActivityCodec, getWalletActivityDecoder, getWalletActivityDiscriminatorBytes, getWalletActivityEncoder, getWalletActivitySize, identifyGaboxAccount, identifyGaboxEvent, identifyGaboxInstruction, isGaboxError, parseBuyPackInstruction, parseDeliverDrawInstruction, parseDrawResolvedEvent, parseExpireDrawInstruction, parseFundPrizesInstruction, parseGaboxInstruction, parseInitializePoolInstruction, parsePackBoughtEvent, parsePoolCreatedEvent, parsePrizesFundedEvent, parseRandomnessRetriedEvent, parseRetryDrawInstruction, parseSellTokensInstruction, parseTokensSoldEvent, generated_exports as t };
|
|
794
572
|
|
|
795
573
|
//# sourceMappingURL=index.js.map
|