@gabox-labs/sdk 0.6.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.
@@ -1,4 +1,42 @@
1
1
  import { AccountMeta, Address, AddressesByLookupTableAddress, Instruction, Rpc, RpcSubscriptions, SolanaRpcApi, SolanaRpcSubscriptionsApi, TransactionMessage, TransactionMessageWithBlockhashLifetime, TransactionMessageWithFeePayerSigner, TransactionSigner } from "@solana/kit";
2
+ //#region src/route/types.d.ts
3
+ /** Which of the two swap modes produced a route. */
4
+ type RouteMode = 'exactOut' | 'exactIn';
5
+ /** One priced swap, ready to put in a transaction message. */
6
+ type Route = {
7
+ /** The swap's own instructions, in order. No compute budget instruction is included. */
8
+ instructions: Instruction[];
9
+ /** The lookup tables the instructions above were compressed against. */
10
+ lookupTables: AddressesByLookupTableAddress;
11
+ /** The input amount. Exact for an exact-in route, a maximum for an exact-out one. */
12
+ inAmount: bigint;
13
+ /** The output amount. Exact for an exact-out route, a minimum for an exact-in one. */
14
+ outAmount: bigint;
15
+ mode: RouteMode;
16
+ /**
17
+ * The compute units this route needs, on top of what the Gabox instruction uses.
18
+ *
19
+ * The swap shares one transaction with the Gabox instruction, so it shares the budget too. Each
20
+ * provider states its own figure: Jupiter returns one with the route, and the CPMM provider uses
21
+ * a measured number, because it is always one pool. A builder adds this to its own limit and caps
22
+ * the total at the runtime's ceiling.
23
+ */
24
+ computeUnits: number;
25
+ };
26
+ /**
27
+ * Something that can price and build a swap between two mints for one wallet.
28
+ *
29
+ * `client` comes first, the way every chain-touching function in this SDK takes it. `user` is the
30
+ * wallet that will sign: its token accounts are the swap's own source and destination, and the
31
+ * provider creates whichever of them is missing.
32
+ */
33
+ type RouteProvider = {
34
+ /** Buy exactly `amount` of `output`, spending as much `input` as the route needs. */
35
+ exactOut(client: GaboxClient, input: Address, output: Address, amount: bigint, user: Address): Promise<Route>;
36
+ /** Spend exactly `amount` of `input` and take whatever `output` it buys. */
37
+ exactIn(client: GaboxClient, input: Address, output: Address, amount: bigint, user: Address): Promise<Route>;
38
+ };
39
+ //#endregion
2
40
  //#region src/rpc.d.ts
3
41
  type Cluster = 'devnet' | 'mainnet-beta' | 'localnet';
4
42
  /** Solana's public endpoints, and the test validator's default ports. */
@@ -25,6 +63,15 @@ type ClientConfig = {
25
63
  * which only devnet has today; other clusters default to none. Pass `{}` to disable compression.
26
64
  */
27
65
  addressLookupTables?: AddressesByLookupTableAddress;
66
+ /**
67
+ * How a buyer pays in SOL for a machine priced in another token.
68
+ *
69
+ * Mainnet defaults to Jupiter, which is where the liquidity is. Devnet and localnet default to
70
+ * none, because Jupiter does not serve them: pass `raydiumCpmmRoute(pool)` with a CPMM pool that
71
+ * holds the SOL/quote pair. `null` disables the swap leg, and `payWith: 'sol'` then fails on a
72
+ * pool quoted in anything but WSOL.
73
+ */
74
+ route?: RouteProvider | null;
28
75
  };
29
76
  /**
30
77
  * Everything the SDK needs to talk to one cluster. Pass it to every chain-touching function.
@@ -39,6 +86,8 @@ type GaboxClient = Readonly<{
39
86
  rpc: GaboxRpc;
40
87
  rpcSubscriptions: GaboxRpcSubscriptions;
41
88
  addressLookupTables: AddressesByLookupTableAddress;
89
+ /** The swap provider a SOL payment routes through, or `null` when this cluster has none. */
90
+ route: RouteProvider | null;
42
91
  }>;
43
92
  /**
44
93
  * The cluster a URL names, from its text alone. A substring check, deliberately: providers spell
@@ -59,6 +108,13 @@ declare function websocketUrlFor(url: string): string;
59
108
  * the pair: the subscription reports the change, and the RPC reads the account that changed.
60
109
  */
61
110
  declare function createClient(config: ClientConfig): GaboxClient;
111
+ /**
112
+ * The swap provider a cluster gets when the caller names none.
113
+ *
114
+ * Jupiter on mainnet, nothing anywhere else. Jupiter's API only prices mainnet liquidity, and a
115
+ * devnet caller has to say which pool to route through, so there is nothing to guess.
116
+ */
117
+ declare function defaultRoute(cluster: Cluster): RouteProvider | null;
62
118
  //#endregion
63
119
  //#region src/raydium/abi.d.ts
64
120
  /** One account slot: its IDL name and the privileges the venue's own ABI gives it. */
@@ -74,7 +130,12 @@ type VenueInstructionAbi = {
74
130
  };
75
131
  /**
76
132
  * The Raydium deployment of one cluster. Mainnet and devnet run different programs, so every
77
- * address here differs between the two, and so does the quote the curve must raise.
133
+ * address here differs between the two.
134
+ *
135
+ * Two things are deliberately absent, and both for the same reason: the program reads them from
136
+ * the chain instead of pinning them. The CPMM fee tier comes from the Gabox platform config and
137
+ * from the migrated pool's own data. The quote assets come from Raydium's own LaunchLab
138
+ * `GlobalConfig` accounts, one per quote mint, so there is no list of quotes here.
78
139
  */
