@gabox-labs/sdk 0.7.1 → 0.9.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 +62 -0
- package/README.md +85 -23
- package/dist/{gabox-DGTCh34U.js → gabox-CuyJYmrS.js} +669 -309
- package/dist/gabox-CuyJYmrS.js.map +1 -0
- package/dist/generated/index.d.ts +458 -92
- package/dist/generated/index.js +214 -54
- package/dist/generated/index.js.map +1 -1
- package/dist/{index-CA0m7AKk.d.ts → index-CQcBMEah.d.ts} +189 -4
- package/dist/index.d.ts +226 -30
- package/dist/index.js +182 -40
- package/dist/index.js.map +1 -1
- package/dist/raydium/index.d.ts +2 -2
- package/dist/raydium/index.js +2 -2
- package/dist/{raydium-CU-tZzIk.js → raydium-DXUJ-g1p.js} +835 -105
- package/dist/raydium-DXUJ-g1p.js.map +1 -0
- package/llms.txt +4 -0
- package/package.json +1 -1
- package/skills/gabox-sdk/SKILL.md +21 -13
- package/skills/gabox-sdk/references/api.md +47 -18
- package/dist/gabox-DGTCh34U.js.map +0 -1
- package/dist/raydium-CU-tZzIk.js.map +0 -1
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import { Account, AccountMeta, AccountSignerMeta, Address, ClientWithPayer, ClientWithRpc, ClientWithTransactionPlanning, ClientWithTransactionSending, EncodedAccount, ExtendedClient, FetchAccountConfig, FetchAccountsConfig, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, GetAccountInfoApi, GetMultipleAccountsApi, Instruction, InstructionWithAccounts, InstructionWithData, MaybeAccount, MaybeEncodedAccount, ProgramDerivedAddress, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError, TransactionSigner, WritableAccount, WritableSignerAccount, fetchEncodedAccount, fetchEncodedAccounts } from "@solana/kit";
|
|
1
|
+
import { Account, AccountMeta, AccountSignerMeta, Address, ClientWithPayer, ClientWithRpc, ClientWithTransactionPlanning, ClientWithTransactionSending, Codec, Decoder, EncodedAccount, Encoder, ExtendedClient, FetchAccountConfig, FetchAccountsConfig, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, GetAccountInfoApi, GetMultipleAccountsApi, Instruction, InstructionWithAccounts, InstructionWithData, MaybeAccount, MaybeEncodedAccount, ProgramDerivedAddress, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError, TransactionSigner, WritableAccount, WritableSignerAccount, fetchEncodedAccount, fetchEncodedAccounts } from "@solana/kit";
|
|
2
2
|
import { SelfFetchFunctions, SelfPlanAndSendFunctions } from "@solana/program-client-core";
|
|
3
|
+
//#region src/generated/types/packResult.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* One pack's outcome inside a settled batch: the tier it landed on and the
|
|
6
|
+
* tokens it pays.
|
|
7
|
+
*/
|
|
8
|
+
export type PackResult = {
|
|
9
|
+
tier: number;
|
|
10
|
+
amount: bigint;
|
|
11
|
+
};
|
|
12
|
+
export type PackResultArgs = {
|
|
13
|
+
tier: number;
|
|
14
|
+
amount: number | bigint;
|
|
15
|
+
};
|
|
16
|
+
export declare function getPackResultEncoder(): FixedSizeEncoder<PackResultArgs>;
|
|
17
|
+
export declare function getPackResultDecoder(): FixedSizeDecoder<PackResult>;
|
|
18
|
+
export declare function getPackResultCodec(): FixedSizeCodec<PackResultArgs, PackResult>;
|
|
19
|
+
//#endregion
|
|
3
20
|
//#region src/generated/types/prize.d.ts
|
|
4
21
|
export type Prize = {
|
|
5
22
|
amount: bigint;
|
|
@@ -31,26 +48,100 @@ export type Draw = {
|
|
|
31
48
|
discriminator: ReadonlyUint8Array;
|
|
32
49
|
pool: Address;
|
|
33
50
|
purchaser: Address;
|
|
34
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Chosen by the buyer's client and part of the seeds, so two buyers, or
|
|
53
|
+
* two transactions of one buyer, never name the same account.
|
|
54
|
+
*/
|
|
55
|
+
nonce: bigint;
|
|
35
56
|
bump: number;
|
|
57
|
+
/**
|
|
58
|
+
* Sequence number of the first pack; pack k has `seq_start + k`. Unique
|
|
59
|
+
* per pool for ever. Every randomness request of this draw carries it
|
|
60
|
+
* as the callback argument, and `deliver_draw` requires a match, so a
|
|
61
|
+
* request can only ever settle the purchase that made it.
|
|
62
|
+
*/
|
|
63
|
+
seqStart: bigint;
|
|
64
|
+
/** 1 to `MAX_BATCH_SIZE`. */
|
|
65
|
+
count: number;
|
|
36
66
|
requestSlot: bigint;
|
|
37
67
|
lastAttemptSlot: bigint;
|
|
38
68
|
attempts: number;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
69
|
+
/**
|
|
70
|
+
* The pool's tier table and pack size at purchase. Settlement reads
|
|
71
|
+
* these, never the pool, so a pending draw keeps the terms it was bought
|
|
72
|
+
* under whatever a later program version does.
|
|
73
|
+
*/
|
|
74
|
+
tiers: Array<Tier>;
|
|
75
|
+
packTokens: bigint;
|
|
76
|
+
/** `vault - reserved` at purchase, before this batch's own tokens. */
|
|
77
|
+
freeSnapshot: bigint;
|
|
78
|
+
/**
|
|
79
|
+
* What this draw holds in `pool.reserved`. While pending, the purchase
|
|
80
|
+
* reservation `min(count * uncapped_maximum, free_snapshot + count *
|
|
81
|
+
* pack_tokens)`, which settlement never exceeds. Once settled as owed,
|
|
82
|
+
* the owed amount, until a claim pays it.
|
|
83
|
+
*/
|
|
84
|
+
reserved: bigint;
|
|
85
|
+
/** True once the callback or expiry fixed the outcome. */
|
|
86
|
+
settled: boolean;
|
|
87
|
+
/** Written at settlement. All zero when `timed_out`. */
|
|
88
|
+
randomness: ReadonlyUint8Array;
|
|
89
|
+
timedOut: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Tokens a claim still has to pay, when the callback could not pay the
|
|
92
|
+
* purchaser directly. Zero on the normal path. A claim pays this number
|
|
93
|
+
* as written.
|
|
94
|
+
*/
|
|
95
|
+
owed: bigint;
|
|
42
96
|
};
|
|
43
97
|
export type DrawArgs = {
|
|
44
98
|
pool: Address;
|
|
45
99
|
purchaser: Address;
|
|
46
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Chosen by the buyer's client and part of the seeds, so two buyers, or
|
|
102
|
+
* two transactions of one buyer, never name the same account.
|
|
103
|
+
*/
|
|
104
|
+
nonce: number | bigint;
|
|
47
105
|
bump: number;
|
|
106
|
+
/**
|
|
107
|
+
* Sequence number of the first pack; pack k has `seq_start + k`. Unique
|
|
108
|
+
* per pool for ever. Every randomness request of this draw carries it
|
|
109
|
+
* as the callback argument, and `deliver_draw` requires a match, so a
|
|
110
|
+
* request can only ever settle the purchase that made it.
|
|
111
|
+
*/
|
|
112
|
+
seqStart: number | bigint;
|
|
113
|
+
/** 1 to `MAX_BATCH_SIZE`. */
|
|
114
|
+
count: number;
|
|
48
115
|
requestSlot: number | bigint;
|
|
49
116
|
lastAttemptSlot: number | bigint;
|
|
50
117
|
attempts: number;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
118
|
+
/**
|
|
119
|
+
* The pool's tier table and pack size at purchase. Settlement reads
|
|
120
|
+
* these, never the pool, so a pending draw keeps the terms it was bought
|
|
121
|
+
* under whatever a later program version does.
|
|
122
|
+
*/
|
|
123
|
+
tiers: Array<TierArgs>;
|
|
124
|
+
packTokens: number | bigint;
|
|
125
|
+
/** `vault - reserved` at purchase, before this batch's own tokens. */
|
|
126
|
+
freeSnapshot: number | bigint;
|
|
127
|
+
/**
|
|
128
|
+
* What this draw holds in `pool.reserved`. While pending, the purchase
|
|
129
|
+
* reservation `min(count * uncapped_maximum, free_snapshot + count *
|
|
130
|
+
* pack_tokens)`, which settlement never exceeds. Once settled as owed,
|
|
131
|
+
* the owed amount, until a claim pays it.
|
|
132
|
+
*/
|
|
133
|
+
reserved: number | bigint;
|
|
134
|
+
/** True once the callback or expiry fixed the outcome. */
|
|
135
|
+
settled: boolean;
|
|
136
|
+
/** Written at settlement. All zero when `timed_out`. */
|
|
137
|
+
randomness: ReadonlyUint8Array;
|
|
138
|
+
timedOut: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Tokens a claim still has to pay, when the callback could not pay the
|
|
141
|
+
* purchaser directly. Zero on the normal path. A claim pays this number
|
|
142
|
+
* as written.
|
|
143
|
+
*/
|
|
144
|
+
owed: number | bigint;
|
|
54
145
|
};
|
|
55
146
|
/** Gets the encoder for {@link DrawArgs} account data. */
|
|
56
147
|
export declare function getDrawEncoder(): FixedSizeEncoder<DrawArgs>;
|
|
@@ -90,7 +181,11 @@ export type Pool = {
|
|
|
90
181
|
seedQuoteAmount: bigint;
|
|
91
182
|
tiers: Array<Tier>;
|
|
92
183
|
nextSeq: bigint;
|
|
93
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Tokens the vault must keep for pending draws: every pending batch's
|
|
186
|
+
* `Draw::reserved`, plus every settled but unclaimed draw's `owed`.
|
|
187
|
+
* Never creator revenue.
|
|
188
|
+
*/
|
|
94
189
|
reserved: bigint;
|
|
95
190
|
/**
|
|
96
191
|
* The LaunchLab global config for this pool's quote mint. Raydium's
|
|
@@ -126,7 +221,11 @@ export type PoolArgs = {
|
|
|
126
221
|
seedQuoteAmount: number | bigint;
|
|
127
222
|
tiers: Array<TierArgs>;
|
|
128
223
|
nextSeq: number | bigint;
|
|
129
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* Tokens the vault must keep for pending draws: every pending batch's
|
|
226
|
+
* `Draw::reserved`, plus every settled but unclaimed draw's `owed`.
|
|
227
|
+
* Never creator revenue.
|
|
228
|
+
*/
|
|
130
229
|
reserved: number | bigint;
|
|
131
230
|
/**
|
|
132
231
|
* The LaunchLab global config for this pool's quote mint. Raydium's
|
|
@@ -249,7 +348,21 @@ export declare const GABOX_ERROR__INVALID_LAUNCH = 6015;
|
|
|
249
348
|
export declare const GABOX_ERROR__INVALID_QUOTE = 6016;
|
|
250
349
|
/** WalletActivityMismatch: Wallet activity account belongs to a different wallet */
|
|
251
350
|
export declare const GABOX_ERROR__WALLET_ACTIVITY_MISMATCH = 6017;
|
|
252
|
-
|
|
351
|
+
/** TooManyPacks: A purchase opens at most MAX_BATCH_SIZE packs */
|
|
352
|
+
export declare const GABOX_ERROR__TOO_MANY_PACKS = 6018;
|
|
353
|
+
/** DrawAlreadySettled: The draw's outcome is already fixed */
|
|
354
|
+
export declare const GABOX_ERROR__DRAW_ALREADY_SETTLED = 6019;
|
|
355
|
+
/** DrawNotSettled: The draw's outcome is not fixed yet */
|
|
356
|
+
export declare const GABOX_ERROR__DRAW_NOT_SETTLED = 6020;
|
|
357
|
+
/** DrawExpired: Delivery is closed for this draw; only expiry remains */
|
|
358
|
+
export declare const GABOX_ERROR__DRAW_EXPIRED = 6021;
|
|
359
|
+
/** WrongDraw: The callback's sequence number does not match this draw */
|
|
360
|
+
export declare const GABOX_ERROR__WRONG_DRAW = 6022;
|
|
361
|
+
/** WrongTokenAccount: Not the purchaser's coin account */
|
|
362
|
+
export declare const GABOX_ERROR__WRONG_TOKEN_ACCOUNT = 6023;
|
|
363
|
+
/** WrongDestination: The destination must be the purchaser's own account for this coin */
|
|
364
|
+
export declare const GABOX_ERROR__WRONG_DESTINATION = 6024;
|
|
365
|
+
export type GaboxError = typeof GABOX_ERROR__ARITHMETIC | typeof GABOX_ERROR__DRAW_ALREADY_SETTLED | typeof GABOX_ERROR__DRAW_EXPIRED | typeof GABOX_ERROR__DRAW_NOT_SETTLED | typeof GABOX_ERROR__INCORRECT_TOKEN_DELTA | typeof GABOX_ERROR__INSOLVENT_INVENTORY | typeof GABOX_ERROR__INVALID_DISTRIBUTION | typeof GABOX_ERROR__INVALID_LAUNCH | typeof GABOX_ERROR__INVALID_QUOTE | typeof GABOX_ERROR__INVALID_VENUE | typeof GABOX_ERROR__JACKPOT_BELOW_ONE_PACK | typeof GABOX_ERROR__NOT_EXPIRED | typeof GABOX_ERROR__PACK_TOO_SMALL | typeof GABOX_ERROR__PRIZE_CAP_CHANGED | typeof GABOX_ERROR__RETRY_TOO_SOON | typeof GABOX_ERROR__RETRY_UNAVAILABLE | typeof GABOX_ERROR__SLIPPAGE_EXCEEDED | typeof GABOX_ERROR__TOO_MANY_PACKS | typeof GABOX_ERROR__UNFUNDED_EXPECTATION | typeof GABOX_ERROR__UNSUPPORTED_MINT | typeof GABOX_ERROR__WALLET_ACTIVITY_MISMATCH | typeof GABOX_ERROR__WRONG_DESTINATION | typeof GABOX_ERROR__WRONG_DRAW | typeof GABOX_ERROR__WRONG_TOKEN_ACCOUNT | typeof GABOX_ERROR__ZERO_AMOUNT;
|
|
253
366
|
export declare function getGaboxErrorMessage(code: GaboxError): string;
|
|
254
367
|
export declare function isGaboxError<TProgramErrorCode extends GaboxError>(error: unknown, transactionMessage: {
|
|
255
368
|
instructions: Record<number, {
|
|
@@ -266,70 +379,106 @@ export declare const DRAW_RESOLVED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
|
266
379
|
export declare function getDrawResolvedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
267
380
|
export type DrawResolvedEvent = {
|
|
268
381
|
pool: Address;
|
|
269
|
-
|
|
382
|
+
draw: Address;
|
|
270
383
|
purchaser: Address;
|
|
271
|
-
|
|
384
|
+
seqStart: bigint;
|
|
385
|
+
count: number;
|
|
386
|
+
total: bigint;
|
|
272
387
|
randomness: ReadonlyUint8Array;
|
|
273
388
|
timedOut: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* True when the tokens reached the purchaser in the same instruction.
|
|
391
|
+
* False when they wait in the vault for a claim.
|
|
392
|
+
*/
|
|
393
|
+
paid: boolean;
|
|
394
|
+
results: Array<PackResult>;
|
|
274
395
|
};
|
|
275
396
|
export type DrawResolvedEventArgs = {
|
|
276
397
|
pool: Address;
|
|
277
|
-
|
|
398
|
+
draw: Address;
|
|
278
399
|
purchaser: Address;
|
|
279
|
-
|
|
400
|
+
seqStart: number | bigint;
|
|
401
|
+
count: number;
|
|
402
|
+
total: number | bigint;
|
|
280
403
|
randomness: ReadonlyUint8Array;
|
|
281
404
|
timedOut: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* True when the tokens reached the purchaser in the same instruction.
|
|
407
|
+
* False when they wait in the vault for a claim.
|
|
408
|
+
*/
|
|
409
|
+
paid: boolean;
|
|
410
|
+
results: Array<PackResultArgs>;
|
|
282
411
|
};
|
|
283
412
|
/** Gets the encoder for {@link DrawResolvedEventArgs} event data. */
|
|
284
|
-
export declare function getDrawResolvedEventEncoder():
|
|
413
|
+
export declare function getDrawResolvedEventEncoder(): Encoder<DrawResolvedEventArgs>;
|
|
285
414
|
/** Gets the decoder for {@link DrawResolvedEvent} event data. */
|
|
286
|
-
export declare function getDrawResolvedEventDecoder():
|
|
415
|
+
export declare function getDrawResolvedEventDecoder(): Decoder<DrawResolvedEvent>;
|
|
287
416
|
/** Gets the codec for {@link DrawResolvedEvent} event data. */
|
|
288
|
-
export declare function getDrawResolvedEventCodec():
|
|
417
|
+
export declare function getDrawResolvedEventCodec(): Codec<DrawResolvedEventArgs, DrawResolvedEvent>;
|
|
289
418
|
/** Parses the provided bytes into {@link DrawResolvedEvent} event data. */
|
|
290
419
|
export declare function parseDrawResolvedEvent(data: ReadonlyUint8Array | Uint8Array): DrawResolvedEvent;
|
|
291
420
|
//#endregion
|
|
292
|
-
//#region src/generated/events/
|
|
293
|
-
export declare const
|
|
294
|
-
export declare function
|
|
295
|
-
export type
|
|
421
|
+
//#region src/generated/events/packsBought.d.ts
|
|
422
|
+
export declare const PACKS_BOUGHT_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
423
|
+
export declare function getPacksBoughtEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
424
|
+
export type PacksBoughtEvent = {
|
|
296
425
|
pool: Address;
|
|
297
|
-
|
|
426
|
+
draw: Address;
|
|
298
427
|
purchaser: Address;
|
|
428
|
+
seqStart: bigint;
|
|
429
|
+
count: number;
|
|
299
430
|
venue: Address;
|
|
300
431
|
quoteMint: Address;
|
|
301
432
|
tokensBought: bigint;
|
|
302
|
-
/** Quote token the venue charged for the
|
|
433
|
+
/** Quote token the venue charged for the whole batch. */
|
|
303
434
|
quoteDebit: bigint;
|
|
304
435
|
/** Lamports the venue call itself spent, which is venue account rent. */
|
|
305
436
|
nativeDebit: bigint;
|
|
306
437
|
vrfNativeDebit: bigint;
|
|
307
438
|
totalNativeDebit: bigint;
|
|
308
|
-
|
|
439
|
+
/** `vault - reserved` before this purchase, the snapshot settlement uses. */
|
|
440
|
+
freeSnapshot: bigint;
|
|
441
|
+
/** What this purchase added to `pool.reserved`. */
|
|
442
|
+
reserved: bigint;
|
|
443
|
+
/**
|
|
444
|
+
* The first pack's table. Later packs' tables follow from the outcomes
|
|
445
|
+
* before them.
|
|
446
|
+
*/
|
|
447
|
+
firstPrizes: Array<Prize>;
|
|
309
448
|
};
|
|
310
|
-
export type
|
|
449
|
+
export type PacksBoughtEventArgs = {
|
|
311
450
|
pool: Address;
|
|
312
|
-
|
|
451
|
+
draw: Address;
|
|
313
452
|
purchaser: Address;
|
|
453
|
+
seqStart: number | bigint;
|
|
454
|
+
count: number;
|
|
314
455
|
venue: Address;
|
|
315
456
|
quoteMint: Address;
|
|
316
457
|
tokensBought: number | bigint;
|
|
317
|
-
/** Quote token the venue charged for the
|
|
458
|
+
/** Quote token the venue charged for the whole batch. */
|
|
318
459
|
quoteDebit: number | bigint;
|
|
319
460
|
/** Lamports the venue call itself spent, which is venue account rent. */
|
|
320
461
|
nativeDebit: number | bigint;
|
|
321
462
|
vrfNativeDebit: number | bigint;
|
|
322
463
|
totalNativeDebit: number | bigint;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
464
|
+
/** `vault - reserved` before this purchase, the snapshot settlement uses. */
|
|
465
|
+
freeSnapshot: number | bigint;
|
|
466
|
+
/** What this purchase added to `pool.reserved`. */
|
|
467
|
+
reserved: number | bigint;
|
|
468
|
+
/**
|
|
469
|
+
* The first pack's table. Later packs' tables follow from the outcomes
|
|
470
|
+
* before them.
|
|
471
|
+
*/
|
|
472
|
+
firstPrizes: Array<PrizeArgs>;
|
|
473
|
+
};
|
|
474
|
+
/** Gets the encoder for {@link PacksBoughtEventArgs} event data. */
|
|
475
|
+
export declare function getPacksBoughtEventEncoder(): FixedSizeEncoder<PacksBoughtEventArgs>;
|
|
476
|
+
/** Gets the decoder for {@link PacksBoughtEvent} event data. */
|
|
477
|
+
export declare function getPacksBoughtEventDecoder(): FixedSizeDecoder<PacksBoughtEvent>;
|
|
478
|
+
/** Gets the codec for {@link PacksBoughtEvent} event data. */
|
|
479
|
+
export declare function getPacksBoughtEventCodec(): FixedSizeCodec<PacksBoughtEventArgs, PacksBoughtEvent>;
|
|
480
|
+
/** Parses the provided bytes into {@link PacksBoughtEvent} event data. */
|
|
481
|
+
export declare function parsePacksBoughtEvent(data: ReadonlyUint8Array | Uint8Array): PacksBoughtEvent;
|
|
333
482
|
//#endregion
|
|
334
483
|
//#region src/generated/events/poolCreated.d.ts
|
|
335
484
|
export declare const POOL_CREATED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -371,6 +520,34 @@ export declare function getPoolCreatedEventCodec(): FixedSizeCodec<PoolCreatedEv
|
|
|
371
520
|
/** Parses the provided bytes into {@link PoolCreatedEvent} event data. */
|
|
372
521
|
export declare function parsePoolCreatedEvent(data: ReadonlyUint8Array | Uint8Array): PoolCreatedEvent;
|
|
373
522
|
//#endregion
|
|
523
|
+
//#region src/generated/events/prizeClaimed.d.ts
|
|
524
|
+
export declare const PRIZE_CLAIMED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
525
|
+
export declare function getPrizeClaimedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
526
|
+
export type PrizeClaimedEvent = {
|
|
527
|
+
pool: Address;
|
|
528
|
+
draw: Address;
|
|
529
|
+
purchaser: Address;
|
|
530
|
+
amount: bigint;
|
|
531
|
+
payer: Address;
|
|
532
|
+
destination: Address;
|
|
533
|
+
};
|
|
534
|
+
export type PrizeClaimedEventArgs = {
|
|
535
|
+
pool: Address;
|
|
536
|
+
draw: Address;
|
|
537
|
+
purchaser: Address;
|
|
538
|
+
amount: number | bigint;
|
|
539
|
+
payer: Address;
|
|
540
|
+
destination: Address;
|
|
541
|
+
};
|
|
542
|
+
/** Gets the encoder for {@link PrizeClaimedEventArgs} event data. */
|
|
543
|
+
export declare function getPrizeClaimedEventEncoder(): FixedSizeEncoder<PrizeClaimedEventArgs>;
|
|
544
|
+
/** Gets the decoder for {@link PrizeClaimedEvent} event data. */
|
|
545
|
+
export declare function getPrizeClaimedEventDecoder(): FixedSizeDecoder<PrizeClaimedEvent>;
|
|
546
|
+
/** Gets the codec for {@link PrizeClaimedEvent} event data. */
|
|
547
|
+
export declare function getPrizeClaimedEventCodec(): FixedSizeCodec<PrizeClaimedEventArgs, PrizeClaimedEvent>;
|
|
548
|
+
/** Parses the provided bytes into {@link PrizeClaimedEvent} event data. */
|
|
549
|
+
export declare function parsePrizeClaimedEvent(data: ReadonlyUint8Array | Uint8Array): PrizeClaimedEvent;
|
|
550
|
+
//#endregion
|
|
374
551
|
//#region src/generated/events/prizesFunded.d.ts
|
|
375
552
|
export declare const PRIZES_FUNDED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
376
553
|
export declare function getPrizesFundedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -398,12 +575,14 @@ export declare const RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
|
398
575
|
export declare function getRandomnessRetriedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
399
576
|
export type RandomnessRetriedEvent = {
|
|
400
577
|
pool: Address;
|
|
401
|
-
|
|
578
|
+
draw: Address;
|
|
579
|
+
seqStart: bigint;
|
|
402
580
|
attempt: number;
|
|
403
581
|
};
|
|
404
582
|
export type RandomnessRetriedEventArgs = {
|
|
405
583
|
pool: Address;
|
|
406
|
-
|
|
584
|
+
draw: Address;
|
|
585
|
+
seqStart: number | bigint;
|
|
407
586
|
attempt: number;
|
|
408
587
|
};
|
|
409
588
|
/** Gets the encoder for {@link RandomnessRetriedEventArgs} event data. */
|
|
@@ -456,7 +635,8 @@ export declare function findActivityPda(seeds: ActivitySeeds, config?: {
|
|
|
456
635
|
//#region src/generated/pdas/draw.d.ts
|
|
457
636
|
export type DrawSeeds = {
|
|
458
637
|
pool: Address;
|
|
459
|
-
|
|
638
|
+
purchaser: Address;
|
|
639
|
+
nonce: number | bigint;
|
|
460
640
|
};
|
|
461
641
|
export declare function findDrawPda(seeds: DrawSeeds, config?: {
|
|
462
642
|
programAddress?: Address | undefined;
|
|
@@ -487,30 +667,37 @@ export declare function identifyGaboxAccount(account: {
|
|
|
487
667
|
} | ReadonlyUint8Array): GaboxAccount;
|
|
488
668
|
export declare enum GaboxEvent {
|
|
489
669
|
DrawResolved = 0,
|
|
490
|
-
|
|
670
|
+
PacksBought = 1,
|
|
491
671
|
PoolCreated = 2,
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
672
|
+
PrizeClaimed = 3,
|
|
673
|
+
PrizesFunded = 4,
|
|
674
|
+
RandomnessRetried = 5,
|
|
675
|
+
TokensSold = 6
|
|
495
676
|
}
|
|
496
677
|
export declare function identifyGaboxEvent(event: {
|
|
497
678
|
data: ReadonlyUint8Array;
|
|
498
679
|
} | ReadonlyUint8Array): GaboxEvent;
|
|
499
680
|
export declare enum GaboxInstruction {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
681
|
+
BuyPacks = 0,
|
|
682
|
+
ClaimPrize = 1,
|
|
683
|
+
ClaimPrizeTo = 2,
|
|
684
|
+
DeliverDraw = 3,
|
|
685
|
+
ExpireDraw = 4,
|
|
686
|
+
FundPrizes = 5,
|
|
687
|
+
InitializePool = 6,
|
|
688
|
+
RetryDraw = 7,
|
|
689
|
+
SellTokens = 8
|
|
507
690
|
}
|
|
508
691
|
export declare function identifyGaboxInstruction(instruction: {
|
|
509
692
|
data: ReadonlyUint8Array;
|
|
510
693
|
} | ReadonlyUint8Array): GaboxInstruction;
|
|
511
694
|
export type ParsedGaboxInstruction<TProgram extends string = 'GaBoxR9nYcK1zeu8EvSJVHV3SrYpCFmvbh2MLgobMcUA'> = {
|
|
512
|
-
instructionType: GaboxInstruction.
|
|
513
|
-
} &
|
|
695
|
+
instructionType: GaboxInstruction.BuyPacks;
|
|
696
|
+
} & ParsedBuyPacksInstruction<TProgram> | {
|
|
697
|
+
instructionType: GaboxInstruction.ClaimPrize;
|
|
698
|
+
} & ParsedClaimPrizeInstruction<TProgram> | {
|
|
699
|
+
instructionType: GaboxInstruction.ClaimPrizeTo;
|
|
700
|
+
} & ParsedClaimPrizeToInstruction<TProgram> | {
|
|
514
701
|
instructionType: GaboxInstruction.DeliverDraw;
|
|
515
702
|
} & ParsedDeliverDrawInstruction<TProgram> | {
|
|
516
703
|
instructionType: GaboxInstruction.ExpireDraw;
|
|
@@ -538,7 +725,9 @@ export type GaboxPluginAccounts = {
|
|
|
538
725
|
walletActivity: ReturnType<typeof getWalletActivityCodec> & SelfFetchFunctions<WalletActivityArgs, WalletActivity>;
|
|
539
726
|
};
|
|
540
727
|
export type GaboxPluginInstructions = {
|
|
541
|
-
|
|
728
|
+
buyPacks: (input: BuyPacksAsyncInput) => ReturnType<typeof getBuyPacksInstructionAsync> & SelfPlanAndSendFunctions;
|
|
729
|
+
claimPrize: (input: MakeOptional<ClaimPrizeAsyncInput, "payer">) => ReturnType<typeof getClaimPrizeInstructionAsync> & SelfPlanAndSendFunctions;
|
|
730
|
+
claimPrizeTo: (input: ClaimPrizeToAsyncInput) => ReturnType<typeof getClaimPrizeToInstructionAsync> & SelfPlanAndSendFunctions;
|
|
542
731
|
deliverDraw: (input: DeliverDrawAsyncInput) => ReturnType<typeof getDeliverDrawInstructionAsync> & SelfPlanAndSendFunctions;
|
|
543
732
|
expireDraw: (input: ExpireDrawAsyncInput) => ReturnType<typeof getExpireDrawInstructionAsync> & SelfPlanAndSendFunctions;
|
|
544
733
|
fundPrizes: (input: FundPrizesAsyncInput) => ReturnType<typeof getFundPrizesInstructionAsync> & SelfPlanAndSendFunctions;
|
|
@@ -548,9 +737,9 @@ export type GaboxPluginInstructions = {
|
|
|
548
737
|
};
|
|
549
738
|
export type GaboxPluginPdas = {
|
|
550
739
|
pool: typeof findPoolPda;
|
|
740
|
+
draw: typeof findDrawPda;
|
|
551
741
|
activity: typeof findActivityPda;
|
|
552
742
|
identity: typeof findIdentityPda;
|
|
553
|
-
draw: typeof findDrawPda;
|
|
554
743
|
};
|
|
555
744
|
export type GaboxPluginRequirements = ClientWithRpc<GetAccountInfoApi & GetMultipleAccountsApi> & ClientWithPayer & ClientWithTransactionPlanning & ClientWithTransactionSending;
|
|
556
745
|
export declare function gaboxProgram(): <T extends GaboxPluginRequirements>(client: T) => ExtendedClient<T, {
|
|
@@ -558,28 +747,37 @@ export declare function gaboxProgram(): <T extends GaboxPluginRequirements>(clie
|
|
|
558
747
|
}>;
|
|
559
748
|
type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
560
749
|
//#endregion
|
|
561
|
-
//#region src/generated/instructions/
|
|
562
|
-
export declare const
|
|
563
|
-
export declare function
|
|
564
|
-
export type
|
|
565
|
-
export type
|
|
750
|
+
//#region src/generated/instructions/buyPacks.d.ts
|
|
751
|
+
export declare const BUY_PACKS_DISCRIMINATOR: ReadonlyUint8Array;
|
|
752
|
+
export declare function getBuyPacksDiscriminatorBytes(): ReadonlyUint8Array;
|
|
753
|
+
export type BuyPacksInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountPurchaser extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountDraw extends string | AccountMeta<string> = string, TAccountActivity extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountUserTokens extends string | AccountMeta<string> = string, TAccountVenue extends string | AccountMeta<string> = string, TAccountIdentity extends string | AccountMeta<string> = string, TAccountQueue extends string | AccountMeta<string> = "Cuj97ggrhhidhbu39TijNVqE74xvKJ69gDervRUXAxGh", TAccountProgram extends string | AccountMeta<string> = "Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz", TAccountSlotHashes extends string | AccountMeta<string> = "SysvarS1otHashes111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPurchaser extends string ? WritableSignerAccount<TAccountPurchaser> & AccountSignerMeta<TAccountPurchaser> : TAccountPurchaser, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountDraw extends string ? WritableAccount<TAccountDraw> : TAccountDraw, TAccountActivity extends string ? WritableAccount<TAccountActivity> : TAccountActivity, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint, TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault, TAccountUserTokens extends string ? WritableAccount<TAccountUserTokens> : TAccountUserTokens, TAccountVenue extends string ? ReadonlyAccount<TAccountVenue> : TAccountVenue, TAccountIdentity extends string ? ReadonlyAccount<TAccountIdentity> : TAccountIdentity, TAccountQueue extends string ? WritableAccount<TAccountQueue> : TAccountQueue, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, TAccountSlotHashes extends string ? ReadonlyAccount<TAccountSlotHashes> : TAccountSlotHashes, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
|
|
754
|
+
export type BuyPacksInstructionData = {
|
|
566
755
|
discriminator: ReadonlyUint8Array;
|
|
756
|
+
count: number;
|
|
757
|
+
nonce: bigint;
|
|
567
758
|
maxQuoteIn: bigint;
|
|
568
|
-
|
|
759
|
+
minFirstMaximum: bigint;
|
|
569
760
|
maxNativeDebit: bigint;
|
|
570
761
|
};
|
|
571
|
-
export type
|
|
762
|
+
export type BuyPacksInstructionDataArgs = {
|
|
763
|
+
count: number;
|
|
764
|
+
nonce: number | bigint;
|
|
572
765
|
maxQuoteIn: number | bigint;
|
|
573
|
-
|
|
766
|
+
minFirstMaximum: number | bigint;
|
|
574
767
|
maxNativeDebit: number | bigint;
|
|
575
768
|
};
|
|
576
|
-
export declare function
|
|
577
|
-
export declare function
|
|
578
|
-
export declare function
|
|
579
|
-
export type
|
|
769
|
+
export declare function getBuyPacksInstructionDataEncoder(): FixedSizeEncoder<BuyPacksInstructionDataArgs>;
|
|
770
|
+
export declare function getBuyPacksInstructionDataDecoder(): FixedSizeDecoder<BuyPacksInstructionData>;
|
|
771
|
+
export declare function getBuyPacksInstructionDataCodec(): FixedSizeCodec<BuyPacksInstructionDataArgs, BuyPacksInstructionData>;
|
|
772
|
+
export type BuyPacksAsyncInput<TAccountPurchaser extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountActivity extends string = string, TAccountMint extends string = string, TAccountQuoteMint extends string = string, TAccountVault extends string = string, TAccountUserTokens extends string = string, TAccountVenue extends string = string, TAccountIdentity extends string = string, TAccountQueue extends string = string, TAccountProgram extends string = string, TAccountSlotHashes extends string = string, TAccountTokenProgram extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
580
773
|
purchaser: TransactionSigner<TAccountPurchaser>;
|
|
581
774
|
pool?: Address<TAccountPool>;
|
|
582
|
-
|
|
775
|
+
/**
|
|
776
|
+
* The nonce is the buyer's. Two buyers, or two transactions of one
|
|
777
|
+
* buyer, never name the same draw, so concurrent purchases do not
|
|
778
|
+
* collide. A nonce still in use fails here at `init`.
|
|
779
|
+
*/
|
|
780
|
+
draw?: Address<TAccountDraw>;
|
|
583
781
|
/**
|
|
584
782
|
* Rent for this account (when it is first created) is outside
|
|
585
783
|
* `total_native_debit`, the same as `draw`'s rent: Anchor's `init_if_needed`
|
|
@@ -601,16 +799,23 @@ export type BuyPackAsyncInput<TAccountPurchaser extends string = string, TAccoun
|
|
|
601
799
|
quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
|
|
602
800
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
603
801
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
802
|
+
count: BuyPacksInstructionDataArgs["count"];
|
|
803
|
+
nonce: BuyPacksInstructionDataArgs["nonce"];
|
|
804
|
+
maxQuoteIn: BuyPacksInstructionDataArgs["maxQuoteIn"];
|
|
805
|
+
minFirstMaximum: BuyPacksInstructionDataArgs["minFirstMaximum"];
|
|
806
|
+
maxNativeDebit: BuyPacksInstructionDataArgs["maxNativeDebit"];
|
|
607
807
|
};
|
|
608
|
-
export declare function
|
|
808
|
+
export declare function getBuyPacksInstructionAsync<TAccountPurchaser extends string, TAccountPool extends string, TAccountDraw extends string, TAccountActivity extends string, TAccountMint extends string, TAccountQuoteMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountVenue extends string, TAccountIdentity extends string, TAccountQueue extends string, TAccountProgram extends string, TAccountSlotHashes extends string, TAccountTokenProgram extends string, TAccountQuoteTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: BuyPacksAsyncInput<TAccountPurchaser, TAccountPool, TAccountDraw, TAccountActivity, TAccountMint, TAccountQuoteMint, TAccountVault, TAccountUserTokens, TAccountVenue, TAccountIdentity, TAccountQueue, TAccountProgram, TAccountSlotHashes, TAccountTokenProgram, TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
609
809
|
programAddress?: TProgramAddress;
|
|
610
|
-
}): Promise<
|
|
611
|
-
export type
|
|
810
|
+
}): Promise<BuyPacksInstruction<TProgramAddress, TAccountPurchaser, TAccountPool, TAccountDraw, TAccountActivity, TAccountMint, TAccountQuoteMint, TAccountVault, TAccountUserTokens, TAccountVenue, TAccountIdentity, TAccountQueue, TAccountProgram, TAccountSlotHashes, TAccountTokenProgram, TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>>;
|
|
811
|
+
export type BuyPacksInput<TAccountPurchaser extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountActivity extends string = string, TAccountMint extends string = string, TAccountQuoteMint extends string = string, TAccountVault extends string = string, TAccountUserTokens extends string = string, TAccountVenue extends string = string, TAccountIdentity extends string = string, TAccountQueue extends string = string, TAccountProgram extends string = string, TAccountSlotHashes extends string = string, TAccountTokenProgram extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
612
812
|
purchaser: TransactionSigner<TAccountPurchaser>;
|
|
613
813
|
pool: Address<TAccountPool>;
|
|
814
|
+
/**
|
|
815
|
+
* The nonce is the buyer's. Two buyers, or two transactions of one
|
|
816
|
+
* buyer, never name the same draw, so concurrent purchases do not
|
|
817
|
+
* collide. A nonce still in use fails here at `init`.
|
|
818
|
+
*/
|
|
614
819
|
draw: Address<TAccountDraw>;
|
|
615
820
|
/**
|
|
616
821
|
* Rent for this account (when it is first created) is outside
|
|
@@ -633,18 +838,25 @@ export type BuyPackInput<TAccountPurchaser extends string = string, TAccountPool
|
|
|
633
838
|
quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
|
|
634
839
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
635
840
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
841
|
+
count: BuyPacksInstructionDataArgs["count"];
|
|
842
|
+
nonce: BuyPacksInstructionDataArgs["nonce"];
|
|
843
|
+
maxQuoteIn: BuyPacksInstructionDataArgs["maxQuoteIn"];
|
|
844
|
+
minFirstMaximum: BuyPacksInstructionDataArgs["minFirstMaximum"];
|
|
845
|
+
maxNativeDebit: BuyPacksInstructionDataArgs["maxNativeDebit"];
|
|
639
846
|
};
|
|
640
|
-
export declare function
|
|
847
|
+
export declare function getBuyPacksInstruction<TAccountPurchaser extends string, TAccountPool extends string, TAccountDraw extends string, TAccountActivity extends string, TAccountMint extends string, TAccountQuoteMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountVenue extends string, TAccountIdentity extends string, TAccountQueue extends string, TAccountProgram extends string, TAccountSlotHashes extends string, TAccountTokenProgram extends string, TAccountQuoteTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: BuyPacksInput<TAccountPurchaser, TAccountPool, TAccountDraw, TAccountActivity, TAccountMint, TAccountQuoteMint, TAccountVault, TAccountUserTokens, TAccountVenue, TAccountIdentity, TAccountQueue, TAccountProgram, TAccountSlotHashes, TAccountTokenProgram, TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
641
848
|
programAddress?: TProgramAddress;
|
|
642
|
-
}):
|
|
643
|
-
export type
|
|
849
|
+
}): BuyPacksInstruction<TProgramAddress, TAccountPurchaser, TAccountPool, TAccountDraw, TAccountActivity, TAccountMint, TAccountQuoteMint, TAccountVault, TAccountUserTokens, TAccountVenue, TAccountIdentity, TAccountQueue, TAccountProgram, TAccountSlotHashes, TAccountTokenProgram, TAccountQuoteTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>;
|
|
850
|
+
export type ParsedBuyPacksInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
644
851
|
programAddress: Address<TProgram>;
|
|
645
852
|
accounts: {
|
|
646
853
|
purchaser: TAccountMetas[0];
|
|
647
854
|
pool: TAccountMetas[1];
|
|
855
|
+
/**
|
|
856
|
+
* The nonce is the buyer's. Two buyers, or two transactions of one
|
|
857
|
+
* buyer, never name the same draw, so concurrent purchases do not
|
|
858
|
+
* collide. A nonce still in use fails here at `init`.
|
|
859
|
+
*/
|
|
648
860
|
draw: TAccountMetas[2];
|
|
649
861
|
/**
|
|
650
862
|
* Rent for this account (when it is first created) is outside
|
|
@@ -668,9 +880,148 @@ export type ParsedBuyPackInstruction<TProgram extends string = typeof GABOX_PROG
|
|
|
668
880
|
associatedTokenProgram: TAccountMetas[15];
|
|
669
881
|
systemProgram: TAccountMetas[16];
|
|
670
882
|
};
|
|
671
|
-
data:
|
|
883
|
+
data: BuyPacksInstructionData;
|
|
884
|
+
};
|
|
885
|
+
export declare function parseBuyPacksInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedBuyPacksInstruction<TProgram, TAccountMetas>;
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region src/generated/instructions/claimPrize.d.ts
|
|
888
|
+
export declare const CLAIM_PRIZE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
889
|
+
export declare function getClaimPrizeDiscriminatorBytes(): ReadonlyUint8Array;
|
|
890
|
+
export type ClaimPrizeInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountPayer extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountDraw extends string | AccountMeta<string> = string, TAccountPurchaser extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountUserTokens extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountAssociatedTokenProgram extends string | AccountMeta<string> = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountDraw extends string ? WritableAccount<TAccountDraw> : TAccountDraw, TAccountPurchaser extends string ? WritableAccount<TAccountPurchaser> : TAccountPurchaser, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault, TAccountUserTokens extends string ? WritableAccount<TAccountUserTokens> : TAccountUserTokens, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts]>;
|
|
891
|
+
export type ClaimPrizeInstructionData = {
|
|
892
|
+
discriminator: ReadonlyUint8Array;
|
|
893
|
+
};
|
|
894
|
+
export type ClaimPrizeInstructionDataArgs = {};
|
|
895
|
+
export declare function getClaimPrizeInstructionDataEncoder(): FixedSizeEncoder<ClaimPrizeInstructionDataArgs>;
|
|
896
|
+
export declare function getClaimPrizeInstructionDataDecoder(): FixedSizeDecoder<ClaimPrizeInstructionData>;
|
|
897
|
+
export declare function getClaimPrizeInstructionDataCodec(): FixedSizeCodec<ClaimPrizeInstructionDataArgs, ClaimPrizeInstructionData>;
|
|
898
|
+
export type ClaimPrizeAsyncInput<TAccountPayer extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountPurchaser extends string = string, TAccountMint extends string = string, TAccountVault extends string = string, TAccountUserTokens extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
899
|
+
/** Any signer. Pays the ATA rent when the account is missing. */
|
|
900
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
901
|
+
pool?: Address<TAccountPool>;
|
|
902
|
+
draw: Address<TAccountDraw>;
|
|
903
|
+
purchaser: Address<TAccountPurchaser>;
|
|
904
|
+
mint: Address<TAccountMint>;
|
|
905
|
+
vault: Address<TAccountVault>;
|
|
906
|
+
/**
|
|
907
|
+
* The purchaser's ATA. An existing account must still belong to the
|
|
908
|
+
* purchaser; one whose owner was changed fails here, and only
|
|
909
|
+
* `claim_prize_to` can pay that draw.
|
|
910
|
+
*/
|
|
911
|
+
userTokens?: Address<TAccountUserTokens>;
|
|
912
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
913
|
+
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
914
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
915
|
+
};
|
|
916
|
+
export declare function getClaimPrizeInstructionAsync<TAccountPayer extends string, TAccountPool extends string, TAccountDraw extends string, TAccountPurchaser extends string, TAccountMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: ClaimPrizeAsyncInput<TAccountPayer, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
917
|
+
programAddress?: TProgramAddress;
|
|
918
|
+
}): Promise<ClaimPrizeInstruction<TProgramAddress, TAccountPayer, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>>;
|
|
919
|
+
export type ClaimPrizeInput<TAccountPayer extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountPurchaser extends string = string, TAccountMint extends string = string, TAccountVault extends string = string, TAccountUserTokens extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountSystemProgram extends string = string> = {
|
|
920
|
+
/** Any signer. Pays the ATA rent when the account is missing. */
|
|
921
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
922
|
+
pool: Address<TAccountPool>;
|
|
923
|
+
draw: Address<TAccountDraw>;
|
|
924
|
+
purchaser: Address<TAccountPurchaser>;
|
|
925
|
+
mint: Address<TAccountMint>;
|
|
926
|
+
vault: Address<TAccountVault>;
|
|
927
|
+
/**
|
|
928
|
+
* The purchaser's ATA. An existing account must still belong to the
|
|
929
|
+
* purchaser; one whose owner was changed fails here, and only
|
|
930
|
+
* `claim_prize_to` can pay that draw.
|
|
931
|
+
*/
|
|
932
|
+
userTokens: Address<TAccountUserTokens>;
|
|
933
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
934
|
+
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
935
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
936
|
+
};
|
|
937
|
+
export declare function getClaimPrizeInstruction<TAccountPayer extends string, TAccountPool extends string, TAccountDraw extends string, TAccountPurchaser extends string, TAccountMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: ClaimPrizeInput<TAccountPayer, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
938
|
+
programAddress?: TProgramAddress;
|
|
939
|
+
}): ClaimPrizeInstruction<TProgramAddress, TAccountPayer, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>;
|
|
940
|
+
export type ParsedClaimPrizeInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
941
|
+
programAddress: Address<TProgram>;
|
|
942
|
+
accounts: {
|
|
943
|
+
/** Any signer. Pays the ATA rent when the account is missing. */
|
|
944
|
+
payer: TAccountMetas[0];
|
|
945
|
+
pool: TAccountMetas[1];
|
|
946
|
+
draw: TAccountMetas[2];
|
|
947
|
+
purchaser: TAccountMetas[3];
|
|
948
|
+
mint: TAccountMetas[4];
|
|
949
|
+
vault: TAccountMetas[5];
|
|
950
|
+
/**
|
|
951
|
+
* The purchaser's ATA. An existing account must still belong to the
|
|
952
|
+
* purchaser; one whose owner was changed fails here, and only
|
|
953
|
+
* `claim_prize_to` can pay that draw.
|
|
954
|
+
*/
|
|
955
|
+
userTokens: TAccountMetas[6];
|
|
956
|
+
tokenProgram: TAccountMetas[7];
|
|
957
|
+
associatedTokenProgram: TAccountMetas[8];
|
|
958
|
+
systemProgram: TAccountMetas[9];
|
|
959
|
+
};
|
|
960
|
+
data: ClaimPrizeInstructionData;
|
|
961
|
+
};
|
|
962
|
+
export declare function parseClaimPrizeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimPrizeInstruction<TProgram, TAccountMetas>;
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region src/generated/instructions/claimPrizeTo.d.ts
|
|
965
|
+
export declare const CLAIM_PRIZE_TO_DISCRIMINATOR: ReadonlyUint8Array;
|
|
966
|
+
export declare function getClaimPrizeToDiscriminatorBytes(): ReadonlyUint8Array;
|
|
967
|
+
export type ClaimPrizeToInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountPurchaser extends string | AccountMeta<string> = string, TAccountPool extends string | AccountMeta<string> = string, TAccountDraw extends string | AccountMeta<string> = string, TAccountMint extends string | AccountMeta<string> = string, TAccountVault extends string | AccountMeta<string> = string, TAccountDestination extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPurchaser extends string ? WritableSignerAccount<TAccountPurchaser> & AccountSignerMeta<TAccountPurchaser> : TAccountPurchaser, TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountDraw extends string ? WritableAccount<TAccountDraw> : TAccountDraw, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountVault extends string ? WritableAccount<TAccountVault> : TAccountVault, TAccountDestination extends string ? WritableAccount<TAccountDestination> : TAccountDestination, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...TRemainingAccounts]>;
|
|
968
|
+
export type ClaimPrizeToInstructionData = {
|
|
969
|
+
discriminator: ReadonlyUint8Array;
|
|
970
|
+
};
|
|
971
|
+
export type ClaimPrizeToInstructionDataArgs = {};
|
|
972
|
+
export declare function getClaimPrizeToInstructionDataEncoder(): FixedSizeEncoder<ClaimPrizeToInstructionDataArgs>;
|
|
973
|
+
export declare function getClaimPrizeToInstructionDataDecoder(): FixedSizeDecoder<ClaimPrizeToInstructionData>;
|
|
974
|
+
export declare function getClaimPrizeToInstructionDataCodec(): FixedSizeCodec<ClaimPrizeToInstructionDataArgs, ClaimPrizeToInstructionData>;
|
|
975
|
+
export type ClaimPrizeToAsyncInput<TAccountPurchaser extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountMint extends string = string, TAccountVault extends string = string, TAccountDestination extends string = string, TAccountTokenProgram extends string = string> = {
|
|
976
|
+
purchaser: TransactionSigner<TAccountPurchaser>;
|
|
977
|
+
pool?: Address<TAccountPool>;
|
|
978
|
+
draw: Address<TAccountDraw>;
|
|
979
|
+
mint: Address<TAccountMint>;
|
|
980
|
+
vault: Address<TAccountVault>;
|
|
981
|
+
/**
|
|
982
|
+
* Any existing classic token account for this coin that the purchaser
|
|
983
|
+
* owns. Nothing is created here.
|
|
984
|
+
*/
|
|
985
|
+
destination: Address<TAccountDestination>;
|
|
986
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
987
|
+
};
|
|
988
|
+
export declare function getClaimPrizeToInstructionAsync<TAccountPurchaser extends string, TAccountPool extends string, TAccountDraw extends string, TAccountMint extends string, TAccountVault extends string, TAccountDestination extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: ClaimPrizeToAsyncInput<TAccountPurchaser, TAccountPool, TAccountDraw, TAccountMint, TAccountVault, TAccountDestination, TAccountTokenProgram>, config?: {
|
|
989
|
+
programAddress?: TProgramAddress;
|
|
990
|
+
}): Promise<ClaimPrizeToInstruction<TProgramAddress, TAccountPurchaser, TAccountPool, TAccountDraw, TAccountMint, TAccountVault, TAccountDestination, TAccountTokenProgram>>;
|
|
991
|
+
export type ClaimPrizeToInput<TAccountPurchaser extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountMint extends string = string, TAccountVault extends string = string, TAccountDestination extends string = string, TAccountTokenProgram extends string = string> = {
|
|
992
|
+
purchaser: TransactionSigner<TAccountPurchaser>;
|
|
993
|
+
pool: Address<TAccountPool>;
|
|
994
|
+
draw: Address<TAccountDraw>;
|
|
995
|
+
mint: Address<TAccountMint>;
|
|
996
|
+
vault: Address<TAccountVault>;
|
|
997
|
+
/**
|
|
998
|
+
* Any existing classic token account for this coin that the purchaser
|
|
999
|
+
* owns. Nothing is created here.
|
|
1000
|
+
*/
|
|
1001
|
+
destination: Address<TAccountDestination>;
|
|
1002
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
1003
|
+
};
|
|
1004
|
+
export declare function getClaimPrizeToInstruction<TAccountPurchaser extends string, TAccountPool extends string, TAccountDraw extends string, TAccountMint extends string, TAccountVault extends string, TAccountDestination extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: ClaimPrizeToInput<TAccountPurchaser, TAccountPool, TAccountDraw, TAccountMint, TAccountVault, TAccountDestination, TAccountTokenProgram>, config?: {
|
|
1005
|
+
programAddress?: TProgramAddress;
|
|
1006
|
+
}): ClaimPrizeToInstruction<TProgramAddress, TAccountPurchaser, TAccountPool, TAccountDraw, TAccountMint, TAccountVault, TAccountDestination, TAccountTokenProgram>;
|
|
1007
|
+
export type ParsedClaimPrizeToInstruction<TProgram extends string = typeof GABOX_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
1008
|
+
programAddress: Address<TProgram>;
|
|
1009
|
+
accounts: {
|
|
1010
|
+
purchaser: TAccountMetas[0];
|
|
1011
|
+
pool: TAccountMetas[1];
|
|
1012
|
+
draw: TAccountMetas[2];
|
|
1013
|
+
mint: TAccountMetas[3];
|
|
1014
|
+
vault: TAccountMetas[4];
|
|
1015
|
+
/**
|
|
1016
|
+
* Any existing classic token account for this coin that the purchaser
|
|
1017
|
+
* owns. Nothing is created here.
|
|
1018
|
+
*/
|
|
1019
|
+
destination: TAccountMetas[5];
|
|
1020
|
+
tokenProgram: TAccountMetas[6];
|
|
1021
|
+
};
|
|
1022
|
+
data: ClaimPrizeToInstructionData;
|
|
672
1023
|
};
|
|
673
|
-
export declare function
|
|
1024
|
+
export declare function parseClaimPrizeToInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimPrizeToInstruction<TProgram, TAccountMetas>;
|
|
674
1025
|
//#endregion
|
|
675
1026
|
//#region src/generated/instructions/deliverDraw.d.ts
|
|
676
1027
|
export declare const DELIVER_DRAW_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -679,11 +1030,11 @@ export type DeliverDrawInstruction<TProgram extends string = typeof GABOX_PROGRA
|
|
|
679
1030
|
export type DeliverDrawInstructionData = {
|
|
680
1031
|
discriminator: ReadonlyUint8Array;
|
|
681
1032
|
randomness: ReadonlyUint8Array;
|
|
682
|
-
|
|
1033
|
+
seqStart: bigint;
|
|
683
1034
|
};
|
|
684
1035
|
export type DeliverDrawInstructionDataArgs = {
|
|
685
1036
|
randomness: ReadonlyUint8Array;
|
|
686
|
-
|
|
1037
|
+
seqStart: number | bigint;
|
|
687
1038
|
};
|
|
688
1039
|
export declare function getDeliverDrawInstructionDataEncoder(): FixedSizeEncoder<DeliverDrawInstructionDataArgs>;
|
|
689
1040
|
export declare function getDeliverDrawInstructionDataDecoder(): FixedSizeDecoder<DeliverDrawInstructionData>;
|
|
@@ -691,14 +1042,18 @@ export declare function getDeliverDrawInstructionDataCodec(): FixedSizeCodec<Del
|
|
|
691
1042
|
export type DeliverDrawAsyncInput<TAccountOracleIdentity extends string = string, TAccountPool extends string = string, TAccountDraw extends string = string, TAccountPurchaser extends string = string, TAccountMint extends string = string, TAccountVault extends string = string, TAccountUserTokens extends string = string, TAccountTokenProgram extends string = string> = {
|
|
692
1043
|
oracleIdentity?: TransactionSigner<TAccountOracleIdentity>;
|
|
693
1044
|
pool?: Address<TAccountPool>;
|
|
694
|
-
draw
|
|
1045
|
+
draw: Address<TAccountDraw>;
|
|
695
1046
|
purchaser: Address<TAccountPurchaser>;
|
|
696
1047
|
mint: Address<TAccountMint>;
|
|
697
1048
|
vault: Address<TAccountVault>;
|
|
698
|
-
|
|
1049
|
+
/**
|
|
1050
|
+
* account may be missing or unusable; the handler then owes the prize
|
|
1051
|
+
* instead of failing.
|
|
1052
|
+
*/
|
|
1053
|
+
userTokens: Address<TAccountUserTokens>;
|
|
699
1054
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
700
1055
|
randomness: DeliverDrawInstructionDataArgs["randomness"];
|
|
701
|
-
|
|
1056
|
+
seqStart: DeliverDrawInstructionDataArgs["seqStart"];
|
|
702
1057
|
};
|
|
703
1058
|
export declare function getDeliverDrawInstructionAsync<TAccountOracleIdentity extends string, TAccountPool extends string, TAccountDraw extends string, TAccountPurchaser extends string, TAccountMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: DeliverDrawAsyncInput<TAccountOracleIdentity, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram>, config?: {
|
|
704
1059
|
programAddress?: TProgramAddress;
|
|
@@ -710,10 +1065,14 @@ export type DeliverDrawInput<TAccountOracleIdentity extends string = string, TAc
|
|
|
710
1065
|
purchaser: Address<TAccountPurchaser>;
|
|
711
1066
|
mint: Address<TAccountMint>;
|
|
712
1067
|
vault: Address<TAccountVault>;
|
|
1068
|
+
/**
|
|
1069
|
+
* account may be missing or unusable; the handler then owes the prize
|
|
1070
|
+
* instead of failing.
|
|
1071
|
+
*/
|
|
713
1072
|
userTokens: Address<TAccountUserTokens>;
|
|
714
1073
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
715
1074
|
randomness: DeliverDrawInstructionDataArgs["randomness"];
|
|
716
|
-
|
|
1075
|
+
seqStart: DeliverDrawInstructionDataArgs["seqStart"];
|
|
717
1076
|
};
|
|
718
1077
|
export declare function getDeliverDrawInstruction<TAccountOracleIdentity extends string, TAccountPool extends string, TAccountDraw extends string, TAccountPurchaser extends string, TAccountMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: DeliverDrawInput<TAccountOracleIdentity, TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram>, config?: {
|
|
719
1078
|
programAddress?: TProgramAddress;
|
|
@@ -727,6 +1086,10 @@ export type ParsedDeliverDrawInstruction<TProgram extends string = typeof GABOX_
|
|
|
727
1086
|
purchaser: TAccountMetas[3];
|
|
728
1087
|
mint: TAccountMetas[4];
|
|
729
1088
|
vault: TAccountMetas[5];
|
|
1089
|
+
/**
|
|
1090
|
+
* account may be missing or unusable; the handler then owes the prize
|
|
1091
|
+
* instead of failing.
|
|
1092
|
+
*/
|
|
730
1093
|
userTokens: TAccountMetas[6];
|
|
731
1094
|
tokenProgram: TAccountMetas[7];
|
|
732
1095
|
};
|
|
@@ -751,7 +1114,8 @@ export type ExpireDrawAsyncInput<TAccountPool extends string = string, TAccountD
|
|
|
751
1114
|
purchaser: Address<TAccountPurchaser>;
|
|
752
1115
|
mint: Address<TAccountMint>;
|
|
753
1116
|
vault: Address<TAccountVault>;
|
|
754
|
-
|
|
1117
|
+
/** same as in `deliver_draw`. */
|
|
1118
|
+
userTokens: Address<TAccountUserTokens>;
|
|
755
1119
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
756
1120
|
};
|
|
757
1121
|
export declare function getExpireDrawInstructionAsync<TAccountPool extends string, TAccountDraw extends string, TAccountPurchaser extends string, TAccountMint extends string, TAccountVault extends string, TAccountUserTokens extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof GABOX_PROGRAM_ADDRESS>(input: ExpireDrawAsyncInput<TAccountPool, TAccountDraw, TAccountPurchaser, TAccountMint, TAccountVault, TAccountUserTokens, TAccountTokenProgram>, config?: {
|
|
@@ -763,6 +1127,7 @@ export type ExpireDrawInput<TAccountPool extends string = string, TAccountDraw e
|
|
|
763
1127
|
purchaser: Address<TAccountPurchaser>;
|
|
764
1128
|
mint: Address<TAccountMint>;
|
|
765
1129
|
vault: Address<TAccountVault>;
|
|
1130
|
+
/** same as in `deliver_draw`. */
|
|
766
1131
|
userTokens: Address<TAccountUserTokens>;
|
|
767
1132
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
768
1133
|
};
|
|
@@ -777,6 +1142,7 @@ export type ParsedExpireDrawInstruction<TProgram extends string = typeof GABOX_P
|
|
|
777
1142
|
purchaser: TAccountMetas[2];
|
|
778
1143
|
mint: TAccountMetas[3];
|
|
779
1144
|
vault: TAccountMetas[4];
|
|
1145
|
+
/** same as in `deliver_draw`. */
|
|
780
1146
|
userTokens: TAccountMetas[5];
|
|
781
1147
|
tokenProgram: TAccountMetas[6];
|
|
782
1148
|
};
|
|
@@ -1093,7 +1459,7 @@ export type ParsedSellTokensInstruction<TProgram extends string = typeof GABOX_P
|
|
|
1093
1459
|
};
|
|
1094
1460
|
export declare function parseSellTokensInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSellTokensInstruction<TProgram, TAccountMetas>;
|
|
1095
1461
|
declare namespace index_d_exports {
|
|
1096
|
-
export { ActivitySeeds,
|
|
1462
|
+
export { ActivitySeeds, BUY_PACKS_DISCRIMINATOR, BuyPacksAsyncInput, BuyPacksInput, BuyPacksInstruction, BuyPacksInstructionData, BuyPacksInstructionDataArgs, CLAIM_PRIZE_DISCRIMINATOR, CLAIM_PRIZE_TO_DISCRIMINATOR, ClaimPrizeAsyncInput, ClaimPrizeInput, ClaimPrizeInstruction, ClaimPrizeInstructionData, ClaimPrizeInstructionDataArgs, ClaimPrizeToAsyncInput, ClaimPrizeToInput, ClaimPrizeToInstruction, ClaimPrizeToInstructionData, ClaimPrizeToInstructionDataArgs, DELIVER_DRAW_DISCRIMINATOR, DRAW_DISCRIMINATOR, DRAW_RESOLVED_EVENT_DISCRIMINATOR, DeliverDrawAsyncInput, DeliverDrawInput, DeliverDrawInstruction, DeliverDrawInstructionData, DeliverDrawInstructionDataArgs, Draw, DrawArgs, DrawResolvedEvent, DrawResolvedEventArgs, DrawSeeds, EXPIRE_DRAW_DISCRIMINATOR, ExpireDrawAsyncInput, ExpireDrawInput, ExpireDrawInstruction, ExpireDrawInstructionData, ExpireDrawInstructionDataArgs, FUND_PRIZES_DISCRIMINATOR, FundPrizesAsyncInput, FundPrizesInput, FundPrizesInstruction, FundPrizesInstructionData, FundPrizesInstructionDataArgs, GABOX_ERROR__ARITHMETIC, GABOX_ERROR__DRAW_ALREADY_SETTLED, GABOX_ERROR__DRAW_EXPIRED, GABOX_ERROR__DRAW_NOT_SETTLED, 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__TOO_MANY_PACKS, GABOX_ERROR__UNFUNDED_EXPECTATION, GABOX_ERROR__UNSUPPORTED_MINT, GABOX_ERROR__WALLET_ACTIVITY_MISMATCH, GABOX_ERROR__WRONG_DESTINATION, GABOX_ERROR__WRONG_DRAW, GABOX_ERROR__WRONG_TOKEN_ACCOUNT, GABOX_ERROR__ZERO_AMOUNT, GABOX_PROGRAM_ADDRESS, GaboxAccount, GaboxError, GaboxEvent, GaboxInstruction, GaboxPlugin, GaboxPluginAccounts, GaboxPluginInstructions, GaboxPluginPdas, GaboxPluginRequirements, INITIALIZE_POOL_DISCRIMINATOR, InitializePoolAsyncInput, InitializePoolInput, InitializePoolInstruction, InitializePoolInstructionData, InitializePoolInstructionDataArgs, PACKS_BOUGHT_EVENT_DISCRIMINATOR, POOL_CREATED_EVENT_DISCRIMINATOR, POOL_DISCRIMINATOR, PRIZES_FUNDED_EVENT_DISCRIMINATOR, PRIZE_CLAIMED_EVENT_DISCRIMINATOR, PackResult, PackResultArgs, PacksBoughtEvent, PacksBoughtEventArgs, ParsedBuyPacksInstruction, ParsedClaimPrizeInstruction, ParsedClaimPrizeToInstruction, ParsedDeliverDrawInstruction, ParsedExpireDrawInstruction, ParsedFundPrizesInstruction, ParsedGaboxInstruction, ParsedInitializePoolInstruction, ParsedRetryDrawInstruction, ParsedSellTokensInstruction, Pool, PoolArgs, PoolCreatedEvent, PoolCreatedEventArgs, PoolSeeds, Prize, PrizeArgs, PrizeClaimedEvent, PrizeClaimedEventArgs, PrizesFundedEvent, PrizesFundedEventArgs, RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR, RETRY_DRAW_DISCRIMINATOR, RandomnessRetriedEvent, RandomnessRetriedEventArgs, RetryDrawAsyncInput, RetryDrawInput, RetryDrawInstruction, RetryDrawInstructionData, RetryDrawInstructionDataArgs, SELL_TOKENS_DISCRIMINATOR, SellTokensAsyncInput, SellTokensInput, SellTokensInstruction, SellTokensInstructionData, SellTokensInstructionDataArgs, TOKENS_SOLD_EVENT_DISCRIMINATOR, Tier, TierArgs, TokensSoldEvent, TokensSoldEventArgs, WALLET_ACTIVITY_DISCRIMINATOR, WalletActivity, WalletActivityArgs, decodeDraw, decodePool, decodeWalletActivity, fetchAllDraw, fetchAllMaybeDraw, fetchAllMaybePool, fetchAllMaybeWalletActivity, fetchAllPool, fetchAllWalletActivity, fetchDraw, fetchMaybeDraw, fetchMaybePool, fetchMaybeWalletActivity, fetchPool, fetchWalletActivity, findActivityPda, findDrawPda, findIdentityPda, findPoolPda, gaboxProgram, getBuyPacksDiscriminatorBytes, getBuyPacksInstruction, getBuyPacksInstructionAsync, getBuyPacksInstructionDataCodec, getBuyPacksInstructionDataDecoder, getBuyPacksInstructionDataEncoder, getClaimPrizeDiscriminatorBytes, getClaimPrizeInstruction, getClaimPrizeInstructionAsync, getClaimPrizeInstructionDataCodec, getClaimPrizeInstructionDataDecoder, getClaimPrizeInstructionDataEncoder, getClaimPrizeToDiscriminatorBytes, getClaimPrizeToInstruction, getClaimPrizeToInstructionAsync, getClaimPrizeToInstructionDataCodec, getClaimPrizeToInstructionDataDecoder, getClaimPrizeToInstructionDataEncoder, 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, getPackResultCodec, getPackResultDecoder, getPackResultEncoder, getPacksBoughtEventCodec, getPacksBoughtEventDecoder, getPacksBoughtEventDiscriminatorBytes, getPacksBoughtEventEncoder, getPoolCodec, getPoolCreatedEventCodec, getPoolCreatedEventDecoder, getPoolCreatedEventDiscriminatorBytes, getPoolCreatedEventEncoder, getPoolDecoder, getPoolDiscriminatorBytes, getPoolEncoder, getPoolSize, getPrizeClaimedEventCodec, getPrizeClaimedEventDecoder, getPrizeClaimedEventDiscriminatorBytes, getPrizeClaimedEventEncoder, 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, parseBuyPacksInstruction, parseClaimPrizeInstruction, parseClaimPrizeToInstruction, parseDeliverDrawInstruction, parseDrawResolvedEvent, parseExpireDrawInstruction, parseFundPrizesInstruction, parseGaboxInstruction, parseInitializePoolInstruction, parsePacksBoughtEvent, parsePoolCreatedEvent, parsePrizeClaimedEvent, parsePrizesFundedEvent, parseRandomnessRetriedEvent, parseRetryDrawInstruction, parseSellTokensInstruction, parseTokensSoldEvent };
|
|
1097
1463
|
}
|
|
1098
1464
|
//#endregion
|
|
1099
1465
|
export { index_d_exports as t };
|