@whetstone-research/doppler-sdk 1.0.0 → 1.0.1
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/dist/{chunk-RO6R66OM.js → chunk-LIXSTCMM.js} +11 -11
- package/dist/chunk-LIXSTCMM.js.map +1 -0
- package/dist/{chunk-3LTCKCJC.js → chunk-T46KDO65.js} +17 -14
- package/dist/chunk-T46KDO65.js.map +1 -0
- package/dist/evm/index.js +314 -139
- package/dist/evm/index.js.map +1 -1
- package/dist/{oracle-BSvZ6pxp.d.ts → oracle-B2LV97ff.d.ts} +7 -1
- package/dist/{pda-RVIHNLRP.js → pda-LKHUH6JK.js} +3 -3
- package/dist/pda-LKHUH6JK.js.map +1 -0
- package/dist/solana/index.d.ts +65 -26
- package/dist/solana/index.js +146 -57
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/react/index.d.ts +1 -1
- package/dist/solana/react/index.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-3LTCKCJC.js.map +0 -1
- package/dist/chunk-RO6R66OM.js.map +0 -1
- package/dist/pda-RVIHNLRP.js.map +0 -1
|
@@ -266,6 +266,12 @@ interface SwapQuote {
|
|
|
266
266
|
/** Execution price (output/input) */
|
|
267
267
|
executionPrice: number;
|
|
268
268
|
}
|
|
269
|
+
interface SwapQuoteExactOut {
|
|
270
|
+
/** Required input amount */
|
|
271
|
+
amountIn: bigint;
|
|
272
|
+
/** Total fee charged (in input token) */
|
|
273
|
+
feeTotal: bigint;
|
|
274
|
+
}
|
|
269
275
|
interface AddLiquidityQuote {
|
|
270
276
|
/** Shares the user will receive */
|
|
271
277
|
sharesOut: bigint;
|
|
@@ -817,4 +823,4 @@ declare function comparePoolAndOraclePrices(pool: Pool, oracle: OracleState): {
|
|
|
817
823
|
divergencePct: number;
|
|
818
824
|
};
|
|
819
825
|
|
|
820
|
-
export {
|
|
826
|
+
export { fetchPoolPositions as $, type AmmConfig as A, type PositionCreatedEvent as B, type CurveParams as C, type PositionClosedEvent as D, type SentinelInvokedEvent as E, type SentinelErrorEvent as F, type GetProgramAccountsRpc as G, type SentinelUpdatedEvent as H, type InitializeConfigArgs as I, type FeesUpdatedEvent as J, type OracleInitializedEvent as K, type OracleUpdatedEvent as L, type MarketCapValidationResult as M, type RouteUpdatedEvent as N, type OracleState as O, type Pool as P, type QuoteToNumeraireArgs as Q, type RemoveLiquidityQuote as R, type SwapDirection as S, type TransferAdminArgs as T, type AdminTransferredEvent as U, type PausedEvent as V, type UnpausedEvent as W, type SkimmedEvent as X, fetchPosition as Y, fetchUserPositions as Z, getPositionValue as _, type Position as a, fetchPositionByParams as a0, fetchPositionsBatch as a1, fetchOracle as a2, getOracleForPool as a3, consultTwap as a4, getOracleSpotPrices as a5, getOracleDeviation as a6, isOracleStale as a7, getOracleBufferStats as a8, type PositionValue as a9, type FetchPositionsConfig as aa, type PositionWithAddress as ab, type FetchOracleConfig as ac, type OracleWithAddress as ad, getPositionAddressFromParams as ae, filterActivePositions as af, sortPositionsByShares as ag, getOracleAddressFromPool as ah, getOracleAge as ai, fetchOraclesBatch as aj, comparePoolAndOraclePrices as ak, type SwapQuote as b, type SwapQuoteExactOut as c, type AddLiquidityQuote as d, type MarketCapToCurveParamsInput as e, type CurveParamsToMarketCapInput as f, type InitializePoolArgs as g, type InitializeOracleArgs as h, type SetFeesArgs as i, type SetSentinelArgs as j, type SetRouteArgs as k, type SwapExactInArgs as l, type CreatePositionArgs as m, type AddLiquidityArgs as n, type RemoveLiquidityArgs as o, type CollectFeesArgs as p, type CollectProtocolFeesArgs as q, type OracleConsultArgs as r, type Observation as s, type TwapResult as t, type SwapEvent as u, type AddLiquidityEvent as v, type RemoveLiquidityEvent as w, type CollectFeesEvent as x, type CollectProtocolFeesEvent as y, type PoolInitializedEvent as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { areMintsOrdered, getConfigAddress, getLiquidityAddresses, getOracleAddress, getPoolAddress, getPoolAuthorityAddress, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getSwapAddresses, sortMints } from './chunk-
|
|
1
|
+
export { areMintsOrdered, getConfigAddress, getLiquidityAddresses, getOracleAddress, getPoolAddress, getPoolAuthorityAddress, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getSwapAddresses, sortMints } from './chunk-T46KDO65.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
|
-
//# sourceMappingURL=pda-
|
|
4
|
-
//# sourceMappingURL=pda-
|
|
3
|
+
//# sourceMappingURL=pda-LKHUH6JK.js.map
|
|
4
|
+
//# sourceMappingURL=pda-LKHUH6JK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"pda-LKHUH6JK.js"}
|
package/dist/solana/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Address, ReadonlyUint8Array, ProgramDerivedAddress, Instruction, TransactionSigner, Rpc, GetAccountInfoApi, FixedSizeDecoder, FixedSizeEncoder, FixedSizeCodec, Encoder, Decoder, Codec, OptionOrNullable, Option } from '@solana/kit';
|
|
2
|
-
import { A as AmmConfig, P as Pool, a as Position, O as OracleState, S as SwapDirection, b as SwapQuote, c as AddLiquidityQuote, R as RemoveLiquidityQuote, M as MarketCapValidationResult,
|
|
3
|
-
export {
|
|
2
|
+
import { A as AmmConfig, P as Pool, a as Position, O as OracleState, S as SwapDirection, b as SwapQuote, c as SwapQuoteExactOut, d as AddLiquidityQuote, R as RemoveLiquidityQuote, M as MarketCapValidationResult, e as MarketCapToCurveParamsInput, C as CurveParams, f as CurveParamsToMarketCapInput, I as InitializeConfigArgs$1, g as InitializePoolArgs, h as InitializeOracleArgs, i as SetFeesArgs, j as SetSentinelArgs, k as SetRouteArgs, T as TransferAdminArgs, l as SwapExactInArgs, m as CreatePositionArgs, n as AddLiquidityArgs, o as RemoveLiquidityArgs, p as CollectFeesArgs, q as CollectProtocolFeesArgs, r as OracleConsultArgs, Q as QuoteToNumeraireArgs, G as GetProgramAccountsRpc } from '../oracle-B2LV97ff.js';
|
|
3
|
+
export { v as AddLiquidityEvent, U as AdminTransferredEvent, x as CollectFeesEvent, y as CollectProtocolFeesEvent, J as FeesUpdatedEvent, ac as FetchOracleConfig, aa as FetchPositionsConfig, s as Observation, K as OracleInitializedEvent, L as OracleUpdatedEvent, ad as OracleWithAddress, V as PausedEvent, z as PoolInitializedEvent, D as PositionClosedEvent, B as PositionCreatedEvent, a9 as PositionValue, ab as PositionWithAddress, w as RemoveLiquidityEvent, N as RouteUpdatedEvent, F as SentinelErrorEvent, E as SentinelInvokedEvent, H as SentinelUpdatedEvent, X as SkimmedEvent, u as SwapEvent, t as TwapResult, W as UnpausedEvent, ak as comparePoolAndOraclePrices, a4 as consultTwap, a2 as fetchOracle, aj as fetchOraclesBatch, $ as fetchPoolPositions, Y as fetchPosition, a0 as fetchPositionByParams, a1 as fetchPositionsBatch, Z as fetchUserPositions, af as filterActivePositions, ah as getOracleAddressFromPool, ai as getOracleAge, a8 as getOracleBufferStats, a6 as getOracleDeviation, a3 as getOracleForPool, a5 as getOracleSpotPrices, ae as getPositionAddressFromParams, _ as getPositionValue, a7 as isOracleStale, ag as sortPositionsByShares } from '../oracle-B2LV97ff.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Program ID for the CPMM AMM
|
|
6
|
+
* Program ID for the CPMM AMM
|
|
7
7
|
*/
|
|
8
8
|
declare const PROGRAM_ID: Address;
|
|
9
9
|
/**
|
|
@@ -22,6 +22,10 @@ declare const TOKEN_METADATA_PROGRAM_ID: Address;
|
|
|
22
22
|
* System Program ID
|
|
23
23
|
*/
|
|
24
24
|
declare const SYSTEM_PROGRAM_ID: Address;
|
|
25
|
+
/**
|
|
26
|
+
* SPL Associated Token Account Program ID
|
|
27
|
+
*/
|
|
28
|
+
declare const ASSOCIATED_TOKEN_PROGRAM_ID: Address;
|
|
25
29
|
/** Basis points denominator (10,000 = 100%) */
|
|
26
30
|
declare const BPS_DENOM = 10000n;
|
|
27
31
|
/** Q64.64 fixed-point representation of 1.0 (2^64) */
|
|
@@ -130,12 +134,12 @@ declare function decodeOracleState(data: ReadonlyUint8Array): OracleState;
|
|
|
130
134
|
* Sort two mints into canonical order (token0 < token1 by bytes)
|
|
131
135
|
* This is required for Pool PDA derivation and instruction ordering.
|
|
132
136
|
*
|
|
133
|
-
* @param
|
|
134
|
-
* @param
|
|
137
|
+
* @param mint0 - First mint address
|
|
138
|
+
* @param mint1 - Second mint address
|
|
135
139
|
* @returns Tuple of [token0, token1] in canonical order
|
|
136
140
|
* @throws Error if mints are equal
|
|
137
141
|
*/
|
|
138
|
-
declare function sortMints(
|
|
142
|
+
declare function sortMints(mint0: Address, mint1: Address): [Address, Address];
|
|
139
143
|
/**
|
|
140
144
|
* Check if mints are in canonical order
|
|
141
145
|
*/
|
|
@@ -151,7 +155,7 @@ declare function getConfigAddress$1(programId?: Address): Promise<ProgramDerived
|
|
|
151
155
|
*
|
|
152
156
|
* Note: Mints will be automatically sorted if not in canonical order.
|
|
153
157
|
*/
|
|
154
|
-
declare function getPoolAddress(
|
|
158
|
+
declare function getPoolAddress(mint0: Address, mint1: Address, programId?: Address): Promise<ProgramDerivedAddress>;
|
|
155
159
|
/**
|
|
156
160
|
* Derive the Pool authority PDA (vault owner)
|
|
157
161
|
* Seeds: ['authority', pool]
|
|
@@ -175,7 +179,7 @@ declare function getProtocolPositionAddress(pool: Address, programId?: Address):
|
|
|
175
179
|
/**
|
|
176
180
|
* Derive all PDAs needed for pool initialization
|
|
177
181
|
*/
|
|
178
|
-
declare function getPoolInitAddresses(
|
|
182
|
+
declare function getPoolInitAddresses(mint0: Address, mint1: Address, programId?: Address): Promise<{
|
|
179
183
|
token0: Address;
|
|
180
184
|
token1: Address;
|
|
181
185
|
pool: ProgramDerivedAddress;
|
|
@@ -271,10 +275,7 @@ declare function getSwapQuote(pool: Pool, amountIn: bigint, direction: SwapDirec
|
|
|
271
275
|
/**
|
|
272
276
|
* Calculate input amount needed for exact output (reverse quote)
|
|
273
277
|
*/
|
|
274
|
-
declare function getSwapQuoteExactOut(pool: Pool, amountOut: bigint, direction: SwapDirection):
|
|
275
|
-
amountIn: bigint;
|
|
276
|
-
feeTotal: bigint;
|
|
277
|
-
};
|
|
278
|
+
declare function getSwapQuoteExactOut(pool: Pool, amountOut: bigint, direction: SwapDirection): SwapQuoteExactOut;
|
|
278
279
|
/**
|
|
279
280
|
* Calculate shares and actual amounts for adding liquidity
|
|
280
281
|
*
|
|
@@ -329,7 +330,7 @@ declare function getK(pool: Pool): bigint;
|
|
|
329
330
|
* @param pool Pool data
|
|
330
331
|
* @param side 0 = denominate in token0, 1 = denominate in token1
|
|
331
332
|
*/
|
|
332
|
-
declare function getTvl(pool: Pool, side?:
|
|
333
|
+
declare function getTvl(pool: Pool, side?: SwapDirection): bigint;
|
|
333
334
|
/**
|
|
334
335
|
* Calculate TWAP price from oracle observations
|
|
335
336
|
*
|
|
@@ -1669,21 +1670,21 @@ declare function fetchAllPools(rpc: GetProgramAccountsRpc, config?: FetchPoolsCo
|
|
|
1669
1670
|
* Derives the pool PDA from the mints (automatically sorted) and fetches it.
|
|
1670
1671
|
*
|
|
1671
1672
|
* @param rpc - Solana RPC client
|
|
1672
|
-
* @param
|
|
1673
|
-
* @param
|
|
1673
|
+
* @param mint0 - First token mint
|
|
1674
|
+
* @param mint1 - Second token mint
|
|
1674
1675
|
* @param config - Optional configuration
|
|
1675
1676
|
* @returns Pool data with address, or null if not found
|
|
1676
1677
|
*
|
|
1677
1678
|
* @example
|
|
1678
1679
|
* ```ts
|
|
1679
|
-
* const result = await getPoolByMints(rpc, usdcMint,
|
|
1680
|
+
* const result = await getPoolByMints(rpc, usdcMint, wsolMint);
|
|
1680
1681
|
* if (result) {
|
|
1681
1682
|
* console.log(`Found pool at ${result.address}`);
|
|
1682
1683
|
* console.log(`Swap fee: ${result.account.swapFeeBps} bps`);
|
|
1683
1684
|
* }
|
|
1684
1685
|
* ```
|
|
1685
1686
|
*/
|
|
1686
|
-
declare function getPoolByMints(rpc: Rpc<GetAccountInfoApi>,
|
|
1687
|
+
declare function getPoolByMints(rpc: Rpc<GetAccountInfoApi>, mint0: Address, mint1: Address, config?: FetchPoolsConfig): Promise<PoolWithAddress | null>;
|
|
1687
1688
|
/**
|
|
1688
1689
|
* Get multiple pools by their addresses in a single batch request
|
|
1689
1690
|
*
|
|
@@ -1705,21 +1706,21 @@ declare function fetchPoolsBatch(rpc: Rpc<GetAccountInfoApi>, addresses: Address
|
|
|
1705
1706
|
* Check if a pool exists for a token pair
|
|
1706
1707
|
*
|
|
1707
1708
|
* @param rpc - Solana RPC client
|
|
1708
|
-
* @param
|
|
1709
|
-
* @param
|
|
1709
|
+
* @param mint0 - First token mint
|
|
1710
|
+
* @param mint1 - Second token mint
|
|
1710
1711
|
* @param config - Optional configuration
|
|
1711
1712
|
* @returns true if pool exists, false otherwise
|
|
1712
1713
|
*/
|
|
1713
|
-
declare function poolExists(rpc: Rpc<GetAccountInfoApi>,
|
|
1714
|
+
declare function poolExists(rpc: Rpc<GetAccountInfoApi>, mint0: Address, mint1: Address, config?: FetchPoolsConfig): Promise<boolean>;
|
|
1714
1715
|
/**
|
|
1715
1716
|
* Get the pool address for a token pair without fetching
|
|
1716
1717
|
*
|
|
1717
|
-
* @param
|
|
1718
|
-
* @param
|
|
1718
|
+
* @param mint0 - First token mint
|
|
1719
|
+
* @param mint1 - Second token mint
|
|
1719
1720
|
* @param programId - Program ID (defaults to CPMM program)
|
|
1720
1721
|
* @returns Pool address and sorted mints
|
|
1721
1722
|
*/
|
|
1722
|
-
declare function getPoolAddressFromMints(
|
|
1723
|
+
declare function getPoolAddressFromMints(mint0: Address, mint1: Address, programId?: Address): Promise<{
|
|
1723
1724
|
poolAddress: Address;
|
|
1724
1725
|
token0: Address;
|
|
1725
1726
|
token1: Address;
|
|
@@ -1763,7 +1764,7 @@ declare function fetchConfigWithAddress(rpc: Rpc<GetAccountInfoApi>, programId?:
|
|
|
1763
1764
|
} | null>;
|
|
1764
1765
|
|
|
1765
1766
|
/**
|
|
1766
|
-
* Program ID for the Initializer program
|
|
1767
|
+
* Program ID for the Initializer program.
|
|
1767
1768
|
*
|
|
1768
1769
|
* Source of truth: programs/initializer/src/lib.rs
|
|
1769
1770
|
*/
|
|
@@ -1772,6 +1773,19 @@ declare const BPF_LOADER_UPGRADEABLE_PROGRAM_ID: Address;
|
|
|
1772
1773
|
declare const SEED_CONFIG = "config_v3";
|
|
1773
1774
|
declare const SEED_LAUNCH = "launch_v3";
|
|
1774
1775
|
declare const SEED_LAUNCH_AUTHORITY = "launch_authority_v3";
|
|
1776
|
+
/**
|
|
1777
|
+
* Commitment hash for an empty remaining-accounts list — SHA256 of [0,0,0,0].
|
|
1778
|
+
* Pass this for sentinelRemainingAccountsHash and migratorRemainingAccountsHash
|
|
1779
|
+
* when no extra accounts are needed.
|
|
1780
|
+
*/
|
|
1781
|
+
declare const EMPTY_REMAINING_ACCOUNTS_HASH: Uint8Array<ArrayBuffer>;
|
|
1782
|
+
/**
|
|
1783
|
+
* Devnet ALT containing static accounts shared by every initializeLaunch tx.
|
|
1784
|
+
* Indices: 0=TOKEN_PROGRAM, 1=SYSTEM_PROGRAM, 2=SYSVAR_RENT,
|
|
1785
|
+
* 3=INITIALIZER_PROGRAM, 4=TOKEN_METADATA_PROGRAM,
|
|
1786
|
+
* 5=CPMM_MIGRATOR_PROGRAM, 6=WSOL_MINT, 7=config PDA
|
|
1787
|
+
*/
|
|
1788
|
+
declare const DOPPLER_DEVNET_ALT: Address;
|
|
1775
1789
|
declare const MAX_MIGRATOR_ALLOWLIST = 32;
|
|
1776
1790
|
declare const MAX_SENTINEL_ALLOWLIST = 32;
|
|
1777
1791
|
declare const MAX_CALLDATA = 256;
|
|
@@ -2094,6 +2108,14 @@ interface SetSentinelAllowlistAccounts {
|
|
|
2094
2108
|
declare function createSetSentinelAllowlistInstruction(accounts: SetSentinelAllowlistAccounts, allowlist: Address[], programId?: Address): Instruction;
|
|
2095
2109
|
|
|
2096
2110
|
type AddressOrSigner$3 = Address | TransactionSigner;
|
|
2111
|
+
/**
|
|
2112
|
+
* Derive the Metaplex token metadata PDA for a given mint.
|
|
2113
|
+
* Seeds: ["metadata", TOKEN_METADATA_PROGRAM_ID, mint]
|
|
2114
|
+
*
|
|
2115
|
+
* Pass the result as `metadataAccount` in InitializeLaunchAccounts
|
|
2116
|
+
* whenever `metadataName` is non-empty.
|
|
2117
|
+
*/
|
|
2118
|
+
declare function getTokenMetadataAddress(mint: Address): Promise<Address>;
|
|
2097
2119
|
interface InitializeLaunchAccounts {
|
|
2098
2120
|
config: Address;
|
|
2099
2121
|
launch: Address;
|
|
@@ -2108,6 +2130,19 @@ interface InitializeLaunchAccounts {
|
|
|
2108
2130
|
tokenProgram?: Address;
|
|
2109
2131
|
systemProgram?: Address;
|
|
2110
2132
|
rent: Address;
|
|
2133
|
+
/** Required when args.metadataName is non-empty. Derive with getTokenMetadataAddress(baseMint). */
|
|
2134
|
+
metadataAccount?: Address;
|
|
2135
|
+
/**
|
|
2136
|
+
* Optional Address Lookup Table to reference for static accounts.
|
|
2137
|
+
* When provided, constant non-signer accounts (tokenProgram, systemProgram,
|
|
2138
|
+
* rent, migratorProgram, quoteMint when WSOL, metadataProgram, config) are
|
|
2139
|
+
* encoded as ALT lookup metas instead of 32-byte static keys, reducing
|
|
2140
|
+
* transaction size by ~200+ bytes and enabling V4 metadata within the
|
|
2141
|
+
* 1232-byte Solana transaction limit.
|
|
2142
|
+
*
|
|
2143
|
+
* Use DOPPLER_DEVNET_ALT for devnet.
|
|
2144
|
+
*/
|
|
2145
|
+
addressLookupTable?: Address;
|
|
2111
2146
|
}
|
|
2112
2147
|
declare function createInitializeLaunchInstruction(accounts: InitializeLaunchAccounts, args: InitializeLaunchArgsArgs, programId?: Address): Instruction;
|
|
2113
2148
|
|
|
@@ -2123,6 +2158,7 @@ interface CurveSwapExactInAccounts {
|
|
|
2123
2158
|
baseMint: Address;
|
|
2124
2159
|
quoteMint: Address;
|
|
2125
2160
|
user: AddressOrSigner$2;
|
|
2161
|
+
/** Pass the actual sentinel program address, or omit to use System Program as a no-op placeholder. */
|
|
2126
2162
|
sentinelProgram?: Address;
|
|
2127
2163
|
tokenProgram?: Address;
|
|
2128
2164
|
}
|
|
@@ -2222,6 +2258,8 @@ type index$1_CalldataBuf = CalldataBuf;
|
|
|
2222
2258
|
type index$1_CurveSwapExactInAccounts = CurveSwapExactInAccounts;
|
|
2223
2259
|
declare const index$1_DIRECTION_BUY: typeof DIRECTION_BUY;
|
|
2224
2260
|
declare const index$1_DIRECTION_SELL: typeof DIRECTION_SELL;
|
|
2261
|
+
declare const index$1_DOPPLER_DEVNET_ALT: typeof DOPPLER_DEVNET_ALT;
|
|
2262
|
+
declare const index$1_EMPTY_REMAINING_ACCOUNTS_HASH: typeof EMPTY_REMAINING_ACCOUNTS_HASH;
|
|
2225
2263
|
type index$1_FetchLaunchesConfig = FetchLaunchesConfig;
|
|
2226
2264
|
declare const index$1_INITIALIZER_ACCOUNT_DISCRIMINATORS: typeof INITIALIZER_ACCOUNT_DISCRIMINATORS;
|
|
2227
2265
|
declare const index$1_INITIALIZER_INSTRUCTION_DISCRIMINATORS: typeof INITIALIZER_INSTRUCTION_DISCRIMINATORS;
|
|
@@ -2287,10 +2325,11 @@ declare const index$1_getLaunchCodec: typeof getLaunchCodec;
|
|
|
2287
2325
|
declare const index$1_getLaunchDecoder: typeof getLaunchDecoder;
|
|
2288
2326
|
declare const index$1_getLaunchEncoder: typeof getLaunchEncoder;
|
|
2289
2327
|
declare const index$1_getProgramDataAddress: typeof getProgramDataAddress;
|
|
2328
|
+
declare const index$1_getTokenMetadataAddress: typeof getTokenMetadataAddress;
|
|
2290
2329
|
declare const index$1_launchExists: typeof launchExists;
|
|
2291
2330
|
declare const index$1_launchIdFromU64: typeof launchIdFromU64;
|
|
2292
2331
|
declare namespace index$1 {
|
|
2293
|
-
export { type index$1_AbortLaunchAccounts as AbortLaunchAccounts, index$1_BPF_LOADER_UPGRADEABLE_PROGRAM_ID as BPF_LOADER_UPGRADEABLE_PROGRAM_ID, index$1_CURVE_KIND_XYK as CURVE_KIND_XYK, index$1_CURVE_PARAMS_FORMAT_XYK_V0 as CURVE_PARAMS_FORMAT_XYK_V0, type index$1_CalldataBuf as CalldataBuf, type index$1_CurveSwapExactInAccounts as CurveSwapExactInAccounts, index$1_DIRECTION_BUY as DIRECTION_BUY, index$1_DIRECTION_SELL as DIRECTION_SELL, type index$1_FetchLaunchesConfig as FetchLaunchesConfig, index$1_INITIALIZER_ACCOUNT_DISCRIMINATORS as INITIALIZER_ACCOUNT_DISCRIMINATORS, index$1_INITIALIZER_INSTRUCTION_DISCRIMINATORS as INITIALIZER_INSTRUCTION_DISCRIMINATORS, index$1_INITIALIZER_PROGRAM_ID as INITIALIZER_PROGRAM_ID, type index$1_InitConfig as InitConfig, type index$1_InitConfigArgs as InitConfigArgs, type index$1_InitializeConfigAccounts as InitializeConfigAccounts, type index$1_InitializeConfigArgs as InitializeConfigArgs, type index$1_InitializeConfigArgsArgs as InitializeConfigArgsArgs, type index$1_InitializeLaunchAccounts as InitializeLaunchAccounts, type index$1_InitializeLaunchArgs as InitializeLaunchArgs, type index$1_InitializeLaunchArgsArgs as InitializeLaunchArgsArgs, type index$1_Launch as Launch, type index$1_LaunchArgs as LaunchArgs, type index$1_LaunchWithAddress as LaunchWithAddress, index$1_MAX_CALLDATA as MAX_CALLDATA, index$1_MAX_MIGRATOR_ALLOWLIST as MAX_MIGRATOR_ALLOWLIST, index$1_MAX_SENTINEL_ALLOWLIST as MAX_SENTINEL_ALLOWLIST, type index$1_MigrateLaunchAccounts as MigrateLaunchAccounts, index$1_PHASE_ABORTED as PHASE_ABORTED, index$1_PHASE_MIGRATED as PHASE_MIGRATED, index$1_PHASE_TRADING as PHASE_TRADING, type index$1_PreviewMigrationAccounts as PreviewMigrationAccounts, type index$1_PreviewMigrationResult as PreviewMigrationResult, type index$1_PreviewSwapExactInAccounts as PreviewSwapExactInAccounts, type index$1_PreviewSwapExactInResult as PreviewSwapExactInResult, index$1_SEED_CONFIG as SEED_CONFIG, index$1_SEED_LAUNCH as SEED_LAUNCH, index$1_SEED_LAUNCH_AUTHORITY as SEED_LAUNCH_AUTHORITY, index$1_SENTINEL_NO_CHANGE as SENTINEL_NO_CHANGE, index$1_SF_AFTER_SWAP as SF_AFTER_SWAP, index$1_SF_BEFORE_SWAP as SF_BEFORE_SWAP, type index$1_SetMigratorAllowlistAccounts as SetMigratorAllowlistAccounts, type index$1_SetSentinelAllowlistAccounts as SetSentinelAllowlistAccounts, index$1_createAbortLaunchInstruction as createAbortLaunchInstruction, index$1_createCurveSwapExactInInstruction as createCurveSwapExactInInstruction, index$1_createInitializeConfigInstruction as createInitializeConfigInstruction, index$1_createInitializeLaunchInstruction as createInitializeLaunchInstruction, index$1_createMigrateLaunchInstruction as createMigrateLaunchInstruction, index$1_createPreviewMigrationInstruction as createPreviewMigrationInstruction, index$1_createPreviewSwapExactInInstruction as createPreviewSwapExactInInstruction, index$1_createSetMigratorAllowlistInstruction as createSetMigratorAllowlistInstruction, index$1_createSetSentinelAllowlistInstruction as createSetSentinelAllowlistInstruction, index$1_decodePreviewMigrationResult as decodePreviewMigrationResult, index$1_decodePreviewSwapExactInResult as decodePreviewSwapExactInResult, index$1_encodeU64LE as encodeU64LE, index$1_fetchAllLaunches as fetchAllLaunches, index$1_fetchLaunch as fetchLaunch, index$1_fetchLaunchesByAuthority as fetchLaunchesByAuthority, index$1_getConfigAddress as getConfigAddress, index$1_getInitConfigCodec as getInitConfigCodec, index$1_getInitConfigDecoder as getInitConfigDecoder, index$1_getInitConfigEncoder as getInitConfigEncoder, index$1_getInitializeConfigArgsCodec as getInitializeConfigArgsCodec, index$1_getInitializeConfigArgsDecoder as getInitializeConfigArgsDecoder, index$1_getInitializeConfigArgsEncoder as getInitializeConfigArgsEncoder, index$1_getInitializeLaunchArgsCodec as getInitializeLaunchArgsCodec, index$1_getInitializeLaunchArgsDecoder as getInitializeLaunchArgsDecoder, index$1_getInitializeLaunchArgsEncoder as getInitializeLaunchArgsEncoder, index$1_getLaunchAddress as getLaunchAddress, index$1_getLaunchAuthorityAddress as getLaunchAuthorityAddress, index$1_getLaunchCodec as getLaunchCodec, index$1_getLaunchDecoder as getLaunchDecoder, index$1_getLaunchEncoder as getLaunchEncoder, index$1_getProgramDataAddress as getProgramDataAddress, index$1_launchExists as launchExists, index$1_launchIdFromU64 as launchIdFromU64 };
|
|
2332
|
+
export { type index$1_AbortLaunchAccounts as AbortLaunchAccounts, index$1_BPF_LOADER_UPGRADEABLE_PROGRAM_ID as BPF_LOADER_UPGRADEABLE_PROGRAM_ID, index$1_CURVE_KIND_XYK as CURVE_KIND_XYK, index$1_CURVE_PARAMS_FORMAT_XYK_V0 as CURVE_PARAMS_FORMAT_XYK_V0, type index$1_CalldataBuf as CalldataBuf, type index$1_CurveSwapExactInAccounts as CurveSwapExactInAccounts, index$1_DIRECTION_BUY as DIRECTION_BUY, index$1_DIRECTION_SELL as DIRECTION_SELL, index$1_DOPPLER_DEVNET_ALT as DOPPLER_DEVNET_ALT, index$1_EMPTY_REMAINING_ACCOUNTS_HASH as EMPTY_REMAINING_ACCOUNTS_HASH, type index$1_FetchLaunchesConfig as FetchLaunchesConfig, index$1_INITIALIZER_ACCOUNT_DISCRIMINATORS as INITIALIZER_ACCOUNT_DISCRIMINATORS, index$1_INITIALIZER_INSTRUCTION_DISCRIMINATORS as INITIALIZER_INSTRUCTION_DISCRIMINATORS, index$1_INITIALIZER_PROGRAM_ID as INITIALIZER_PROGRAM_ID, type index$1_InitConfig as InitConfig, type index$1_InitConfigArgs as InitConfigArgs, type index$1_InitializeConfigAccounts as InitializeConfigAccounts, type index$1_InitializeConfigArgs as InitializeConfigArgs, type index$1_InitializeConfigArgsArgs as InitializeConfigArgsArgs, type index$1_InitializeLaunchAccounts as InitializeLaunchAccounts, type index$1_InitializeLaunchArgs as InitializeLaunchArgs, type index$1_InitializeLaunchArgsArgs as InitializeLaunchArgsArgs, type index$1_Launch as Launch, type index$1_LaunchArgs as LaunchArgs, type index$1_LaunchWithAddress as LaunchWithAddress, index$1_MAX_CALLDATA as MAX_CALLDATA, index$1_MAX_MIGRATOR_ALLOWLIST as MAX_MIGRATOR_ALLOWLIST, index$1_MAX_SENTINEL_ALLOWLIST as MAX_SENTINEL_ALLOWLIST, type index$1_MigrateLaunchAccounts as MigrateLaunchAccounts, index$1_PHASE_ABORTED as PHASE_ABORTED, index$1_PHASE_MIGRATED as PHASE_MIGRATED, index$1_PHASE_TRADING as PHASE_TRADING, type index$1_PreviewMigrationAccounts as PreviewMigrationAccounts, type index$1_PreviewMigrationResult as PreviewMigrationResult, type index$1_PreviewSwapExactInAccounts as PreviewSwapExactInAccounts, type index$1_PreviewSwapExactInResult as PreviewSwapExactInResult, index$1_SEED_CONFIG as SEED_CONFIG, index$1_SEED_LAUNCH as SEED_LAUNCH, index$1_SEED_LAUNCH_AUTHORITY as SEED_LAUNCH_AUTHORITY, index$1_SENTINEL_NO_CHANGE as SENTINEL_NO_CHANGE, index$1_SF_AFTER_SWAP as SF_AFTER_SWAP, index$1_SF_BEFORE_SWAP as SF_BEFORE_SWAP, type index$1_SetMigratorAllowlistAccounts as SetMigratorAllowlistAccounts, type index$1_SetSentinelAllowlistAccounts as SetSentinelAllowlistAccounts, index$1_createAbortLaunchInstruction as createAbortLaunchInstruction, index$1_createCurveSwapExactInInstruction as createCurveSwapExactInInstruction, index$1_createInitializeConfigInstruction as createInitializeConfigInstruction, index$1_createInitializeLaunchInstruction as createInitializeLaunchInstruction, index$1_createMigrateLaunchInstruction as createMigrateLaunchInstruction, index$1_createPreviewMigrationInstruction as createPreviewMigrationInstruction, index$1_createPreviewSwapExactInInstruction as createPreviewSwapExactInInstruction, index$1_createSetMigratorAllowlistInstruction as createSetMigratorAllowlistInstruction, index$1_createSetSentinelAllowlistInstruction as createSetSentinelAllowlistInstruction, index$1_decodePreviewMigrationResult as decodePreviewMigrationResult, index$1_decodePreviewSwapExactInResult as decodePreviewSwapExactInResult, index$1_encodeU64LE as encodeU64LE, index$1_fetchAllLaunches as fetchAllLaunches, index$1_fetchLaunch as fetchLaunch, index$1_fetchLaunchesByAuthority as fetchLaunchesByAuthority, index$1_getConfigAddress as getConfigAddress, index$1_getInitConfigCodec as getInitConfigCodec, index$1_getInitConfigDecoder as getInitConfigDecoder, index$1_getInitConfigEncoder as getInitConfigEncoder, index$1_getInitializeConfigArgsCodec as getInitializeConfigArgsCodec, index$1_getInitializeConfigArgsDecoder as getInitializeConfigArgsDecoder, index$1_getInitializeConfigArgsEncoder as getInitializeConfigArgsEncoder, index$1_getInitializeLaunchArgsCodec as getInitializeLaunchArgsCodec, index$1_getInitializeLaunchArgsDecoder as getInitializeLaunchArgsDecoder, index$1_getInitializeLaunchArgsEncoder as getInitializeLaunchArgsEncoder, index$1_getLaunchAddress as getLaunchAddress, index$1_getLaunchAuthorityAddress as getLaunchAuthorityAddress, index$1_getLaunchCodec as getLaunchCodec, index$1_getLaunchDecoder as getLaunchDecoder, index$1_getLaunchEncoder as getLaunchEncoder, index$1_getProgramDataAddress as getProgramDataAddress, index$1_getTokenMetadataAddress as getTokenMetadataAddress, index$1_launchExists as launchExists, index$1_launchIdFromU64 as launchIdFromU64 };
|
|
2294
2333
|
}
|
|
2295
2334
|
|
|
2296
2335
|
/**
|
|
@@ -2492,4 +2531,4 @@ declare namespace index {
|
|
|
2492
2531
|
export { index_CPMM_MIGRATOR_ACCOUNT_DISCRIMINATORS as CPMM_MIGRATOR_ACCOUNT_DISCRIMINATORS, index_CPMM_MIGRATOR_INSTRUCTION_DISCRIMINATORS as CPMM_MIGRATOR_INSTRUCTION_DISCRIMINATORS, index_CPMM_MIGRATOR_PROGRAM_ID as CPMM_MIGRATOR_PROGRAM_ID, type index_CpmmMigratorState as CpmmMigratorState, type index_CpmmMigratorStateArgs as CpmmMigratorStateArgs, index_MAX_RECIPIENTS as MAX_RECIPIENTS, type index_MigrateArgs as MigrateArgs, type index_MigrateArgsArgs as MigrateArgsArgs, type index_Recipient as Recipient, type index_RecipientArgs as RecipientArgs, type index_RegisterLaunchArgs as RegisterLaunchArgs, type index_RegisterLaunchArgsArgs as RegisterLaunchArgsArgs, index_SEED_STATE as SEED_STATE, index_encodeMigrateCalldata as encodeMigrateCalldata, index_encodeRegisterLaunchCalldata as encodeRegisterLaunchCalldata, index_fetchCpmmMigratorState as fetchCpmmMigratorState, index_getCpmmMigratorStateAddress as getCpmmMigratorStateAddress, index_getCpmmMigratorStateCodec as getCpmmMigratorStateCodec, index_getCpmmMigratorStateDecoder as getCpmmMigratorStateDecoder, index_getCpmmMigratorStateEncoder as getCpmmMigratorStateEncoder, index_getMigrateArgsCodec as getMigrateArgsCodec, index_getMigrateArgsDecoder as getMigrateArgsDecoder, index_getMigrateArgsEncoder as getMigrateArgsEncoder, index_getRecipientCodec as getRecipientCodec, index_getRecipientDecoder as getRecipientDecoder, index_getRecipientEncoder as getRecipientEncoder, index_getRegisterLaunchArgsCodec as getRegisterLaunchArgsCodec, index_getRegisterLaunchArgsDecoder as getRegisterLaunchArgsDecoder, index_getRegisterLaunchArgsEncoder as getRegisterLaunchArgsEncoder };
|
|
2493
2532
|
}
|
|
2494
2533
|
|
|
2495
|
-
export { ACCOUNT_DISCRIMINATORS, ACCOUNT_ROLE_READONLY, ACCOUNT_ROLE_SIGNER, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_VERSION, type AddLiquidityAccounts, AddLiquidityArgs, type AddLiquidityArgsWithOracle, AddLiquidityQuote, AmmConfig, BPS_DENOM, CPMM_ERROR_MESSAGES, type ClosePositionAccounts, type CollectFeesAccounts, CollectFeesArgs, type CollectProtocolFeesAccounts, CollectProtocolFeesArgs, CpmmError, CpmmErrorCode, type CreatePositionAccounts, CreatePositionArgs, CurveParams, CurveParamsToMarketCapInput, type FetchPoolsConfig, INSTRUCTION_DISCRIMINATORS, type InitializeConfigAccounts$1 as InitializeConfigAccounts, InitializeConfigArgs$1 as InitializeConfigArgs, type InitializeOracleAccounts, InitializeOracleArgs, type InitializePoolAccounts, InitializePoolArgs, MAX_FEE_AMOUNT, MAX_ORACLE_OBSERVATIONS, MAX_SENTINEL_ALLOWLIST$1 as MAX_SENTINEL_ALLOWLIST, MarketCapToCurveParamsInput, MarketCapValidationResult, type OracleConsultAccounts, OracleConsultArgs, type OracleConsultResult, OracleState, type OracleUpdateAccounts, PROGRAM_ID, type PauseAccounts, Pool, type PoolWithAddress, Position, Q64_ONE, type QuoteToNumeraireAccounts, QuoteToNumeraireArgs, type QuoteToNumeraireResult, type RemoveLiquidityAccounts, RemoveLiquidityArgs, RemoveLiquidityQuote, SEED_AUTHORITY, SEED_CONFIG$1 as SEED_CONFIG, SEED_ORACLE, SEED_POOL, SEED_POSITION, SEED_PROTOCOL_POSITION, SENTINEL_NO_CHANGE$1 as SENTINEL_NO_CHANGE, SENTINEL_PROGRAM_ID, SF_AFTER_ADD_LIQ, SF_AFTER_REMOVE_LIQ, SF_AFTER_SWAP$1 as SF_AFTER_SWAP, SF_BEFORE_ADD_LIQ, SF_BEFORE_REMOVE_LIQ, SF_BEFORE_SWAP$1 as SF_BEFORE_SWAP, SYSTEM_PROGRAM_ID, type SetFeesAccounts, SetFeesArgs, type SetRouteAccounts, SetRouteArgs, type SetSentinelAccounts, SetSentinelArgs, type SkimAccounts, SwapDirection, type SwapExactInAccounts, SwapExactInArgs, SwapQuote, TOKEN_METADATA_PROGRAM_ID, TOKEN_PROGRAM_ID, type TransferAdminAccounts, TransferAdminArgs, type UnpauseAccounts, areMintsOrdered, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, computePrice0Q64, computePrice1Q64, index as cpmmMigrator, createAddLiquidityInstruction, createClosePositionInstruction, createCollectFeesInstruction, createCollectProtocolFeesInstruction, createCreatePositionInstruction, createInitializeConfigInstruction$1 as createInitializeConfigInstruction, createInitializeOracleInstruction, createInitializePoolInstruction, createOracleConsultInstruction, createOracleUpdateInstruction, createPauseInstruction, createQuoteToNumeraireInstruction, createRemoveLiquidityInstruction, createSetFeesInstruction, createSetRouteInstruction, createSetSentinelInstruction, createSkimInstruction, createSwapExactInInstruction, createSwapInstruction, createTransferAdminInstruction, createUnpauseInstruction, curveParamsToMarketCap, decodeAmmConfig, decodeOracleConsultResult, decodeOracleState, decodePool, decodePosition, decodeQuoteToNumeraireResult, fetchAllPools, fetchConfig, fetchConfigWithAddress, fetchPool, fetchPoolsBatch, filterPoolsByMint, getAddLiquidityQuote, getConfigAddress$1 as getConfigAddress, getErrorMessage, getK, getLiquidityAddresses, getMetadataAddress, getOracleAddress, getPendingFees, getPoolAddress, getPoolAddressFromMints, getPoolAuthorityAddress, getPoolByMints, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getRemoveLiquidityQuote, getSpotPrice0, getSpotPrice1, getSwapAddresses, getSwapQuote, getSwapQuoteExactOut, getTvl, index$1 as initializer, isCpmmError, isqrt, marketCapToCurveParams, marketCapToSingleCurveParams, marketCapToTokenPrice, maxBigInt, minBigInt, numberToQ64, parseErrorFromLogs, poolExists, q64Div, q64Mul, q64ToNumber, ratioToNumber, sortMints, sortPoolsByReserves, validateMarketCapParameters };
|
|
2534
|
+
export { ACCOUNT_DISCRIMINATORS, ACCOUNT_ROLE_READONLY, ACCOUNT_ROLE_SIGNER, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_VERSION, ASSOCIATED_TOKEN_PROGRAM_ID, type AddLiquidityAccounts, AddLiquidityArgs, type AddLiquidityArgsWithOracle, AddLiquidityQuote, AmmConfig, BPS_DENOM, CPMM_ERROR_MESSAGES, type ClosePositionAccounts, type CollectFeesAccounts, CollectFeesArgs, type CollectProtocolFeesAccounts, CollectProtocolFeesArgs, CpmmError, CpmmErrorCode, type CreatePositionAccounts, CreatePositionArgs, CurveParams, CurveParamsToMarketCapInput, type FetchPoolsConfig, INSTRUCTION_DISCRIMINATORS, type InitializeConfigAccounts$1 as InitializeConfigAccounts, InitializeConfigArgs$1 as InitializeConfigArgs, type InitializeOracleAccounts, InitializeOracleArgs, type InitializePoolAccounts, InitializePoolArgs, MAX_FEE_AMOUNT, MAX_ORACLE_OBSERVATIONS, MAX_SENTINEL_ALLOWLIST$1 as MAX_SENTINEL_ALLOWLIST, MarketCapToCurveParamsInput, MarketCapValidationResult, type OracleConsultAccounts, OracleConsultArgs, type OracleConsultResult, OracleState, type OracleUpdateAccounts, PROGRAM_ID, type PauseAccounts, Pool, type PoolWithAddress, Position, Q64_ONE, type QuoteToNumeraireAccounts, QuoteToNumeraireArgs, type QuoteToNumeraireResult, type RemoveLiquidityAccounts, RemoveLiquidityArgs, RemoveLiquidityQuote, SEED_AUTHORITY, SEED_CONFIG$1 as SEED_CONFIG, SEED_ORACLE, SEED_POOL, SEED_POSITION, SEED_PROTOCOL_POSITION, SENTINEL_NO_CHANGE$1 as SENTINEL_NO_CHANGE, SENTINEL_PROGRAM_ID, SF_AFTER_ADD_LIQ, SF_AFTER_REMOVE_LIQ, SF_AFTER_SWAP$1 as SF_AFTER_SWAP, SF_BEFORE_ADD_LIQ, SF_BEFORE_REMOVE_LIQ, SF_BEFORE_SWAP$1 as SF_BEFORE_SWAP, SYSTEM_PROGRAM_ID, type SetFeesAccounts, SetFeesArgs, type SetRouteAccounts, SetRouteArgs, type SetSentinelAccounts, SetSentinelArgs, type SkimAccounts, SwapDirection, type SwapExactInAccounts, SwapExactInArgs, SwapQuote, SwapQuoteExactOut, TOKEN_METADATA_PROGRAM_ID, TOKEN_PROGRAM_ID, type TransferAdminAccounts, TransferAdminArgs, type UnpauseAccounts, areMintsOrdered, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, computePrice0Q64, computePrice1Q64, index as cpmmMigrator, createAddLiquidityInstruction, createClosePositionInstruction, createCollectFeesInstruction, createCollectProtocolFeesInstruction, createCreatePositionInstruction, createInitializeConfigInstruction$1 as createInitializeConfigInstruction, createInitializeOracleInstruction, createInitializePoolInstruction, createOracleConsultInstruction, createOracleUpdateInstruction, createPauseInstruction, createQuoteToNumeraireInstruction, createRemoveLiquidityInstruction, createSetFeesInstruction, createSetRouteInstruction, createSetSentinelInstruction, createSkimInstruction, createSwapExactInInstruction, createSwapInstruction, createTransferAdminInstruction, createUnpauseInstruction, curveParamsToMarketCap, decodeAmmConfig, decodeOracleConsultResult, decodeOracleState, decodePool, decodePosition, decodeQuoteToNumeraireResult, fetchAllPools, fetchConfig, fetchConfigWithAddress, fetchPool, fetchPoolsBatch, filterPoolsByMint, getAddLiquidityQuote, getConfigAddress$1 as getConfigAddress, getErrorMessage, getK, getLiquidityAddresses, getMetadataAddress, getOracleAddress, getPendingFees, getPoolAddress, getPoolAddressFromMints, getPoolAuthorityAddress, getPoolByMints, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getRemoveLiquidityQuote, getSpotPrice0, getSpotPrice1, getSwapAddresses, getSwapQuote, getSwapQuoteExactOut, getTvl, index$1 as initializer, isCpmmError, isqrt, marketCapToCurveParams, marketCapToSingleCurveParams, marketCapToTokenPrice, maxBigInt, minBigInt, numberToQ64, parseErrorFromLogs, poolExists, q64Div, q64Mul, q64ToNumber, ratioToNumber, sortMints, sortPoolsByReserves, validateMarketCapParameters };
|
package/dist/solana/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { encodeInstructionData, initializeConfigArgsCodec, initializePoolArgsCodec, initializeOracleArgsCodec, setFeesArgsCodec, setSentinelArgsCodec, setRouteArgsCodec, transferAdminArgsCodec, swapExactInArgsCodec, createPositionArgsCodec, removeLiquidityArgsCodec, collectProtocolFeesArgsCodec, oracleConsultArgsCodec, quoteToNumeraireArgsCodec, decodeAmmConfig } from '../chunk-
|
|
2
|
-
export { MAX_FEE_AMOUNT, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createCollectFeesInstruction, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityQuote, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getRemoveLiquidityQuote, getSpotPrice0, getSpotPrice1, getSwapQuote, getSwapQuoteExactOut, getTvl, isOracleStale, isqrt, maxBigInt, minBigInt, numberToQ64, poolExists, q64Div, q64Mul, q64ToNumber, ratioToNumber, sortPoolsByReserves, sortPositionsByShares } from '../chunk-
|
|
3
|
-
import { SYSTEM_PROGRAM_ID, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_READONLY, TOKEN_PROGRAM_ID, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_ROLE_SIGNER, PROGRAM_ID,
|
|
4
|
-
export { ACCOUNT_DISCRIMINATORS, ACCOUNT_ROLE_READONLY, ACCOUNT_ROLE_SIGNER, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_VERSION, BPS_DENOM, INSTRUCTION_DISCRIMINATORS, MAX_ORACLE_OBSERVATIONS, MAX_SENTINEL_ALLOWLIST, PROGRAM_ID, Q64_ONE, SEED_AUTHORITY, SEED_CONFIG, SEED_ORACLE, SEED_POOL, SEED_POSITION, SEED_PROTOCOL_POSITION, SENTINEL_NO_CHANGE, SENTINEL_PROGRAM_ID, SF_AFTER_ADD_LIQ, SF_AFTER_REMOVE_LIQ, SF_AFTER_SWAP, SF_BEFORE_ADD_LIQ, SF_BEFORE_REMOVE_LIQ, SF_BEFORE_SWAP, SYSTEM_PROGRAM_ID, TOKEN_METADATA_PROGRAM_ID, TOKEN_PROGRAM_ID, areMintsOrdered, getConfigAddress, getLiquidityAddresses, getOracleAddress, getPoolAddress, getPoolAuthorityAddress, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getSwapAddresses, sortMints } from '../chunk-
|
|
1
|
+
import { encodeInstructionData, initializeConfigArgsCodec, initializePoolArgsCodec, initializeOracleArgsCodec, setFeesArgsCodec, setSentinelArgsCodec, setRouteArgsCodec, transferAdminArgsCodec, swapExactInArgsCodec, createPositionArgsCodec, removeLiquidityArgsCodec, collectProtocolFeesArgsCodec, oracleConsultArgsCodec, quoteToNumeraireArgsCodec, decodeAmmConfig } from '../chunk-LIXSTCMM.js';
|
|
2
|
+
export { MAX_FEE_AMOUNT, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createCollectFeesInstruction, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityQuote, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getRemoveLiquidityQuote, getSpotPrice0, getSpotPrice1, getSwapQuote, getSwapQuoteExactOut, getTvl, isOracleStale, isqrt, maxBigInt, minBigInt, numberToQ64, poolExists, q64Div, q64Mul, q64ToNumber, ratioToNumber, sortPoolsByReserves, sortPositionsByShares } from '../chunk-LIXSTCMM.js';
|
|
3
|
+
import { SYSTEM_PROGRAM_ID, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_READONLY, TOKEN_METADATA_PROGRAM_ID, TOKEN_PROGRAM_ID, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_ROLE_SIGNER, PROGRAM_ID, INSTRUCTION_DISCRIMINATORS, getConfigAddress } from '../chunk-T46KDO65.js';
|
|
4
|
+
export { ACCOUNT_DISCRIMINATORS, ACCOUNT_ROLE_READONLY, ACCOUNT_ROLE_SIGNER, ACCOUNT_ROLE_WRITABLE, ACCOUNT_ROLE_WRITABLE_SIGNER, ACCOUNT_VERSION, ASSOCIATED_TOKEN_PROGRAM_ID, BPS_DENOM, INSTRUCTION_DISCRIMINATORS, MAX_ORACLE_OBSERVATIONS, MAX_SENTINEL_ALLOWLIST, PROGRAM_ID, Q64_ONE, SEED_AUTHORITY, SEED_CONFIG, SEED_ORACLE, SEED_POOL, SEED_POSITION, SEED_PROTOCOL_POSITION, SENTINEL_NO_CHANGE, SENTINEL_PROGRAM_ID, SF_AFTER_ADD_LIQ, SF_AFTER_REMOVE_LIQ, SF_AFTER_SWAP, SF_BEFORE_ADD_LIQ, SF_BEFORE_REMOVE_LIQ, SF_BEFORE_SWAP, SYSTEM_PROGRAM_ID, TOKEN_METADATA_PROGRAM_ID, TOKEN_PROGRAM_ID, areMintsOrdered, getConfigAddress, getLiquidityAddresses, getOracleAddress, getPoolAddress, getPoolAuthorityAddress, getPoolInitAddresses, getPositionAddress, getProtocolPositionAddress, getSwapAddresses, sortMints } from '../chunk-T46KDO65.js';
|
|
5
5
|
import { __export } from '../chunk-PZ5AY32C.js';
|
|
6
|
-
import { getAddressCodec, getStructCodec, getU64Codec, getU128Codec, getBooleanCodec, getU8Codec, address, transformEncoder, getStructEncoder, fixEncoderSize, getAddressEncoder, getU8Encoder, getArrayEncoder, getBytesEncoder, getStructDecoder, fixDecoderSize, getAddressDecoder, getU8Decoder, getArrayDecoder, getBytesDecoder, combineCodec, getU64Encoder, getU16Encoder, addEncoderSizePrefix, getU32Encoder, getUtf8Encoder, getU64Decoder, getU16Decoder, addDecoderSizePrefix, getU32Decoder, getUtf8Decoder, getProgramDerivedAddress, getOptionEncoder, getU128Encoder, getOptionDecoder, getU128Decoder, getBooleanEncoder, getBooleanDecoder, mergeBytes } from '@solana/kit';
|
|
6
|
+
import { getAddressCodec, getStructCodec, getU64Codec, getU128Codec, getBooleanCodec, getU8Codec, address, transformEncoder, getStructEncoder, fixEncoderSize, getAddressEncoder, getU8Encoder, getArrayEncoder, getBytesEncoder, getStructDecoder, fixDecoderSize, getAddressDecoder, getU8Decoder, getArrayDecoder, getBytesDecoder, combineCodec, getU64Encoder, getU16Encoder, addEncoderSizePrefix, getU32Encoder, getUtf8Encoder, getU64Decoder, getU16Decoder, addDecoderSizePrefix, getU32Decoder, getUtf8Decoder, getProgramDerivedAddress, AccountRole, getOptionEncoder, getU128Encoder, getOptionDecoder, getU128Decoder, getBooleanEncoder, getBooleanDecoder, mergeBytes } from '@solana/kit';
|
|
7
7
|
import '@solana/program-client-core';
|
|
8
8
|
|
|
9
9
|
var addressCodec = getAddressCodec();
|
|
@@ -948,6 +948,8 @@ __export(initializer_exports, {
|
|
|
948
948
|
CURVE_PARAMS_FORMAT_XYK_V0: () => CURVE_PARAMS_FORMAT_XYK_V0,
|
|
949
949
|
DIRECTION_BUY: () => DIRECTION_BUY,
|
|
950
950
|
DIRECTION_SELL: () => DIRECTION_SELL,
|
|
951
|
+
DOPPLER_DEVNET_ALT: () => DOPPLER_DEVNET_ALT,
|
|
952
|
+
EMPTY_REMAINING_ACCOUNTS_HASH: () => EMPTY_REMAINING_ACCOUNTS_HASH,
|
|
951
953
|
INITIALIZER_ACCOUNT_DISCRIMINATORS: () => INITIALIZER_ACCOUNT_DISCRIMINATORS,
|
|
952
954
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS: () => INITIALIZER_INSTRUCTION_DISCRIMINATORS,
|
|
953
955
|
INITIALIZER_PROGRAM_ID: () => INITIALIZER_PROGRAM_ID,
|
|
@@ -994,11 +996,12 @@ __export(initializer_exports, {
|
|
|
994
996
|
getLaunchDecoder: () => getLaunchDecoder,
|
|
995
997
|
getLaunchEncoder: () => getLaunchEncoder,
|
|
996
998
|
getProgramDataAddress: () => getProgramDataAddress,
|
|
999
|
+
getTokenMetadataAddress: () => getTokenMetadataAddress,
|
|
997
1000
|
launchExists: () => launchExists,
|
|
998
1001
|
launchIdFromU64: () => launchIdFromU64
|
|
999
1002
|
});
|
|
1000
1003
|
var INITIALIZER_PROGRAM_ID = address(
|
|
1001
|
-
"
|
|
1004
|
+
"4h3Dqyo5qmteJoMxXt3tdtfXELDB6pdRTPU9mWruiKp1"
|
|
1002
1005
|
);
|
|
1003
1006
|
var BPF_LOADER_UPGRADEABLE_PROGRAM_ID = address(
|
|
1004
1007
|
"BPFLoaderUpgradeab1e11111111111111111111111"
|
|
@@ -1006,6 +1009,43 @@ var BPF_LOADER_UPGRADEABLE_PROGRAM_ID = address(
|
|
|
1006
1009
|
var SEED_CONFIG2 = "config_v3";
|
|
1007
1010
|
var SEED_LAUNCH = "launch_v3";
|
|
1008
1011
|
var SEED_LAUNCH_AUTHORITY = "launch_authority_v3";
|
|
1012
|
+
var EMPTY_REMAINING_ACCOUNTS_HASH = new Uint8Array([
|
|
1013
|
+
223,
|
|
1014
|
+
63,
|
|
1015
|
+
97,
|
|
1016
|
+
152,
|
|
1017
|
+
4,
|
|
1018
|
+
169,
|
|
1019
|
+
47,
|
|
1020
|
+
219,
|
|
1021
|
+
64,
|
|
1022
|
+
87,
|
|
1023
|
+
25,
|
|
1024
|
+
45,
|
|
1025
|
+
196,
|
|
1026
|
+
61,
|
|
1027
|
+
215,
|
|
1028
|
+
72,
|
|
1029
|
+
234,
|
|
1030
|
+
119,
|
|
1031
|
+
138,
|
|
1032
|
+
220,
|
|
1033
|
+
82,
|
|
1034
|
+
188,
|
|
1035
|
+
73,
|
|
1036
|
+
140,
|
|
1037
|
+
232,
|
|
1038
|
+
5,
|
|
1039
|
+
36,
|
|
1040
|
+
192,
|
|
1041
|
+
20,
|
|
1042
|
+
184,
|
|
1043
|
+
17,
|
|
1044
|
+
25
|
|
1045
|
+
]);
|
|
1046
|
+
var DOPPLER_DEVNET_ALT = address(
|
|
1047
|
+
"7r5rdLkGMzTq5Q2kBhkePw4ZTeZEooHgTXktYoamNmVq"
|
|
1048
|
+
);
|
|
1009
1049
|
var MAX_MIGRATOR_ALLOWLIST = 32;
|
|
1010
1050
|
var MAX_SENTINEL_ALLOWLIST2 = 32;
|
|
1011
1051
|
var MAX_CALLDATA = 256;
|
|
@@ -1650,6 +1690,42 @@ function createSetSentinelAllowlistInstruction(accounts, allowlist, programId =
|
|
|
1650
1690
|
);
|
|
1651
1691
|
return { programAddress: programId, accounts: keys, data };
|
|
1652
1692
|
}
|
|
1693
|
+
var CPMM_MIGRATOR_PROGRAM_ID = address(
|
|
1694
|
+
"7WMUTNC41eMCo6eGH5Sy2xbgE3AycvLbFPo95AU9CSUd"
|
|
1695
|
+
);
|
|
1696
|
+
var SEED_STATE = "state";
|
|
1697
|
+
var MAX_RECIPIENTS = 2;
|
|
1698
|
+
var CPMM_MIGRATOR_INSTRUCTION_DISCRIMINATORS = {
|
|
1699
|
+
// SHA256("global:register_launch")[0:8]
|
|
1700
|
+
registerLaunch: new Uint8Array([
|
|
1701
|
+
114,
|
|
1702
|
+
114,
|
|
1703
|
+
67,
|
|
1704
|
+
23,
|
|
1705
|
+
41,
|
|
1706
|
+
70,
|
|
1707
|
+
0,
|
|
1708
|
+
225
|
|
1709
|
+
]),
|
|
1710
|
+
// SHA256("global:migrate")[0:8]
|
|
1711
|
+
migrate: new Uint8Array([155, 234, 231, 146, 236, 158, 162, 30])
|
|
1712
|
+
};
|
|
1713
|
+
var CPMM_MIGRATOR_ACCOUNT_DISCRIMINATORS = {
|
|
1714
|
+
// SHA256("account:CpmmMigratorState")[0:8]
|
|
1715
|
+
CpmmMigratorState: new Uint8Array([
|
|
1716
|
+
169,
|
|
1717
|
+
86,
|
|
1718
|
+
255,
|
|
1719
|
+
187,
|
|
1720
|
+
37,
|
|
1721
|
+
248,
|
|
1722
|
+
11,
|
|
1723
|
+
176
|
|
1724
|
+
])
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
// src/solana/generated/predictionMigrator/programs/predictionMigrator.ts
|
|
1728
|
+
var PREDICTION_MIGRATOR_PROGRAM_ADDRESS = "HYHdyy7QZg8Ucky9Z97xNtSCvrZxVNkeoney8xEPXjiZ";
|
|
1653
1729
|
|
|
1654
1730
|
// src/solana/initializer/instructions/initializeLaunch.ts
|
|
1655
1731
|
function isTransactionSigner5(value) {
|
|
@@ -1661,6 +1737,29 @@ function createAccountMeta(value, role) {
|
|
|
1661
1737
|
}
|
|
1662
1738
|
return { address: value, role };
|
|
1663
1739
|
}
|
|
1740
|
+
async function getTokenMetadataAddress(mint) {
|
|
1741
|
+
const encoder = getAddressEncoder();
|
|
1742
|
+
const [metadataAddress] = await getProgramDerivedAddress({
|
|
1743
|
+
programAddress: TOKEN_METADATA_PROGRAM_ID,
|
|
1744
|
+
seeds: [
|
|
1745
|
+
new TextEncoder().encode("metadata"),
|
|
1746
|
+
encoder.encode(TOKEN_METADATA_PROGRAM_ID),
|
|
1747
|
+
encoder.encode(mint)
|
|
1748
|
+
]
|
|
1749
|
+
});
|
|
1750
|
+
return metadataAddress;
|
|
1751
|
+
}
|
|
1752
|
+
var ALT_INDEX = {
|
|
1753
|
+
[TOKEN_PROGRAM_ID]: 0,
|
|
1754
|
+
[SYSTEM_PROGRAM_ID]: 1,
|
|
1755
|
+
SysvarRent111111111111111111111111111111111: 2,
|
|
1756
|
+
[INITIALIZER_PROGRAM_ID]: 3,
|
|
1757
|
+
[TOKEN_METADATA_PROGRAM_ID]: 4,
|
|
1758
|
+
[CPMM_MIGRATOR_PROGRAM_ID]: 5,
|
|
1759
|
+
So11111111111111111111111111111111111111112: 6,
|
|
1760
|
+
// index 7 = config PDA — resolved at call time from accounts.config
|
|
1761
|
+
[PREDICTION_MIGRATOR_PROGRAM_ADDRESS]: 8
|
|
1762
|
+
};
|
|
1664
1763
|
function validateInitializeLaunchCurveParams(args) {
|
|
1665
1764
|
if (args.curveKind !== CURVE_KIND_XYK) {
|
|
1666
1765
|
throw new Error(
|
|
@@ -1686,14 +1785,36 @@ function createInitializeLaunchInstruction(accounts, args, programId = INITIALIZ
|
|
|
1686
1785
|
migratorProgram,
|
|
1687
1786
|
tokenProgram = TOKEN_PROGRAM_ID,
|
|
1688
1787
|
systemProgram = SYSTEM_PROGRAM_ID,
|
|
1689
|
-
rent
|
|
1788
|
+
rent,
|
|
1789
|
+
metadataAccount,
|
|
1790
|
+
addressLookupTable: alt
|
|
1690
1791
|
} = accounts;
|
|
1792
|
+
const withMetadata = Boolean(
|
|
1793
|
+
args.metadataName && args.metadataName.length > 0
|
|
1794
|
+
);
|
|
1795
|
+
if (withMetadata && !metadataAccount) {
|
|
1796
|
+
throw new Error(
|
|
1797
|
+
"metadataName is set but metadataAccount was not provided. Derive it with await initializer.getTokenMetadataAddress(baseMintAddress)."
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
const altIndexMap = alt ? { ...ALT_INDEX, [config]: 7 } : {};
|
|
1801
|
+
function staticOrLookup(addr, role) {
|
|
1802
|
+
if (alt && altIndexMap[addr] !== void 0) {
|
|
1803
|
+
return {
|
|
1804
|
+
address: addr,
|
|
1805
|
+
role,
|
|
1806
|
+
lookupTableAddress: alt,
|
|
1807
|
+
addressIndex: altIndexMap[addr]
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
return { address: addr, role };
|
|
1811
|
+
}
|
|
1691
1812
|
const keys = [
|
|
1692
|
-
|
|
1813
|
+
staticOrLookup(config, AccountRole.READONLY),
|
|
1693
1814
|
{ address: launch, role: ACCOUNT_ROLE_WRITABLE },
|
|
1694
1815
|
{ address: launchAuthority, role: ACCOUNT_ROLE_READONLY },
|
|
1695
1816
|
createAccountMeta(baseMint, ACCOUNT_ROLE_WRITABLE_SIGNER),
|
|
1696
|
-
|
|
1817
|
+
staticOrLookup(quoteMint, AccountRole.READONLY),
|
|
1697
1818
|
createAccountMeta(baseVault, ACCOUNT_ROLE_WRITABLE_SIGNER),
|
|
1698
1819
|
createAccountMeta(quoteVault, ACCOUNT_ROLE_WRITABLE_SIGNER),
|
|
1699
1820
|
createAccountMeta(payer, ACCOUNT_ROLE_WRITABLE_SIGNER)
|
|
@@ -1702,19 +1823,19 @@ function createInitializeLaunchInstruction(accounts, args, programId = INITIALIZ
|
|
|
1702
1823
|
keys.push(createAccountMeta(authority, ACCOUNT_ROLE_SIGNER));
|
|
1703
1824
|
}
|
|
1704
1825
|
if (migratorProgram) {
|
|
1705
|
-
keys.push(
|
|
1826
|
+
keys.push(staticOrLookup(migratorProgram, AccountRole.READONLY));
|
|
1827
|
+
}
|
|
1828
|
+
keys.push(staticOrLookup(tokenProgram, AccountRole.READONLY));
|
|
1829
|
+
keys.push(staticOrLookup(systemProgram, AccountRole.READONLY));
|
|
1830
|
+
keys.push(staticOrLookup(rent, AccountRole.READONLY));
|
|
1831
|
+
if (withMetadata) {
|
|
1832
|
+
keys.push({ address: metadataAccount, role: ACCOUNT_ROLE_WRITABLE });
|
|
1833
|
+
keys.push(staticOrLookup(TOKEN_METADATA_PROGRAM_ID, AccountRole.READONLY));
|
|
1706
1834
|
}
|
|
1707
|
-
keys.push({ address: tokenProgram, role: ACCOUNT_ROLE_READONLY });
|
|
1708
|
-
keys.push({ address: systemProgram, role: ACCOUNT_ROLE_READONLY });
|
|
1709
|
-
keys.push({ address: rent, role: ACCOUNT_ROLE_READONLY });
|
|
1710
1835
|
const data = new Uint8Array(
|
|
1711
1836
|
getInitializeLaunchInstructionDataEncoder().encode(args)
|
|
1712
1837
|
);
|
|
1713
|
-
return {
|
|
1714
|
-
programAddress: programId,
|
|
1715
|
-
accounts: keys,
|
|
1716
|
-
data
|
|
1717
|
-
};
|
|
1838
|
+
return { programAddress: programId, accounts: keys, data };
|
|
1718
1839
|
}
|
|
1719
1840
|
|
|
1720
1841
|
// src/solana/initializer/instructions/curveSwapExactIn.ts
|
|
@@ -1739,7 +1860,7 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
1739
1860
|
baseMint,
|
|
1740
1861
|
quoteMint,
|
|
1741
1862
|
user,
|
|
1742
|
-
sentinelProgram,
|
|
1863
|
+
sentinelProgram = SYSTEM_PROGRAM_ID,
|
|
1743
1864
|
tokenProgram = TOKEN_PROGRAM_ID
|
|
1744
1865
|
} = accounts;
|
|
1745
1866
|
const keys = [
|
|
@@ -1752,12 +1873,13 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
1752
1873
|
{ address: userQuoteAccount, role: ACCOUNT_ROLE_WRITABLE },
|
|
1753
1874
|
{ address: baseMint, role: ACCOUNT_ROLE_READONLY },
|
|
1754
1875
|
{ address: quoteMint, role: ACCOUNT_ROLE_READONLY },
|
|
1755
|
-
createAccountMeta2(user, ACCOUNT_ROLE_SIGNER)
|
|
1876
|
+
createAccountMeta2(user, ACCOUNT_ROLE_SIGNER),
|
|
1877
|
+
// sentinel_program is Optional in the on-chain struct but still occupies a fixed
|
|
1878
|
+
// slot (token_program follows it). Always emit it — use SYSTEM_PROGRAM_ID as the
|
|
1879
|
+
// no-op placeholder when no real sentinel is configured.
|
|
1880
|
+
{ address: sentinelProgram, role: ACCOUNT_ROLE_READONLY },
|
|
1881
|
+
{ address: tokenProgram, role: ACCOUNT_ROLE_READONLY }
|
|
1756
1882
|
];
|
|
1757
|
-
if (sentinelProgram) {
|
|
1758
|
-
keys.push({ address: sentinelProgram, role: ACCOUNT_ROLE_READONLY });
|
|
1759
|
-
}
|
|
1760
|
-
keys.push({ address: tokenProgram, role: ACCOUNT_ROLE_READONLY });
|
|
1761
1883
|
const data = new Uint8Array(
|
|
1762
1884
|
getCurveSwapExactInInstructionDataEncoder().encode(args)
|
|
1763
1885
|
);
|
|
@@ -2129,39 +2251,6 @@ function getCpmmMigratorStateCodec() {
|
|
|
2129
2251
|
);
|
|
2130
2252
|
}
|
|
2131
2253
|
if (process.env.NODE_ENV !== "production") ;
|
|
2132
|
-
var CPMM_MIGRATOR_PROGRAM_ID = address(
|
|
2133
|
-
"CpmmMig1111111111111111111111111111111111111"
|
|
2134
|
-
);
|
|
2135
|
-
var SEED_STATE = "state";
|
|
2136
|
-
var MAX_RECIPIENTS = 2;
|
|
2137
|
-
var CPMM_MIGRATOR_INSTRUCTION_DISCRIMINATORS = {
|
|
2138
|
-
// SHA256("global:register_launch")[0:8]
|
|
2139
|
-
registerLaunch: new Uint8Array([
|
|
2140
|
-
114,
|
|
2141
|
-
114,
|
|
2142
|
-
67,
|
|
2143
|
-
23,
|
|
2144
|
-
41,
|
|
2145
|
-
70,
|
|
2146
|
-
0,
|
|
2147
|
-
225
|
|
2148
|
-
]),
|
|
2149
|
-
// SHA256("global:migrate")[0:8]
|
|
2150
|
-
migrate: new Uint8Array([155, 234, 231, 146, 236, 158, 162, 30])
|
|
2151
|
-
};
|
|
2152
|
-
var CPMM_MIGRATOR_ACCOUNT_DISCRIMINATORS = {
|
|
2153
|
-
// SHA256("account:CpmmMigratorState")[0:8]
|
|
2154
|
-
CpmmMigratorState: new Uint8Array([
|
|
2155
|
-
169,
|
|
2156
|
-
86,
|
|
2157
|
-
255,
|
|
2158
|
-
187,
|
|
2159
|
-
37,
|
|
2160
|
-
248,
|
|
2161
|
-
11,
|
|
2162
|
-
176
|
|
2163
|
-
])
|
|
2164
|
-
};
|
|
2165
2254
|
var addressCodec4 = getAddressCodec();
|
|
2166
2255
|
var textEncoder3 = new TextEncoder();
|
|
2167
2256
|
async function getCpmmMigratorStateAddress(launch, programId = CPMM_MIGRATOR_PROGRAM_ID) {
|