79
140
  type RaydiumClusterIds = {
80
141
  /** Raydium LaunchLab, the bonding curve a Gabox coin launches and trades on first. */
@@ -83,8 +144,6 @@ type RaydiumClusterIds = {
83
144
  readonly launchlabAuthority: Address;
84
145
  /** PDA(["__event_authority"], launchlab). */
85
146
  readonly launchlabEventAuthority: Address;
86
- /** PDA(["global_config", WSOL, u8 0, u16 big-endian 0], launchlab). Holds the curve settings. */
87
- readonly solGlobalConfig: Address;
88
147
  /** PDA(["platform_config", PLATFORM_ADMIN], launchlab). The Gabox platform on LaunchLab. */
89
148
  readonly gaboxPlatform: Address;
90
149
  /** Raydium CPMM, the pool a Gabox coin graduates into. */
@@ -92,17 +151,21 @@ type RaydiumClusterIds = {
92
151
  /** PDA(["vault_and_lp_mint_auth_seed"], cpmm). */
93
152
  readonly cpmmAuthority: Address;
94
153
  /**
95
- * The quote the curve must raise before the coin graduates, in lamports.
154
+ * The raise a WSOL-quoted curve must reach before the coin graduates, in lamports.
96
155
  *
97
- * There is no fee tier here on purpose. The Gabox platform config names the CPMM fee tier a coin
98
- * graduates into, and a migrated pool records it again in its own data. Both are read from the
99
- * chain, never compiled in.
156
+ * The program pins this one value, and only for a WSOL pool: it knows what SOL is worth to its
157
+ * own product and cannot say the same about USDC or a stock token. A pool quoted in any other
158
+ * asset picks its own raise, and LaunchLab checks it against `min_quote_fund_raising` in that
159
+ * quote's own global config.
100
160
  */
101
161
  readonly launchQuoteRaise: bigint;
102
162
  };
103
163
  declare const RAYDIUM_MAINNET_IDS: RaydiumClusterIds;
104
164
  declare const RAYDIUM_DEVNET_IDS: RaydiumClusterIds;
105
- /** Wrapped SOL. The only quote Gabox accepts today, on both venues. */
165
+ /**
166
+ * Wrapped SOL: the default quote, and the one every price in SOL is measured in. Gabox accepts any
167
+ * quote Raydium enabled on LaunchLab, so this is not the only one.
168
+ */
106
169
  declare const WSOL_MINT: Address;
107
170
  /** Metaplex Token Metadata, which LaunchLab's create instruction writes to. */
108
171
  declare const METAPLEX_PROGRAM_ADDRESS: Address;
@@ -115,8 +178,13 @@ declare const PLATFORM_ADMIN: Address;
115
178
  declare const LAUNCH_SUPPLY = 1000000000000000n;
116
179
  /** The part of the supply the LaunchLab curve sells: 793,100,000 coins. */
117
180
  declare const LAUNCH_TOTAL_BASE_SELL = 793100000000000n;
118
- /** Classic SPL Token. LaunchLab pins it on both sides of every Gabox launch and trade. */
181
+ /** Classic SPL Token. The base coin is always under it, on both venues. */
119
182
  declare const TOKEN_PROGRAM_ADDRESS: Address;
183
+ /**
184
+ * Token-2022. A quote mint may be under it, inside the bounded profile the program's
185
+ * `tokens::validate_quote_mint` accepts. The base coin never is.
186
+ */
187
+ declare const TOKEN_2022_PROGRAM_ADDRESS: Address;
120
188
  declare const ASSOCIATED_TOKEN_PROGRAM_ADDRESS: Address;
121
189
  declare const SYSTEM_PROGRAM_ADDRESS: Address;
122
190
  /** The rent sysvar. LaunchLab's create instruction still takes it. */
@@ -236,7 +304,7 @@ declare const SHARE_FEE_RATE = 0n;
236
304
  declare const CONSTANT_CURVE_TAG = 0;
237
305
  /** `migrate_type` 1: the coin graduates into a CPMM pool, not into an AMM pool. */
238
306
  declare const MIGRATE_TO_CPMM = 1;
239
- /** `AmmCreatorFeeOn::QuoteToken`, so the CPMM creator fee is paid in WSOL. */
307
+ /** `AmmCreatorFeeOn::QuoteToken`, so the CPMM creator fee is paid in the pool's quote asset. */
240
308
  declare const CREATOR_FEE_ON_QUOTE = 0;
241
309
  /** LaunchLab pool `status`: still selling on the curve. */
242
310
  declare const LAUNCHLAB_STATUS_FUND = 0;
@@ -268,6 +336,25 @@ declare function tokenAccountOwnerAndMint(data: Uint8Array): {
268
336
  mint: Address;
269
337
  owner: Address;
270
338
  };
339
+ /**
340
+ * The `decimals` of a mint. Both token programs share the first 82 bytes, so one reader covers a
341
+ * classic SPL mint and a Token-2022 one.
342
+ */
343
+ declare function mintDecimals(data: Uint8Array): number;
344
+ /**
345
+ * The `symbol` of a Metaplex token metadata account, or `null` when it carries none.
346
+ *
347
+ * Layout: a one-byte key, `update_authority` and `mint`, then the three Borsh strings `name`,
348
+ * `symbol` and `uri`. Metaplex stores them at their maximum length, NUL padded.
349
+ */
350
+ declare function metaplexSymbol(data: Uint8Array): string | null;
351
+ /**
352
+ * The `symbol` a Token-2022 mint stores in its own `TokenMetadata` extension, or `null`.
353
+ *
354
+ * The extensions are a TLV list: a u16 type, a u16 length, then the value. The metadata value is
355
+ * `update_authority`, `mint`, then the Borsh strings `name`, `symbol` and `uri`.
356
+ */
357
+ declare function token2022Symbol(data: Uint8Array): string | null;
271
358
  /** The curve pool of one coin, as far as pricing and routing need it. */
272
359
  type LaunchlabPoolState = {
273
360
  /** 0 while the curve still sells, 1 while Raydium migrates the coin, 2 once it has graduated. */
@@ -301,7 +388,13 @@ type LaunchlabPoolState = {
301
388
  /** The bytes the decoder above reads, discriminator included. The account itself is longer. */
302
389
  declare const LAUNCHLAB_POOL_STATE_HEAD_SIZE = 367;
303
390
  declare function decodeLaunchlabPool(data: Uint8Array): LaunchlabPoolState;
304
- /** LaunchLab's settings for one quote asset. Gabox reads the trade fee and the migrate fee. */
391
+ /**
392
+ * LaunchLab's settings for one quote asset.
393
+ *
394
+ * One of these exists for every quote Raydium enabled, and only Raydium's admin can create one. So
395
+ * the account itself is what proves a quote is allowed: the program checks the same four things in
396
+ * `venue/launch.rs` before it opens a pool.
397
+ */
305
398
  type LaunchlabGlobalConfig = {
306
399
  /** 0 is the constant product curve, the only shape Gabox launches. */
307
400
  curveType: number;
@@ -310,6 +403,8 @@ type LaunchlabGlobalConfig = {
310
403
  migrateFee: bigint;
311
404
  /** Raydium's own share of every curve trade, out of 1,000,000. */
312
405
  tradeFeeRate: bigint;
406
+ /** The smallest raise LaunchLab accepts for this quote, in its own base units. */
407
+ minQuoteFundRaising: bigint;
313
408
  quoteMint: Address;
314
409
  };
315
410
  declare const LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE = 115;
@@ -535,6 +630,18 @@ declare function cpmmSwapBaseInput(sides: CpmmSwapSides, rates: CpmmFeeRates, am
535
630
  //#endregion
536
631
  //#region src/raydium/venue.d.ts
537
632
  type VenueKind = 'launchlab' | 'cpmm';
633
+ /**
634
+ * The quote asset one pool is bound to, as the pool records it.
635
+ *
636
+ * `config` is LaunchLab's global config for the mint: the account that proves Raydium enabled the
637
+ * quote, and the account both venues check the trade against. `tokenProgram` owns the mint, and the
638
+ * user's quote ATA lives under it.
639
+ */
640
+ type QuoteBinding = {
641
+ mint: Address;
642
+ config: Address;
643
+ tokenProgram: Address;
644
+ };
538
645
  /** Everything `resolveVenue` learned, plus the pure functions that follow from it. */
539
646
  type ResolvedVenue = {
540
647
  kind: VenueKind;
@@ -542,6 +649,10 @@ type ResolvedVenue = {
542
649
  program: Address;
543
650
  mint: Address;
544
651
  quoteMint: Address;
652
+ /** The token program the quote mint lives under: classic SPL Token, or Token-2022. */
653
+ quoteTokenProgram: Address;
654
+ /** The trader's quote ATA. Both venues settle here, and the program pins this address. */
655
+ userQuoteToken: Address;
545
656
  /** The venue's own pool: the LaunchLab curve pool, or the migrated CPMM pool. */
546
657
  poolState: Address;
547
658
  /** The LaunchLab pool's `status`: 0 funding, 1 migrating, 2 graduated. */
@@ -556,9 +667,9 @@ type ResolvedVenue = {
556
667
  buyAccounts: AccountMeta[];
557
668
  /** The ordered account list for a sale. */
558
669
  sellAccounts: AccountMeta[];
559
- /** WSOL an exact-coins-out buy of `tokens` costs right now, the venue's fees included. */
670
+ /** Quote token an exact-coins-out buy of `tokens` costs right now, the venue's fees included. */
560
671
  quoteBuy(tokens: bigint): bigint;
561
- /** WSOL a sale of `tokens` returns right now, net of the venue's fees. */
672
+ /** Quote token a sale of `tokens` returns right now, net of the venue's fees. */
562
673
  quoteSell(tokens: bigint): bigint;
563
674
  };
564
675
  type ResolveVenueOptions = {
@@ -567,14 +678,20 @@ type ResolveVenueOptions = {
567
678
  user: Address;
568
679
  /** Force a venue instead of reading the pool's `status`. A wrong choice fails on chain. */
569
680
  venue?: VenueKind;
681
+ /** The pool's quote binding. Read from the Gabox pool when it is left out. */
682
+ quote?: QuoteBinding;
570
683
  };
684
+ /** The quote binding a Gabox pool records. One account read. */
685
+ declare function fetchQuoteBinding(client: GaboxClient, mint: Address): Promise<QuoteBinding>;
571
686
  /**
572
- * The user's WSOL associated token account.
687
+ * The user's quote associated token account, under the quote's own token program.
573
688
  *
574
- * Both venues settle in WSOL, never in native SOL. This account must exist and hold enough before a
575
- * pack is bought, and sale proceeds land in it. Every builder in `tx/` wraps the SOL it needs into
576
- * this account and closes it again in the same transaction.
689
+ * Both venues settle in this account, never in native SOL. It must exist and hold enough before a
690
+ * pack is bought, and sale proceeds land in it. For a WSOL-quoted pool every builder in `tx/` wraps
691
+ * the SOL it needs into this account and closes it again in the same transaction.
577
692
  */
693
+ declare function quoteAccountFor(user: Address, quoteMint: Address, quoteTokenProgram?: Address): Promise<Address>;
694
+ /** The user's WSOL associated token account. WSOL is always classic SPL Token. */
578
695
  declare function wsolAccountFor(user: Address): Promise<Address>;
579
696
  /** What LaunchLab's global config and the Gabox platform config say about a curve trade. */
580
697
  type CurveSettings = {
@@ -584,8 +701,14 @@ type CurveSettings = {
584
701
  /** `cpswap_config` on the platform config: the CPMM fee tier a Gabox coin graduates into. */
585
702
  cpswapConfig: Address;
586
703
  };
587
- /** Read the two pinned config accounts and take the four numbers a quote needs out of them. */
588
- declare function fetchCurveSettings(client: GaboxClient, ids?: RaydiumIds): Promise<CurveSettings>;
704
+ /**
705
+ * Read the quote's global config and the Gabox platform config, and take the four numbers a quote
706
+ * needs out of them.
707
+ *
708
+ * `quoteConfig` is the LaunchLab global config of the pool's quote asset: `pool.quoteConfig`, or
709
+ * the address `raydium.fetchQuoteConfig` derives for a coin that has no pool yet.
710
+ */
711
+ declare function fetchCurveSettings(client: GaboxClient, quoteConfig: Address, ids?: RaydiumIds): Promise<CurveSettings>;
589
712
  declare function resolveVenue(client: GaboxClient, options: ResolveVenueOptions): Promise<ResolvedVenue>;
590
713
  /** A CPMM pool that has proved, from its own data, that it is a coin's migrated pool. */
591
714
  type MigratedCpmmPool = {
@@ -598,6 +721,7 @@ type FindCpmmPoolOptions = {
598
721
  creator: Address;
599
722
  /** The fee tier the Gabox platform config names. Read it with `fetchCurveSettings`. */
600
723
  cpswapConfig: Address;
724
+ /** The pool's quote mint. Defaults to WSOL, which is the default quote. */
601
725
  quoteMint?: Address;
602
726
  };
603
727
  /**
@@ -630,12 +754,13 @@ declare function findCpmmPool(client: GaboxClient, options: FindCpmmPoolOptions)
630
754
  *
631
755
  * `creator_fee_on` is 0 when the fee follows the input token, 1 when it is always token 0, and 2
632
756
  * when it is always token 1. LaunchLab migrates a Gabox coin with `AmmCreatorFeeOn::QuoteToken`, so
633
- * the pool charges the creator fee in WSOL only: on the input of a buy, on the output of a sale.
757
+ * the pool charges the creator fee in the quote token only: on the input of a buy, on the output of
758
+ * a sale.
634
759
  */
635
760
  declare function creatorFeeOnInput(pool: CpmmPoolState, inputMint: Address): boolean;
636
761
  /**
637
- * WSOL an exact-coins-out buy of `tokens` costs right now, on whichever venue the coin trades.
638
- * Pass `pool.packTokens` for the pack price.
762
+ * Quote token an exact-coins-out buy of `tokens` costs right now, on whichever venue the coin
763
+ * trades. Pass `pool.packTokens` for the pack price.
639
764
  *
640
765
  * Use `resolveVenue` when you also need the account list, which every transaction builder does.
641
766
  * This is for a price display.
@@ -643,23 +768,33 @@ declare function creatorFeeOnInput(pool: CpmmPoolState, inputMint: Address): boo
643
768
  declare function curveQuote(client: GaboxClient, mint: Address, tokens: bigint, options?: {
644
769
  user?: Address;
645
770
  venue?: VenueKind;
771
+ quote?: QuoteBinding;
646
772
  }): Promise<bigint>;
647
- /** WSOL a sale of `tokens` returns right now, net of the venue's fees. */
773
+ /** Quote token a sale of `tokens` returns right now, net of the venue's fees. */
648
774
  declare function sellQuote(client: GaboxClient, mint: Address, tokens: bigint, options?: {
649
775
  user?: Address;
650
776
  venue?: VenueKind;
777
+ quote?: QuoteBinding;
651
778
  }): Promise<bigint>;
652
779
  /**
653
- * WSOL an exact-coins-out buy of `tokens` would cost on a curve that does not exist yet, fees
654
- * included.
780
+ * Quote token an exact-coins-out buy of `tokens` would cost on a curve that does not exist yet,
781
+ * fees included.
655
782
  *
656
783
  * This is what the seed costs. `initialize_pool` buys it in the same transaction that creates the
657
784
  * coin, so the curve is a brand-new LaunchLab curve with the pinned Gabox launch shape at that
658
785
  * moment. Exact, unless Raydium changes a fee rate between this read and the send.
659
786
  */
660
- declare function newCurveBuyCost(client: GaboxClient, tokens: bigint): Promise<bigint>;
661
- /** The starting reserves of a brand-new Gabox curve on this cluster. */
662
- declare function newCurveReserves(ids: RaydiumIds, migrateFee: bigint): CurveReserves;
787
+ declare function newCurveBuyCost(client: GaboxClient, tokens: bigint, launch: {
788
+ quoteConfig: Address;
789
+ raise: bigint;
790
+ }): Promise<bigint>;
791
+ /**
792
+ * The starting reserves of a brand-new Gabox curve.
793
+ *
794
+ * `raise` is `total_quote_fund_raising`, in the quote's own base units. It is the one launch number
795
+ * the client picks, so the reserves follow it.
796
+ */
797
+ declare function newCurveReserves(raise: bigint, migrateFee: bigint): CurveReserves;
663
798
  //#endregion
664
799
  //#region src/tx/message.d.ts
665
800
  /**
@@ -724,8 +859,10 @@ type LaunchlabTradeAccountsInput = {
724
859
  user: Address;
725
860
  /** The trader's coin ATA. `buy_pack` passes the same address as its own `user_tokens`. */
726
861
  userBaseToken: Address;
727
- /** The trader's WSOL ATA. Both venues settle here. */
862
+ /** The trader's quote ATA, under the quote's own token program. Both venues settle here. */
728
863
  userQuoteToken: Address;
864
+ /** The quote mint's token program: classic SPL Token, or Token-2022. */
865
+ quoteTokenProgram: Address;
729
866
  /** `[platform_config, quote_mint]` under LaunchLab. */
730
867
  platformFeeVault: Address;
731
868
  /** `[creator, quote_mint]` under LaunchLab, where `creator` is the coin creator. */
@@ -760,6 +897,9 @@ type CpmmTradeAccountsInput = {
760
897
  user: Address;
761
898
  userBaseToken: Address;
762
899
  userQuoteToken: Address;
900
+ /** The two token programs the pool records. Read them from the pool account, never derive them. */
901
+ baseTokenProgram: Address;
902
+ quoteTokenProgram: Address;
763
903
  };
764
904
  /** `swap_base_output`: 13 accounts. Note the argument order is `(max_amount_in, amount_out)`. */
765
905
  declare const cpmmBuyAccounts: (input: CpmmTradeAccountsInput) => AccountMeta[];
@@ -768,59 +908,87 @@ declare const cpmmSellAccounts: (input: CpmmTradeAccountsInput) => AccountMeta[]
768
908
  //#endregion
769
909
  //#region src/raydium/claim.d.ts
770
910
  /**
771
- * The instructions of a curve fee claim: create the WSOL account, claim, close it.
911
+ * The instructions of a curve fee claim, for one quote asset: create the quote account, claim, and
912
+ * close it again when the quote is WSOL.
772
913
  *
773
- * This sweeps **every** coin this wallet launched, because LaunchLab keeps one vault per wallet per
774
- * quote asset. There is no per-coin version.
914
+ * This sweeps **every** coin this wallet launched against that quote, because LaunchLab keeps one
915
+ * vault per wallet per quote asset. There is no per-coin version, and a creator with machines in
916
+ * two quote assets claims once per asset.
775
917
  */
776
- declare function getClaimCreatorFeeInstructions(creator: TransactionSigner, ids: RaydiumIds): Promise<Instruction[]>;
918
+ declare function getClaimCreatorFeeInstructions(creator: TransactionSigner, ids: RaydiumIds, quote: {
919
+ mint: Address;
920
+ tokenProgram: Address;
921
+ }): Promise<Instruction[]>;
777
922
  type ClaimCreatorFeeInput = {
778
923
  creator: TransactionSigner;
924
+ /** The quote asset to claim. Defaults to wrapped SOL. One claim per quote asset. */
925
+ quoteMint?: Address;
779
926
  } & Partial<BuildOptions>;
780
927
  /**
781
- * Claim the curve creator fee and receive it as SOL.
928
+ * Claim the curve creator fee for one quote asset.
782
929
  *
783
- * One transaction, three instructions. It sweeps every coin this wallet launched on LaunchLab.
930
+ * A WSOL claim arrives as SOL, because the builder closes the WSOL account. Any other quote arrives
931
+ * as that token, in the creator's own account.
784
932
  */
785
933
  declare function claimCreatorFee(client: GaboxClient, input: ClaimCreatorFeeInput): Promise<GaboxTransactionMessage>;
786
934
  /**
787
- * The instructions of a graduated coin's fee collection: create the WSOL account, collect, close.
935
+ * The instructions of a graduated coin's fee collection: create the quote account, collect, and
936
+ * close it again when the quote is WSOL.
788
937
  *
789
938
  * This is per coin. `collect_creator_fee` pays out both sides of the pair, so anything owed in the
790
939
  * coin itself lands in the creator's coin account and stays there.
940
+ *
941
+ * The coin's quote asset comes from its Gabox pool, so a caller never has to name it.
791
942
  */
792
943
  declare function getCollectCreatorFeeInstructions(client: GaboxClient, input: {
793
944
  mint: Address;
794
945
  creator: TransactionSigner;
946
+ quote?: QuoteBinding;
795
947
  }, ids?: RaydiumIds): Promise<Instruction[]>;
796
948
  type CollectCreatorFeeInput = {
797
949
  mint: Address;
798
950
  creator: TransactionSigner;
951
+ /** The coin's quote binding, when it is already at hand. Read from the Gabox pool otherwise. */
952
+ quote?: QuoteBinding;
799
953
  } & Partial<BuildOptions>;
800
- /** Collect one graduated coin's CPMM creator fee and receive the WSOL side as SOL. */
954
+ /**
955
+ * Collect one graduated coin's CPMM creator fee.
956
+ *
957
+ * A WSOL-quoted coin pays the quote side out as SOL, because the builder closes the WSOL account.
958
+ * Any other quote arrives as that token.
959
+ */
801
960
  declare function collectCreatorFee(client: GaboxClient, input: CollectCreatorFeeInput): Promise<GaboxTransactionMessage>;
802
- /** What a creator can collect right now. Every amount is in base units. */
961
+ /** What a creator can collect right now, for one quote asset. Every amount is in base units. */
803
962
  type CreatorFees = {
804
- /** WSOL waiting in the LaunchLab creator fee vault, across every coin this wallet launched. */
805
- curveLamports: bigint;
963
+ /** The quote asset these three amounts are measured against. */
964
+ quoteMint: Address;
806
965
  /**
807
- * WSOL the migrated CPMM pool of `mint` owes this creator. `0n` when the coin has not graduated,
808
- * and `0n` when no `mint` was passed.
966
+ * Quote token waiting in the LaunchLab creator fee vault, across every coin this wallet launched
967
+ * against that quote.
809
968
  */
810
- cpmmLamports: bigint;
969
+ curveQuote: bigint;
970
+ /**
971
+ * Quote token the migrated CPMM pool of `mint` owes this creator. `0n` when the coin has not
972
+ * graduated, and `0n` when no `mint` was passed.
973
+ */
974
+ cpmmQuote: bigint;
811
975
  /** Coins the same pool owes this creator. CPMM can charge the fee on either side. */
812
976
  cpmmTokens: bigint;
813
977
  };
814
978
  /**
815
- * Read both places a creator's fees can sit.
979
+ * Read both places a creator's fees can sit, for one quote asset.
980
+ *
981
+ * `quoteMint` defaults to wrapped SOL. LaunchLab keeps one vault per wallet per quote, so a creator
982
+ * with machines in two quote assets reads this twice.
816
983
  *
817
984
  * `mint` is optional. Without it only the curve vault is read, which is the one number that covers
818
- * every coin at once. With it the coin's CPMM pool is read too, and a coin that has not graduated
819
- * reports zeros rather than failing.
985
+ * every coin of that quote at once. With it the coin's CPMM pool is read too, and a coin that has
986
+ * not graduated reports zeros rather than failing.
820
987
  */
821
988
  declare function fetchCreatorFees(client: GaboxClient, input: {
822
989
  creator: Address;
823
990
  mint?: Address;
991
+ quoteMint?: Address;
824
992
  }): Promise<CreatorFees>;
825
993
  //#endregion
826
994
  //#region src/raydium/launch.d.ts
@@ -837,6 +1005,14 @@ type LaunchInput = {
837
1005
  symbol: string;
838
1006
  /** The metadata URI. Metaplex stores it on the mint's metadata account. */
839
1007
  uri: string;
1008
+ /** The quote asset the coin is priced in. */
1009
+ quoteMint: Address;
1010
+ /** LaunchLab's global config for that quote: `["global_config", quote_mint, 0u8, 0u16]`. */
1011
+ quoteConfig: Address;
1012
+ /** The token program that owns the quote mint: classic SPL Token, or Token-2022. */
1013
+ quoteTokenProgram: Address;
1014
+ /** `total_quote_fund_raising`, in the quote's own base units. */
1015
+ raise: bigint;
840
1016
  };
841
1017
  /**
842
1018
  * Build `initialize_v2` for one cluster's LaunchLab. `ids` is `raydiumIds(client.cluster)`.
@@ -906,29 +1082,103 @@ declare const cpmmCreatorFeeShare: (cpmm: Address, creator: Address, ammConfig:
906
1082
  /** An associated token account. Off-curve owners are allowed: pool PDAs are all off-curve. */
907
1083
  declare const ata: (owner: Address, mint: Address, tokenProgram?: Address) => Promise<Address>;
908
1084
  //#endregion
1085
+ //#region src/raydium/quote.d.ts
1086
+ /** LaunchLab's settings for one quote, and the address they were read from. */
1087
+ type QuoteConfig = LaunchlabGlobalConfig & {
1088
+ /** `["global_config", quote_mint, u8 0, u16 big-endian 0]` under LaunchLab. */
1089
+ address: Address;
1090
+ };
1091
+ /** Everything a pool, a price and an account list need to know about a quote asset. */
1092
+ type QuoteAsset = {
1093
+ mint: Address;
1094
+ /** The LaunchLab global config `initialize_pool` proves the quote with. */
1095
+ config: Address;
1096
+ /** Classic SPL Token, or Token-2022. The user's quote ATA lives under it. */
1097
+ tokenProgram: Address;
1098
+ decimals: number;
1099
+ /** From Metaplex, or from the Token-2022 metadata extension. `null` when the mint has none. */
1100
+ symbol: string | null;
1101
+ /** Raydium's own share of every curve trade, out of 1,000,000. */
1102
+ tradeFeeRate: bigint;
1103
+ /** The quote LaunchLab keeps at graduation. The starting reserves depend on it. */
1104
+ migrateFee: bigint;
1105
+ /** The smallest `raise` LaunchLab accepts for this quote, in the quote's base units. */
1106
+ minQuoteFundRaising: bigint;
1107
+ };
1108
+ /**
1109
+ * LaunchLab's global config for one quote mint, or `null` when Raydium enabled no such quote.
1110
+ *
1111
+ * Index 0 is the usual config, and the constant-product curve is the only shape Gabox launches, so
1112
+ * those two are fixed here. The decoded `quoteMint` has to be the mint asked for: a config for a
1113
+ * different quote would price the wrong asset.
1114
+ */
1115
+ declare function fetchQuoteConfig(client: GaboxClient, mint: Address, ids?: RaydiumIds): Promise<QuoteConfig | null>;
1116
+ /** Can a Gabox machine be quoted in this mint? One account read. */
1117
+ declare function isQuoteSupported(client: GaboxClient, mint: Address): Promise<boolean>;
1118
+ /**
1119
+ * The full quote asset: its LaunchLab config, its token program, its decimals and its symbol.
1120
+ *
1121
+ * Two round trips. The first reads the global config, because the config address is derived from
1122
+ * the mint. The second reads the mint and its Metaplex metadata account together.
1123
+ *
1124
+ * Throws when Raydium has no config for the mint, because no pool can be created or traded then.
1125
+ */
1126
+ declare function fetchQuoteAsset(client: GaboxClient, mint: Address, ids?: RaydiumIds): Promise<QuoteAsset>;
1127
+ /** What a price display needs about a quote mint: its program, its decimals and its symbol. */
1128
+ type QuoteDisplay = {
1129
+ tokenProgram: Address;
1130
+ decimals: number;
1131
+ symbol: string | null;
1132
+ };
1133
+ /**
1134
+ * Read a quote mint and its Metaplex metadata in one call.
1135
+ *
1136
+ * A Token-2022 mint may carry its own `TokenMetadata` extension, and that one wins: it is the
1137
+ * issuer's own record. A classic SPL mint keeps its symbol in a Metaplex account, and a mint with
1138
+ * neither reports `null`.
1139
+ */
1140
+ declare function fetchQuoteDisplay(client: GaboxClient, mint: Address): Promise<QuoteDisplay>;
1141
+ //#endregion
1142
+ //#region src/raydium/read.d.ts
1143
+ /** An account that may not exist, with its raw bytes and its owning program. */
1144
+ type MaybeAccount$1 = {
1145
+ data: Uint8Array;
1146
+ owner: Address;
1147
+ } | null;
1148
+ /** Read several accounts in one call. A missing account comes back as `null`, not as an error. */
1149
+ declare function readAccounts(rpc: GaboxRpc, addresses: Address[]): Promise<MaybeAccount$1[]>;
1150
+ /** Decode one base64 account payload the RPC returned inside another shape. */
1151
+ declare const decodeBase64: (encoded: string) => Uint8Array;
1152
+ //#endregion
909
1153
  //#region src/raydium/trade.d.ts
910
1154
  type CurveBuyExactInInput = {
911
1155
  mint: Address;
912
1156
  /** The coin creator, so the creator fee vault can be derived. Read it off the pool. */
913
1157
  creator: Address;
914
- /** The wallet spending. It signs, and its WSOL ATA must already hold `quoteIn`. */
1158
+ /** The wallet spending. It signs, and its quote ATA must already hold `quoteIn`. */
915
1159
  user: TransactionSigner;
916
- /** WSOL to spend, fees included. */
1160
+ /** Quote token to spend, fees included. */
917
1161
  quoteIn: bigint;
918
1162
  /** The floor on the coins received. Use `curveBuyExactIn` from `curve.ts` to compute it. */
919
1163
  minTokensOut: bigint;
1164
+ /** The pool's quote mint. Defaults to wrapped SOL. */
1165
+ quoteMint?: Address;
1166
+ /** The quote mint's token program. Defaults to classic SPL Token, which is what WSOL uses. */
1167
+ quoteTokenProgram?: Address;
920
1168
  };
921
1169
  /**
922
- * `buy_exact_in` on the curve: spend exactly `quoteIn` WSOL and take whatever coins it buys.
1170
+ * `buy_exact_in` on the curve: spend exactly `quoteIn` of the quote token and take whatever coins
1171
+ * it buys.
923
1172
  *
924
1173
  * LaunchLab caps the trade at what the curve has left to sell, so a spend larger than the rest of
925
- * the raise still succeeds and graduates the coin. Wrap the SOL into the user's WSOL ATA first and
926
- * close it afterwards, the same way the Gabox builders do.
1174
+ * the raise still succeeds and graduates the coin. Fund the user's quote ATA first. On a WSOL pool
1175
+ * that means wrapping the SOL and closing the account afterwards, the same way the Gabox builders
1176
+ * do.
927
1177
  */
928
1178
  declare function getCurveBuyExactInInstruction(client: GaboxClient, input: CurveBuyExactInInput, ids?: RaydiumIds): Promise<Instruction>;
929
1179
  declare namespace index_d_exports {
930
- export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, CONSTANT_CURVE_TAG, CPMM_AMM_CONFIG_DISCRIMINATOR, CPMM_AMM_CONFIG_HEAD_SIZE, CPMM_COLLECT_CREATOR_FEE, CPMM_POOL_OFFSETS, CPMM_POOL_STATE_DISCRIMINATOR, CPMM_POOL_STATE_HEAD_SIZE, CPMM_POOL_STATE_SIZE, CPMM_SEEDS, CPMM_SWAP_BASE_INPUT, CPMM_SWAP_BASE_OUTPUT, CREATOR_FEE_ON_QUOTE, ClaimCreatorFeeInput, CollectCreatorFeeInput, CpmmAmmConfig, CpmmFeeRates, CpmmPoolState, CpmmSwapSides, CpmmTradeAccountsInput, CreatorFees, CurveBuyExactInInput, CurveFeeRates, CurveReserves, CurveSettings, FindCpmmPoolOptions, LAUNCHLAB_BUY_EXACT_IN, LAUNCHLAB_BUY_EXACT_OUT, LAUNCHLAB_CLAIM_CREATOR_FEE, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE, LAUNCHLAB_INITIALIZE, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE, LAUNCHLAB_POOL_STATE_DISCRIMINATOR, LAUNCHLAB_POOL_STATE_HEAD_SIZE, LAUNCHLAB_SEEDS, LAUNCHLAB_SELL_EXACT_IN, LAUNCHLAB_STATUS_FUND, LAUNCHLAB_STATUS_MIGRATE, LAUNCHLAB_STATUS_TRADE, LAUNCH_DECIMALS, LAUNCH_SUPPLY, LAUNCH_TOTAL_BASE_SELL, LaunchInput, LaunchParams, LaunchlabGlobalConfig, LaunchlabPlatformConfig, LaunchlabPoolState, LaunchlabTradeAccountsInput, METADATA_LIMITS, METADATA_SEED, METAPLEX_PROGRAM_ADDRESS, MIGRATE_TO_CPMM, MigratedCpmmPool, PLATFORM_ADMIN, RATE_DENOMINATOR, RAYDIUM_DEVNET_IDS, RAYDIUM_IDS, RAYDIUM_MAINNET_IDS, RENT_SYSVAR_ADDRESS, RaydiumClusterIds, RaydiumIds, ResolveVenueOptions, ResolvedVenue, SHARE_FEE_RATE, SYSTEM_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, VenueAccountSpec, VenueInstructionAbi, VenueKind, WSOL_MINT, ata, ceilDiv, ceilDivRate, claimCreatorFee, collectCreatorFee, compareAddresses, cpmmAuthority, cpmmBuyAccounts, cpmmCreatorFeeShare, cpmmPoolAddress, cpmmPoolMatches, cpmmSellAccounts, cpmmSwapBaseInput, cpmmSwapBaseOutput, creatorFeeOnInput, creatorFeeVaultAddress, creatorFeeVaultAuthority, curveBuyExactIn, curveBuyExactOut, curveQuote, curveSellExactIn, decodeCpmmAmmConfig, decodeCpmmPool, decodeLaunchlabGlobalConfig, decodeLaunchlabPlatformConfig, decodeLaunchlabPool, fetchCreatorFees, fetchCurveSettings, findCpmmPool, getClaimCreatorFeeInstructions, getCollectCreatorFeeInstructions, getCurveBuyExactInInstruction, getLaunchInstruction, initialCurve, launchlabAuthority, launchlabBuyAccounts, launchlabBuyExactInAccounts, launchlabEventAuthority, launchlabGlobalConfig, launchlabPlatformConfig, launchlabPoolAddress, launchlabSellAccounts, launchlabVaultAddress, metadataAddress, newCurveBuyCost, newCurveReserves, order, platformFeeVaultAddress, preFeeAmount, raydiumIds, remainingBase, resolveVenue, sellQuote, sortedMints, tokenAccountAmount, tokenAccountOwnerAndMint, totalCurveFeeRate, wsolAccountFor };
1180
+ export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, CONSTANT_CURVE_TAG, CPMM_AMM_CONFIG_DISCRIMINATOR, CPMM_AMM_CONFIG_HEAD_SIZE, CPMM_COLLECT_CREATOR_FEE, CPMM_POOL_OFFSETS, CPMM_POOL_STATE_DISCRIMINATOR, CPMM_POOL_STATE_HEAD_SIZE, CPMM_POOL_STATE_SIZE, CPMM_SEEDS, CPMM_SWAP_BASE_INPUT, CPMM_SWAP_BASE_OUTPUT, CREATOR_FEE_ON_QUOTE, ClaimCreatorFeeInput, CollectCreatorFeeInput, CpmmAmmConfig, CpmmFeeRates, CpmmPoolState, CpmmSwapSides, CpmmTradeAccountsInput, CreatorFees, CurveBuyExactInInput, CurveFeeRates, CurveReserves, CurveSettings, FindCpmmPoolOptions, LAUNCHLAB_BUY_EXACT_IN, LAUNCHLAB_BUY_EXACT_OUT, LAUNCHLAB_CLAIM_CREATOR_FEE, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE, LAUNCHLAB_INITIALIZE, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE, LAUNCHLAB_POOL_STATE_DISCRIMINATOR, LAUNCHLAB_POOL_STATE_HEAD_SIZE, LAUNCHLAB_SEEDS, LAUNCHLAB_SELL_EXACT_IN, LAUNCHLAB_STATUS_FUND, LAUNCHLAB_STATUS_MIGRATE, LAUNCHLAB_STATUS_TRADE, LAUNCH_DECIMALS, LAUNCH_SUPPLY, LAUNCH_TOTAL_BASE_SELL, LaunchInput, LaunchParams, LaunchlabGlobalConfig, LaunchlabPlatformConfig, LaunchlabPoolState, LaunchlabTradeAccountsInput, METADATA_LIMITS, METADATA_SEED, METAPLEX_PROGRAM_ADDRESS, MIGRATE_TO_CPMM, MaybeAccount$1 as MaybeAccount, MigratedCpmmPool, PLATFORM_ADMIN, QuoteAsset, QuoteBinding, QuoteConfig, QuoteDisplay, RATE_DENOMINATOR, RAYDIUM_DEVNET_IDS, RAYDIUM_IDS, RAYDIUM_MAINNET_IDS, RENT_SYSVAR_ADDRESS, RaydiumClusterIds, RaydiumIds, ResolveVenueOptions, ResolvedVenue, SHARE_FEE_RATE, SYSTEM_PROGRAM_ADDRESS, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, VenueAccountSpec, VenueInstructionAbi, VenueKind, WSOL_MINT, ata, ceilDiv, ceilDivRate, claimCreatorFee, collectCreatorFee, compareAddresses, cpmmAuthority, cpmmBuyAccounts, cpmmCreatorFeeShare, cpmmPoolAddress, cpmmPoolMatches, cpmmSellAccounts, cpmmSwapBaseInput, cpmmSwapBaseOutput, creatorFeeOnInput, creatorFeeVaultAddress, creatorFeeVaultAuthority, curveBuyExactIn, curveBuyExactOut, curveQuote, curveSellExactIn, decodeBase64, decodeCpmmAmmConfig, decodeCpmmPool, decodeLaunchlabGlobalConfig, decodeLaunchlabPlatformConfig, decodeLaunchlabPool, fetchCreatorFees, fetchCurveSettings, fetchQuoteAsset, fetchQuoteBinding, fetchQuoteConfig, fetchQuoteDisplay, findCpmmPool, getClaimCreatorFeeInstructions, getCollectCreatorFeeInstructions, getCurveBuyExactInInstruction, getLaunchInstruction, initialCurve, isQuoteSupported, launchlabAuthority, launchlabBuyAccounts, launchlabBuyExactInAccounts, launchlabEventAuthority, launchlabGlobalConfig, launchlabPlatformConfig, launchlabPoolAddress, launchlabSellAccounts, launchlabVaultAddress, metadataAddress, metaplexSymbol, mintDecimals, newCurveBuyCost, newCurveReserves, order, platformFeeVaultAddress, preFeeAmount, quoteAccountFor, raydiumIds, readAccounts, remainingBase, resolveVenue, sellQuote, sortedMints, token2022Symbol, tokenAccountAmount, tokenAccountOwnerAndMint, totalCurveFeeRate, wsolAccountFor };
931
1181
  }
932
1182
  //#endregion
933
- export { resolveVenue as $, raydiumIds as $t, cpmmBuyAccounts as A, Cluster as An, decodeCpmmAmmConfig as At, CurveSettings as B, LAUNCHLAB_SEEDS as Bt, claimCreatorFee as C, SYSTEM_PROGRAM_ADDRESS as Cn, CpmmPoolState as Ct, getCollectCreatorFeeInstructions as D, WSOL_MINT as Dn, LaunchlabGlobalConfig as Dt, getClaimCreatorFeeInstructions as E, VenueInstructionAbi as En, LAUNCHLAB_POOL_STATE_HEAD_SIZE as Et, order as F, GaboxRpcSubscriptions as Fn, tokenAccountAmount as Ft, VenueKind as G, METADATA_LIMITS as Gt, MigratedCpmmPool as H, LAUNCHLAB_STATUS_MIGRATE as Ht, BuildOptions as I, assertClusterUrl as In, tokenAccountOwnerAndMint as It, curveQuote as J, RATE_DENOMINATOR as Jt, cpmmPoolMatches as K, METADATA_SEED as Kt, GaboxTransactionMessage as L, clusterNamedBy as Ln, CONSTANT_CURVE_TAG as Lt, launchlabBuyAccounts as M, DEVNET_WS as Mn, decodeLaunchlabGlobalConfig as Mt, launchlabBuyExactInAccounts as N, GaboxClient as Nn, decodeLaunchlabPlatformConfig as Nt, CpmmTradeAccountsInput as O, CLUSTER_ENDPOINTS as On, LaunchlabPlatformConfig as Ot, launchlabSellAccounts as P, GaboxRpc as Pn, decodeLaunchlabPool as Pt, newCurveReserves as Q, compareAddresses as Qt, buildMessage as R, createClient as Rn, CPMM_SEEDS as Rt, CreatorFees as S, RaydiumClusterIds as Sn, CpmmAmmConfig as St, fetchCreatorFees as T, VenueAccountSpec as Tn, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE as Tt, ResolveVenueOptions as U, LAUNCHLAB_STATUS_TRADE as Ut, FindCpmmPoolOptions as V, LAUNCHLAB_STATUS_FUND as Vt, ResolvedVenue as W, LAUNCH_DECIMALS as Wt, findCpmmPool as X, RaydiumIds as Xt, fetchCurveSettings as Y, RAYDIUM_IDS as Yt, newCurveBuyCost as Z, SHARE_FEE_RATE as Zt, platformFeeVaultAddress as _, METAPLEX_PROGRAM_ADDRESS as _n, totalCurveFeeRate as _t, cpmmAuthority as a, CPMM_SWAP_BASE_INPUT as an, CurveReserves as at, ClaimCreatorFeeInput as b, RAYDIUM_MAINNET_IDS as bn, CPMM_POOL_STATE_HEAD_SIZE as bt, creatorFeeVaultAddress as c, LAUNCHLAB_BUY_EXACT_OUT as cn, ceilDivRate as ct, launchlabEventAuthority as d, LAUNCHLAB_INITIALIZE as dn, curveBuyExactIn as dt, sortedMints as en, sellQuote as et, launchlabGlobalConfig as f, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR as fn, curveBuyExactOut as ft, metadataAddress as g, LAUNCH_TOTAL_BASE_SELL as gn, remainingBase as gt, launchlabVaultAddress as h, LAUNCH_SUPPLY as hn, preFeeAmount as ht, ata as i, CPMM_POOL_STATE_DISCRIMINATOR as in, CurveFeeRates as it, cpmmSellAccounts as j, DEVNET_HTTP as jn, decodeCpmmPool as jt, LaunchlabTradeAccountsInput as k, ClientConfig as kn, LaunchlabPoolState as kt, creatorFeeVaultAuthority as l, LAUNCHLAB_CLAIM_CREATOR_FEE as ln, cpmmSwapBaseInput as lt, launchlabPoolAddress as m, LAUNCHLAB_SELL_EXACT_IN as mn, initialCurve as mt, CurveBuyExactInInput as n, CPMM_AMM_CONFIG_DISCRIMINATOR as nn, CpmmFeeRates as nt, cpmmCreatorFeeShare as o, CPMM_SWAP_BASE_OUTPUT as on, LaunchParams as ot, launchlabPlatformConfig as p, LAUNCHLAB_POOL_STATE_DISCRIMINATOR as pn, curveSellExactIn as pt, creatorFeeOnInput as q, MIGRATE_TO_CPMM as qt, getCurveBuyExactInInstruction as r, CPMM_COLLECT_CREATOR_FEE as rn, CpmmSwapSides as rt, cpmmPoolAddress as s, LAUNCHLAB_BUY_EXACT_IN as sn, ceilDiv as st, index_d_exports as t, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as tn, wsolAccountFor as tt, launchlabAuthority as u, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR as un, cpmmSwapBaseOutput as ut, LaunchInput as v, PLATFORM_ADMIN as vn, CPMM_AMM_CONFIG_HEAD_SIZE as vt, collectCreatorFee as w, TOKEN_PROGRAM_ADDRESS as wn, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE as wt, CollectCreatorFeeInput as x, RENT_SYSVAR_ADDRESS as xn, CPMM_POOL_STATE_SIZE as xt, getLaunchInstruction as y, RAYDIUM_DEVNET_IDS as yn, CPMM_POOL_OFFSETS as yt, withRemainingAccounts as z, websocketUrlFor as zn, CREATOR_FEE_ON_QUOTE as zt };
934
- //# sourceMappingURL=index-BDfGvmgF.d.ts.map
1183
+ export { QuoteBinding as $, assertClusterUrl as $n, CONSTANT_CURVE_TAG as $t, ClaimCreatorFeeInput as A, LAUNCHLAB_SELL_EXACT_IN as An, totalCurveFeeRate as At, cpmmBuyAccounts as B, TOKEN_2022_PROGRAM_ADDRESS as Bn, LaunchlabGlobalConfig as Bt, launchlabPlatformConfig as C, LAUNCHLAB_BUY_EXACT_IN as Cn, cpmmSwapBaseOutput as Ct, platformFeeVaultAddress as D, LAUNCHLAB_INITIALIZE as Dn, initialCurve as Dt, metadataAddress as E, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR as En, curveSellExactIn as Et, fetchCreatorFees as F, RAYDIUM_DEVNET_IDS as Fn, CpmmAmmConfig as Ft, order as G, CLUSTER_ENDPOINTS as Gn, decodeLaunchlabGlobalConfig as Gt, launchlabBuyAccounts as H, VenueAccountSpec as Hn, LaunchlabPoolState as Ht, getClaimCreatorFeeInstructions as I, RAYDIUM_MAINNET_IDS as In, CpmmPoolState as It, buildMessage as J, DEVNET_HTTP as Jn, metaplexSymbol as Jt, BuildOptions as K, ClientConfig as Kn, decodeLaunchlabPlatformConfig as Kt, getCollectCreatorFeeInstructions as L, RENT_SYSVAR_ADDRESS as Ln, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE as Lt, CreatorFees as M, LAUNCH_TOTAL_BASE_SELL as Mn, CPMM_POOL_OFFSETS as Mt, claimCreatorFee as N, METAPLEX_PROGRAM_ADDRESS as Nn, CPMM_POOL_STATE_HEAD_SIZE as Nt, LaunchInput as O, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR as On, preFeeAmount as Ot, collectCreatorFee as P, PLATFORM_ADMIN as Pn, CPMM_POOL_STATE_SIZE as Pt, MigratedCpmmPool as Q, GaboxRpcSubscriptions as Qn, tokenAccountOwnerAndMint as Qt, CpmmTradeAccountsInput as R, RaydiumClusterIds as Rn, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE as Rt, launchlabGlobalConfig as S, CPMM_SWAP_BASE_OUTPUT as Sn, cpmmSwapBaseInput as St, launchlabVaultAddress as T, LAUNCHLAB_CLAIM_CREATOR_FEE as Tn, curveBuyExactOut as Tt, launchlabBuyExactInAccounts as U, VenueInstructionAbi as Un, decodeCpmmAmmConfig as Ut, cpmmSellAccounts as V, TOKEN_PROGRAM_ADDRESS as Vn, LaunchlabPlatformConfig as Vt, launchlabSellAccounts as W, WSOL_MINT as Wn, decodeCpmmPool as Wt, CurveSettings as X, GaboxClient as Xn, token2022Symbol as Xt, withRemainingAccounts as Y, DEVNET_WS as Yn, mintDecimals as Yt, FindCpmmPoolOptions as Z, GaboxRpc as Zn, tokenAccountAmount as Zt, cpmmPoolAddress as _, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as _n, CurveFeeRates as _t, decodeBase64 as a, LAUNCHLAB_STATUS_TRADE as an, RouteMode as ar, curveQuote as at, launchlabAuthority as b, CPMM_POOL_STATE_DISCRIMINATOR as bn, ceilDiv as bt, QuoteConfig as c, METADATA_SEED as cn, findCpmmPool as ct, fetchQuoteConfig as d, RAYDIUM_IDS as dn, quoteAccountFor as dt, CPMM_SEEDS as en, clusterNamedBy as er, ResolveVenueOptions as et, fetchQuoteDisplay as f, RaydiumIds as fn, resolveVenue as ft, cpmmCreatorFeeShare as g, sortedMints as gn, CpmmSwapSides as gt, cpmmAuthority as h, raydiumIds as hn, CpmmFeeRates as ht, MaybeAccount$1 as i, LAUNCHLAB_STATUS_MIGRATE as in, Route as ir, creatorFeeOnInput as it, CollectCreatorFeeInput as j, LAUNCH_SUPPLY as jn, CPMM_AMM_CONFIG_HEAD_SIZE as jt, getLaunchInstruction as k, LAUNCHLAB_POOL_STATE_DISCRIMINATOR as kn, remainingBase as kt, QuoteDisplay as l, MIGRATE_TO_CPMM as ln, newCurveBuyCost as lt, ata as m, compareAddresses as mn, wsolAccountFor as mt, CurveBuyExactInInput as n, LAUNCHLAB_SEEDS as nn, defaultRoute as nr, VenueKind as nt, readAccounts as o, LAUNCH_DECIMALS as on, RouteProvider as or, fetchCurveSettings as ot, isQuoteSupported as p, SHARE_FEE_RATE as pn, sellQuote as pt, GaboxTransactionMessage as q, Cluster as qn, decodeLaunchlabPool as qt, getCurveBuyExactInInstruction as r, LAUNCHLAB_STATUS_FUND as rn, websocketUrlFor as rr, cpmmPoolMatches as rt, QuoteAsset as s, METADATA_LIMITS as sn, fetchQuoteBinding as st, index_d_exports as t, CREATOR_FEE_ON_QUOTE as tn, createClient as tr, ResolvedVenue as tt, fetchQuoteAsset as u, RATE_DENOMINATOR as un, newCurveReserves as ut, creatorFeeVaultAddress as v, CPMM_AMM_CONFIG_DISCRIMINATOR as vn, CurveReserves as vt, launchlabPoolAddress as w, LAUNCHLAB_BUY_EXACT_OUT as wn, curveBuyExactIn as wt, launchlabEventAuthority as x, CPMM_SWAP_BASE_INPUT as xn, ceilDivRate as xt, creatorFeeVaultAuthority as y, CPMM_COLLECT_CREATOR_FEE as yn, LaunchParams as yt, LaunchlabTradeAccountsInput as z, SYSTEM_PROGRAM_ADDRESS as zn, LAUNCHLAB_POOL_STATE_HEAD_SIZE as zt };
1184
+ //# sourceMappingURL=index-C4at2cZ_.d.ts.map