@whetstone-research/doppler-sdk 1.0.24 → 1.0.26
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/README.md +7 -1
- package/dist/{chunk-BESE77DM.js → chunk-RVDRWCJN.js} +3 -3
- package/dist/{chunk-BESE77DM.js.map → chunk-RVDRWCJN.js.map} +1 -1
- package/dist/{chunk-Y6TJIH33.cjs → chunk-U6B52TBT.cjs} +13 -4
- package/dist/chunk-U6B52TBT.cjs.map +1 -0
- package/dist/{chunk-ZUJKBFXW.js → chunk-WD5VOZGI.js} +8 -5
- package/dist/chunk-WD5VOZGI.js.map +1 -0
- package/dist/{chunk-KJ6W44WF.cjs → chunk-XTL2GBZ4.cjs} +36 -36
- package/dist/{chunk-KJ6W44WF.cjs.map → chunk-XTL2GBZ4.cjs.map} +1 -1
- package/dist/evm/index.cjs +79 -0
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +3 -2
- package/dist/evm/index.d.ts +3 -2
- package/dist/evm/index.js +79 -0
- package/dist/evm/index.js.map +1 -1
- package/dist/{pda-A4PIAS5Y.cjs → pda-H6VMGONM.cjs} +17 -17
- package/dist/pda-H6VMGONM.cjs.map +1 -0
- package/dist/{pda-JVAD45XJ.js → pda-UJLXCO6I.js} +3 -3
- package/dist/pda-UJLXCO6I.js.map +1 -0
- package/dist/solana/index.cjs +1362 -801
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +493 -279
- package/dist/solana/index.d.ts +493 -279
- package/dist/solana/index.js +1029 -469
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/react/index.cjs +45 -45
- package/dist/solana/react/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-Y6TJIH33.cjs.map +0 -1
- package/dist/chunk-ZUJKBFXW.js.map +0 -1
- package/dist/pda-A4PIAS5Y.cjs.map +0 -1
- package/dist/pda-JVAD45XJ.js.map +0 -1
package/dist/solana/index.cjs
CHANGED
|
@@ -1,344 +1,345 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkXTL2GBZ4_cjs = require('../chunk-XTL2GBZ4.cjs');
|
|
4
|
+
var chunkU6B52TBT_cjs = require('../chunk-U6B52TBT.cjs');
|
|
5
5
|
var chunkQ7SFCCGT_cjs = require('../chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var kit = require('@solana/kit');
|
|
7
7
|
var programClientCore = require('@solana/program-client-core');
|
|
8
8
|
var sha3_js = require('@noble/hashes/sha3.js');
|
|
9
|
+
var token = require('@solana-program/token');
|
|
9
10
|
var addressLookupTable = require('@solana-program/address-lookup-table');
|
|
10
11
|
|
|
11
12
|
// src/solana/cpmm/index.ts
|
|
12
13
|
var cpmm_exports = {};
|
|
13
14
|
chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
14
|
-
ACCOUNT_DISCRIMINATORS: () =>
|
|
15
|
-
ACCOUNT_VERSION: () =>
|
|
16
|
-
ADD_LIQUIDITY_DISCRIMINATOR: () =>
|
|
17
|
-
BPS_DENOM: () =>
|
|
18
|
-
CLOSE_POSITION_DISCRIMINATOR: () =>
|
|
19
|
-
COLLECT_FEES_DISCRIMINATOR: () =>
|
|
20
|
-
COLLECT_PROTOCOL_FEES_DISCRIMINATOR: () =>
|
|
15
|
+
ACCOUNT_DISCRIMINATORS: () => chunkU6B52TBT_cjs.ACCOUNT_DISCRIMINATORS,
|
|
16
|
+
ACCOUNT_VERSION: () => chunkU6B52TBT_cjs.ACCOUNT_VERSION,
|
|
17
|
+
ADD_LIQUIDITY_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.ADD_LIQUIDITY_DISCRIMINATOR,
|
|
18
|
+
BPS_DENOM: () => chunkU6B52TBT_cjs.BPS_DENOM,
|
|
19
|
+
CLOSE_POSITION_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.CLOSE_POSITION_DISCRIMINATOR,
|
|
20
|
+
COLLECT_FEES_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.COLLECT_FEES_DISCRIMINATOR,
|
|
21
|
+
COLLECT_PROTOCOL_FEES_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.COLLECT_PROTOCOL_FEES_DISCRIMINATOR,
|
|
21
22
|
CPMM_ERROR_MESSAGES: () => CPMM_ERROR_MESSAGES,
|
|
22
|
-
CPMM_PROGRAM_ID: () =>
|
|
23
|
-
CREATE_POSITION_DISCRIMINATOR: () =>
|
|
23
|
+
CPMM_PROGRAM_ID: () => chunkU6B52TBT_cjs.CPMM_PROGRAM_ID,
|
|
24
|
+
CREATE_POSITION_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.CREATE_POSITION_DISCRIMINATOR,
|
|
24
25
|
CpmmError: () => CpmmError,
|
|
25
26
|
CpmmErrorCode: () => CpmmErrorCode,
|
|
26
|
-
HF_AFTER_ADD_LIQ: () =>
|
|
27
|
-
HF_AFTER_REMOVE_LIQ: () =>
|
|
28
|
-
HF_AFTER_SWAP: () =>
|
|
29
|
-
HF_BEFORE_ADD_LIQ: () =>
|
|
30
|
-
HF_BEFORE_REMOVE_LIQ: () =>
|
|
31
|
-
HF_BEFORE_SWAP: () =>
|
|
32
|
-
HF_FORWARD_READONLY_SIGNERS: () =>
|
|
33
|
-
HF_REQUIRE_ORACLE: () =>
|
|
34
|
-
HOOK_NO_CHANGE: () =>
|
|
35
|
-
INITIALIZE_CONFIG_DISCRIMINATOR: () =>
|
|
36
|
-
INITIALIZE_ORACLE_DISCRIMINATOR: () =>
|
|
37
|
-
INITIALIZE_POOL_DISCRIMINATOR: () =>
|
|
38
|
-
INSTRUCTION_DISCRIMINATORS: () =>
|
|
27
|
+
HF_AFTER_ADD_LIQ: () => chunkU6B52TBT_cjs.HF_AFTER_ADD_LIQ,
|
|
28
|
+
HF_AFTER_REMOVE_LIQ: () => chunkU6B52TBT_cjs.HF_AFTER_REMOVE_LIQ,
|
|
29
|
+
HF_AFTER_SWAP: () => chunkU6B52TBT_cjs.HF_AFTER_SWAP,
|
|
30
|
+
HF_BEFORE_ADD_LIQ: () => chunkU6B52TBT_cjs.HF_BEFORE_ADD_LIQ,
|
|
31
|
+
HF_BEFORE_REMOVE_LIQ: () => chunkU6B52TBT_cjs.HF_BEFORE_REMOVE_LIQ,
|
|
32
|
+
HF_BEFORE_SWAP: () => chunkU6B52TBT_cjs.HF_BEFORE_SWAP,
|
|
33
|
+
HF_FORWARD_READONLY_SIGNERS: () => chunkU6B52TBT_cjs.HF_FORWARD_READONLY_SIGNERS,
|
|
34
|
+
HF_REQUIRE_ORACLE: () => chunkU6B52TBT_cjs.HF_REQUIRE_ORACLE,
|
|
35
|
+
HOOK_NO_CHANGE: () => chunkU6B52TBT_cjs.HOOK_NO_CHANGE,
|
|
36
|
+
INITIALIZE_CONFIG_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.INITIALIZE_CONFIG_DISCRIMINATOR,
|
|
37
|
+
INITIALIZE_ORACLE_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.INITIALIZE_ORACLE_DISCRIMINATOR,
|
|
38
|
+
INITIALIZE_POOL_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.INITIALIZE_POOL_DISCRIMINATOR,
|
|
39
|
+
INSTRUCTION_DISCRIMINATORS: () => chunkU6B52TBT_cjs.INSTRUCTION_DISCRIMINATORS,
|
|
39
40
|
MAX_FEE_AMOUNT: () => MAX_FEE_AMOUNT,
|
|
40
|
-
MAX_HOOK_ALLOWLIST: () =>
|
|
41
|
-
MAX_ORACLE_OBSERVATIONS: () =>
|
|
42
|
-
ORACLE_CONSULT_DISCRIMINATOR: () =>
|
|
43
|
-
ORACLE_UPDATE_DISCRIMINATOR: () =>
|
|
44
|
-
PAUSE_DISCRIMINATOR: () =>
|
|
45
|
-
PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR: () =>
|
|
46
|
-
Q64_ONE: () =>
|
|
47
|
-
REDEEM_PROTOCOL_SHARES_DISCRIMINATOR: () =>
|
|
48
|
-
REMOVE_LIQUIDITY_DISCRIMINATOR: () =>
|
|
49
|
-
SEED_AUTHORITY: () =>
|
|
50
|
-
SEED_CONFIG: () =>
|
|
51
|
-
SEED_ORACLE: () =>
|
|
52
|
-
SEED_POOL: () =>
|
|
53
|
-
SEED_POSITION: () =>
|
|
54
|
-
SEED_PROTOCOL_FEE_OWNER: () =>
|
|
55
|
-
SET_FEES_DISCRIMINATOR: () =>
|
|
56
|
-
SET_HOOK_DISCRIMINATOR: () =>
|
|
57
|
-
SWAP_EXACT_IN_DISCRIMINATOR: () =>
|
|
58
|
-
TOKEN_METADATA_PROGRAM_ID: () =>
|
|
59
|
-
TRANSFER_ADMIN_DISCRIMINATOR: () =>
|
|
60
|
-
UNPAUSE_DISCRIMINATOR: () =>
|
|
61
|
-
UPDATE_CONFIG_DISCRIMINATOR: () =>
|
|
62
|
-
WITHDRAW_VAULT_EXCESS_DISCRIMINATOR: () =>
|
|
63
|
-
addLiquidityArgsCodec: () =>
|
|
64
|
-
ammConfigDataCodec: () =>
|
|
65
|
-
areMintsOrdered: () =>
|
|
66
|
-
calculateAccruedFees: () =>
|
|
67
|
-
calculateTwap: () =>
|
|
68
|
-
calculateTwapNumber: () =>
|
|
69
|
-
ceilDiv: () =>
|
|
70
|
-
collectFeesArgsCodec: () =>
|
|
71
|
-
collectProtocolFeesArgsCodec: () =>
|
|
72
|
-
comparePoolAndOraclePrices: () =>
|
|
73
|
-
computePrice0Q64: () =>
|
|
74
|
-
computePrice1Q64: () =>
|
|
75
|
-
consultTwap: () =>
|
|
76
|
-
createAddLiquidityInstruction: () =>
|
|
77
|
-
createClosePositionInstruction: () =>
|
|
78
|
-
createCollectFeesInstruction: () =>
|
|
79
|
-
createCollectProtocolFeesInstruction: () =>
|
|
80
|
-
createCreatePositionInstruction: () =>
|
|
81
|
-
createInitializeConfigInstruction: () =>
|
|
82
|
-
createInitializeOracleInstruction: () =>
|
|
83
|
-
createInitializePoolInstruction: () =>
|
|
84
|
-
createOracleConsultInstruction: () =>
|
|
85
|
-
createOracleUpdateInstruction: () =>
|
|
86
|
-
createPauseInstruction: () =>
|
|
87
|
-
createPositionArgsCodec: () =>
|
|
88
|
-
createRemoveLiquidityInstruction: () =>
|
|
89
|
-
createSetFeesInstruction: () =>
|
|
90
|
-
createSetHookInstruction: () =>
|
|
91
|
-
createSwapExactInInstruction: () =>
|
|
41
|
+
MAX_HOOK_ALLOWLIST: () => chunkU6B52TBT_cjs.MAX_HOOK_ALLOWLIST,
|
|
42
|
+
MAX_ORACLE_OBSERVATIONS: () => chunkU6B52TBT_cjs.MAX_ORACLE_OBSERVATIONS,
|
|
43
|
+
ORACLE_CONSULT_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.ORACLE_CONSULT_DISCRIMINATOR,
|
|
44
|
+
ORACLE_UPDATE_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.ORACLE_UPDATE_DISCRIMINATOR,
|
|
45
|
+
PAUSE_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.PAUSE_DISCRIMINATOR,
|
|
46
|
+
PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR,
|
|
47
|
+
Q64_ONE: () => chunkU6B52TBT_cjs.Q64_ONE,
|
|
48
|
+
REDEEM_PROTOCOL_SHARES_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.REDEEM_PROTOCOL_SHARES_DISCRIMINATOR,
|
|
49
|
+
REMOVE_LIQUIDITY_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.REMOVE_LIQUIDITY_DISCRIMINATOR,
|
|
50
|
+
SEED_AUTHORITY: () => chunkU6B52TBT_cjs.SEED_AUTHORITY,
|
|
51
|
+
SEED_CONFIG: () => chunkU6B52TBT_cjs.SEED_CONFIG,
|
|
52
|
+
SEED_ORACLE: () => chunkU6B52TBT_cjs.SEED_ORACLE,
|
|
53
|
+
SEED_POOL: () => chunkU6B52TBT_cjs.SEED_POOL,
|
|
54
|
+
SEED_POSITION: () => chunkU6B52TBT_cjs.SEED_POSITION,
|
|
55
|
+
SEED_PROTOCOL_FEE_OWNER: () => chunkU6B52TBT_cjs.SEED_PROTOCOL_FEE_OWNER,
|
|
56
|
+
SET_FEES_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.SET_FEES_DISCRIMINATOR,
|
|
57
|
+
SET_HOOK_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.SET_HOOK_DISCRIMINATOR,
|
|
58
|
+
SWAP_EXACT_IN_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.SWAP_EXACT_IN_DISCRIMINATOR,
|
|
59
|
+
TOKEN_METADATA_PROGRAM_ID: () => chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
60
|
+
TRANSFER_ADMIN_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.TRANSFER_ADMIN_DISCRIMINATOR,
|
|
61
|
+
UNPAUSE_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.UNPAUSE_DISCRIMINATOR,
|
|
62
|
+
UPDATE_CONFIG_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.UPDATE_CONFIG_DISCRIMINATOR,
|
|
63
|
+
WITHDRAW_VAULT_EXCESS_DISCRIMINATOR: () => chunkXTL2GBZ4_cjs.WITHDRAW_VAULT_EXCESS_DISCRIMINATOR,
|
|
64
|
+
addLiquidityArgsCodec: () => chunkXTL2GBZ4_cjs.addLiquidityArgsCodec,
|
|
65
|
+
ammConfigDataCodec: () => chunkXTL2GBZ4_cjs.ammConfigDataCodec,
|
|
66
|
+
areMintsOrdered: () => chunkU6B52TBT_cjs.areMintsOrdered,
|
|
67
|
+
calculateAccruedFees: () => chunkXTL2GBZ4_cjs.calculateAccruedFees,
|
|
68
|
+
calculateTwap: () => chunkXTL2GBZ4_cjs.calculateTwap,
|
|
69
|
+
calculateTwapNumber: () => chunkXTL2GBZ4_cjs.calculateTwapNumber,
|
|
70
|
+
ceilDiv: () => chunkXTL2GBZ4_cjs.ceilDiv,
|
|
71
|
+
collectFeesArgsCodec: () => chunkXTL2GBZ4_cjs.collectFeesArgsCodec,
|
|
72
|
+
collectProtocolFeesArgsCodec: () => chunkXTL2GBZ4_cjs.collectProtocolFeesArgsCodec,
|
|
73
|
+
comparePoolAndOraclePrices: () => chunkXTL2GBZ4_cjs.comparePoolAndOraclePrices,
|
|
74
|
+
computePrice0Q64: () => chunkXTL2GBZ4_cjs.computePrice0Q64,
|
|
75
|
+
computePrice1Q64: () => chunkXTL2GBZ4_cjs.computePrice1Q64,
|
|
76
|
+
consultTwap: () => chunkXTL2GBZ4_cjs.consultTwap,
|
|
77
|
+
createAddLiquidityInstruction: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstruction,
|
|
78
|
+
createClosePositionInstruction: () => chunkXTL2GBZ4_cjs.getClosePositionInstruction,
|
|
79
|
+
createCollectFeesInstruction: () => chunkXTL2GBZ4_cjs.getCollectFeesInstruction,
|
|
80
|
+
createCollectProtocolFeesInstruction: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstruction,
|
|
81
|
+
createCreatePositionInstruction: () => chunkXTL2GBZ4_cjs.getCreatePositionInstruction,
|
|
82
|
+
createInitializeConfigInstruction: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstruction,
|
|
83
|
+
createInitializeOracleInstruction: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstruction,
|
|
84
|
+
createInitializePoolInstruction: () => chunkXTL2GBZ4_cjs.getInitializePoolInstruction,
|
|
85
|
+
createOracleConsultInstruction: () => chunkXTL2GBZ4_cjs.getOracleConsultInstruction,
|
|
86
|
+
createOracleUpdateInstruction: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstruction,
|
|
87
|
+
createPauseInstruction: () => chunkXTL2GBZ4_cjs.getPauseInstruction,
|
|
88
|
+
createPositionArgsCodec: () => chunkXTL2GBZ4_cjs.createPositionArgsCodec,
|
|
89
|
+
createRemoveLiquidityInstruction: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstruction,
|
|
90
|
+
createSetFeesInstruction: () => chunkXTL2GBZ4_cjs.getSetFeesInstruction,
|
|
91
|
+
createSetHookInstruction: () => chunkXTL2GBZ4_cjs.getSetHookInstruction,
|
|
92
|
+
createSwapExactInInstruction: () => chunkXTL2GBZ4_cjs.getSwapExactInInstruction,
|
|
92
93
|
createSwapInstruction: () => createSwapInstruction,
|
|
93
|
-
createTransferAdminInstruction: () =>
|
|
94
|
-
createUnpauseInstruction: () =>
|
|
95
|
-
createWithdrawVaultExcessInstruction: () =>
|
|
94
|
+
createTransferAdminInstruction: () => chunkXTL2GBZ4_cjs.getTransferAdminInstruction,
|
|
95
|
+
createUnpauseInstruction: () => chunkXTL2GBZ4_cjs.getUnpauseInstruction,
|
|
96
|
+
createWithdrawVaultExcessInstruction: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstruction,
|
|
96
97
|
curveParamsToMarketCap: () => curveParamsToMarketCap,
|
|
97
|
-
decodeAmmConfig: () =>
|
|
98
|
-
decodeOracleState: () =>
|
|
99
|
-
decodePool: () =>
|
|
100
|
-
decodePosition: () =>
|
|
101
|
-
encodeAddLiquidityArgs: () =>
|
|
102
|
-
encodeCollectFeesArgs: () =>
|
|
103
|
-
encodeCollectProtocolFeesArgs: () =>
|
|
104
|
-
encodeCreatePositionArgs: () =>
|
|
105
|
-
encodeInitializeConfigArgs: () =>
|
|
106
|
-
encodeInitializeOracleArgs: () =>
|
|
107
|
-
encodeInitializePoolArgs: () =>
|
|
108
|
-
encodeInstructionData: () =>
|
|
109
|
-
encodeOracleConsultArgs: () =>
|
|
110
|
-
encodeRemoveLiquidityArgs: () =>
|
|
111
|
-
encodeSetFeesArgs: () =>
|
|
112
|
-
encodeSetHookArgs: () =>
|
|
113
|
-
encodeSwapExactInArgs: () =>
|
|
114
|
-
encodeTransferAdminArgs: () =>
|
|
115
|
-
fetchAllPools: () =>
|
|
98
|
+
decodeAmmConfig: () => chunkXTL2GBZ4_cjs.decodeAmmConfig,
|
|
99
|
+
decodeOracleState: () => chunkXTL2GBZ4_cjs.decodeOracleState,
|
|
100
|
+
decodePool: () => chunkXTL2GBZ4_cjs.decodePool,
|
|
101
|
+
decodePosition: () => chunkXTL2GBZ4_cjs.decodePosition,
|
|
102
|
+
encodeAddLiquidityArgs: () => chunkXTL2GBZ4_cjs.encodeAddLiquidityArgs,
|
|
103
|
+
encodeCollectFeesArgs: () => chunkXTL2GBZ4_cjs.encodeCollectFeesArgs,
|
|
104
|
+
encodeCollectProtocolFeesArgs: () => chunkXTL2GBZ4_cjs.encodeCollectProtocolFeesArgs,
|
|
105
|
+
encodeCreatePositionArgs: () => chunkXTL2GBZ4_cjs.encodeCreatePositionArgs,
|
|
106
|
+
encodeInitializeConfigArgs: () => chunkXTL2GBZ4_cjs.encodeInitializeConfigArgs,
|
|
107
|
+
encodeInitializeOracleArgs: () => chunkXTL2GBZ4_cjs.encodeInitializeOracleArgs,
|
|
108
|
+
encodeInitializePoolArgs: () => chunkXTL2GBZ4_cjs.encodeInitializePoolArgs,
|
|
109
|
+
encodeInstructionData: () => chunkXTL2GBZ4_cjs.encodeInstructionData,
|
|
110
|
+
encodeOracleConsultArgs: () => chunkXTL2GBZ4_cjs.encodeOracleConsultArgs,
|
|
111
|
+
encodeRemoveLiquidityArgs: () => chunkXTL2GBZ4_cjs.encodeRemoveLiquidityArgs,
|
|
112
|
+
encodeSetFeesArgs: () => chunkXTL2GBZ4_cjs.encodeSetFeesArgs,
|
|
113
|
+
encodeSetHookArgs: () => chunkXTL2GBZ4_cjs.encodeSetHookArgs,
|
|
114
|
+
encodeSwapExactInArgs: () => chunkXTL2GBZ4_cjs.encodeSwapExactInArgs,
|
|
115
|
+
encodeTransferAdminArgs: () => chunkXTL2GBZ4_cjs.encodeTransferAdminArgs,
|
|
116
|
+
fetchAllPools: () => chunkXTL2GBZ4_cjs.fetchAllPools,
|
|
116
117
|
fetchConfig: () => fetchConfig,
|
|
117
118
|
fetchConfigWithAddress: () => fetchConfigWithAddress,
|
|
118
|
-
fetchOracle: () =>
|
|
119
|
-
fetchOraclesBatch: () =>
|
|
120
|
-
fetchPool: () =>
|
|
121
|
-
fetchPoolPositions: () =>
|
|
122
|
-
fetchPoolsBatch: () =>
|
|
123
|
-
fetchPosition: () =>
|
|
124
|
-
fetchPositionByParams: () =>
|
|
125
|
-
fetchPositionsBatch: () =>
|
|
126
|
-
fetchUserPositions: () =>
|
|
127
|
-
filterActivePositions: () =>
|
|
128
|
-
filterPoolsByMint: () =>
|
|
129
|
-
getAddLiquidityDiscriminatorBytes: () =>
|
|
130
|
-
getAddLiquidityInstruction: () =>
|
|
131
|
-
getAddLiquidityInstructionAsync: () =>
|
|
132
|
-
getAddLiquidityInstructionDataCodec: () =>
|
|
133
|
-
getAddLiquidityInstructionDataDecoder: () =>
|
|
134
|
-
getAddLiquidityInstructionDataEncoder: () =>
|
|
135
|
-
getAddLiquidityQuote: () =>
|
|
136
|
-
getClosePositionDiscriminatorBytes: () =>
|
|
137
|
-
getClosePositionInstruction: () =>
|
|
138
|
-
getClosePositionInstructionDataCodec: () =>
|
|
139
|
-
getClosePositionInstructionDataDecoder: () =>
|
|
140
|
-
getClosePositionInstructionDataEncoder: () =>
|
|
141
|
-
getCollectFeesDiscriminatorBytes: () =>
|
|
142
|
-
getCollectFeesInstruction: () =>
|
|
143
|
-
getCollectFeesInstructionAsync: () =>
|
|
144
|
-
getCollectFeesInstructionDataCodec: () =>
|
|
145
|
-
getCollectFeesInstructionDataDecoder: () =>
|
|
146
|
-
getCollectFeesInstructionDataEncoder: () =>
|
|
147
|
-
getCollectProtocolFeesDiscriminatorBytes: () =>
|
|
148
|
-
getCollectProtocolFeesInstruction: () =>
|
|
149
|
-
getCollectProtocolFeesInstructionAsync: () =>
|
|
150
|
-
getCollectProtocolFeesInstructionDataCodec: () =>
|
|
151
|
-
getCollectProtocolFeesInstructionDataDecoder: () =>
|
|
152
|
-
getCollectProtocolFeesInstructionDataEncoder: () =>
|
|
153
|
-
getConfigAddress: () =>
|
|
154
|
-
getCreatePositionDiscriminatorBytes: () =>
|
|
155
|
-
getCreatePositionInstruction: () =>
|
|
156
|
-
getCreatePositionInstructionAsync: () =>
|
|
157
|
-
getCreatePositionInstructionDataCodec: () =>
|
|
158
|
-
getCreatePositionInstructionDataDecoder: () =>
|
|
159
|
-
getCreatePositionInstructionDataEncoder: () =>
|
|
119
|
+
fetchOracle: () => chunkXTL2GBZ4_cjs.fetchOracle,
|
|
120
|
+
fetchOraclesBatch: () => chunkXTL2GBZ4_cjs.fetchOraclesBatch,
|
|
121
|
+
fetchPool: () => chunkXTL2GBZ4_cjs.fetchPool,
|
|
122
|
+
fetchPoolPositions: () => chunkXTL2GBZ4_cjs.fetchPoolPositions,
|
|
123
|
+
fetchPoolsBatch: () => chunkXTL2GBZ4_cjs.fetchPoolsBatch,
|
|
124
|
+
fetchPosition: () => chunkXTL2GBZ4_cjs.fetchPosition,
|
|
125
|
+
fetchPositionByParams: () => chunkXTL2GBZ4_cjs.fetchPositionByParams,
|
|
126
|
+
fetchPositionsBatch: () => chunkXTL2GBZ4_cjs.fetchPositionsBatch,
|
|
127
|
+
fetchUserPositions: () => chunkXTL2GBZ4_cjs.fetchUserPositions,
|
|
128
|
+
filterActivePositions: () => chunkXTL2GBZ4_cjs.filterActivePositions,
|
|
129
|
+
filterPoolsByMint: () => chunkXTL2GBZ4_cjs.filterPoolsByMint,
|
|
130
|
+
getAddLiquidityDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getAddLiquidityDiscriminatorBytes,
|
|
131
|
+
getAddLiquidityInstruction: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstruction,
|
|
132
|
+
getAddLiquidityInstructionAsync: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstructionAsync,
|
|
133
|
+
getAddLiquidityInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstructionDataCodec,
|
|
134
|
+
getAddLiquidityInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstructionDataDecoder,
|
|
135
|
+
getAddLiquidityInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getAddLiquidityInstructionDataEncoder,
|
|
136
|
+
getAddLiquidityQuote: () => chunkXTL2GBZ4_cjs.getAddLiquidityQuote,
|
|
137
|
+
getClosePositionDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getClosePositionDiscriminatorBytes,
|
|
138
|
+
getClosePositionInstruction: () => chunkXTL2GBZ4_cjs.getClosePositionInstruction,
|
|
139
|
+
getClosePositionInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getClosePositionInstructionDataCodec,
|
|
140
|
+
getClosePositionInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getClosePositionInstructionDataDecoder,
|
|
141
|
+
getClosePositionInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getClosePositionInstructionDataEncoder,
|
|
142
|
+
getCollectFeesDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getCollectFeesDiscriminatorBytes,
|
|
143
|
+
getCollectFeesInstruction: () => chunkXTL2GBZ4_cjs.getCollectFeesInstruction,
|
|
144
|
+
getCollectFeesInstructionAsync: () => chunkXTL2GBZ4_cjs.getCollectFeesInstructionAsync,
|
|
145
|
+
getCollectFeesInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getCollectFeesInstructionDataCodec,
|
|
146
|
+
getCollectFeesInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getCollectFeesInstructionDataDecoder,
|
|
147
|
+
getCollectFeesInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getCollectFeesInstructionDataEncoder,
|
|
148
|
+
getCollectProtocolFeesDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesDiscriminatorBytes,
|
|
149
|
+
getCollectProtocolFeesInstruction: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstruction,
|
|
150
|
+
getCollectProtocolFeesInstructionAsync: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstructionAsync,
|
|
151
|
+
getCollectProtocolFeesInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstructionDataCodec,
|
|
152
|
+
getCollectProtocolFeesInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstructionDataDecoder,
|
|
153
|
+
getCollectProtocolFeesInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getCollectProtocolFeesInstructionDataEncoder,
|
|
154
|
+
getConfigAddress: () => chunkU6B52TBT_cjs.getConfigAddress,
|
|
155
|
+
getCreatePositionDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getCreatePositionDiscriminatorBytes,
|
|
156
|
+
getCreatePositionInstruction: () => chunkXTL2GBZ4_cjs.getCreatePositionInstruction,
|
|
157
|
+
getCreatePositionInstructionAsync: () => chunkXTL2GBZ4_cjs.getCreatePositionInstructionAsync,
|
|
158
|
+
getCreatePositionInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getCreatePositionInstructionDataCodec,
|
|
159
|
+
getCreatePositionInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getCreatePositionInstructionDataDecoder,
|
|
160
|
+
getCreatePositionInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getCreatePositionInstructionDataEncoder,
|
|
160
161
|
getErrorMessage: () => getErrorMessage,
|
|
161
|
-
getInitializeConfigDiscriminatorBytes: () =>
|
|
162
|
-
getInitializeConfigInstruction: () =>
|
|
163
|
-
getInitializeConfigInstructionAsync: () =>
|
|
164
|
-
getInitializeConfigInstructionDataCodec: () =>
|
|
165
|
-
getInitializeConfigInstructionDataDecoder: () =>
|
|
166
|
-
getInitializeConfigInstructionDataEncoder: () =>
|
|
167
|
-
getInitializeOracleDiscriminatorBytes: () =>
|
|
168
|
-
getInitializeOracleInstruction: () =>
|
|
169
|
-
getInitializeOracleInstructionAsync: () =>
|
|
170
|
-
getInitializeOracleInstructionDataCodec: () =>
|
|
171
|
-
getInitializeOracleInstructionDataDecoder: () =>
|
|
172
|
-
getInitializeOracleInstructionDataEncoder: () =>
|
|
173
|
-
getInitializePoolDiscriminatorBytes: () =>
|
|
174
|
-
getInitializePoolInstruction: () =>
|
|
175
|
-
getInitializePoolInstructionAsync: () =>
|
|
176
|
-
getInitializePoolInstructionDataCodec: () =>
|
|
177
|
-
getInitializePoolInstructionDataDecoder: () =>
|
|
178
|
-
getInitializePoolInstructionDataEncoder: () =>
|
|
179
|
-
getK: () =>
|
|
180
|
-
getLiquidityAddresses: () =>
|
|
162
|
+
getInitializeConfigDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getInitializeConfigDiscriminatorBytes,
|
|
163
|
+
getInitializeConfigInstruction: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstruction,
|
|
164
|
+
getInitializeConfigInstructionAsync: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstructionAsync,
|
|
165
|
+
getInitializeConfigInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstructionDataCodec,
|
|
166
|
+
getInitializeConfigInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstructionDataDecoder,
|
|
167
|
+
getInitializeConfigInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getInitializeConfigInstructionDataEncoder,
|
|
168
|
+
getInitializeOracleDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getInitializeOracleDiscriminatorBytes,
|
|
169
|
+
getInitializeOracleInstruction: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstruction,
|
|
170
|
+
getInitializeOracleInstructionAsync: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstructionAsync,
|
|
171
|
+
getInitializeOracleInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstructionDataCodec,
|
|
172
|
+
getInitializeOracleInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstructionDataDecoder,
|
|
173
|
+
getInitializeOracleInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getInitializeOracleInstructionDataEncoder,
|
|
174
|
+
getInitializePoolDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getInitializePoolDiscriminatorBytes,
|
|
175
|
+
getInitializePoolInstruction: () => chunkXTL2GBZ4_cjs.getInitializePoolInstruction,
|
|
176
|
+
getInitializePoolInstructionAsync: () => chunkXTL2GBZ4_cjs.getInitializePoolInstructionAsync,
|
|
177
|
+
getInitializePoolInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getInitializePoolInstructionDataCodec,
|
|
178
|
+
getInitializePoolInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getInitializePoolInstructionDataDecoder,
|
|
179
|
+
getInitializePoolInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getInitializePoolInstructionDataEncoder,
|
|
180
|
+
getK: () => chunkXTL2GBZ4_cjs.getK,
|
|
181
|
+
getLiquidityAddresses: () => chunkU6B52TBT_cjs.getLiquidityAddresses,
|
|
181
182
|
getMetadataAddress: () => getMetadataAddress,
|
|
182
|
-
getOracleAddress: () =>
|
|
183
|
-
getOracleAddressFromPool: () =>
|
|
184
|
-
getOracleAge: () =>
|
|
185
|
-
getOracleBufferStats: () =>
|
|
186
|
-
getOracleConsultDiscriminatorBytes: () =>
|
|
187
|
-
getOracleConsultInstruction: () =>
|
|
188
|
-
getOracleConsultInstructionAsync: () =>
|
|
189
|
-
getOracleConsultInstructionDataCodec: () =>
|
|
190
|
-
getOracleConsultInstructionDataDecoder: () =>
|
|
191
|
-
getOracleConsultInstructionDataEncoder: () =>
|
|
192
|
-
getOracleDeviation: () =>
|
|
193
|
-
getOracleForPool: () =>
|
|
194
|
-
getOracleSpotPrices: () =>
|
|
195
|
-
getOracleUpdateDiscriminatorBytes: () =>
|
|
196
|
-
getOracleUpdateInstruction: () =>
|
|
197
|
-
getOracleUpdateInstructionAsync: () =>
|
|
198
|
-
getOracleUpdateInstructionDataCodec: () =>
|
|
199
|
-
getOracleUpdateInstructionDataDecoder: () =>
|
|
200
|
-
getOracleUpdateInstructionDataEncoder: () =>
|
|
201
|
-
getPauseDiscriminatorBytes: () =>
|
|
202
|
-
getPauseInstruction: () =>
|
|
203
|
-
getPauseInstructionDataCodec: () =>
|
|
204
|
-
getPauseInstructionDataDecoder: () =>
|
|
205
|
-
getPauseInstructionDataEncoder: () =>
|
|
206
|
-
getPendingFees: () =>
|
|
207
|
-
getPoolAddress: () =>
|
|
208
|
-
getPoolAddressFromMints: () =>
|
|
209
|
-
getPoolAuthorityAddress: () =>
|
|
210
|
-
getPoolByMints: () =>
|
|
211
|
-
getPoolInitAddresses: () =>
|
|
212
|
-
getPoolVault0Address: () =>
|
|
213
|
-
getPoolVault1Address: () =>
|
|
214
|
-
getPositionAddress: () =>
|
|
215
|
-
getPositionAddressFromParams: () =>
|
|
216
|
-
getPositionValue: () =>
|
|
217
|
-
getPreviewSwapExactInDiscriminatorBytes: () =>
|
|
218
|
-
getPreviewSwapExactInInstruction: () =>
|
|
219
|
-
getPreviewSwapExactInInstructionDataCodec: () =>
|
|
220
|
-
getPreviewSwapExactInInstructionDataDecoder: () =>
|
|
221
|
-
getPreviewSwapExactInInstructionDataEncoder: () =>
|
|
222
|
-
getProtocolFeeOwnerAddress: () =>
|
|
223
|
-
getProtocolFeePositionAddress: () =>
|
|
224
|
-
getRedeemProtocolSharesDiscriminatorBytes: () =>
|
|
225
|
-
getRedeemProtocolSharesInstruction: () =>
|
|
226
|
-
getRedeemProtocolSharesInstructionAsync: () =>
|
|
227
|
-
getRedeemProtocolSharesInstructionDataCodec: () =>
|
|
228
|
-
getRedeemProtocolSharesInstructionDataDecoder: () =>
|
|
229
|
-
getRedeemProtocolSharesInstructionDataEncoder: () =>
|
|
230
|
-
getRemoveLiquidityDiscriminatorBytes: () =>
|
|
231
|
-
getRemoveLiquidityInstruction: () =>
|
|
232
|
-
getRemoveLiquidityInstructionAsync: () =>
|
|
233
|
-
getRemoveLiquidityInstructionDataCodec: () =>
|
|
234
|
-
getRemoveLiquidityInstructionDataDecoder: () =>
|
|
235
|
-
getRemoveLiquidityInstructionDataEncoder: () =>
|
|
236
|
-
getRemoveLiquidityQuote: () =>
|
|
237
|
-
getSetFeesDiscriminatorBytes: () =>
|
|
238
|
-
getSetFeesInstruction: () =>
|
|
239
|
-
getSetFeesInstructionDataCodec: () =>
|
|
240
|
-
getSetFeesInstructionDataDecoder: () =>
|
|
241
|
-
getSetFeesInstructionDataEncoder: () =>
|
|
242
|
-
getSetHookDiscriminatorBytes: () =>
|
|
243
|
-
getSetHookInstruction: () =>
|
|
244
|
-
getSetHookInstructionDataCodec: () =>
|
|
245
|
-
getSetHookInstructionDataDecoder: () =>
|
|
246
|
-
getSetHookInstructionDataEncoder: () =>
|
|
247
|
-
getSpotPrice0: () =>
|
|
248
|
-
getSpotPrice1: () =>
|
|
249
|
-
getSwapAddresses: () =>
|
|
250
|
-
getSwapExactInDiscriminatorBytes: () =>
|
|
251
|
-
getSwapExactInInstruction: () =>
|
|
252
|
-
getSwapExactInInstructionAsync: () =>
|
|
253
|
-
getSwapExactInInstructionDataCodec: () =>
|
|
254
|
-
getSwapExactInInstructionDataDecoder: () =>
|
|
255
|
-
getSwapExactInInstructionDataEncoder: () =>
|
|
256
|
-
getSwapQuote: () =>
|
|
257
|
-
getSwapQuoteExactOut: () =>
|
|
258
|
-
getTransferAdminDiscriminatorBytes: () =>
|
|
259
|
-
getTransferAdminInstruction: () =>
|
|
260
|
-
getTransferAdminInstructionDataCodec: () =>
|
|
261
|
-
getTransferAdminInstructionDataDecoder: () =>
|
|
262
|
-
getTransferAdminInstructionDataEncoder: () =>
|
|
263
|
-
getTvl: () =>
|
|
264
|
-
getUnpauseDiscriminatorBytes: () =>
|
|
265
|
-
getUnpauseInstruction: () =>
|
|
266
|
-
getUnpauseInstructionDataCodec: () =>
|
|
267
|
-
getUnpauseInstructionDataDecoder: () =>
|
|
268
|
-
getUnpauseInstructionDataEncoder: () =>
|
|
269
|
-
getUpdateConfigDiscriminatorBytes: () =>
|
|
270
|
-
getUpdateConfigInstruction: () =>
|
|
271
|
-
getUpdateConfigInstructionDataCodec: () =>
|
|
272
|
-
getUpdateConfigInstructionDataDecoder: () =>
|
|
273
|
-
getUpdateConfigInstructionDataEncoder: () =>
|
|
274
|
-
getWithdrawVaultExcessDiscriminatorBytes: () =>
|
|
275
|
-
getWithdrawVaultExcessInstruction: () =>
|
|
276
|
-
getWithdrawVaultExcessInstructionAsync: () =>
|
|
277
|
-
getWithdrawVaultExcessInstructionDataCodec: () =>
|
|
278
|
-
getWithdrawVaultExcessInstructionDataDecoder: () =>
|
|
279
|
-
getWithdrawVaultExcessInstructionDataEncoder: () =>
|
|
280
|
-
initializeConfigArgsCodec: () =>
|
|
281
|
-
initializeOracleArgsCodec: () =>
|
|
282
|
-
initializePoolArgsCodec: () =>
|
|
183
|
+
getOracleAddress: () => chunkU6B52TBT_cjs.getOracleAddress,
|
|
184
|
+
getOracleAddressFromPool: () => chunkXTL2GBZ4_cjs.getOracleAddressFromPool,
|
|
185
|
+
getOracleAge: () => chunkXTL2GBZ4_cjs.getOracleAge,
|
|
186
|
+
getOracleBufferStats: () => chunkXTL2GBZ4_cjs.getOracleBufferStats,
|
|
187
|
+
getOracleConsultDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getOracleConsultDiscriminatorBytes,
|
|
188
|
+
getOracleConsultInstruction: () => chunkXTL2GBZ4_cjs.getOracleConsultInstruction,
|
|
189
|
+
getOracleConsultInstructionAsync: () => chunkXTL2GBZ4_cjs.getOracleConsultInstructionAsync,
|
|
190
|
+
getOracleConsultInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getOracleConsultInstructionDataCodec,
|
|
191
|
+
getOracleConsultInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getOracleConsultInstructionDataDecoder,
|
|
192
|
+
getOracleConsultInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getOracleConsultInstructionDataEncoder,
|
|
193
|
+
getOracleDeviation: () => chunkXTL2GBZ4_cjs.getOracleDeviation,
|
|
194
|
+
getOracleForPool: () => chunkXTL2GBZ4_cjs.getOracleForPool,
|
|
195
|
+
getOracleSpotPrices: () => chunkXTL2GBZ4_cjs.getOracleSpotPrices,
|
|
196
|
+
getOracleUpdateDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getOracleUpdateDiscriminatorBytes,
|
|
197
|
+
getOracleUpdateInstruction: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstruction,
|
|
198
|
+
getOracleUpdateInstructionAsync: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstructionAsync,
|
|
199
|
+
getOracleUpdateInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstructionDataCodec,
|
|
200
|
+
getOracleUpdateInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstructionDataDecoder,
|
|
201
|
+
getOracleUpdateInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getOracleUpdateInstructionDataEncoder,
|
|
202
|
+
getPauseDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getPauseDiscriminatorBytes,
|
|
203
|
+
getPauseInstruction: () => chunkXTL2GBZ4_cjs.getPauseInstruction,
|
|
204
|
+
getPauseInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getPauseInstructionDataCodec,
|
|
205
|
+
getPauseInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getPauseInstructionDataDecoder,
|
|
206
|
+
getPauseInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getPauseInstructionDataEncoder,
|
|
207
|
+
getPendingFees: () => chunkXTL2GBZ4_cjs.getPendingFees,
|
|
208
|
+
getPoolAddress: () => chunkU6B52TBT_cjs.getPoolAddress,
|
|
209
|
+
getPoolAddressFromMints: () => chunkXTL2GBZ4_cjs.getPoolAddressFromMints,
|
|
210
|
+
getPoolAuthorityAddress: () => chunkU6B52TBT_cjs.getPoolAuthorityAddress,
|
|
211
|
+
getPoolByMints: () => chunkXTL2GBZ4_cjs.getPoolByMints,
|
|
212
|
+
getPoolInitAddresses: () => chunkU6B52TBT_cjs.getPoolInitAddresses,
|
|
213
|
+
getPoolVault0Address: () => chunkU6B52TBT_cjs.getPoolVault0Address,
|
|
214
|
+
getPoolVault1Address: () => chunkU6B52TBT_cjs.getPoolVault1Address,
|
|
215
|
+
getPositionAddress: () => chunkU6B52TBT_cjs.getPositionAddress,
|
|
216
|
+
getPositionAddressFromParams: () => chunkXTL2GBZ4_cjs.getPositionAddressFromParams,
|
|
217
|
+
getPositionValue: () => chunkXTL2GBZ4_cjs.getPositionValue,
|
|
218
|
+
getPreviewSwapExactInDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getPreviewSwapExactInDiscriminatorBytes,
|
|
219
|
+
getPreviewSwapExactInInstruction: () => chunkXTL2GBZ4_cjs.getPreviewSwapExactInInstruction,
|
|
220
|
+
getPreviewSwapExactInInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getPreviewSwapExactInInstructionDataCodec,
|
|
221
|
+
getPreviewSwapExactInInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getPreviewSwapExactInInstructionDataDecoder,
|
|
222
|
+
getPreviewSwapExactInInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getPreviewSwapExactInInstructionDataEncoder,
|
|
223
|
+
getProtocolFeeOwnerAddress: () => chunkU6B52TBT_cjs.getProtocolFeeOwnerAddress,
|
|
224
|
+
getProtocolFeePositionAddress: () => chunkU6B52TBT_cjs.getProtocolFeePositionAddress,
|
|
225
|
+
getRedeemProtocolSharesDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesDiscriminatorBytes,
|
|
226
|
+
getRedeemProtocolSharesInstruction: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesInstruction,
|
|
227
|
+
getRedeemProtocolSharesInstructionAsync: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesInstructionAsync,
|
|
228
|
+
getRedeemProtocolSharesInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesInstructionDataCodec,
|
|
229
|
+
getRedeemProtocolSharesInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesInstructionDataDecoder,
|
|
230
|
+
getRedeemProtocolSharesInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getRedeemProtocolSharesInstructionDataEncoder,
|
|
231
|
+
getRemoveLiquidityDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityDiscriminatorBytes,
|
|
232
|
+
getRemoveLiquidityInstruction: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstruction,
|
|
233
|
+
getRemoveLiquidityInstructionAsync: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstructionAsync,
|
|
234
|
+
getRemoveLiquidityInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstructionDataCodec,
|
|
235
|
+
getRemoveLiquidityInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstructionDataDecoder,
|
|
236
|
+
getRemoveLiquidityInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityInstructionDataEncoder,
|
|
237
|
+
getRemoveLiquidityQuote: () => chunkXTL2GBZ4_cjs.getRemoveLiquidityQuote,
|
|
238
|
+
getSetFeesDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getSetFeesDiscriminatorBytes,
|
|
239
|
+
getSetFeesInstruction: () => chunkXTL2GBZ4_cjs.getSetFeesInstruction,
|
|
240
|
+
getSetFeesInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getSetFeesInstructionDataCodec,
|
|
241
|
+
getSetFeesInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getSetFeesInstructionDataDecoder,
|
|
242
|
+
getSetFeesInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getSetFeesInstructionDataEncoder,
|
|
243
|
+
getSetHookDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getSetHookDiscriminatorBytes,
|
|
244
|
+
getSetHookInstruction: () => chunkXTL2GBZ4_cjs.getSetHookInstruction,
|
|
245
|
+
getSetHookInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getSetHookInstructionDataCodec,
|
|
246
|
+
getSetHookInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getSetHookInstructionDataDecoder,
|
|
247
|
+
getSetHookInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getSetHookInstructionDataEncoder,
|
|
248
|
+
getSpotPrice0: () => chunkXTL2GBZ4_cjs.getSpotPrice0,
|
|
249
|
+
getSpotPrice1: () => chunkXTL2GBZ4_cjs.getSpotPrice1,
|
|
250
|
+
getSwapAddresses: () => chunkU6B52TBT_cjs.getSwapAddresses,
|
|
251
|
+
getSwapExactInDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getSwapExactInDiscriminatorBytes,
|
|
252
|
+
getSwapExactInInstruction: () => chunkXTL2GBZ4_cjs.getSwapExactInInstruction,
|
|
253
|
+
getSwapExactInInstructionAsync: () => chunkXTL2GBZ4_cjs.getSwapExactInInstructionAsync,
|
|
254
|
+
getSwapExactInInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getSwapExactInInstructionDataCodec,
|
|
255
|
+
getSwapExactInInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getSwapExactInInstructionDataDecoder,
|
|
256
|
+
getSwapExactInInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getSwapExactInInstructionDataEncoder,
|
|
257
|
+
getSwapQuote: () => chunkXTL2GBZ4_cjs.getSwapQuote,
|
|
258
|
+
getSwapQuoteExactOut: () => chunkXTL2GBZ4_cjs.getSwapQuoteExactOut,
|
|
259
|
+
getTransferAdminDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getTransferAdminDiscriminatorBytes,
|
|
260
|
+
getTransferAdminInstruction: () => chunkXTL2GBZ4_cjs.getTransferAdminInstruction,
|
|
261
|
+
getTransferAdminInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getTransferAdminInstructionDataCodec,
|
|
262
|
+
getTransferAdminInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getTransferAdminInstructionDataDecoder,
|
|
263
|
+
getTransferAdminInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getTransferAdminInstructionDataEncoder,
|
|
264
|
+
getTvl: () => chunkXTL2GBZ4_cjs.getTvl,
|
|
265
|
+
getUnpauseDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getUnpauseDiscriminatorBytes,
|
|
266
|
+
getUnpauseInstruction: () => chunkXTL2GBZ4_cjs.getUnpauseInstruction,
|
|
267
|
+
getUnpauseInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getUnpauseInstructionDataCodec,
|
|
268
|
+
getUnpauseInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getUnpauseInstructionDataDecoder,
|
|
269
|
+
getUnpauseInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getUnpauseInstructionDataEncoder,
|
|
270
|
+
getUpdateConfigDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getUpdateConfigDiscriminatorBytes,
|
|
271
|
+
getUpdateConfigInstruction: () => chunkXTL2GBZ4_cjs.getUpdateConfigInstruction,
|
|
272
|
+
getUpdateConfigInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getUpdateConfigInstructionDataCodec,
|
|
273
|
+
getUpdateConfigInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getUpdateConfigInstructionDataDecoder,
|
|
274
|
+
getUpdateConfigInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getUpdateConfigInstructionDataEncoder,
|
|
275
|
+
getWithdrawVaultExcessDiscriminatorBytes: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessDiscriminatorBytes,
|
|
276
|
+
getWithdrawVaultExcessInstruction: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstruction,
|
|
277
|
+
getWithdrawVaultExcessInstructionAsync: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstructionAsync,
|
|
278
|
+
getWithdrawVaultExcessInstructionDataCodec: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstructionDataCodec,
|
|
279
|
+
getWithdrawVaultExcessInstructionDataDecoder: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstructionDataDecoder,
|
|
280
|
+
getWithdrawVaultExcessInstructionDataEncoder: () => chunkXTL2GBZ4_cjs.getWithdrawVaultExcessInstructionDataEncoder,
|
|
281
|
+
initializeConfigArgsCodec: () => chunkXTL2GBZ4_cjs.initializeConfigArgsCodec,
|
|
282
|
+
initializeOracleArgsCodec: () => chunkXTL2GBZ4_cjs.initializeOracleArgsCodec,
|
|
283
|
+
initializePoolArgsCodec: () => chunkXTL2GBZ4_cjs.initializePoolArgsCodec,
|
|
283
284
|
isCpmmError: () => isCpmmError,
|
|
284
|
-
isOracleStale: () =>
|
|
285
|
-
isqrt: () =>
|
|
285
|
+
isOracleStale: () => chunkXTL2GBZ4_cjs.isOracleStale,
|
|
286
|
+
isqrt: () => chunkXTL2GBZ4_cjs.isqrt,
|
|
286
287
|
marketCapToCurveParams: () => marketCapToCurveParams,
|
|
287
288
|
marketCapToSingleCurveParams: () => marketCapToSingleCurveParams,
|
|
288
289
|
marketCapToTokenPrice: () => marketCapToTokenPrice,
|
|
289
|
-
maxBigInt: () =>
|
|
290
|
-
minBigInt: () =>
|
|
291
|
-
numberToQ64: () =>
|
|
292
|
-
observationCodec: () =>
|
|
293
|
-
oracleConsultArgsCodec: () =>
|
|
294
|
-
oracleStateDataCodec: () =>
|
|
295
|
-
parseAddLiquidityInstruction: () =>
|
|
296
|
-
parseClosePositionInstruction: () =>
|
|
297
|
-
parseCollectFeesInstruction: () =>
|
|
298
|
-
parseCollectProtocolFeesInstruction: () =>
|
|
299
|
-
parseCreatePositionInstruction: () =>
|
|
290
|
+
maxBigInt: () => chunkXTL2GBZ4_cjs.maxBigInt,
|
|
291
|
+
minBigInt: () => chunkXTL2GBZ4_cjs.minBigInt,
|
|
292
|
+
numberToQ64: () => chunkXTL2GBZ4_cjs.numberToQ64,
|
|
293
|
+
observationCodec: () => chunkXTL2GBZ4_cjs.observationCodec,
|
|
294
|
+
oracleConsultArgsCodec: () => chunkXTL2GBZ4_cjs.oracleConsultArgsCodec,
|
|
295
|
+
oracleStateDataCodec: () => chunkXTL2GBZ4_cjs.oracleStateDataCodec,
|
|
296
|
+
parseAddLiquidityInstruction: () => chunkXTL2GBZ4_cjs.parseAddLiquidityInstruction,
|
|
297
|
+
parseClosePositionInstruction: () => chunkXTL2GBZ4_cjs.parseClosePositionInstruction,
|
|
298
|
+
parseCollectFeesInstruction: () => chunkXTL2GBZ4_cjs.parseCollectFeesInstruction,
|
|
299
|
+
parseCollectProtocolFeesInstruction: () => chunkXTL2GBZ4_cjs.parseCollectProtocolFeesInstruction,
|
|
300
|
+
parseCreatePositionInstruction: () => chunkXTL2GBZ4_cjs.parseCreatePositionInstruction,
|
|
300
301
|
parseErrorFromLogs: () => parseErrorFromLogs,
|
|
301
|
-
parseInitializeConfigInstruction: () =>
|
|
302
|
-
parseInitializeOracleInstruction: () =>
|
|
303
|
-
parseInitializePoolInstruction: () =>
|
|
304
|
-
parseOracleConsultInstruction: () =>
|
|
305
|
-
parseOracleUpdateInstruction: () =>
|
|
306
|
-
parsePauseInstruction: () =>
|
|
307
|
-
parsePreviewSwapExactInInstruction: () =>
|
|
308
|
-
parseRedeemProtocolSharesInstruction: () =>
|
|
309
|
-
parseRemoveLiquidityInstruction: () =>
|
|
310
|
-
parseSetFeesInstruction: () =>
|
|
311
|
-
parseSetHookInstruction: () =>
|
|
312
|
-
parseSwapExactInInstruction: () =>
|
|
313
|
-
parseTransferAdminInstruction: () =>
|
|
314
|
-
parseUnpauseInstruction: () =>
|
|
315
|
-
parseUpdateConfigInstruction: () =>
|
|
316
|
-
parseWithdrawVaultExcessInstruction: () =>
|
|
317
|
-
poolDataCodec: () =>
|
|
318
|
-
poolExists: () =>
|
|
319
|
-
positionDataCodec: () =>
|
|
320
|
-
q64Div: () =>
|
|
321
|
-
q64Mul: () =>
|
|
322
|
-
q64ToNumber: () =>
|
|
323
|
-
ratioToNumber: () =>
|
|
324
|
-
removeLiquidityArgsCodec: () =>
|
|
325
|
-
setFeesArgsCodec: () =>
|
|
326
|
-
setHookArgsCodec: () =>
|
|
327
|
-
sortMints: () =>
|
|
328
|
-
sortPoolsByReserves: () =>
|
|
329
|
-
sortPositionsByShares: () =>
|
|
330
|
-
swapExactInArgsCodec: () =>
|
|
331
|
-
transferAdminArgsCodec: () =>
|
|
302
|
+
parseInitializeConfigInstruction: () => chunkXTL2GBZ4_cjs.parseInitializeConfigInstruction,
|
|
303
|
+
parseInitializeOracleInstruction: () => chunkXTL2GBZ4_cjs.parseInitializeOracleInstruction,
|
|
304
|
+
parseInitializePoolInstruction: () => chunkXTL2GBZ4_cjs.parseInitializePoolInstruction,
|
|
305
|
+
parseOracleConsultInstruction: () => chunkXTL2GBZ4_cjs.parseOracleConsultInstruction,
|
|
306
|
+
parseOracleUpdateInstruction: () => chunkXTL2GBZ4_cjs.parseOracleUpdateInstruction,
|
|
307
|
+
parsePauseInstruction: () => chunkXTL2GBZ4_cjs.parsePauseInstruction,
|
|
308
|
+
parsePreviewSwapExactInInstruction: () => chunkXTL2GBZ4_cjs.parsePreviewSwapExactInInstruction,
|
|
309
|
+
parseRedeemProtocolSharesInstruction: () => chunkXTL2GBZ4_cjs.parseRedeemProtocolSharesInstruction,
|
|
310
|
+
parseRemoveLiquidityInstruction: () => chunkXTL2GBZ4_cjs.parseRemoveLiquidityInstruction,
|
|
311
|
+
parseSetFeesInstruction: () => chunkXTL2GBZ4_cjs.parseSetFeesInstruction,
|
|
312
|
+
parseSetHookInstruction: () => chunkXTL2GBZ4_cjs.parseSetHookInstruction,
|
|
313
|
+
parseSwapExactInInstruction: () => chunkXTL2GBZ4_cjs.parseSwapExactInInstruction,
|
|
314
|
+
parseTransferAdminInstruction: () => chunkXTL2GBZ4_cjs.parseTransferAdminInstruction,
|
|
315
|
+
parseUnpauseInstruction: () => chunkXTL2GBZ4_cjs.parseUnpauseInstruction,
|
|
316
|
+
parseUpdateConfigInstruction: () => chunkXTL2GBZ4_cjs.parseUpdateConfigInstruction,
|
|
317
|
+
parseWithdrawVaultExcessInstruction: () => chunkXTL2GBZ4_cjs.parseWithdrawVaultExcessInstruction,
|
|
318
|
+
poolDataCodec: () => chunkXTL2GBZ4_cjs.poolDataCodec,
|
|
319
|
+
poolExists: () => chunkXTL2GBZ4_cjs.poolExists,
|
|
320
|
+
positionDataCodec: () => chunkXTL2GBZ4_cjs.positionDataCodec,
|
|
321
|
+
q64Div: () => chunkXTL2GBZ4_cjs.q64Div,
|
|
322
|
+
q64Mul: () => chunkXTL2GBZ4_cjs.q64Mul,
|
|
323
|
+
q64ToNumber: () => chunkXTL2GBZ4_cjs.q64ToNumber,
|
|
324
|
+
ratioToNumber: () => chunkXTL2GBZ4_cjs.ratioToNumber,
|
|
325
|
+
removeLiquidityArgsCodec: () => chunkXTL2GBZ4_cjs.removeLiquidityArgsCodec,
|
|
326
|
+
setFeesArgsCodec: () => chunkXTL2GBZ4_cjs.setFeesArgsCodec,
|
|
327
|
+
setHookArgsCodec: () => chunkXTL2GBZ4_cjs.setHookArgsCodec,
|
|
328
|
+
sortMints: () => chunkU6B52TBT_cjs.sortMints,
|
|
329
|
+
sortPoolsByReserves: () => chunkXTL2GBZ4_cjs.sortPoolsByReserves,
|
|
330
|
+
sortPositionsByShares: () => chunkXTL2GBZ4_cjs.sortPositionsByShares,
|
|
331
|
+
swapExactInArgsCodec: () => chunkXTL2GBZ4_cjs.swapExactInArgsCodec,
|
|
332
|
+
transferAdminArgsCodec: () => chunkXTL2GBZ4_cjs.transferAdminArgsCodec,
|
|
332
333
|
validateMarketCapParameters: () => validateMarketCapParameters
|
|
333
334
|
});
|
|
334
335
|
var addressCodec = kit.getAddressCodec();
|
|
335
336
|
var textEncoder = new TextEncoder();
|
|
336
337
|
async function getMetadataAddress(mint) {
|
|
337
338
|
return kit.getProgramDerivedAddress({
|
|
338
|
-
programAddress:
|
|
339
|
+
programAddress: chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
339
340
|
seeds: [
|
|
340
341
|
textEncoder.encode("metadata"),
|
|
341
|
-
addressCodec.encode(
|
|
342
|
+
addressCodec.encode(chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
342
343
|
addressCodec.encode(mint)
|
|
343
344
|
]
|
|
344
345
|
});
|
|
@@ -667,12 +668,12 @@ function createSwapInstruction(params) {
|
|
|
667
668
|
token0Program,
|
|
668
669
|
token1Program,
|
|
669
670
|
tokenProgram,
|
|
670
|
-
programId =
|
|
671
|
+
programId = chunkXTL2GBZ4_cjs.CPMM_PROGRAM_ADDRESS
|
|
671
672
|
} = params;
|
|
672
673
|
const trader = typeof user === "string" ? kit.createNoopSigner(user) : user;
|
|
673
674
|
const [vaultIn, vaultOut] = tradeDirection === 0 ? [vault0, vault1] : [vault1, vault0];
|
|
674
675
|
const [userIn, userOut] = tradeDirection === 0 ? [userToken0, userToken1] : [userToken1, userToken0];
|
|
675
|
-
const instruction =
|
|
676
|
+
const instruction = chunkXTL2GBZ4_cjs.getSwapExactInInstruction(
|
|
676
677
|
{
|
|
677
678
|
config,
|
|
678
679
|
pool,
|
|
@@ -684,8 +685,8 @@ function createSwapInstruction(params) {
|
|
|
684
685
|
userIn,
|
|
685
686
|
userOut,
|
|
686
687
|
trader,
|
|
687
|
-
token0Program: token0Program ?? tokenProgram ??
|
|
688
|
-
token1Program: token1Program ?? tokenProgram ??
|
|
688
|
+
token0Program: token0Program ?? tokenProgram ?? chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
689
|
+
token1Program: token1Program ?? tokenProgram ?? chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
689
690
|
oracle,
|
|
690
691
|
amountIn,
|
|
691
692
|
minAmountOut,
|
|
@@ -713,8 +714,8 @@ function base64ToBytes(base64) {
|
|
|
713
714
|
}
|
|
714
715
|
return bytes;
|
|
715
716
|
}
|
|
716
|
-
async function fetchConfig(rpc, programId =
|
|
717
|
-
const [configAddress] = await
|
|
717
|
+
async function fetchConfig(rpc, programId = chunkU6B52TBT_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
718
|
+
const [configAddress] = await chunkU6B52TBT_cjs.getConfigAddress(programId);
|
|
718
719
|
const response = await rpc.getAccountInfo(configAddress, {
|
|
719
720
|
encoding: "base64",
|
|
720
721
|
commitment
|
|
@@ -722,10 +723,10 @@ async function fetchConfig(rpc, programId = chunkY6TJIH33_cjs.CPMM_PROGRAM_ID, c
|
|
|
722
723
|
if (!response.value) {
|
|
723
724
|
return null;
|
|
724
725
|
}
|
|
725
|
-
return
|
|
726
|
+
return chunkXTL2GBZ4_cjs.decodeAmmConfig(base64ToBytes(response.value.data[0]));
|
|
726
727
|
}
|
|
727
|
-
async function fetchConfigWithAddress(rpc, programId =
|
|
728
|
-
const [configAddress] = await
|
|
728
|
+
async function fetchConfigWithAddress(rpc, programId = chunkU6B52TBT_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
729
|
+
const [configAddress] = await chunkU6B52TBT_cjs.getConfigAddress(programId);
|
|
729
730
|
const account = await fetchConfig(rpc, programId, commitment);
|
|
730
731
|
if (!account) {
|
|
731
732
|
return null;
|
|
@@ -748,6 +749,13 @@ chunkQ7SFCCGT_cjs.__export(cosignerHook_exports, {
|
|
|
748
749
|
COSIGNER_HOOK_PROGRAM_ID: () => COSIGNER_HOOK_PROGRAM_ID,
|
|
749
750
|
CosignerHookAccount: () => CosignerHookAccount,
|
|
750
751
|
CosignerHookInstruction: () => CosignerHookInstruction,
|
|
752
|
+
DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID: () => DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID,
|
|
753
|
+
GATE_EXPIRY_DISABLED: () => GATE_EXPIRY_DISABLED,
|
|
754
|
+
GATE_EXPIRY_HEADER_LEN: () => GATE_EXPIRY_HEADER_LEN,
|
|
755
|
+
GATE_EXPIRY_PAYLOAD_LEN: () => GATE_EXPIRY_PAYLOAD_LEN,
|
|
756
|
+
GATE_EXPIRY_PAYLOAD_VERSION: () => GATE_EXPIRY_PAYLOAD_VERSION,
|
|
757
|
+
GATE_EXPIRY_SLOT: () => GATE_EXPIRY_SLOT,
|
|
758
|
+
GATE_EXPIRY_UNIX_TIMESTAMP: () => GATE_EXPIRY_UNIX_TIMESTAMP,
|
|
751
759
|
INITIALIZE_CONFIG_DISCRIMINATOR: () => INITIALIZE_CONFIG_DISCRIMINATOR2,
|
|
752
760
|
MAX_COSIGNERS: () => MAX_COSIGNERS,
|
|
753
761
|
REMOVE_COSIGNER_DISCRIMINATOR: () => REMOVE_COSIGNER_DISCRIMINATOR,
|
|
@@ -755,6 +763,8 @@ chunkQ7SFCCGT_cjs.__export(cosignerHook_exports, {
|
|
|
755
763
|
SET_AUTHORITY_DISCRIMINATOR: () => SET_AUTHORITY_DISCRIMINATOR,
|
|
756
764
|
cosignerHookProgram: () => cosignerHookProgram,
|
|
757
765
|
decodeCosignerConfig: () => decodeCosignerConfig,
|
|
766
|
+
decodeCosignerGateExpiryPayload: () => decodeCosignerGateExpiryPayload,
|
|
767
|
+
encodeCosignerGateExpiryPayload: () => encodeCosignerGateExpiryPayload,
|
|
758
768
|
fetchAllCosignerConfig: () => fetchAllCosignerConfig,
|
|
759
769
|
fetchAllMaybeCosignerConfig: () => fetchAllMaybeCosignerConfig,
|
|
760
770
|
fetchCosignerConfig: () => fetchCosignerConfig,
|
|
@@ -773,8 +783,10 @@ chunkQ7SFCCGT_cjs.__export(cosignerHook_exports, {
|
|
|
773
783
|
getCosignerConfigDiscriminatorBytes: () => getCosignerConfigDiscriminatorBytes,
|
|
774
784
|
getCosignerConfigEncoder: () => getCosignerConfigEncoder,
|
|
775
785
|
getCosignerConfigSize: () => getCosignerConfigSize,
|
|
786
|
+
getCosignerGateStatus: () => getCosignerGateStatus,
|
|
776
787
|
getCosignerHookConfigAddress: () => getCosignerHookConfigAddress,
|
|
777
788
|
getCosignerHookErrorMessage: () => getCosignerHookErrorMessage,
|
|
789
|
+
getCosignerHookRemainingAccounts: () => getCosignerHookRemainingAccounts,
|
|
778
790
|
getInitializeConfigArgsCodec: () => getInitializeConfigArgsCodec,
|
|
779
791
|
getInitializeConfigArgsDecoder: () => getInitializeConfigArgsDecoder,
|
|
780
792
|
getInitializeConfigArgsEncoder: () => getInitializeConfigArgsEncoder,
|
|
@@ -801,6 +813,7 @@ chunkQ7SFCCGT_cjs.__export(cosignerHook_exports, {
|
|
|
801
813
|
getSetAuthorityInstructionDataEncoder: () => getSetAuthorityInstructionDataEncoder,
|
|
802
814
|
identifyCosignerHookAccount: () => identifyCosignerHookAccount,
|
|
803
815
|
identifyCosignerHookInstruction: () => identifyCosignerHookInstruction,
|
|
816
|
+
isCosignerGateEnforced: () => isCosignerGateEnforced,
|
|
804
817
|
isCosignerHookError: () => isCosignerHookError,
|
|
805
818
|
parseAddCosignerInstruction: () => parseAddCosignerInstruction,
|
|
806
819
|
parseCosignerHookInstruction: () => parseCosignerHookInstruction,
|
|
@@ -857,13 +870,13 @@ function decodeCosignerConfig(encodedAccount) {
|
|
|
857
870
|
getCosignerConfigDecoder()
|
|
858
871
|
);
|
|
859
872
|
}
|
|
860
|
-
async function fetchCosignerConfig(rpc,
|
|
861
|
-
const maybeAccount = await fetchMaybeCosignerConfig(rpc,
|
|
873
|
+
async function fetchCosignerConfig(rpc, address4, config) {
|
|
874
|
+
const maybeAccount = await fetchMaybeCosignerConfig(rpc, address4, config);
|
|
862
875
|
kit.assertAccountExists(maybeAccount);
|
|
863
876
|
return maybeAccount;
|
|
864
877
|
}
|
|
865
|
-
async function fetchMaybeCosignerConfig(rpc,
|
|
866
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
878
|
+
async function fetchMaybeCosignerConfig(rpc, address4, config) {
|
|
879
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
867
880
|
return decodeCosignerConfig(maybeAccount);
|
|
868
881
|
}
|
|
869
882
|
async function fetchAllCosignerConfig(rpc, addresses, config) {
|
|
@@ -1644,104 +1657,18 @@ function getSetAuthorityArgsCodec() {
|
|
|
1644
1657
|
getSetAuthorityArgsDecoder()
|
|
1645
1658
|
);
|
|
1646
1659
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1660
|
+
var DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID = kit.address(
|
|
1661
|
+
"5iWYdN9SEDeF3FTjKB48XYyCFAcVDuYHsz31Z4Wmq7Ch"
|
|
1662
|
+
);
|
|
1663
|
+
var COSIGNER_HOOK_PROGRAM_ID = DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID;
|
|
1650
1664
|
var SEED_COSIGNER_HOOK_CONFIG = "cosigner_hook_config";
|
|
1651
1665
|
var MAX_COSIGNERS = 32;
|
|
1652
|
-
var
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
// src/solana/initializer/index.ts
|
|
1661
|
-
var initializer_exports = {};
|
|
1662
|
-
chunkQ7SFCCGT_cjs.__export(initializer_exports, {
|
|
1663
|
-
BPF_LOADER_UPGRADEABLE_PROGRAM_ID: () => BPF_LOADER_UPGRADEABLE_PROGRAM_ID,
|
|
1664
|
-
CPMM_HOOK_PROGRAM_ID: () => CPMM_HOOK_PROGRAM_ID,
|
|
1665
|
-
CURVE_KIND_XYK: () => CURVE_KIND_XYK,
|
|
1666
|
-
CURVE_PARAMS_FORMAT_XYK_V0: () => CURVE_PARAMS_FORMAT_XYK_V0,
|
|
1667
|
-
DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND: () => DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND,
|
|
1668
|
-
EMPTY_REMAINING_ACCOUNTS_HASH: () => EMPTY_REMAINING_ACCOUNTS_HASH,
|
|
1669
|
-
HF_AFTER_CREATE: () => HF_AFTER_CREATE,
|
|
1670
|
-
HF_AFTER_MIGRATE: () => HF_AFTER_MIGRATE,
|
|
1671
|
-
HF_AFTER_SWAP: () => HF_AFTER_SWAP2,
|
|
1672
|
-
HF_BEFORE_CREATE: () => HF_BEFORE_CREATE,
|
|
1673
|
-
HF_BEFORE_MIGRATE: () => HF_BEFORE_MIGRATE,
|
|
1674
|
-
HF_BEFORE_SWAP: () => HF_BEFORE_SWAP2,
|
|
1675
|
-
HF_FORWARD_READONLY_SIGNERS: () => HF_FORWARD_READONLY_SIGNERS2,
|
|
1676
|
-
HOOK_NO_CHANGE: () => HOOK_NO_CHANGE2,
|
|
1677
|
-
INITIALIZER_ACCOUNT_DISCRIMINATORS: () => INITIALIZER_ACCOUNT_DISCRIMINATORS,
|
|
1678
|
-
INITIALIZER_INSTRUCTION_DISCRIMINATORS: () => INITIALIZER_INSTRUCTION_DISCRIMINATORS,
|
|
1679
|
-
INITIALIZER_PROGRAM_ID: () => INITIALIZER_PROGRAM_ID,
|
|
1680
|
-
MAX_HOOK_ALLOWLIST: () => MAX_HOOK_ALLOWLIST2,
|
|
1681
|
-
MAX_MIGRATOR_ALLOWLIST: () => MAX_MIGRATOR_ALLOWLIST,
|
|
1682
|
-
MAX_PAYLOAD: () => MAX_PAYLOAD,
|
|
1683
|
-
PHASE_ABORTED: () => PHASE_ABORTED,
|
|
1684
|
-
PHASE_MIGRATED: () => PHASE_MIGRATED,
|
|
1685
|
-
PHASE_TRADING: () => PHASE_TRADING,
|
|
1686
|
-
PREDICTION_HOOK_PROGRAM_ID: () => PREDICTION_HOOK_PROGRAM_ID,
|
|
1687
|
-
SEED_CONFIG: () => SEED_CONFIG2,
|
|
1688
|
-
SEED_LAUNCH: () => SEED_LAUNCH,
|
|
1689
|
-
SEED_LAUNCH_AUTHORITY: () => SEED_LAUNCH_AUTHORITY,
|
|
1690
|
-
SEED_LAUNCH_FEE_STATE: () => SEED_LAUNCH_FEE_STATE,
|
|
1691
|
-
SOLANA_TRANSACTION_SIZE_LIMIT: () => SOLANA_TRANSACTION_SIZE_LIMIT,
|
|
1692
|
-
TRADE_DIRECTION_BUY: () => TRADE_DIRECTION_BUY,
|
|
1693
|
-
TRADE_DIRECTION_SELL: () => TRADE_DIRECTION_SELL,
|
|
1694
|
-
assertTransactionMessageFits: () => assertTransactionMessageFits,
|
|
1695
|
-
assertTransactionMessageFitsWithLookupTable: () => assertTransactionMessageFitsWithLookupTable,
|
|
1696
|
-
buildAddressLookupTableSetupInstructions: () => buildAddressLookupTableSetupInstructions,
|
|
1697
|
-
compressTransactionMessageWithLookupTable: () => compressTransactionMessageWithLookupTable,
|
|
1698
|
-
computeRemainingAccountsHash: () => computeRemainingAccountsHash,
|
|
1699
|
-
createCurveSwapExactInInstruction: () => createCurveSwapExactInInstruction,
|
|
1700
|
-
createInitializeConfigInstruction: () => createInitializeConfigInstruction,
|
|
1701
|
-
createInitializeLaunchInstruction: () => createInitializeLaunchInstruction,
|
|
1702
|
-
createMigrateLaunchInstruction: () => createMigrateLaunchInstruction,
|
|
1703
|
-
createPreviewMigrationInstruction: () => createPreviewMigrationInstruction,
|
|
1704
|
-
createPreviewSwapExactInInstruction: () => createPreviewSwapExactInInstruction,
|
|
1705
|
-
createSetHookAllowlistInstruction: () => createSetHookAllowlistInstruction,
|
|
1706
|
-
createSetMigratorAllowlistInstruction: () => createSetMigratorAllowlistInstruction,
|
|
1707
|
-
decodePreviewMigrationResult: () => decodePreviewMigrationResult,
|
|
1708
|
-
decodePreviewSwapExactInResult: () => decodePreviewSwapExactInResult,
|
|
1709
|
-
encodeU64LE: () => encodeU64LE,
|
|
1710
|
-
fetchAllLaunches: () => fetchAllLaunches,
|
|
1711
|
-
fetchLaunch: () => fetchLaunch2,
|
|
1712
|
-
fetchLaunchesByAuthority: () => fetchLaunchesByAuthority,
|
|
1713
|
-
getClaimFeesInstructionAsync: () => getClaimFeesInstructionAsync,
|
|
1714
|
-
getConfigAddress: () => getConfigAddress2,
|
|
1715
|
-
getHarvestMigratedFeesInstructionAsync: () => getHarvestMigratedFeesInstructionAsync,
|
|
1716
|
-
getInitConfigCodec: () => getInitConfigCodec,
|
|
1717
|
-
getInitConfigDecoder: () => getInitConfigDecoder,
|
|
1718
|
-
getInitConfigEncoder: () => getInitConfigEncoder,
|
|
1719
|
-
getInitializeConfigArgsCodec: () => getInitializeConfigArgsCodec2,
|
|
1720
|
-
getInitializeConfigArgsDecoder: () => getInitializeConfigArgsDecoder2,
|
|
1721
|
-
getInitializeConfigArgsEncoder: () => getInitializeConfigArgsEncoder2,
|
|
1722
|
-
getInitializeLaunchArgsCodec: () => getInitializeLaunchArgsCodec,
|
|
1723
|
-
getInitializeLaunchArgsDecoder: () => getInitializeLaunchArgsDecoder,
|
|
1724
|
-
getInitializeLaunchArgsEncoder: () => getInitializeLaunchArgsEncoder,
|
|
1725
|
-
getInstructionLookupTableAddresses: () => getInstructionLookupTableAddresses,
|
|
1726
|
-
getLaunchAddress: () => getLaunchAddress,
|
|
1727
|
-
getLaunchAuthorityAddress: () => getLaunchAuthorityAddress,
|
|
1728
|
-
getLaunchCodec: () => getLaunchCodec,
|
|
1729
|
-
getLaunchDecoder: () => getLaunchDecoder,
|
|
1730
|
-
getLaunchEncoder: () => getLaunchEncoder,
|
|
1731
|
-
getLaunchFeeStateAddress: () => getLaunchFeeStateAddress,
|
|
1732
|
-
getLaunchFeeStateCodec: () => getLaunchFeeStateCodec,
|
|
1733
|
-
getLaunchFeeStateDecoder: () => getLaunchFeeStateDecoder,
|
|
1734
|
-
getLaunchFeeStateEncoder: () => getLaunchFeeStateEncoder,
|
|
1735
|
-
getProgramDataAddress: () => getProgramDataAddress,
|
|
1736
|
-
getReplaceFeeBeneficiaryInstructionAsync: () => getReplaceFeeBeneficiaryInstructionAsync,
|
|
1737
|
-
getSetFeePolicyInstructionAsync: () => getSetFeePolicyInstructionAsync,
|
|
1738
|
-
getTokenMetadataAddress: () => getTokenMetadataAddress,
|
|
1739
|
-
launchExists: () => launchExists,
|
|
1740
|
-
launchIdFromU64: () => launchIdFromU64,
|
|
1741
|
-
measureTransactionMessageSize: () => measureTransactionMessageSize,
|
|
1742
|
-
measureTransactionMessageSizeWithLookupTable: () => measureTransactionMessageSizeWithLookupTable,
|
|
1743
|
-
phaseLabel: () => phaseLabel
|
|
1744
|
-
});
|
|
1666
|
+
var GATE_EXPIRY_DISABLED = 0;
|
|
1667
|
+
var GATE_EXPIRY_UNIX_TIMESTAMP = 1;
|
|
1668
|
+
var GATE_EXPIRY_SLOT = 2;
|
|
1669
|
+
var GATE_EXPIRY_PAYLOAD_VERSION = 1;
|
|
1670
|
+
var GATE_EXPIRY_HEADER_LEN = 10;
|
|
1671
|
+
var GATE_EXPIRY_PAYLOAD_LEN = 42;
|
|
1745
1672
|
var INITIALIZER_PROGRAM_ID = kit.address(
|
|
1746
1673
|
"4h3Dqyo5qmteJoMxXt3tdtfXELDB6pdRTPU9mWruiKp1"
|
|
1747
1674
|
);
|
|
@@ -1917,114 +1844,381 @@ var INITIALIZER_ACCOUNT_DISCRIMINATORS = {
|
|
|
1917
1844
|
232
|
|
1918
1845
|
])
|
|
1919
1846
|
};
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
function getInitConfigEncoder() {
|
|
1931
|
-
return kit.transformEncoder(
|
|
1932
|
-
kit.getStructEncoder([
|
|
1933
|
-
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
1934
|
-
["admin", kit.getAddressEncoder()],
|
|
1935
|
-
["migratorAllowlistLen", kit.getU8Encoder()],
|
|
1936
|
-
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
1937
|
-
["hookAllowlistLen", kit.getU8Encoder()],
|
|
1938
|
-
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
1939
|
-
["bump", kit.getU8Encoder()],
|
|
1940
|
-
["version", kit.getU8Encoder()],
|
|
1941
|
-
["protocolFeeBps", kit.getU16Encoder()],
|
|
1942
|
-
["minSwapFeeBps", kit.getU16Encoder()],
|
|
1943
|
-
["maxSwapFeeBps", kit.getU16Encoder()],
|
|
1944
|
-
["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 24)]
|
|
1945
|
-
]),
|
|
1946
|
-
(value) => ({ ...value, discriminator: INIT_CONFIG_DISCRIMINATOR })
|
|
1947
|
-
);
|
|
1948
|
-
}
|
|
1949
|
-
function getInitConfigDecoder() {
|
|
1950
|
-
return kit.getStructDecoder([
|
|
1951
|
-
["discriminator", kit.fixDecoderSize(kit.getBytesDecoder(), 8)],
|
|
1952
|
-
["admin", kit.getAddressDecoder()],
|
|
1953
|
-
["migratorAllowlistLen", kit.getU8Decoder()],
|
|
1954
|
-
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
1955
|
-
["hookAllowlistLen", kit.getU8Decoder()],
|
|
1956
|
-
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
1957
|
-
["bump", kit.getU8Decoder()],
|
|
1958
|
-
["version", kit.getU8Decoder()],
|
|
1959
|
-
["protocolFeeBps", kit.getU16Decoder()],
|
|
1960
|
-
["minSwapFeeBps", kit.getU16Decoder()],
|
|
1961
|
-
["maxSwapFeeBps", kit.getU16Decoder()],
|
|
1962
|
-
["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 24)]
|
|
1963
|
-
]);
|
|
1847
|
+
|
|
1848
|
+
// src/solana/initializer/helpers.ts
|
|
1849
|
+
function computeRemainingAccountsHash(addresses) {
|
|
1850
|
+
const addressEncoder = kit.getAddressEncoder();
|
|
1851
|
+
const buf = new Uint8Array(4 + addresses.length * 32);
|
|
1852
|
+
new DataView(buf.buffer).setUint32(0, addresses.length, true);
|
|
1853
|
+
for (let i = 0; i < addresses.length; i++) {
|
|
1854
|
+
buf.set(addressEncoder.encode(addresses[i]), 4 + i * 32);
|
|
1855
|
+
}
|
|
1856
|
+
return sha3_js.keccak_256(buf);
|
|
1964
1857
|
}
|
|
1965
|
-
function
|
|
1966
|
-
|
|
1858
|
+
function getCurveSwapFeeAmount(amountIn, swapFeeBps) {
|
|
1859
|
+
if (amountIn < 0n) {
|
|
1860
|
+
throw new Error("amountIn must be non-negative");
|
|
1861
|
+
}
|
|
1862
|
+
if (!Number.isInteger(swapFeeBps) || swapFeeBps < 0 || swapFeeBps > Number(chunkU6B52TBT_cjs.BPS_DENOM)) {
|
|
1863
|
+
throw new Error("swapFeeBps must be an integer from 0 to 10000");
|
|
1864
|
+
}
|
|
1865
|
+
return chunkXTL2GBZ4_cjs.ceilDiv(amountIn * BigInt(swapFeeBps), chunkU6B52TBT_cjs.BPS_DENOM);
|
|
1967
1866
|
}
|
|
1968
|
-
function
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1867
|
+
function phaseLabel(phase) {
|
|
1868
|
+
switch (phase) {
|
|
1869
|
+
case PHASE_TRADING:
|
|
1870
|
+
return "TRADING";
|
|
1871
|
+
case PHASE_MIGRATED:
|
|
1872
|
+
return "MIGRATED";
|
|
1873
|
+
case PHASE_ABORTED:
|
|
1874
|
+
return "ABORTED";
|
|
1875
|
+
default:
|
|
1876
|
+
return String(phase);
|
|
1877
|
+
}
|
|
1974
1878
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1879
|
+
|
|
1880
|
+
// src/solana/cosignerHook/gate.ts
|
|
1881
|
+
var MAX_U64 = (1n << 64n) - 1n;
|
|
1882
|
+
function toBigInt(value) {
|
|
1883
|
+
return typeof value === "bigint" ? value : BigInt(value);
|
|
1884
|
+
}
|
|
1885
|
+
function isValidExpiryMode(mode) {
|
|
1886
|
+
return mode === GATE_EXPIRY_UNIX_TIMESTAMP || mode === GATE_EXPIRY_SLOT;
|
|
1887
|
+
}
|
|
1888
|
+
function readU64Le(bytes, offset) {
|
|
1889
|
+
let value = 0n;
|
|
1890
|
+
for (let i = 0; i < 8; i++) {
|
|
1891
|
+
value |= BigInt(bytes[offset + i] ?? 0) << BigInt(i * 8);
|
|
1892
|
+
}
|
|
1893
|
+
return value;
|
|
1981
1894
|
}
|
|
1982
|
-
function
|
|
1983
|
-
|
|
1984
|
-
[
|
|
1985
|
-
|
|
1986
|
-
]);
|
|
1895
|
+
function writeU64Le(bytes, offset, value) {
|
|
1896
|
+
for (let i = 0; i < 8; i++) {
|
|
1897
|
+
bytes[offset + i] = Number(value >> BigInt(i * 8) & 0xffn);
|
|
1898
|
+
}
|
|
1987
1899
|
}
|
|
1988
|
-
function
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1900
|
+
function encodeCosignerGateExpiryPayload(expiry) {
|
|
1901
|
+
if (expiry.mode === GATE_EXPIRY_DISABLED) {
|
|
1902
|
+
if (expiry.cosigner !== void 0) {
|
|
1903
|
+
throw new Error("Cosigner hint cannot be encoded for disabled gates");
|
|
1904
|
+
}
|
|
1905
|
+
return new Uint8Array();
|
|
1906
|
+
}
|
|
1907
|
+
if (!isValidExpiryMode(expiry.mode)) {
|
|
1908
|
+
throw new Error(`Invalid cosigner gate expiry mode: ${expiry.mode}`);
|
|
1909
|
+
}
|
|
1910
|
+
const value = toBigInt(expiry.value);
|
|
1911
|
+
if (value < 0n || value > MAX_U64) {
|
|
1912
|
+
throw new Error(`Invalid cosigner gate expiry value: ${expiry.value}`);
|
|
1913
|
+
}
|
|
1914
|
+
if (expiry.cosigner === void 0) {
|
|
1915
|
+
throw new Error("Cosigner hint is required for expiring gates");
|
|
1916
|
+
}
|
|
1917
|
+
const payload = new Uint8Array(GATE_EXPIRY_PAYLOAD_LEN);
|
|
1918
|
+
payload[0] = GATE_EXPIRY_PAYLOAD_VERSION;
|
|
1919
|
+
payload[1] = expiry.mode;
|
|
1920
|
+
writeU64Le(payload, 2, value);
|
|
1921
|
+
payload.set(
|
|
1922
|
+
kit.getAddressEncoder().encode(expiry.cosigner),
|
|
1923
|
+
GATE_EXPIRY_HEADER_LEN
|
|
1924
|
+
);
|
|
1925
|
+
return payload;
|
|
1993
1926
|
}
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
1927
|
+
function decodeCosignerGateExpiryPayload(payload) {
|
|
1928
|
+
if (!payload || payload.length === 0) {
|
|
1929
|
+
return { mode: GATE_EXPIRY_DISABLED, value: 0n };
|
|
1930
|
+
}
|
|
1931
|
+
if (payload.length !== GATE_EXPIRY_PAYLOAD_LEN || payload[0] !== GATE_EXPIRY_PAYLOAD_VERSION) {
|
|
1932
|
+
return null;
|
|
1933
|
+
}
|
|
1934
|
+
const mode = payload[1] ?? GATE_EXPIRY_DISABLED;
|
|
1935
|
+
if (!isValidExpiryMode(mode)) {
|
|
1936
|
+
return null;
|
|
1937
|
+
}
|
|
1938
|
+
return {
|
|
1939
|
+
mode,
|
|
1940
|
+
value: readU64Le(payload, 2),
|
|
1941
|
+
cosigner: kit.getAddressDecoder().decode(
|
|
1942
|
+
payload.slice(GATE_EXPIRY_HEADER_LEN, GATE_EXPIRY_PAYLOAD_LEN)
|
|
1943
|
+
)
|
|
1944
|
+
};
|
|
2001
1945
|
}
|
|
2002
|
-
function
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
1946
|
+
function getCosignerGateStatus(hookPayload, clock = {}) {
|
|
1947
|
+
const expiry = decodeCosignerGateExpiryPayload(hookPayload);
|
|
1948
|
+
if (!expiry) {
|
|
1949
|
+
return {
|
|
1950
|
+
gateEnforced: true,
|
|
1951
|
+
expiryMode: GATE_EXPIRY_DISABLED,
|
|
1952
|
+
expiryValue: 0n,
|
|
1953
|
+
reason: "invalid_expiry_payload"
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
if (expiry.mode === GATE_EXPIRY_DISABLED) {
|
|
1957
|
+
return {
|
|
1958
|
+
gateEnforced: true,
|
|
1959
|
+
expiryMode: expiry.mode,
|
|
1960
|
+
expiryValue: expiry.value,
|
|
1961
|
+
reason: "expiry_disabled"
|
|
1962
|
+
};
|
|
1963
|
+
}
|
|
1964
|
+
if (expiry.mode === GATE_EXPIRY_UNIX_TIMESTAMP) {
|
|
1965
|
+
const unixTimestamp = clock.unixTimestamp === void 0 ? BigInt(Math.floor(Date.now() / 1e3)) : toBigInt(clock.unixTimestamp);
|
|
1966
|
+
const expired = unixTimestamp >= expiry.value;
|
|
1967
|
+
return {
|
|
1968
|
+
gateEnforced: !expired,
|
|
1969
|
+
expiryMode: expiry.mode,
|
|
1970
|
+
expiryValue: expiry.value,
|
|
1971
|
+
reason: expired ? "timestamp_expired" : "timestamp_pending"
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
if (expiry.mode === GATE_EXPIRY_SLOT) {
|
|
1975
|
+
if (clock.slot === void 0) {
|
|
1976
|
+
return {
|
|
1977
|
+
gateEnforced: true,
|
|
1978
|
+
expiryMode: expiry.mode,
|
|
1979
|
+
expiryValue: expiry.value,
|
|
1980
|
+
reason: "slot_unavailable"
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
const expired = toBigInt(clock.slot) >= expiry.value;
|
|
1984
|
+
return {
|
|
1985
|
+
gateEnforced: !expired,
|
|
1986
|
+
expiryMode: expiry.mode,
|
|
1987
|
+
expiryValue: expiry.value,
|
|
1988
|
+
reason: expired ? "slot_expired" : "slot_pending"
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
return {
|
|
1992
|
+
gateEnforced: true,
|
|
1993
|
+
expiryMode: expiry.mode,
|
|
1994
|
+
expiryValue: expiry.value,
|
|
1995
|
+
reason: "invalid_expiry_mode"
|
|
1996
|
+
};
|
|
2010
1997
|
}
|
|
2011
|
-
function
|
|
2012
|
-
return
|
|
2013
|
-
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
2014
|
-
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
2015
|
-
["protocolFeeBps", kit.getU16Decoder()],
|
|
2016
|
-
["minSwapFeeBps", kit.getU16Decoder()],
|
|
2017
|
-
["maxSwapFeeBps", kit.getU16Decoder()]
|
|
2018
|
-
]);
|
|
1998
|
+
function isCosignerGateEnforced(hookPayload, clock = {}) {
|
|
1999
|
+
return getCosignerGateStatus(hookPayload, clock).gateEnforced;
|
|
2019
2000
|
}
|
|
2020
|
-
function
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2001
|
+
function getCosignerHookRemainingAccounts({
|
|
2002
|
+
namespace,
|
|
2003
|
+
cosigner
|
|
2004
|
+
}) {
|
|
2005
|
+
const unsignedHookRemainingAccounts = [
|
|
2006
|
+
namespace,
|
|
2007
|
+
cosigner.address
|
|
2008
|
+
];
|
|
2009
|
+
return {
|
|
2010
|
+
signedHookRemainingAccounts: [namespace, cosigner],
|
|
2011
|
+
unsignedHookRemainingAccounts,
|
|
2012
|
+
hookRemainingAccountsHash: computeRemainingAccountsHash(
|
|
2013
|
+
unsignedHookRemainingAccounts
|
|
2014
|
+
)
|
|
2015
|
+
};
|
|
2025
2016
|
}
|
|
2026
|
-
|
|
2027
|
-
|
|
2017
|
+
var textEncoder2 = new TextEncoder();
|
|
2018
|
+
async function getCosignerHookConfigAddress(programId = COSIGNER_HOOK_PROGRAM_ID) {
|
|
2019
|
+
return kit.getProgramDerivedAddress({
|
|
2020
|
+
programAddress: programId,
|
|
2021
|
+
seeds: [textEncoder2.encode(SEED_COSIGNER_HOOK_CONFIG)]
|
|
2022
|
+
});
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
// src/solana/initializer/index.ts
|
|
2026
|
+
var initializer_exports = {};
|
|
2027
|
+
chunkQ7SFCCGT_cjs.__export(initializer_exports, {
|
|
2028
|
+
BPF_LOADER_UPGRADEABLE_PROGRAM_ID: () => BPF_LOADER_UPGRADEABLE_PROGRAM_ID,
|
|
2029
|
+
CPMM_HOOK_PROGRAM_ID: () => CPMM_HOOK_PROGRAM_ID,
|
|
2030
|
+
CURVE_KIND_XYK: () => CURVE_KIND_XYK,
|
|
2031
|
+
CURVE_PARAMS_FORMAT_XYK_V0: () => CURVE_PARAMS_FORMAT_XYK_V0,
|
|
2032
|
+
DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND: () => DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND,
|
|
2033
|
+
EMPTY_REMAINING_ACCOUNTS_HASH: () => EMPTY_REMAINING_ACCOUNTS_HASH,
|
|
2034
|
+
HF_AFTER_CREATE: () => HF_AFTER_CREATE,
|
|
2035
|
+
HF_AFTER_MIGRATE: () => HF_AFTER_MIGRATE,
|
|
2036
|
+
HF_AFTER_SWAP: () => HF_AFTER_SWAP2,
|
|
2037
|
+
HF_BEFORE_CREATE: () => HF_BEFORE_CREATE,
|
|
2038
|
+
HF_BEFORE_MIGRATE: () => HF_BEFORE_MIGRATE,
|
|
2039
|
+
HF_BEFORE_SWAP: () => HF_BEFORE_SWAP2,
|
|
2040
|
+
HF_FORWARD_READONLY_SIGNERS: () => HF_FORWARD_READONLY_SIGNERS2,
|
|
2041
|
+
HOOK_NO_CHANGE: () => HOOK_NO_CHANGE2,
|
|
2042
|
+
INITIALIZER_ACCOUNT_DISCRIMINATORS: () => INITIALIZER_ACCOUNT_DISCRIMINATORS,
|
|
2043
|
+
INITIALIZER_INSTRUCTION_DISCRIMINATORS: () => INITIALIZER_INSTRUCTION_DISCRIMINATORS,
|
|
2044
|
+
INITIALIZER_PROGRAM_ID: () => INITIALIZER_PROGRAM_ID,
|
|
2045
|
+
MAX_HOOK_ALLOWLIST: () => MAX_HOOK_ALLOWLIST2,
|
|
2046
|
+
MAX_MIGRATOR_ALLOWLIST: () => MAX_MIGRATOR_ALLOWLIST,
|
|
2047
|
+
MAX_PAYLOAD: () => MAX_PAYLOAD,
|
|
2048
|
+
PHASE_ABORTED: () => PHASE_ABORTED,
|
|
2049
|
+
PHASE_MIGRATED: () => PHASE_MIGRATED,
|
|
2050
|
+
PHASE_TRADING: () => PHASE_TRADING,
|
|
2051
|
+
PREDICTION_HOOK_PROGRAM_ID: () => PREDICTION_HOOK_PROGRAM_ID,
|
|
2052
|
+
SEED_CONFIG: () => SEED_CONFIG2,
|
|
2053
|
+
SEED_LAUNCH: () => SEED_LAUNCH,
|
|
2054
|
+
SEED_LAUNCH_AUTHORITY: () => SEED_LAUNCH_AUTHORITY,
|
|
2055
|
+
SEED_LAUNCH_FEE_STATE: () => SEED_LAUNCH_FEE_STATE,
|
|
2056
|
+
SOLANA_TRANSACTION_SIZE_LIMIT: () => SOLANA_TRANSACTION_SIZE_LIMIT,
|
|
2057
|
+
TRADE_DIRECTION_BUY: () => TRADE_DIRECTION_BUY,
|
|
2058
|
+
TRADE_DIRECTION_SELL: () => TRADE_DIRECTION_SELL,
|
|
2059
|
+
assertTransactionMessageFits: () => assertTransactionMessageFits,
|
|
2060
|
+
assertTransactionMessageFitsWithLookupTable: () => assertTransactionMessageFitsWithLookupTable,
|
|
2061
|
+
buildAddressLookupTableSetupInstructions: () => buildAddressLookupTableSetupInstructions,
|
|
2062
|
+
compressTransactionMessageWithLookupTable: () => compressTransactionMessageWithLookupTable,
|
|
2063
|
+
computeRemainingAccountsHash: () => computeRemainingAccountsHash,
|
|
2064
|
+
createCurveSwapExactInInstruction: () => createCurveSwapExactInInstruction,
|
|
2065
|
+
createInitializeConfigInstruction: () => createInitializeConfigInstruction,
|
|
2066
|
+
createInitializeLaunchInstruction: () => createInitializeLaunchInstruction,
|
|
2067
|
+
createLaunchId: () => createLaunchId,
|
|
2068
|
+
createMigrateLaunchInstruction: () => createMigrateLaunchInstruction,
|
|
2069
|
+
createPreviewMigrationInstruction: () => createPreviewMigrationInstruction,
|
|
2070
|
+
createPreviewSwapExactInInstruction: () => createPreviewSwapExactInInstruction,
|
|
2071
|
+
createSetHookAllowlistInstruction: () => createSetHookAllowlistInstruction,
|
|
2072
|
+
createSetMigratorAllowlistInstruction: () => createSetMigratorAllowlistInstruction,
|
|
2073
|
+
decodePreviewMigrationResult: () => decodePreviewMigrationResult,
|
|
2074
|
+
decodePreviewSwapExactInResult: () => decodePreviewSwapExactInResult,
|
|
2075
|
+
deriveCreateLaunchAddresses: () => deriveCreateLaunchAddresses,
|
|
2076
|
+
encodeU64LE: () => encodeU64LE,
|
|
2077
|
+
fetchAllLaunches: () => fetchAllLaunches,
|
|
2078
|
+
fetchLaunch: () => fetchLaunch2,
|
|
2079
|
+
fetchLaunchesByAuthority: () => fetchLaunchesByAuthority,
|
|
2080
|
+
getClaimFeesInstructionAsync: () => getClaimFeesInstructionAsync,
|
|
2081
|
+
getConfigAddress: () => getConfigAddress2,
|
|
2082
|
+
getCurveSwapFeeAmount: () => getCurveSwapFeeAmount,
|
|
2083
|
+
getHarvestMigratedFeesInstructionAsync: () => getHarvestMigratedFeesInstructionAsync,
|
|
2084
|
+
getInitConfigCodec: () => getInitConfigCodec,
|
|
2085
|
+
getInitConfigDecoder: () => getInitConfigDecoder,
|
|
2086
|
+
getInitConfigEncoder: () => getInitConfigEncoder,
|
|
2087
|
+
getInitializeConfigArgsCodec: () => getInitializeConfigArgsCodec2,
|
|
2088
|
+
getInitializeConfigArgsDecoder: () => getInitializeConfigArgsDecoder2,
|
|
2089
|
+
getInitializeConfigArgsEncoder: () => getInitializeConfigArgsEncoder2,
|
|
2090
|
+
getInitializeLaunchArgsCodec: () => getInitializeLaunchArgsCodec,
|
|
2091
|
+
getInitializeLaunchArgsDecoder: () => getInitializeLaunchArgsDecoder,
|
|
2092
|
+
getInitializeLaunchArgsEncoder: () => getInitializeLaunchArgsEncoder,
|
|
2093
|
+
getInstructionLookupTableAddresses: () => getInstructionLookupTableAddresses,
|
|
2094
|
+
getLaunchAddress: () => getLaunchAddress,
|
|
2095
|
+
getLaunchAuthorityAddress: () => getLaunchAuthorityAddress,
|
|
2096
|
+
getLaunchCodec: () => getLaunchCodec,
|
|
2097
|
+
getLaunchDecoder: () => getLaunchDecoder,
|
|
2098
|
+
getLaunchEncoder: () => getLaunchEncoder,
|
|
2099
|
+
getLaunchFeeStateAddress: () => getLaunchFeeStateAddress,
|
|
2100
|
+
getLaunchFeeStateCodec: () => getLaunchFeeStateCodec,
|
|
2101
|
+
getLaunchFeeStateDecoder: () => getLaunchFeeStateDecoder,
|
|
2102
|
+
getLaunchFeeStateEncoder: () => getLaunchFeeStateEncoder,
|
|
2103
|
+
getProgramDataAddress: () => getProgramDataAddress,
|
|
2104
|
+
getReplaceFeeBeneficiaryInstructionAsync: () => getReplaceFeeBeneficiaryInstructionAsync,
|
|
2105
|
+
getSetFeePolicyInstructionAsync: () => getSetFeePolicyInstructionAsync,
|
|
2106
|
+
getTokenMetadataAddress: () => getTokenMetadataAddress,
|
|
2107
|
+
launchExists: () => launchExists,
|
|
2108
|
+
launchIdFromU64: () => launchIdFromU64,
|
|
2109
|
+
launchTokenPrograms: () => launchTokenPrograms,
|
|
2110
|
+
measureTransactionMessageSize: () => measureTransactionMessageSize,
|
|
2111
|
+
measureTransactionMessageSizeWithLookupTable: () => measureTransactionMessageSizeWithLookupTable,
|
|
2112
|
+
phaseLabel: () => phaseLabel
|
|
2113
|
+
});
|
|
2114
|
+
var INIT_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
2115
|
+
97,
|
|
2116
|
+
166,
|
|
2117
|
+
35,
|
|
2118
|
+
7,
|
|
2119
|
+
20,
|
|
2120
|
+
2,
|
|
2121
|
+
164,
|
|
2122
|
+
126
|
|
2123
|
+
]);
|
|
2124
|
+
function getInitConfigEncoder() {
|
|
2125
|
+
return kit.transformEncoder(
|
|
2126
|
+
kit.getStructEncoder([
|
|
2127
|
+
["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
|
|
2128
|
+
["admin", kit.getAddressEncoder()],
|
|
2129
|
+
["migratorAllowlistLen", kit.getU8Encoder()],
|
|
2130
|
+
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
2131
|
+
["hookAllowlistLen", kit.getU8Encoder()],
|
|
2132
|
+
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
|
|
2133
|
+
["bump", kit.getU8Encoder()],
|
|
2134
|
+
["version", kit.getU8Encoder()],
|
|
2135
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
2136
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
2137
|
+
["maxSwapFeeBps", kit.getU16Encoder()],
|
|
2138
|
+
["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 24)]
|
|
2139
|
+
]),
|
|
2140
|
+
(value) => ({ ...value, discriminator: INIT_CONFIG_DISCRIMINATOR })
|
|
2141
|
+
);
|
|
2142
|
+
}
|
|
2143
|
+
function getInitConfigDecoder() {
|
|
2144
|
+
return kit.getStructDecoder([
|
|
2145
|
+
["discriminator", kit.fixDecoderSize(kit.getBytesDecoder(), 8)],
|
|
2146
|
+
["admin", kit.getAddressDecoder()],
|
|
2147
|
+
["migratorAllowlistLen", kit.getU8Decoder()],
|
|
2148
|
+
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
2149
|
+
["hookAllowlistLen", kit.getU8Decoder()],
|
|
2150
|
+
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
|
|
2151
|
+
["bump", kit.getU8Decoder()],
|
|
2152
|
+
["version", kit.getU8Decoder()],
|
|
2153
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
2154
|
+
["minSwapFeeBps", kit.getU16Decoder()],
|
|
2155
|
+
["maxSwapFeeBps", kit.getU16Decoder()],
|
|
2156
|
+
["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 24)]
|
|
2157
|
+
]);
|
|
2158
|
+
}
|
|
2159
|
+
function getInitConfigCodec() {
|
|
2160
|
+
return kit.combineCodec(getInitConfigEncoder(), getInitConfigDecoder());
|
|
2161
|
+
}
|
|
2162
|
+
function getFeeBeneficiaryEncoder() {
|
|
2163
|
+
return kit.getStructEncoder([
|
|
2164
|
+
["wallet", kit.getAddressEncoder()],
|
|
2165
|
+
["shareBps", kit.getU16Encoder()],
|
|
2166
|
+
["pad", kit.fixEncoderSize(kit.getBytesEncoder(), 6)]
|
|
2167
|
+
]);
|
|
2168
|
+
}
|
|
2169
|
+
function getFeeBeneficiaryDecoder() {
|
|
2170
|
+
return kit.getStructDecoder([
|
|
2171
|
+
["wallet", kit.getAddressDecoder()],
|
|
2172
|
+
["shareBps", kit.getU16Decoder()],
|
|
2173
|
+
["pad", kit.fixDecoderSize(kit.getBytesDecoder(), 6)]
|
|
2174
|
+
]);
|
|
2175
|
+
}
|
|
2176
|
+
function getFeeBeneficiaryInputEncoder() {
|
|
2177
|
+
return kit.getStructEncoder([
|
|
2178
|
+
["wallet", kit.getAddressEncoder()],
|
|
2179
|
+
["shareBps", kit.getU16Encoder()]
|
|
2180
|
+
]);
|
|
2181
|
+
}
|
|
2182
|
+
function getFeeBeneficiaryInputDecoder() {
|
|
2183
|
+
return kit.getStructDecoder([
|
|
2184
|
+
["wallet", kit.getAddressDecoder()],
|
|
2185
|
+
["shareBps", kit.getU16Decoder()]
|
|
2186
|
+
]);
|
|
2187
|
+
}
|
|
2188
|
+
var FeeClaimRole = /* @__PURE__ */ ((FeeClaimRole2) => {
|
|
2189
|
+
FeeClaimRole2[FeeClaimRole2["Protocol"] = 0] = "Protocol";
|
|
2190
|
+
FeeClaimRole2[FeeClaimRole2["Beneficiary"] = 1] = "Beneficiary";
|
|
2191
|
+
return FeeClaimRole2;
|
|
2192
|
+
})(FeeClaimRole || {});
|
|
2193
|
+
function getFeeClaimRoleEncoder() {
|
|
2194
|
+
return kit.getEnumEncoder(FeeClaimRole);
|
|
2195
|
+
}
|
|
2196
|
+
function getInitializeConfigArgsEncoder2() {
|
|
2197
|
+
return kit.getStructEncoder([
|
|
2198
|
+
["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
2199
|
+
["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder())],
|
|
2200
|
+
["protocolFeeBps", kit.getU16Encoder()],
|
|
2201
|
+
["minSwapFeeBps", kit.getU16Encoder()],
|
|
2202
|
+
["maxSwapFeeBps", kit.getU16Encoder()]
|
|
2203
|
+
]);
|
|
2204
|
+
}
|
|
2205
|
+
function getInitializeConfigArgsDecoder2() {
|
|
2206
|
+
return kit.getStructDecoder([
|
|
2207
|
+
["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
2208
|
+
["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder())],
|
|
2209
|
+
["protocolFeeBps", kit.getU16Decoder()],
|
|
2210
|
+
["minSwapFeeBps", kit.getU16Decoder()],
|
|
2211
|
+
["maxSwapFeeBps", kit.getU16Decoder()]
|
|
2212
|
+
]);
|
|
2213
|
+
}
|
|
2214
|
+
function getInitializeConfigArgsCodec2() {
|
|
2215
|
+
return kit.combineCodec(
|
|
2216
|
+
getInitializeConfigArgsEncoder2(),
|
|
2217
|
+
getInitializeConfigArgsDecoder2()
|
|
2218
|
+
);
|
|
2219
|
+
}
|
|
2220
|
+
function getInitializeLaunchArgsEncoder() {
|
|
2221
|
+
return kit.getStructEncoder([
|
|
2028
2222
|
["namespace", kit.getAddressEncoder()],
|
|
2029
2223
|
["launchId", kit.fixEncoderSize(kit.getBytesEncoder(), 32)],
|
|
2030
2224
|
["baseDecimals", kit.getU8Encoder()],
|
|
@@ -2963,7 +3157,7 @@ function createInitializeConfigInstruction(accounts, args, programId = INITIALIZ
|
|
|
2963
3157
|
admin,
|
|
2964
3158
|
config,
|
|
2965
3159
|
programData,
|
|
2966
|
-
systemProgram =
|
|
3160
|
+
systemProgram = chunkU6B52TBT_cjs.SYSTEM_PROGRAM_ADDRESS
|
|
2967
3161
|
} = accounts;
|
|
2968
3162
|
const keys = [
|
|
2969
3163
|
createSignerAccountMeta(admin, kit.AccountRole.WRITABLE_SIGNER),
|
|
@@ -3016,27 +3210,6 @@ function createSetHookAllowlistInstruction(accounts, allowlist, programId = INIT
|
|
|
3016
3210
|
);
|
|
3017
3211
|
return { programAddress: programId, accounts: keys, data };
|
|
3018
3212
|
}
|
|
3019
|
-
function computeRemainingAccountsHash(addresses) {
|
|
3020
|
-
const addressEncoder = kit.getAddressEncoder();
|
|
3021
|
-
const buf = new Uint8Array(4 + addresses.length * 32);
|
|
3022
|
-
new DataView(buf.buffer).setUint32(0, addresses.length, true);
|
|
3023
|
-
for (let i = 0; i < addresses.length; i++) {
|
|
3024
|
-
buf.set(addressEncoder.encode(addresses[i]), 4 + i * 32);
|
|
3025
|
-
}
|
|
3026
|
-
return sha3_js.keccak_256(buf);
|
|
3027
|
-
}
|
|
3028
|
-
function phaseLabel(phase) {
|
|
3029
|
-
switch (phase) {
|
|
3030
|
-
case PHASE_TRADING:
|
|
3031
|
-
return "TRADING";
|
|
3032
|
-
case PHASE_MIGRATED:
|
|
3033
|
-
return "MIGRATED";
|
|
3034
|
-
case PHASE_ABORTED:
|
|
3035
|
-
return "ABORTED";
|
|
3036
|
-
default:
|
|
3037
|
-
return String(phase);
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
3213
|
var CPMM_MIGRATOR_PROGRAM_ID = kit.address(
|
|
3041
3214
|
"7WMUTNC41eMCo6eGH5Sy2xbgE3AycvLbFPo95AU9CSUd"
|
|
3042
3215
|
);
|
|
@@ -3134,13 +3307,13 @@ function decodeClaimReceipt(encodedAccount) {
|
|
|
3134
3307
|
getClaimReceiptDecoder()
|
|
3135
3308
|
);
|
|
3136
3309
|
}
|
|
3137
|
-
async function fetchClaimReceipt(rpc,
|
|
3138
|
-
const maybeAccount = await fetchMaybeClaimReceipt(rpc,
|
|
3310
|
+
async function fetchClaimReceipt(rpc, address4, config) {
|
|
3311
|
+
const maybeAccount = await fetchMaybeClaimReceipt(rpc, address4, config);
|
|
3139
3312
|
kit.assertAccountExists(maybeAccount);
|
|
3140
3313
|
return maybeAccount;
|
|
3141
3314
|
}
|
|
3142
|
-
async function fetchMaybeClaimReceipt(rpc,
|
|
3143
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3315
|
+
async function fetchMaybeClaimReceipt(rpc, address4, config) {
|
|
3316
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3144
3317
|
return decodeClaimReceipt(maybeAccount);
|
|
3145
3318
|
}
|
|
3146
3319
|
async function fetchAllClaimReceipt(rpc, addresses, config) {
|
|
@@ -3204,13 +3377,13 @@ function decodeEntry(encodedAccount) {
|
|
|
3204
3377
|
getEntryDecoder()
|
|
3205
3378
|
);
|
|
3206
3379
|
}
|
|
3207
|
-
async function fetchEntry(rpc,
|
|
3208
|
-
const maybeAccount = await fetchMaybeEntry(rpc,
|
|
3380
|
+
async function fetchEntry(rpc, address4, config) {
|
|
3381
|
+
const maybeAccount = await fetchMaybeEntry(rpc, address4, config);
|
|
3209
3382
|
kit.assertAccountExists(maybeAccount);
|
|
3210
3383
|
return maybeAccount;
|
|
3211
3384
|
}
|
|
3212
|
-
async function fetchMaybeEntry(rpc,
|
|
3213
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3385
|
+
async function fetchMaybeEntry(rpc, address4, config) {
|
|
3386
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3214
3387
|
return decodeEntry(maybeAccount);
|
|
3215
3388
|
}
|
|
3216
3389
|
async function fetchAllEntry(rpc, addresses, config) {
|
|
@@ -3272,13 +3445,13 @@ function decodeEntryByMint(encodedAccount) {
|
|
|
3272
3445
|
getEntryByMintDecoder()
|
|
3273
3446
|
);
|
|
3274
3447
|
}
|
|
3275
|
-
async function fetchEntryByMint(rpc,
|
|
3276
|
-
const maybeAccount = await fetchMaybeEntryByMint(rpc,
|
|
3448
|
+
async function fetchEntryByMint(rpc, address4, config) {
|
|
3449
|
+
const maybeAccount = await fetchMaybeEntryByMint(rpc, address4, config);
|
|
3277
3450
|
kit.assertAccountExists(maybeAccount);
|
|
3278
3451
|
return maybeAccount;
|
|
3279
3452
|
}
|
|
3280
|
-
async function fetchMaybeEntryByMint(rpc,
|
|
3281
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3453
|
+
async function fetchMaybeEntryByMint(rpc, address4, config) {
|
|
3454
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3282
3455
|
return decodeEntryByMint(maybeAccount);
|
|
3283
3456
|
}
|
|
3284
3457
|
async function fetchAllEntryByMint(rpc, addresses, config) {
|
|
@@ -3350,13 +3523,13 @@ function decodeInitConfig(encodedAccount) {
|
|
|
3350
3523
|
getInitConfigDecoder2()
|
|
3351
3524
|
);
|
|
3352
3525
|
}
|
|
3353
|
-
async function fetchInitConfig(rpc,
|
|
3354
|
-
const maybeAccount = await fetchMaybeInitConfig(rpc,
|
|
3526
|
+
async function fetchInitConfig(rpc, address4, config) {
|
|
3527
|
+
const maybeAccount = await fetchMaybeInitConfig(rpc, address4, config);
|
|
3355
3528
|
kit.assertAccountExists(maybeAccount);
|
|
3356
3529
|
return maybeAccount;
|
|
3357
3530
|
}
|
|
3358
|
-
async function fetchMaybeInitConfig(rpc,
|
|
3359
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3531
|
+
async function fetchMaybeInitConfig(rpc, address4, config) {
|
|
3532
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3360
3533
|
return decodeInitConfig(maybeAccount);
|
|
3361
3534
|
}
|
|
3362
3535
|
async function fetchAllInitConfig(rpc, addresses, config) {
|
|
@@ -3656,13 +3829,13 @@ function decodeLaunch(encodedAccount) {
|
|
|
3656
3829
|
getLaunchDecoder2()
|
|
3657
3830
|
);
|
|
3658
3831
|
}
|
|
3659
|
-
async function fetchLaunch(rpc,
|
|
3660
|
-
const maybeAccount = await fetchMaybeLaunch(rpc,
|
|
3832
|
+
async function fetchLaunch(rpc, address4, config) {
|
|
3833
|
+
const maybeAccount = await fetchMaybeLaunch(rpc, address4, config);
|
|
3661
3834
|
kit.assertAccountExists(maybeAccount);
|
|
3662
3835
|
return maybeAccount;
|
|
3663
3836
|
}
|
|
3664
|
-
async function fetchMaybeLaunch(rpc,
|
|
3665
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3837
|
+
async function fetchMaybeLaunch(rpc, address4, config) {
|
|
3838
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3666
3839
|
return decodeLaunch(maybeAccount);
|
|
3667
3840
|
}
|
|
3668
3841
|
async function fetchAllLaunch(rpc, addresses, config) {
|
|
@@ -3736,13 +3909,13 @@ function decodeMarket(encodedAccount) {
|
|
|
3736
3909
|
getMarketDecoder()
|
|
3737
3910
|
);
|
|
3738
3911
|
}
|
|
3739
|
-
async function fetchMarket(rpc,
|
|
3740
|
-
const maybeAccount = await fetchMaybeMarket(rpc,
|
|
3912
|
+
async function fetchMarket(rpc, address4, config) {
|
|
3913
|
+
const maybeAccount = await fetchMaybeMarket(rpc, address4, config);
|
|
3741
3914
|
kit.assertAccountExists(maybeAccount);
|
|
3742
3915
|
return maybeAccount;
|
|
3743
3916
|
}
|
|
3744
|
-
async function fetchMaybeMarket(rpc,
|
|
3745
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3917
|
+
async function fetchMaybeMarket(rpc, address4, config) {
|
|
3918
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3746
3919
|
return decodeMarket(maybeAccount);
|
|
3747
3920
|
}
|
|
3748
3921
|
async function fetchAllMarket(rpc, addresses, config) {
|
|
@@ -3808,13 +3981,13 @@ function decodeOracleState2(encodedAccount) {
|
|
|
3808
3981
|
getOracleStateDecoder()
|
|
3809
3982
|
);
|
|
3810
3983
|
}
|
|
3811
|
-
async function fetchOracleState(rpc,
|
|
3812
|
-
const maybeAccount = await fetchMaybeOracleState(rpc,
|
|
3984
|
+
async function fetchOracleState(rpc, address4, config) {
|
|
3985
|
+
const maybeAccount = await fetchMaybeOracleState(rpc, address4, config);
|
|
3813
3986
|
kit.assertAccountExists(maybeAccount);
|
|
3814
3987
|
return maybeAccount;
|
|
3815
3988
|
}
|
|
3816
|
-
async function fetchMaybeOracleState(rpc,
|
|
3817
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
3989
|
+
async function fetchMaybeOracleState(rpc, address4, config) {
|
|
3990
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
3818
3991
|
return decodeOracleState2(maybeAccount);
|
|
3819
3992
|
}
|
|
3820
3993
|
async function fetchAllOracleState(rpc, addresses, config) {
|
|
@@ -5110,10 +5283,10 @@ function createAccountMeta(value, role) {
|
|
|
5110
5283
|
async function getTokenMetadataAddress(mint) {
|
|
5111
5284
|
const encoder = kit.getAddressEncoder();
|
|
5112
5285
|
const [metadataAddress] = await kit.getProgramDerivedAddress({
|
|
5113
|
-
programAddress:
|
|
5286
|
+
programAddress: chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
5114
5287
|
seeds: [
|
|
5115
5288
|
new TextEncoder().encode("metadata"),
|
|
5116
|
-
encoder.encode(
|
|
5289
|
+
encoder.encode(chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
5117
5290
|
encoder.encode(mint)
|
|
5118
5291
|
]
|
|
5119
5292
|
});
|
|
@@ -5144,17 +5317,18 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5144
5317
|
authority,
|
|
5145
5318
|
hookProgram,
|
|
5146
5319
|
migratorProgram,
|
|
5147
|
-
baseTokenProgram =
|
|
5148
|
-
quoteTokenProgram =
|
|
5149
|
-
systemProgram =
|
|
5320
|
+
baseTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5321
|
+
quoteTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5322
|
+
systemProgram = chunkU6B52TBT_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5150
5323
|
rent,
|
|
5151
5324
|
metadataAccount,
|
|
5152
|
-
metadataProgram =
|
|
5325
|
+
metadataProgram = chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
5153
5326
|
hookCreateRemainingAccounts = []
|
|
5154
5327
|
} = accounts;
|
|
5155
5328
|
const withMetadata = Boolean(
|
|
5156
5329
|
args.metadataName && args.metadataName.length > 0
|
|
5157
5330
|
);
|
|
5331
|
+
const withToken2022Metadata = withMetadata && baseTokenProgram === chunkU6B52TBT_cjs.TOKEN_2022_PROGRAM_ADDRESS;
|
|
5158
5332
|
if (withMetadata && !metadataAccount) {
|
|
5159
5333
|
throw new Error(
|
|
5160
5334
|
"metadataName is set but metadataAccount was not provided. Derive it with await initializer.getTokenMetadataAddress(baseMintAddress)."
|
|
@@ -5214,6 +5388,12 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5214
5388
|
const data = new Uint8Array(
|
|
5215
5389
|
getInitializeLaunchInstructionDataEncoder().encode(encoderArgs)
|
|
5216
5390
|
);
|
|
5391
|
+
if (withToken2022Metadata) {
|
|
5392
|
+
keys.push({
|
|
5393
|
+
address: chunkU6B52TBT_cjs.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
5394
|
+
role: kit.AccountRole.READONLY
|
|
5395
|
+
});
|
|
5396
|
+
}
|
|
5217
5397
|
keys.push(
|
|
5218
5398
|
...hookCreateRemainingAccounts.map(
|
|
5219
5399
|
(account) => createAccountMeta(
|
|
@@ -5293,10 +5473,10 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
5293
5473
|
baseMint,
|
|
5294
5474
|
quoteMint,
|
|
5295
5475
|
user,
|
|
5296
|
-
hookProgram =
|
|
5476
|
+
hookProgram = chunkU6B52TBT_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5297
5477
|
launchFeeState,
|
|
5298
|
-
baseTokenProgram =
|
|
5299
|
-
quoteTokenProgram =
|
|
5478
|
+
baseTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5479
|
+
quoteTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5300
5480
|
remainingAccounts = []
|
|
5301
5481
|
} = accounts;
|
|
5302
5482
|
const keys = [
|
|
@@ -5344,9 +5524,9 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
5344
5524
|
launchFeeState,
|
|
5345
5525
|
migratorProgram,
|
|
5346
5526
|
payer,
|
|
5347
|
-
baseTokenProgram =
|
|
5348
|
-
quoteTokenProgram =
|
|
5349
|
-
systemProgram =
|
|
5527
|
+
baseTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5528
|
+
quoteTokenProgram = chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5529
|
+
systemProgram = chunkU6B52TBT_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5350
5530
|
rent
|
|
5351
5531
|
} = accounts;
|
|
5352
5532
|
const keys = [
|
|
@@ -5365,7 +5545,7 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
5365
5545
|
{ address: systemProgram, role: kit.AccountRole.READONLY },
|
|
5366
5546
|
{ address: rent, role: kit.AccountRole.READONLY }
|
|
5367
5547
|
];
|
|
5368
|
-
const data =
|
|
5548
|
+
const data = chunkXTL2GBZ4_cjs.encodeInstructionData(
|
|
5369
5549
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.migrateLaunch
|
|
5370
5550
|
);
|
|
5371
5551
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -5431,7 +5611,7 @@ function createPreviewMigrationInstruction(accounts, programId = INITIALIZER_PRO
|
|
|
5431
5611
|
{ address: baseVault, role: kit.AccountRole.READONLY },
|
|
5432
5612
|
{ address: quoteVault, role: kit.AccountRole.READONLY }
|
|
5433
5613
|
];
|
|
5434
|
-
const data =
|
|
5614
|
+
const data = chunkXTL2GBZ4_cjs.encodeInstructionData(
|
|
5435
5615
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.previewMigration
|
|
5436
5616
|
);
|
|
5437
5617
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -5439,213 +5619,6 @@ function createPreviewMigrationInstruction(accounts, programId = INITIALIZER_PRO
|
|
|
5439
5619
|
function decodePreviewMigrationResult(data) {
|
|
5440
5620
|
return previewMigrationResultCodec.decode(data);
|
|
5441
5621
|
}
|
|
5442
|
-
var DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND = 20;
|
|
5443
|
-
function getInstructionLookupTableAddresses(instructions) {
|
|
5444
|
-
const seen = /* @__PURE__ */ new Set();
|
|
5445
|
-
const addresses = [];
|
|
5446
|
-
for (const instruction of Array.isArray(instructions) ? instructions : [instructions]) {
|
|
5447
|
-
for (const account of instruction.accounts ?? []) {
|
|
5448
|
-
if ("signer" in account || account.role === kit.AccountRole.READONLY_SIGNER || account.role === kit.AccountRole.WRITABLE_SIGNER) {
|
|
5449
|
-
continue;
|
|
5450
|
-
}
|
|
5451
|
-
if (!seen.has(account.address)) {
|
|
5452
|
-
seen.add(account.address);
|
|
5453
|
-
addresses.push(account.address);
|
|
5454
|
-
}
|
|
5455
|
-
}
|
|
5456
|
-
}
|
|
5457
|
-
return addresses;
|
|
5458
|
-
}
|
|
5459
|
-
async function buildAddressLookupTableSetupInstructions({
|
|
5460
|
-
authority,
|
|
5461
|
-
payer,
|
|
5462
|
-
recentSlot,
|
|
5463
|
-
addresses,
|
|
5464
|
-
addressesPerExtendInstruction = DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND
|
|
5465
|
-
}) {
|
|
5466
|
-
if (addressesPerExtendInstruction <= 0) {
|
|
5467
|
-
throw new Error("addressesPerExtendInstruction must be greater than zero");
|
|
5468
|
-
}
|
|
5469
|
-
const dedupedAddresses = [...new Set(addresses)];
|
|
5470
|
-
const lookupTablePda = await addressLookupTable.findAddressLookupTablePda({
|
|
5471
|
-
authority: authority.address,
|
|
5472
|
-
recentSlot
|
|
5473
|
-
});
|
|
5474
|
-
const [lookupTableAddress] = lookupTablePda;
|
|
5475
|
-
const createInstruction = addressLookupTable.getCreateLookupTableInstruction({
|
|
5476
|
-
address: lookupTablePda,
|
|
5477
|
-
authority: authority.address,
|
|
5478
|
-
payer,
|
|
5479
|
-
recentSlot
|
|
5480
|
-
});
|
|
5481
|
-
const extendInstructions = [];
|
|
5482
|
-
for (let start = 0; start < dedupedAddresses.length; start += addressesPerExtendInstruction) {
|
|
5483
|
-
extendInstructions.push(
|
|
5484
|
-
addressLookupTable.getExtendLookupTableInstruction({
|
|
5485
|
-
address: lookupTableAddress,
|
|
5486
|
-
authority,
|
|
5487
|
-
payer,
|
|
5488
|
-
addresses: dedupedAddresses.slice(
|
|
5489
|
-
start,
|
|
5490
|
-
start + addressesPerExtendInstruction
|
|
5491
|
-
)
|
|
5492
|
-
})
|
|
5493
|
-
);
|
|
5494
|
-
}
|
|
5495
|
-
return {
|
|
5496
|
-
lookupTableAddress,
|
|
5497
|
-
createInstruction,
|
|
5498
|
-
extendInstructions,
|
|
5499
|
-
addresses: dedupedAddresses
|
|
5500
|
-
};
|
|
5501
|
-
}
|
|
5502
|
-
function compressTransactionMessageWithLookupTable(transactionMessage, {
|
|
5503
|
-
lookupTableAddress,
|
|
5504
|
-
addresses
|
|
5505
|
-
}) {
|
|
5506
|
-
return kit.compressTransactionMessageUsingAddressLookupTables(
|
|
5507
|
-
transactionMessage,
|
|
5508
|
-
{
|
|
5509
|
-
[lookupTableAddress]: [...addresses]
|
|
5510
|
-
}
|
|
5511
|
-
);
|
|
5512
|
-
}
|
|
5513
|
-
var SOLANA_TRANSACTION_SIZE_LIMIT = 1232;
|
|
5514
|
-
function measureTransactionMessageSize(transactionMessage) {
|
|
5515
|
-
const size = kit.getTransactionMessageSize(transactionMessage);
|
|
5516
|
-
const overBy = Math.max(0, size - SOLANA_TRANSACTION_SIZE_LIMIT);
|
|
5517
|
-
return {
|
|
5518
|
-
size,
|
|
5519
|
-
limit: SOLANA_TRANSACTION_SIZE_LIMIT,
|
|
5520
|
-
overBy,
|
|
5521
|
-
fits: overBy === 0
|
|
5522
|
-
};
|
|
5523
|
-
}
|
|
5524
|
-
function measureTransactionMessageSizeWithLookupTable(transactionMessage, lookupTable) {
|
|
5525
|
-
return measureTransactionMessageSize(
|
|
5526
|
-
compressTransactionMessageWithLookupTable(transactionMessage, lookupTable)
|
|
5527
|
-
);
|
|
5528
|
-
}
|
|
5529
|
-
function assertTransactionMessageFits(transactionMessage, { label = "Transaction", metadataBytes } = {}) {
|
|
5530
|
-
const report = measureTransactionMessageSize(transactionMessage);
|
|
5531
|
-
if (report.fits) {
|
|
5532
|
-
return report;
|
|
5533
|
-
}
|
|
5534
|
-
const metadataHint = metadataBytes && metadataBytes > 0 ? ` Metadata contributes ${metadataBytes} instruction-data bytes; address lookup tables do not compress metadata strings.` : "";
|
|
5535
|
-
throw new Error(
|
|
5536
|
-
`${label} is ${report.size} bytes, exceeding Solana's ${report.limit}-byte transaction limit by ${report.overBy} bytes.${metadataHint}`
|
|
5537
|
-
);
|
|
5538
|
-
}
|
|
5539
|
-
function assertTransactionMessageFitsWithLookupTable(transactionMessage, lookupTable, options = {}) {
|
|
5540
|
-
const compressedMessage = compressTransactionMessageWithLookupTable(
|
|
5541
|
-
transactionMessage,
|
|
5542
|
-
lookupTable
|
|
5543
|
-
);
|
|
5544
|
-
return assertTransactionMessageFits(compressedMessage, options);
|
|
5545
|
-
}
|
|
5546
|
-
var addressCodec5 = kit.getAddressCodec();
|
|
5547
|
-
function bytesToBase64(bytes) {
|
|
5548
|
-
let binary = "";
|
|
5549
|
-
for (let i = 0; i < bytes.length; i++) {
|
|
5550
|
-
binary += String.fromCharCode(bytes[i]);
|
|
5551
|
-
}
|
|
5552
|
-
return btoa(binary);
|
|
5553
|
-
}
|
|
5554
|
-
function base64ToBytes2(base64) {
|
|
5555
|
-
const binary = atob(base64);
|
|
5556
|
-
const bytes = new Uint8Array(binary.length);
|
|
5557
|
-
for (let i = 0; i < binary.length; i++) {
|
|
5558
|
-
bytes[i] = binary.charCodeAt(i);
|
|
5559
|
-
}
|
|
5560
|
-
return bytes;
|
|
5561
|
-
}
|
|
5562
|
-
async function fetchLaunch2(rpc, address3, config) {
|
|
5563
|
-
const response = await rpc.getAccountInfo(address3, {
|
|
5564
|
-
encoding: "base64",
|
|
5565
|
-
commitment: config?.commitment
|
|
5566
|
-
}).send();
|
|
5567
|
-
if (!response.value) {
|
|
5568
|
-
return null;
|
|
5569
|
-
}
|
|
5570
|
-
return getLaunchDecoder().decode(base64ToBytes2(response.value.data[0]));
|
|
5571
|
-
}
|
|
5572
|
-
async function fetchAllLaunches(rpc, config) {
|
|
5573
|
-
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
5574
|
-
const discriminatorFilter = {
|
|
5575
|
-
memcmp: {
|
|
5576
|
-
offset: 0n,
|
|
5577
|
-
bytes: bytesToBase64(
|
|
5578
|
-
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
5579
|
-
),
|
|
5580
|
-
encoding: "base64"
|
|
5581
|
-
}
|
|
5582
|
-
};
|
|
5583
|
-
const response = await rpc.getProgramAccounts(programId, {
|
|
5584
|
-
encoding: "base64",
|
|
5585
|
-
commitment: config?.commitment,
|
|
5586
|
-
filters: [discriminatorFilter]
|
|
5587
|
-
}).send();
|
|
5588
|
-
const accounts = Array.isArray(response) ? response : response.value;
|
|
5589
|
-
const launches = [];
|
|
5590
|
-
const decoder = getLaunchDecoder();
|
|
5591
|
-
for (const account of accounts) {
|
|
5592
|
-
try {
|
|
5593
|
-
const launch = decoder.decode(base64ToBytes2(account.account.data[0]));
|
|
5594
|
-
launches.push({ address: account.pubkey, account: launch });
|
|
5595
|
-
} catch {
|
|
5596
|
-
console.warn(`Failed to decode launch account: ${account.pubkey}`);
|
|
5597
|
-
}
|
|
5598
|
-
}
|
|
5599
|
-
return launches;
|
|
5600
|
-
}
|
|
5601
|
-
async function fetchLaunchesByAuthority(rpc, authority, config) {
|
|
5602
|
-
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
5603
|
-
const discriminatorFilter = {
|
|
5604
|
-
memcmp: {
|
|
5605
|
-
offset: 0n,
|
|
5606
|
-
bytes: bytesToBase64(
|
|
5607
|
-
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
5608
|
-
),
|
|
5609
|
-
encoding: "base64"
|
|
5610
|
-
}
|
|
5611
|
-
};
|
|
5612
|
-
const authorityFilter = {
|
|
5613
|
-
memcmp: {
|
|
5614
|
-
offset: 8n,
|
|
5615
|
-
bytes: bytesToBase64(
|
|
5616
|
-
addressCodec5.encode(authority)
|
|
5617
|
-
),
|
|
5618
|
-
encoding: "base64"
|
|
5619
|
-
}
|
|
5620
|
-
};
|
|
5621
|
-
const response = await rpc.getProgramAccounts(programId, {
|
|
5622
|
-
encoding: "base64",
|
|
5623
|
-
commitment: config?.commitment,
|
|
5624
|
-
filters: [discriminatorFilter, authorityFilter]
|
|
5625
|
-
}).send();
|
|
5626
|
-
const accounts = Array.isArray(response) ? response : response.value;
|
|
5627
|
-
const launches = [];
|
|
5628
|
-
const decoder = getLaunchDecoder();
|
|
5629
|
-
for (const account of accounts) {
|
|
5630
|
-
try {
|
|
5631
|
-
const launch = decoder.decode(base64ToBytes2(account.account.data[0]));
|
|
5632
|
-
launches.push({ address: account.pubkey, account: launch });
|
|
5633
|
-
} catch {
|
|
5634
|
-
console.warn(`Failed to decode launch account: ${account.pubkey}`);
|
|
5635
|
-
}
|
|
5636
|
-
}
|
|
5637
|
-
return launches;
|
|
5638
|
-
}
|
|
5639
|
-
async function launchExists(rpc, namespace, launchId, config) {
|
|
5640
|
-
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
5641
|
-
const [launchAddress] = await getLaunchAddress(
|
|
5642
|
-
namespace,
|
|
5643
|
-
launchId,
|
|
5644
|
-
programId
|
|
5645
|
-
);
|
|
5646
|
-
const launch = await fetchLaunch2(rpc, launchAddress, config);
|
|
5647
|
-
return launch !== null;
|
|
5648
|
-
}
|
|
5649
5622
|
|
|
5650
5623
|
// src/solana/migrators/cpmmMigrator/index.ts
|
|
5651
5624
|
var cpmmMigrator_exports = {};
|
|
@@ -5814,7 +5787,7 @@ function getCpmmMigratorStateCodec() {
|
|
|
5814
5787
|
if (process.env.NODE_ENV !== "production") ;
|
|
5815
5788
|
|
|
5816
5789
|
// src/solana/migrators/cpmmMigrator/client.ts
|
|
5817
|
-
function
|
|
5790
|
+
function base64ToBytes2(base64) {
|
|
5818
5791
|
const binary = atob(base64);
|
|
5819
5792
|
const bytes = new Uint8Array(binary.length);
|
|
5820
5793
|
for (let i = 0; i < binary.length; i++) {
|
|
@@ -5822,11 +5795,11 @@ function base64ToBytes3(base64) {
|
|
|
5822
5795
|
}
|
|
5823
5796
|
return bytes;
|
|
5824
5797
|
}
|
|
5825
|
-
async function fetchCpmmMigratorState(rpc,
|
|
5826
|
-
const response = await rpc.getAccountInfo(
|
|
5798
|
+
async function fetchCpmmMigratorState(rpc, address4) {
|
|
5799
|
+
const response = await rpc.getAccountInfo(address4, { encoding: "base64" }).send();
|
|
5827
5800
|
if (!response.value) return null;
|
|
5828
5801
|
return getCpmmMigratorStateDecoder().decode(
|
|
5829
|
-
|
|
5802
|
+
base64ToBytes2(response.value.data[0])
|
|
5830
5803
|
);
|
|
5831
5804
|
}
|
|
5832
5805
|
async function buildCpmmMigrationRemainingAccounts({
|
|
@@ -5837,7 +5810,7 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
5837
5810
|
adminBaseAta,
|
|
5838
5811
|
adminQuoteAta,
|
|
5839
5812
|
recipientAtas,
|
|
5840
|
-
cpmmProgram =
|
|
5813
|
+
cpmmProgram = chunkU6B52TBT_cjs.CPMM_PROGRAM_ID,
|
|
5841
5814
|
cpmmMigratorProgram = CPMM_MIGRATOR_PROGRAM_ID
|
|
5842
5815
|
}) {
|
|
5843
5816
|
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
@@ -5845,9 +5818,9 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
5845
5818
|
cpmmMigratorProgram
|
|
5846
5819
|
);
|
|
5847
5820
|
const [migrationAuthority] = await getCpmmMigrationAuthorityAddress(cpmmMigratorProgram);
|
|
5848
|
-
const poolInit = await
|
|
5821
|
+
const poolInit = await chunkU6B52TBT_cjs.getPoolInitAddresses(baseMint, quoteMint, cpmmProgram);
|
|
5849
5822
|
const pool = poolInit.pool[0];
|
|
5850
|
-
const [launchLpPosition] = await
|
|
5823
|
+
const [launchLpPosition] = await chunkU6B52TBT_cjs.getPositionAddress(
|
|
5851
5824
|
pool,
|
|
5852
5825
|
launchAuthority,
|
|
5853
5826
|
0n,
|
|
@@ -5886,13 +5859,16 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
5886
5859
|
{ address: migrationAuthority, role: kit.AccountRole.READONLY },
|
|
5887
5860
|
{ address: adminBaseAta, role: kit.AccountRole.WRITABLE },
|
|
5888
5861
|
{ address: adminQuoteAta, role: kit.AccountRole.WRITABLE },
|
|
5889
|
-
...recipientAtas.map((
|
|
5890
|
-
address:
|
|
5862
|
+
...recipientAtas.map((address4) => ({
|
|
5863
|
+
address: address4,
|
|
5891
5864
|
role: kit.AccountRole.WRITABLE
|
|
5892
5865
|
}))
|
|
5893
5866
|
],
|
|
5894
5867
|
cpmmMigrationState,
|
|
5895
5868
|
cpmmConfig: poolInit.config[0],
|
|
5869
|
+
adminBaseAta,
|
|
5870
|
+
adminQuoteAta,
|
|
5871
|
+
recipientAtas,
|
|
5896
5872
|
pool,
|
|
5897
5873
|
poolAuthority: poolInit.authority[0],
|
|
5898
5874
|
poolVault0: poolInit.vault0[0],
|
|
@@ -5923,6 +5899,590 @@ function encodeMigratePayload(args) {
|
|
|
5923
5899
|
]);
|
|
5924
5900
|
}
|
|
5925
5901
|
|
|
5902
|
+
// src/solana/initializer/createLaunch.ts
|
|
5903
|
+
var DEFAULT_CPMM_MIGRATION_FEE_SPLIT_BPS = 1e4;
|
|
5904
|
+
var launchIdCounter = 0n;
|
|
5905
|
+
var launchTokenPrograms = {
|
|
5906
|
+
splToken() {
|
|
5907
|
+
return {
|
|
5908
|
+
baseTokenProgram: chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5909
|
+
quoteTokenProgram: chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS
|
|
5910
|
+
};
|
|
5911
|
+
},
|
|
5912
|
+
token2022Base() {
|
|
5913
|
+
return {
|
|
5914
|
+
baseTokenProgram: chunkU6B52TBT_cjs.TOKEN_2022_PROGRAM_ADDRESS,
|
|
5915
|
+
quoteTokenProgram: chunkU6B52TBT_cjs.TOKEN_PROGRAM_ADDRESS
|
|
5916
|
+
};
|
|
5917
|
+
}
|
|
5918
|
+
};
|
|
5919
|
+
function createLaunchId() {
|
|
5920
|
+
const bytes = new Uint8Array(32);
|
|
5921
|
+
const view = new DataView(bytes.buffer);
|
|
5922
|
+
view.setBigUint64(0, BigInt(Date.now()), true);
|
|
5923
|
+
view.setBigUint64(8, launchIdCounter, true);
|
|
5924
|
+
launchIdCounter += 1n;
|
|
5925
|
+
bytes.set([68, 79, 80, 76], 28);
|
|
5926
|
+
return bytes;
|
|
5927
|
+
}
|
|
5928
|
+
function isTransactionSigner9(value) {
|
|
5929
|
+
return typeof value === "object" && value !== null && "address" in value && "signTransactions" in value;
|
|
5930
|
+
}
|
|
5931
|
+
function getAccountAddress(account) {
|
|
5932
|
+
if (typeof account === "string") {
|
|
5933
|
+
return account;
|
|
5934
|
+
}
|
|
5935
|
+
return account.address;
|
|
5936
|
+
}
|
|
5937
|
+
function getSignerAddress(value) {
|
|
5938
|
+
return isTransactionSigner9(value) ? value.address : value;
|
|
5939
|
+
}
|
|
5940
|
+
function getRemainingAccountMeta(account) {
|
|
5941
|
+
if (typeof account === "string") {
|
|
5942
|
+
return { address: account, role: kit.AccountRole.READONLY };
|
|
5943
|
+
}
|
|
5944
|
+
if (isTransactionSigner9(account)) {
|
|
5945
|
+
return {
|
|
5946
|
+
address: account.address,
|
|
5947
|
+
role: kit.AccountRole.READONLY_SIGNER,
|
|
5948
|
+
signer: account
|
|
5949
|
+
};
|
|
5950
|
+
}
|
|
5951
|
+
return account;
|
|
5952
|
+
}
|
|
5953
|
+
function hasMetadata(metadata) {
|
|
5954
|
+
return Boolean(metadata?.metadataName);
|
|
5955
|
+
}
|
|
5956
|
+
function getInitializerProgramId(input) {
|
|
5957
|
+
return input.programId ?? input.deployment?.initializerProgram ?? INITIALIZER_PROGRAM_ID;
|
|
5958
|
+
}
|
|
5959
|
+
function getInitializerConfig(input) {
|
|
5960
|
+
return input.config ?? input.deployment?.initializerConfig;
|
|
5961
|
+
}
|
|
5962
|
+
function hashRemainingAccounts(accounts) {
|
|
5963
|
+
if (!accounts) {
|
|
5964
|
+
return void 0;
|
|
5965
|
+
}
|
|
5966
|
+
return computeRemainingAccountsHash(accounts.map(getAccountAddress));
|
|
5967
|
+
}
|
|
5968
|
+
function isCustomMigrationConfig(migration) {
|
|
5969
|
+
return migration.kind === "custom";
|
|
5970
|
+
}
|
|
5971
|
+
function getCreateLaunchHookMode(input) {
|
|
5972
|
+
if (input.hook !== void 0 && input.hook !== null) {
|
|
5973
|
+
return input.hook;
|
|
5974
|
+
}
|
|
5975
|
+
return input.cosigner ? "cosigner" : "cpmm";
|
|
5976
|
+
}
|
|
5977
|
+
async function getCreateLaunchHookContext(input) {
|
|
5978
|
+
const mode = getCreateLaunchHookMode(input);
|
|
5979
|
+
if (mode !== "cosigner") {
|
|
5980
|
+
return { mode };
|
|
5981
|
+
}
|
|
5982
|
+
const [cosignerConfig] = await getCosignerHookConfigAddress(
|
|
5983
|
+
input.deployment?.cosignerHookProgram ?? DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID
|
|
5984
|
+
);
|
|
5985
|
+
return { mode, cosignerConfig };
|
|
5986
|
+
}
|
|
5987
|
+
function getCosignerHookRemainingAccounts2({
|
|
5988
|
+
namespace,
|
|
5989
|
+
cosigner,
|
|
5990
|
+
cosignerConfig
|
|
5991
|
+
}) {
|
|
5992
|
+
const accounts = namespace === cosignerConfig ? [cosignerConfig] : [namespace, cosignerConfig];
|
|
5993
|
+
accounts.push(cosigner);
|
|
5994
|
+
return accounts;
|
|
5995
|
+
}
|
|
5996
|
+
function resolveCosignerHookPayload(input) {
|
|
5997
|
+
if (input.cosignGateExpiresAt === void 0 || input.cosignGateExpiresAt === null) {
|
|
5998
|
+
return new Uint8Array();
|
|
5999
|
+
}
|
|
6000
|
+
if (!input.cosigner) {
|
|
6001
|
+
throw new Error("cosigner is required when cosignGateExpiresAt is set");
|
|
6002
|
+
}
|
|
6003
|
+
return encodeCosignerGateExpiryPayload({
|
|
6004
|
+
mode: GATE_EXPIRY_UNIX_TIMESTAMP,
|
|
6005
|
+
value: input.cosignGateExpiresAt,
|
|
6006
|
+
cosigner: getSignerAddress(input.cosigner)
|
|
6007
|
+
});
|
|
6008
|
+
}
|
|
6009
|
+
function resolveCreateLaunchHook({
|
|
6010
|
+
input,
|
|
6011
|
+
namespace,
|
|
6012
|
+
hookContext
|
|
6013
|
+
}) {
|
|
6014
|
+
if (hookContext.mode === false) {
|
|
6015
|
+
return {
|
|
6016
|
+
flags: 0,
|
|
6017
|
+
remainingAccountsHash: EMPTY_REMAINING_ACCOUNTS_HASH
|
|
6018
|
+
};
|
|
6019
|
+
}
|
|
6020
|
+
if (hookContext.mode === "cosigner") {
|
|
6021
|
+
if (!input.cosigner) {
|
|
6022
|
+
throw new Error('cosigner is required when hook is "cosigner"');
|
|
6023
|
+
}
|
|
6024
|
+
if (!hookContext.cosignerConfig) {
|
|
6025
|
+
throw new Error("cosigner hook config could not be derived");
|
|
6026
|
+
}
|
|
6027
|
+
const remainingAccounts = getCosignerHookRemainingAccounts2({
|
|
6028
|
+
namespace,
|
|
6029
|
+
cosigner: input.cosigner,
|
|
6030
|
+
cosignerConfig: hookContext.cosignerConfig
|
|
6031
|
+
});
|
|
6032
|
+
return {
|
|
6033
|
+
program: input.deployment?.cosignerHookProgram ?? DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID,
|
|
6034
|
+
flags: HF_BEFORE_SWAP2 | HF_FORWARD_READONLY_SIGNERS2,
|
|
6035
|
+
payload: resolveCosignerHookPayload(input),
|
|
6036
|
+
remainingAccounts,
|
|
6037
|
+
remainingAccountsHash: hashRemainingAccounts(remainingAccounts) ?? EMPTY_REMAINING_ACCOUNTS_HASH
|
|
6038
|
+
};
|
|
6039
|
+
}
|
|
6040
|
+
return {
|
|
6041
|
+
program: input.deployment?.cpmmHookProgram ?? CPMM_HOOK_PROGRAM_ID,
|
|
6042
|
+
flags: HF_BEFORE_SWAP2,
|
|
6043
|
+
payload: new Uint8Array(),
|
|
6044
|
+
remainingAccountsHash: EMPTY_REMAINING_ACCOUNTS_HASH
|
|
6045
|
+
};
|
|
6046
|
+
}
|
|
6047
|
+
async function getAssociatedTokenAddress({
|
|
6048
|
+
owner,
|
|
6049
|
+
mint,
|
|
6050
|
+
tokenProgram
|
|
6051
|
+
}) {
|
|
6052
|
+
const [ata] = await token.findAssociatedTokenPda({
|
|
6053
|
+
owner,
|
|
6054
|
+
mint,
|
|
6055
|
+
tokenProgram
|
|
6056
|
+
});
|
|
6057
|
+
return ata;
|
|
6058
|
+
}
|
|
6059
|
+
async function resolveCreateLaunchMigration({
|
|
6060
|
+
addresses,
|
|
6061
|
+
input,
|
|
6062
|
+
tokenPrograms
|
|
6063
|
+
}) {
|
|
6064
|
+
const migration = input.migration === void 0 ? true : input.migration;
|
|
6065
|
+
if (migration === false || migration === null) {
|
|
6066
|
+
return null;
|
|
6067
|
+
}
|
|
6068
|
+
const cpmmMigratorProgram = input.deployment?.cpmmMigratorProgram ?? CPMM_MIGRATOR_PROGRAM_ID;
|
|
6069
|
+
if (migration !== true && isCustomMigrationConfig(migration)) {
|
|
6070
|
+
if (!migration.program) {
|
|
6071
|
+
throw new Error("custom launch migration requires a migrator program");
|
|
6072
|
+
}
|
|
6073
|
+
return migration;
|
|
6074
|
+
}
|
|
6075
|
+
const cpmmMigration = migration === true ? {} : migration;
|
|
6076
|
+
const admin = cpmmMigration.admin ?? getSignerAddress(input.payer);
|
|
6077
|
+
const baseMint = getSignerAddress(input.launchAccounts.baseMint);
|
|
6078
|
+
const adminBaseAta = cpmmMigration.adminBaseAta ?? await getAssociatedTokenAddress({
|
|
6079
|
+
owner: admin,
|
|
6080
|
+
mint: baseMint,
|
|
6081
|
+
tokenProgram: tokenPrograms.baseTokenProgram
|
|
6082
|
+
});
|
|
6083
|
+
const adminQuoteAta = cpmmMigration.adminQuoteAta ?? await getAssociatedTokenAddress({
|
|
6084
|
+
owner: admin,
|
|
6085
|
+
mint: input.launchAccounts.quoteMint,
|
|
6086
|
+
tokenProgram: tokenPrograms.quoteTokenProgram
|
|
6087
|
+
});
|
|
6088
|
+
const recipients = [...cpmmMigration.recipients ?? []];
|
|
6089
|
+
const recipientAtas = cpmmMigration.recipientAtas ?? await Promise.all(
|
|
6090
|
+
recipients.map(
|
|
6091
|
+
({ wallet }) => getAssociatedTokenAddress({
|
|
6092
|
+
owner: wallet,
|
|
6093
|
+
mint: baseMint,
|
|
6094
|
+
tokenProgram: tokenPrograms.baseTokenProgram
|
|
6095
|
+
})
|
|
6096
|
+
)
|
|
6097
|
+
);
|
|
6098
|
+
const migrationAccounts = await buildCpmmMigrationRemainingAccounts({
|
|
6099
|
+
launch: addresses.launch,
|
|
6100
|
+
baseMint,
|
|
6101
|
+
quoteMint: input.launchAccounts.quoteMint,
|
|
6102
|
+
launchAuthority: addresses.launchAuthority,
|
|
6103
|
+
adminBaseAta,
|
|
6104
|
+
adminQuoteAta,
|
|
6105
|
+
recipientAtas: [...recipientAtas],
|
|
6106
|
+
cpmmProgram: cpmmMigration.cpmmProgram ?? input.deployment?.cpmmProgram,
|
|
6107
|
+
cpmmMigratorProgram: cpmmMigration.program ?? cpmmMigratorProgram
|
|
6108
|
+
});
|
|
6109
|
+
const initPayload = encodeRegisterLaunchPayload({
|
|
6110
|
+
cpmmConfig: migrationAccounts.cpmmConfig,
|
|
6111
|
+
initialSwapFeeBps: cpmmMigration.initialSwapFeeBps ?? input.curve.swapFeeBps,
|
|
6112
|
+
initialFeeSplitBps: cpmmMigration.initialFeeSplitBps ?? DEFAULT_CPMM_MIGRATION_FEE_SPLIT_BPS,
|
|
6113
|
+
recipients,
|
|
6114
|
+
minRaiseQuote: cpmmMigration.minRaiseQuote ?? 0n,
|
|
6115
|
+
minMigrationPriceQ64Opt: cpmmMigration.minMigrationPriceQ64Opt ?? null,
|
|
6116
|
+
migratedPoolHookConfig: cpmmMigration.migratedPoolHookConfig ?? null
|
|
6117
|
+
});
|
|
6118
|
+
const migratePayload = encodeMigratePayload({
|
|
6119
|
+
baseForDistribution: cpmmMigration.baseForDistribution ?? input.supply.baseForDistribution,
|
|
6120
|
+
baseForLiquidity: cpmmMigration.baseForLiquidity ?? input.supply.baseForLiquidity
|
|
6121
|
+
});
|
|
6122
|
+
return {
|
|
6123
|
+
program: cpmmMigration.program ?? cpmmMigratorProgram,
|
|
6124
|
+
initPayload,
|
|
6125
|
+
migratePayload,
|
|
6126
|
+
cpmmConfig: migrationAccounts.cpmmConfig,
|
|
6127
|
+
remainingAccounts: migrationAccounts.addresses,
|
|
6128
|
+
remainingAccountsHash: migrationAccounts.hash,
|
|
6129
|
+
cpmmMigration: migrationAccounts
|
|
6130
|
+
};
|
|
6131
|
+
}
|
|
6132
|
+
async function deriveCreateLaunchAddresses(input) {
|
|
6133
|
+
const programId = input.programId ?? input.deployment?.initializerProgram ?? INITIALIZER_PROGRAM_ID;
|
|
6134
|
+
const config = input.config ?? input.deployment?.initializerConfig ?? (await getConfigAddress2(programId))[0];
|
|
6135
|
+
const [launch] = await getLaunchAddress(
|
|
6136
|
+
input.namespace,
|
|
6137
|
+
input.launchId,
|
|
6138
|
+
programId
|
|
6139
|
+
);
|
|
6140
|
+
const [launchAuthority] = await getLaunchAuthorityAddress(launch, programId);
|
|
6141
|
+
const [launchFeeState] = await getLaunchFeeStateAddress(launch, programId);
|
|
6142
|
+
const metadataAccount = hasMetadata(input.metadata) ? input.metadataAccount ?? await getTokenMetadataAddress(getSignerAddress(input.baseMint)) : input.metadataAccount;
|
|
6143
|
+
return {
|
|
6144
|
+
config,
|
|
6145
|
+
launch,
|
|
6146
|
+
launchAuthority,
|
|
6147
|
+
launchFeeState,
|
|
6148
|
+
metadataAccount
|
|
6149
|
+
};
|
|
6150
|
+
}
|
|
6151
|
+
async function getMigrationInitRemainingAccountsHash({
|
|
6152
|
+
launch,
|
|
6153
|
+
migration
|
|
6154
|
+
}) {
|
|
6155
|
+
if (!migration) {
|
|
6156
|
+
return EMPTY_REMAINING_ACCOUNTS_HASH;
|
|
6157
|
+
}
|
|
6158
|
+
if (migration.initRemainingAccountsHash) {
|
|
6159
|
+
return migration.initRemainingAccountsHash;
|
|
6160
|
+
}
|
|
6161
|
+
const initHash = hashRemainingAccounts(migration.initRemainingAccounts);
|
|
6162
|
+
if (initHash) {
|
|
6163
|
+
return initHash;
|
|
6164
|
+
}
|
|
6165
|
+
if (migration.cpmmConfig) {
|
|
6166
|
+
const migratorProgram = migration.program ?? CPMM_MIGRATOR_PROGRAM_ID;
|
|
6167
|
+
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
6168
|
+
launch,
|
|
6169
|
+
migratorProgram
|
|
6170
|
+
);
|
|
6171
|
+
return computeRemainingAccountsHash([
|
|
6172
|
+
cpmmMigrationState,
|
|
6173
|
+
migration.cpmmConfig
|
|
6174
|
+
]);
|
|
6175
|
+
}
|
|
6176
|
+
return EMPTY_REMAINING_ACCOUNTS_HASH;
|
|
6177
|
+
}
|
|
6178
|
+
async function createLaunch(input) {
|
|
6179
|
+
const programId = getInitializerProgramId(input);
|
|
6180
|
+
const launchId = input.launchId ?? createLaunchId();
|
|
6181
|
+
const hookContext = await getCreateLaunchHookContext(input);
|
|
6182
|
+
const namespace = input.namespace ?? hookContext.cosignerConfig ?? getSignerAddress(input.payer);
|
|
6183
|
+
const tokenPrograms = {
|
|
6184
|
+
...launchTokenPrograms.splToken(),
|
|
6185
|
+
...input.tokenPrograms
|
|
6186
|
+
};
|
|
6187
|
+
const addresses = input.addresses ?? await deriveCreateLaunchAddresses({
|
|
6188
|
+
deployment: input.deployment,
|
|
6189
|
+
programId,
|
|
6190
|
+
config: getInitializerConfig(input),
|
|
6191
|
+
namespace,
|
|
6192
|
+
launchId,
|
|
6193
|
+
baseMint: input.launchAccounts.baseMint,
|
|
6194
|
+
metadata: input.metadata
|
|
6195
|
+
});
|
|
6196
|
+
const migration = await resolveCreateLaunchMigration({
|
|
6197
|
+
addresses,
|
|
6198
|
+
input,
|
|
6199
|
+
tokenPrograms
|
|
6200
|
+
});
|
|
6201
|
+
const hook = resolveCreateLaunchHook({
|
|
6202
|
+
input,
|
|
6203
|
+
namespace,
|
|
6204
|
+
hookContext
|
|
6205
|
+
});
|
|
6206
|
+
const migratorInitRemainingAccountsHash = await getMigrationInitRemainingAccountsHash({
|
|
6207
|
+
launch: addresses.launch,
|
|
6208
|
+
migration
|
|
6209
|
+
});
|
|
6210
|
+
const migratorRemainingAccountsHash = migration?.remainingAccountsHash ?? hashRemainingAccounts(migration?.remainingAccounts) ?? EMPTY_REMAINING_ACCOUNTS_HASH;
|
|
6211
|
+
const instruction = await createInitializeLaunchInstruction(
|
|
6212
|
+
{
|
|
6213
|
+
config: addresses.config,
|
|
6214
|
+
launch: addresses.launch,
|
|
6215
|
+
launchAuthority: addresses.launchAuthority,
|
|
6216
|
+
baseMint: input.launchAccounts.baseMint,
|
|
6217
|
+
quoteMint: input.launchAccounts.quoteMint,
|
|
6218
|
+
baseVault: input.launchAccounts.baseVault,
|
|
6219
|
+
quoteVault: input.launchAccounts.quoteVault,
|
|
6220
|
+
launchFeeState: addresses.launchFeeState,
|
|
6221
|
+
payer: input.payer,
|
|
6222
|
+
authority: input.authority,
|
|
6223
|
+
hookProgram: hook.program,
|
|
6224
|
+
migratorProgram: migration?.program,
|
|
6225
|
+
cpmmConfig: migration?.cpmmConfig,
|
|
6226
|
+
baseTokenProgram: tokenPrograms.baseTokenProgram,
|
|
6227
|
+
quoteTokenProgram: tokenPrograms.quoteTokenProgram,
|
|
6228
|
+
systemProgram: input.systemProgram ?? chunkU6B52TBT_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
6229
|
+
rent: input.rent ?? chunkU6B52TBT_cjs.SYSVAR_RENT_ADDRESS,
|
|
6230
|
+
metadataAccount: addresses.metadataAccount,
|
|
6231
|
+
metadataProgram: input.metadataProgram ?? chunkU6B52TBT_cjs.TOKEN_METADATA_PROGRAM_ID
|
|
6232
|
+
},
|
|
6233
|
+
{
|
|
6234
|
+
namespace,
|
|
6235
|
+
launchId,
|
|
6236
|
+
baseDecimals: input.supply.baseDecimals,
|
|
6237
|
+
baseTotalSupply: input.supply.baseTotalSupply,
|
|
6238
|
+
baseForDistribution: input.supply.baseForDistribution,
|
|
6239
|
+
baseForLiquidity: input.supply.baseForLiquidity,
|
|
6240
|
+
curveVirtualBase: input.curve.curveVirtualBase,
|
|
6241
|
+
curveVirtualQuote: input.curve.curveVirtualQuote,
|
|
6242
|
+
swapFeeBps: input.curve.swapFeeBps,
|
|
6243
|
+
curveKind: CURVE_KIND_XYK,
|
|
6244
|
+
curveParams: new Uint8Array([CURVE_PARAMS_FORMAT_XYK_V0]),
|
|
6245
|
+
allowBuy: input.allowBuy ?? true,
|
|
6246
|
+
allowSell: input.allowSell ?? true,
|
|
6247
|
+
hookFlags: hook.flags,
|
|
6248
|
+
hookPayload: hook.payload ?? new Uint8Array(),
|
|
6249
|
+
migratorInitPayload: migration?.initPayload ?? new Uint8Array(),
|
|
6250
|
+
migratorMigratePayload: migration?.migratePayload ?? new Uint8Array(),
|
|
6251
|
+
hookRemainingAccountsHash: hook.remainingAccountsHash,
|
|
6252
|
+
migratorInitRemainingAccountsHash,
|
|
6253
|
+
migratorRemainingAccountsHash,
|
|
6254
|
+
feeBeneficiaries: input.feeBeneficiaries ?? [],
|
|
6255
|
+
metadataName: input.metadata?.metadataName ?? "",
|
|
6256
|
+
metadataSymbol: input.metadata?.metadataSymbol ?? "",
|
|
6257
|
+
metadataUri: input.metadata?.metadataUri ?? ""
|
|
6258
|
+
},
|
|
6259
|
+
programId
|
|
6260
|
+
);
|
|
6261
|
+
const preparedInstruction = migration?.initRemainingAccounts ? {
|
|
6262
|
+
...instruction,
|
|
6263
|
+
accounts: [
|
|
6264
|
+
...instruction.accounts ?? [],
|
|
6265
|
+
...(migration?.initRemainingAccounts ?? []).map(
|
|
6266
|
+
getRemainingAccountMeta
|
|
6267
|
+
)
|
|
6268
|
+
]
|
|
6269
|
+
} : instruction;
|
|
6270
|
+
return {
|
|
6271
|
+
namespace,
|
|
6272
|
+
launchId,
|
|
6273
|
+
addresses,
|
|
6274
|
+
instruction: preparedInstruction,
|
|
6275
|
+
cpmmMigration: migration?.cpmmMigration
|
|
6276
|
+
};
|
|
6277
|
+
}
|
|
6278
|
+
var DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND = 20;
|
|
6279
|
+
function getInstructionLookupTableAddresses(instructions) {
|
|
6280
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6281
|
+
const addresses = [];
|
|
6282
|
+
for (const instruction of Array.isArray(instructions) ? instructions : [instructions]) {
|
|
6283
|
+
for (const account of instruction.accounts ?? []) {
|
|
6284
|
+
if ("signer" in account || account.role === kit.AccountRole.READONLY_SIGNER || account.role === kit.AccountRole.WRITABLE_SIGNER) {
|
|
6285
|
+
continue;
|
|
6286
|
+
}
|
|
6287
|
+
if (!seen.has(account.address)) {
|
|
6288
|
+
seen.add(account.address);
|
|
6289
|
+
addresses.push(account.address);
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6293
|
+
return addresses;
|
|
6294
|
+
}
|
|
6295
|
+
async function buildAddressLookupTableSetupInstructions({
|
|
6296
|
+
authority,
|
|
6297
|
+
payer,
|
|
6298
|
+
recentSlot,
|
|
6299
|
+
addresses,
|
|
6300
|
+
addressesPerExtendInstruction = DEFAULT_LOOKUP_TABLE_ADDRESSES_PER_EXTEND
|
|
6301
|
+
}) {
|
|
6302
|
+
if (addressesPerExtendInstruction <= 0) {
|
|
6303
|
+
throw new Error("addressesPerExtendInstruction must be greater than zero");
|
|
6304
|
+
}
|
|
6305
|
+
const dedupedAddresses = [...new Set(addresses)];
|
|
6306
|
+
const lookupTablePda = await addressLookupTable.findAddressLookupTablePda({
|
|
6307
|
+
authority: authority.address,
|
|
6308
|
+
recentSlot
|
|
6309
|
+
});
|
|
6310
|
+
const [lookupTableAddress] = lookupTablePda;
|
|
6311
|
+
const createInstruction = addressLookupTable.getCreateLookupTableInstruction({
|
|
6312
|
+
address: lookupTablePda,
|
|
6313
|
+
authority: authority.address,
|
|
6314
|
+
payer,
|
|
6315
|
+
recentSlot
|
|
6316
|
+
});
|
|
6317
|
+
const extendInstructions = [];
|
|
6318
|
+
for (let start = 0; start < dedupedAddresses.length; start += addressesPerExtendInstruction) {
|
|
6319
|
+
extendInstructions.push(
|
|
6320
|
+
addressLookupTable.getExtendLookupTableInstruction({
|
|
6321
|
+
address: lookupTableAddress,
|
|
6322
|
+
authority,
|
|
6323
|
+
payer,
|
|
6324
|
+
addresses: dedupedAddresses.slice(
|
|
6325
|
+
start,
|
|
6326
|
+
start + addressesPerExtendInstruction
|
|
6327
|
+
)
|
|
6328
|
+
})
|
|
6329
|
+
);
|
|
6330
|
+
}
|
|
6331
|
+
return {
|
|
6332
|
+
lookupTableAddress,
|
|
6333
|
+
createInstruction,
|
|
6334
|
+
extendInstructions,
|
|
6335
|
+
addresses: dedupedAddresses
|
|
6336
|
+
};
|
|
6337
|
+
}
|
|
6338
|
+
function compressTransactionMessageWithLookupTable(transactionMessage, {
|
|
6339
|
+
lookupTableAddress,
|
|
6340
|
+
addresses
|
|
6341
|
+
}) {
|
|
6342
|
+
return kit.compressTransactionMessageUsingAddressLookupTables(
|
|
6343
|
+
transactionMessage,
|
|
6344
|
+
{
|
|
6345
|
+
[lookupTableAddress]: [...addresses]
|
|
6346
|
+
}
|
|
6347
|
+
);
|
|
6348
|
+
}
|
|
6349
|
+
var SOLANA_TRANSACTION_SIZE_LIMIT = 1232;
|
|
6350
|
+
function measureTransactionMessageSize(transactionMessage) {
|
|
6351
|
+
const size = kit.getTransactionMessageSize(transactionMessage);
|
|
6352
|
+
const overBy = Math.max(0, size - SOLANA_TRANSACTION_SIZE_LIMIT);
|
|
6353
|
+
return {
|
|
6354
|
+
size,
|
|
6355
|
+
limit: SOLANA_TRANSACTION_SIZE_LIMIT,
|
|
6356
|
+
overBy,
|
|
6357
|
+
fits: overBy === 0
|
|
6358
|
+
};
|
|
6359
|
+
}
|
|
6360
|
+
function measureTransactionMessageSizeWithLookupTable(transactionMessage, lookupTable) {
|
|
6361
|
+
return measureTransactionMessageSize(
|
|
6362
|
+
compressTransactionMessageWithLookupTable(transactionMessage, lookupTable)
|
|
6363
|
+
);
|
|
6364
|
+
}
|
|
6365
|
+
function assertTransactionMessageFits(transactionMessage, { label = "Transaction", metadataBytes } = {}) {
|
|
6366
|
+
const report = measureTransactionMessageSize(transactionMessage);
|
|
6367
|
+
if (report.fits) {
|
|
6368
|
+
return report;
|
|
6369
|
+
}
|
|
6370
|
+
const metadataHint = metadataBytes && metadataBytes > 0 ? ` Metadata contributes ${metadataBytes} instruction-data bytes; address lookup tables do not compress metadata strings.` : "";
|
|
6371
|
+
throw new Error(
|
|
6372
|
+
`${label} is ${report.size} bytes, exceeding Solana's ${report.limit}-byte transaction limit by ${report.overBy} bytes.${metadataHint}`
|
|
6373
|
+
);
|
|
6374
|
+
}
|
|
6375
|
+
function assertTransactionMessageFitsWithLookupTable(transactionMessage, lookupTable, options = {}) {
|
|
6376
|
+
const compressedMessage = compressTransactionMessageWithLookupTable(
|
|
6377
|
+
transactionMessage,
|
|
6378
|
+
lookupTable
|
|
6379
|
+
);
|
|
6380
|
+
return assertTransactionMessageFits(compressedMessage, options);
|
|
6381
|
+
}
|
|
6382
|
+
var addressCodec5 = kit.getAddressCodec();
|
|
6383
|
+
function bytesToBase64(bytes) {
|
|
6384
|
+
let binary = "";
|
|
6385
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
6386
|
+
binary += String.fromCharCode(bytes[i]);
|
|
6387
|
+
}
|
|
6388
|
+
return btoa(binary);
|
|
6389
|
+
}
|
|
6390
|
+
function base64ToBytes3(base64) {
|
|
6391
|
+
const binary = atob(base64);
|
|
6392
|
+
const bytes = new Uint8Array(binary.length);
|
|
6393
|
+
for (let i = 0; i < binary.length; i++) {
|
|
6394
|
+
bytes[i] = binary.charCodeAt(i);
|
|
6395
|
+
}
|
|
6396
|
+
return bytes;
|
|
6397
|
+
}
|
|
6398
|
+
async function fetchLaunch2(rpc, address4, config) {
|
|
6399
|
+
const response = await rpc.getAccountInfo(address4, {
|
|
6400
|
+
encoding: "base64",
|
|
6401
|
+
commitment: config?.commitment
|
|
6402
|
+
}).send();
|
|
6403
|
+
if (!response.value) {
|
|
6404
|
+
return null;
|
|
6405
|
+
}
|
|
6406
|
+
return getLaunchDecoder().decode(base64ToBytes3(response.value.data[0]));
|
|
6407
|
+
}
|
|
6408
|
+
async function fetchAllLaunches(rpc, config) {
|
|
6409
|
+
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
6410
|
+
const discriminatorFilter = {
|
|
6411
|
+
memcmp: {
|
|
6412
|
+
offset: 0n,
|
|
6413
|
+
bytes: bytesToBase64(
|
|
6414
|
+
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
6415
|
+
),
|
|
6416
|
+
encoding: "base64"
|
|
6417
|
+
}
|
|
6418
|
+
};
|
|
6419
|
+
const response = await rpc.getProgramAccounts(programId, {
|
|
6420
|
+
encoding: "base64",
|
|
6421
|
+
commitment: config?.commitment,
|
|
6422
|
+
filters: [discriminatorFilter]
|
|
6423
|
+
}).send();
|
|
6424
|
+
const accounts = Array.isArray(response) ? response : response.value;
|
|
6425
|
+
const launches = [];
|
|
6426
|
+
const decoder = getLaunchDecoder();
|
|
6427
|
+
for (const account of accounts) {
|
|
6428
|
+
try {
|
|
6429
|
+
const launch = decoder.decode(base64ToBytes3(account.account.data[0]));
|
|
6430
|
+
launches.push({ address: account.pubkey, account: launch });
|
|
6431
|
+
} catch {
|
|
6432
|
+
console.warn(`Failed to decode launch account: ${account.pubkey}`);
|
|
6433
|
+
}
|
|
6434
|
+
}
|
|
6435
|
+
return launches;
|
|
6436
|
+
}
|
|
6437
|
+
async function fetchLaunchesByAuthority(rpc, authority, config) {
|
|
6438
|
+
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
6439
|
+
const discriminatorFilter = {
|
|
6440
|
+
memcmp: {
|
|
6441
|
+
offset: 0n,
|
|
6442
|
+
bytes: bytesToBase64(
|
|
6443
|
+
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
6444
|
+
),
|
|
6445
|
+
encoding: "base64"
|
|
6446
|
+
}
|
|
6447
|
+
};
|
|
6448
|
+
const authorityFilter = {
|
|
6449
|
+
memcmp: {
|
|
6450
|
+
offset: 8n,
|
|
6451
|
+
bytes: bytesToBase64(
|
|
6452
|
+
addressCodec5.encode(authority)
|
|
6453
|
+
),
|
|
6454
|
+
encoding: "base64"
|
|
6455
|
+
}
|
|
6456
|
+
};
|
|
6457
|
+
const response = await rpc.getProgramAccounts(programId, {
|
|
6458
|
+
encoding: "base64",
|
|
6459
|
+
commitment: config?.commitment,
|
|
6460
|
+
filters: [discriminatorFilter, authorityFilter]
|
|
6461
|
+
}).send();
|
|
6462
|
+
const accounts = Array.isArray(response) ? response : response.value;
|
|
6463
|
+
const launches = [];
|
|
6464
|
+
const decoder = getLaunchDecoder();
|
|
6465
|
+
for (const account of accounts) {
|
|
6466
|
+
try {
|
|
6467
|
+
const launch = decoder.decode(base64ToBytes3(account.account.data[0]));
|
|
6468
|
+
launches.push({ address: account.pubkey, account: launch });
|
|
6469
|
+
} catch {
|
|
6470
|
+
console.warn(`Failed to decode launch account: ${account.pubkey}`);
|
|
6471
|
+
}
|
|
6472
|
+
}
|
|
6473
|
+
return launches;
|
|
6474
|
+
}
|
|
6475
|
+
async function launchExists(rpc, namespace, launchId, config) {
|
|
6476
|
+
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
6477
|
+
const [launchAddress] = await getLaunchAddress(
|
|
6478
|
+
namespace,
|
|
6479
|
+
launchId,
|
|
6480
|
+
programId
|
|
6481
|
+
);
|
|
6482
|
+
const launch = await fetchLaunch2(rpc, launchAddress, config);
|
|
6483
|
+
return launch !== null;
|
|
6484
|
+
}
|
|
6485
|
+
|
|
5926
6486
|
// src/solana/migrators/predictionMigrator/index.ts
|
|
5927
6487
|
var predictionMigrator_exports = {};
|
|
5928
6488
|
chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
|
|
@@ -6243,13 +6803,13 @@ function decodeOracleState3(encodedAccount) {
|
|
|
6243
6803
|
getOracleStateDecoder2()
|
|
6244
6804
|
);
|
|
6245
6805
|
}
|
|
6246
|
-
async function fetchOracleState2(rpc,
|
|
6247
|
-
const maybeAccount = await fetchMaybeOracleState2(rpc,
|
|
6806
|
+
async function fetchOracleState2(rpc, address4, config) {
|
|
6807
|
+
const maybeAccount = await fetchMaybeOracleState2(rpc, address4, config);
|
|
6248
6808
|
kit.assertAccountExists(maybeAccount);
|
|
6249
6809
|
return maybeAccount;
|
|
6250
6810
|
}
|
|
6251
|
-
async function fetchMaybeOracleState2(rpc,
|
|
6252
|
-
const maybeAccount = await kit.fetchEncodedAccount(rpc,
|
|
6811
|
+
async function fetchMaybeOracleState2(rpc, address4, config) {
|
|
6812
|
+
const maybeAccount = await kit.fetchEncodedAccount(rpc, address4, config);
|
|
6253
6813
|
return decodeOracleState3(maybeAccount);
|
|
6254
6814
|
}
|
|
6255
6815
|
async function fetchAllOracleState2(rpc, addresses, config) {
|
|
@@ -6594,14 +7154,14 @@ async function getOracleStateAddress(oracleAuthority, nonce) {
|
|
|
6594
7154
|
|
|
6595
7155
|
// src/solana/deployment.ts
|
|
6596
7156
|
var DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES = {
|
|
6597
|
-
cpmmProgram:
|
|
7157
|
+
cpmmProgram: chunkU6B52TBT_cjs.CPMM_PROGRAM_ID,
|
|
6598
7158
|
initializerProgram: INITIALIZER_PROGRAM_ID,
|
|
6599
7159
|
cpmmMigratorProgram: CPMM_MIGRATOR_PROGRAM_ID,
|
|
6600
7160
|
cpmmHookProgram: CPMM_HOOK_PROGRAM_ID,
|
|
6601
|
-
cosignerHookProgram:
|
|
7161
|
+
cosignerHookProgram: DOPPLER_NATIVE_COSIGNER_HOOK_PROGRAM_ID
|
|
6602
7162
|
};
|
|
6603
7163
|
async function deriveSolanaCpmmDeployment(programs = DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES) {
|
|
6604
|
-
const [cpmmConfig] = await
|
|
7164
|
+
const [cpmmConfig] = await chunkU6B52TBT_cjs.getConfigAddress(programs.cpmmProgram);
|
|
6605
7165
|
const [initializerConfig] = await getConfigAddress2(
|
|
6606
7166
|
programs.initializerProgram
|
|
6607
7167
|
);
|
|
@@ -6616,6 +7176,7 @@ exports.DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES = DOPPLER_SOLANA_DEVNET_PROGRAM_
|
|
|
6616
7176
|
exports.cosignerHook = cosignerHook_exports;
|
|
6617
7177
|
exports.cpmm = cpmm_exports;
|
|
6618
7178
|
exports.cpmmMigrator = cpmmMigrator_exports;
|
|
7179
|
+
exports.createLaunch = createLaunch;
|
|
6619
7180
|
exports.deriveSolanaCpmmDeployment = deriveSolanaCpmmDeployment;
|
|
6620
7181
|
exports.initializer = initializer_exports;
|
|
6621
7182
|
exports.predictionMigrator = predictionMigrator_exports;
|