@whetstone-research/doppler-sdk 1.0.34 → 1.0.35
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 +4 -0
- package/dist/{chunk-PSLY7M7C.js → chunk-4N5U2MXE.js} +305 -4
- package/dist/chunk-4N5U2MXE.js.map +1 -0
- package/dist/{chunk-7PXLEMBJ.cjs → chunk-AANZBN5X.cjs} +345 -36
- package/dist/chunk-AANZBN5X.cjs.map +1 -0
- package/dist/{chunk-4CI2M2F6.cjs → chunk-O2Z5ORGF.cjs} +39 -2
- package/dist/chunk-O2Z5ORGF.cjs.map +1 -0
- package/dist/{chunk-AFXFT3BD.js → chunk-PWBQLC5V.js} +39 -3
- package/dist/chunk-PWBQLC5V.js.map +1 -0
- package/dist/evm/index.cjs +343 -79
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +118 -5
- package/dist/evm/index.d.ts +118 -5
- package/dist/evm/index.js +341 -81
- package/dist/evm/index.js.map +1 -1
- package/dist/{pda-44IHEORD.cjs → pda-4VCQGO3F.cjs} +22 -18
- package/dist/{pda-44IHEORD.cjs.map → pda-4VCQGO3F.cjs.map} +1 -1
- package/dist/pda-IRVGRDQX.js +4 -0
- package/dist/pda-IRVGRDQX.js.map +1 -0
- package/dist/solana/index.cjs +481 -436
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +243 -11
- package/dist/solana/index.d.ts +243 -11
- package/dist/solana/index.js +62 -17
- 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-4CI2M2F6.cjs.map +0 -1
- package/dist/chunk-7PXLEMBJ.cjs.map +0 -1
- package/dist/chunk-AFXFT3BD.js.map +0 -1
- package/dist/chunk-PSLY7M7C.js.map +0 -1
- package/dist/pda-WJVDXQPW.js +0 -4
- package/dist/pda-WJVDXQPW.js.map +0 -1
package/dist/solana/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkAANZBN5X_cjs = require('../chunk-AANZBN5X.cjs');
|
|
4
|
+
var chunkO2Z5ORGF_cjs = require('../chunk-O2Z5ORGF.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');
|
|
@@ -14,355 +14,365 @@ var addressLookupTable = require('@solana-program/address-lookup-table');
|
|
|
14
14
|
// src/solana/cpmm/index.ts
|
|
15
15
|
var cpmm_exports = {};
|
|
16
16
|
chunkQ7SFCCGT_cjs.__export(cpmm_exports, {
|
|
17
|
-
ACCOUNT_DISCRIMINATORS: () =>
|
|
18
|
-
ACCOUNT_VERSION: () =>
|
|
19
|
-
ADD_LIQUIDITY_DISCRIMINATOR: () =>
|
|
20
|
-
BPS_DENOM: () =>
|
|
21
|
-
CLOSE_POSITION_DISCRIMINATOR: () =>
|
|
22
|
-
COLLECT_FEES_DISCRIMINATOR: () =>
|
|
23
|
-
COLLECT_PROTOCOL_FEES_DISCRIMINATOR: () =>
|
|
17
|
+
ACCOUNT_DISCRIMINATORS: () => chunkO2Z5ORGF_cjs.ACCOUNT_DISCRIMINATORS,
|
|
18
|
+
ACCOUNT_VERSION: () => chunkO2Z5ORGF_cjs.ACCOUNT_VERSION,
|
|
19
|
+
ADD_LIQUIDITY_DISCRIMINATOR: () => chunkAANZBN5X_cjs.ADD_LIQUIDITY_DISCRIMINATOR,
|
|
20
|
+
BPS_DENOM: () => chunkO2Z5ORGF_cjs.BPS_DENOM,
|
|
21
|
+
CLOSE_POSITION_DISCRIMINATOR: () => chunkAANZBN5X_cjs.CLOSE_POSITION_DISCRIMINATOR,
|
|
22
|
+
COLLECT_FEES_DISCRIMINATOR: () => chunkAANZBN5X_cjs.COLLECT_FEES_DISCRIMINATOR,
|
|
23
|
+
COLLECT_PROTOCOL_FEES_DISCRIMINATOR: () => chunkAANZBN5X_cjs.COLLECT_PROTOCOL_FEES_DISCRIMINATOR,
|
|
24
24
|
CPMM_ERROR_MESSAGES: () => CPMM_ERROR_MESSAGES,
|
|
25
|
-
CPMM_PROGRAM_ID: () =>
|
|
26
|
-
CREATE_POSITION_DISCRIMINATOR: () =>
|
|
25
|
+
CPMM_PROGRAM_ID: () => chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID,
|
|
26
|
+
CREATE_POSITION_DISCRIMINATOR: () => chunkAANZBN5X_cjs.CREATE_POSITION_DISCRIMINATOR,
|
|
27
27
|
CpmmError: () => CpmmError,
|
|
28
28
|
CpmmErrorCode: () => CpmmErrorCode,
|
|
29
|
-
HF_AFTER_ADD_LIQ: () =>
|
|
30
|
-
HF_AFTER_REMOVE_LIQ: () =>
|
|
31
|
-
HF_AFTER_SWAP: () =>
|
|
32
|
-
HF_BEFORE_ADD_LIQ: () =>
|
|
33
|
-
HF_BEFORE_REMOVE_LIQ: () =>
|
|
34
|
-
HF_BEFORE_SWAP: () =>
|
|
35
|
-
HF_FORWARD_READONLY_SIGNERS: () =>
|
|
36
|
-
HF_REQUIRE_ORACLE: () =>
|
|
37
|
-
HOOK_NO_CHANGE: () =>
|
|
38
|
-
INITIALIZE_CONFIG_DISCRIMINATOR: () =>
|
|
39
|
-
INITIALIZE_ORACLE_DISCRIMINATOR: () =>
|
|
40
|
-
INITIALIZE_POOL_DISCRIMINATOR: () =>
|
|
41
|
-
INITIALIZE_SPOT_POOL_DISCRIMINATOR: () =>
|
|
42
|
-
|
|
29
|
+
HF_AFTER_ADD_LIQ: () => chunkO2Z5ORGF_cjs.HF_AFTER_ADD_LIQ,
|
|
30
|
+
HF_AFTER_REMOVE_LIQ: () => chunkO2Z5ORGF_cjs.HF_AFTER_REMOVE_LIQ,
|
|
31
|
+
HF_AFTER_SWAP: () => chunkO2Z5ORGF_cjs.HF_AFTER_SWAP,
|
|
32
|
+
HF_BEFORE_ADD_LIQ: () => chunkO2Z5ORGF_cjs.HF_BEFORE_ADD_LIQ,
|
|
33
|
+
HF_BEFORE_REMOVE_LIQ: () => chunkO2Z5ORGF_cjs.HF_BEFORE_REMOVE_LIQ,
|
|
34
|
+
HF_BEFORE_SWAP: () => chunkO2Z5ORGF_cjs.HF_BEFORE_SWAP,
|
|
35
|
+
HF_FORWARD_READONLY_SIGNERS: () => chunkO2Z5ORGF_cjs.HF_FORWARD_READONLY_SIGNERS,
|
|
36
|
+
HF_REQUIRE_ORACLE: () => chunkO2Z5ORGF_cjs.HF_REQUIRE_ORACLE,
|
|
37
|
+
HOOK_NO_CHANGE: () => chunkO2Z5ORGF_cjs.HOOK_NO_CHANGE,
|
|
38
|
+
INITIALIZE_CONFIG_DISCRIMINATOR: () => chunkAANZBN5X_cjs.INITIALIZE_CONFIG_DISCRIMINATOR,
|
|
39
|
+
INITIALIZE_ORACLE_DISCRIMINATOR: () => chunkAANZBN5X_cjs.INITIALIZE_ORACLE_DISCRIMINATOR,
|
|
40
|
+
INITIALIZE_POOL_DISCRIMINATOR: () => chunkAANZBN5X_cjs.INITIALIZE_POOL_DISCRIMINATOR,
|
|
41
|
+
INITIALIZE_SPOT_POOL_DISCRIMINATOR: () => chunkAANZBN5X_cjs.INITIALIZE_SPOT_POOL_DISCRIMINATOR,
|
|
42
|
+
INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR: () => chunkAANZBN5X_cjs.INITIALIZE_SPOT_POOL_WITH_HOOK_DISCRIMINATOR,
|
|
43
|
+
INSTRUCTION_DISCRIMINATORS: () => chunkO2Z5ORGF_cjs.INSTRUCTION_DISCRIMINATORS,
|
|
43
44
|
MAX_FEE_AMOUNT: () => MAX_FEE_AMOUNT,
|
|
44
|
-
MAX_HOOK_ALLOWLIST: () =>
|
|
45
|
-
MAX_ORACLE_OBSERVATIONS: () =>
|
|
46
|
-
ORACLE_CONSULT_DISCRIMINATOR: () =>
|
|
47
|
-
ORACLE_UPDATE_DISCRIMINATOR: () =>
|
|
48
|
-
PAUSE_DISCRIMINATOR: () =>
|
|
49
|
-
PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR: () =>
|
|
50
|
-
Q64_ONE: () =>
|
|
51
|
-
REDEEM_PROTOCOL_SHARES_DISCRIMINATOR: () =>
|
|
52
|
-
REMOVE_LIQUIDITY_DISCRIMINATOR: () =>
|
|
53
|
-
SEED_AUTHORITY: () =>
|
|
54
|
-
SEED_CONFIG: () =>
|
|
55
|
-
SEED_ORACLE: () =>
|
|
56
|
-
SEED_POOL: () =>
|
|
57
|
-
SEED_POSITION: () =>
|
|
58
|
-
SEED_PROTOCOL_FEE_OWNER: () =>
|
|
59
|
-
SEED_SPOT_POOL: () =>
|
|
60
|
-
SET_FEES_DISCRIMINATOR: () =>
|
|
61
|
-
SET_HOOK_DISCRIMINATOR: () =>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
45
|
+
MAX_HOOK_ALLOWLIST: () => chunkO2Z5ORGF_cjs.MAX_HOOK_ALLOWLIST,
|
|
46
|
+
MAX_ORACLE_OBSERVATIONS: () => chunkO2Z5ORGF_cjs.MAX_ORACLE_OBSERVATIONS,
|
|
47
|
+
ORACLE_CONSULT_DISCRIMINATOR: () => chunkAANZBN5X_cjs.ORACLE_CONSULT_DISCRIMINATOR,
|
|
48
|
+
ORACLE_UPDATE_DISCRIMINATOR: () => chunkAANZBN5X_cjs.ORACLE_UPDATE_DISCRIMINATOR,
|
|
49
|
+
PAUSE_DISCRIMINATOR: () => chunkAANZBN5X_cjs.PAUSE_DISCRIMINATOR,
|
|
50
|
+
PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR: () => chunkAANZBN5X_cjs.PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR,
|
|
51
|
+
Q64_ONE: () => chunkO2Z5ORGF_cjs.Q64_ONE,
|
|
52
|
+
REDEEM_PROTOCOL_SHARES_DISCRIMINATOR: () => chunkAANZBN5X_cjs.REDEEM_PROTOCOL_SHARES_DISCRIMINATOR,
|
|
53
|
+
REMOVE_LIQUIDITY_DISCRIMINATOR: () => chunkAANZBN5X_cjs.REMOVE_LIQUIDITY_DISCRIMINATOR,
|
|
54
|
+
SEED_AUTHORITY: () => chunkO2Z5ORGF_cjs.SEED_AUTHORITY,
|
|
55
|
+
SEED_CONFIG: () => chunkO2Z5ORGF_cjs.SEED_CONFIG,
|
|
56
|
+
SEED_ORACLE: () => chunkO2Z5ORGF_cjs.SEED_ORACLE,
|
|
57
|
+
SEED_POOL: () => chunkO2Z5ORGF_cjs.SEED_POOL,
|
|
58
|
+
SEED_POSITION: () => chunkO2Z5ORGF_cjs.SEED_POSITION,
|
|
59
|
+
SEED_PROTOCOL_FEE_OWNER: () => chunkO2Z5ORGF_cjs.SEED_PROTOCOL_FEE_OWNER,
|
|
60
|
+
SEED_SPOT_POOL: () => chunkO2Z5ORGF_cjs.SEED_SPOT_POOL,
|
|
61
|
+
SET_FEES_DISCRIMINATOR: () => chunkAANZBN5X_cjs.SET_FEES_DISCRIMINATOR,
|
|
62
|
+
SET_HOOK_DISCRIMINATOR: () => chunkAANZBN5X_cjs.SET_HOOK_DISCRIMINATOR,
|
|
63
|
+
SPOT_HOOK_FLAG_MASK: () => chunkO2Z5ORGF_cjs.SPOT_HOOK_FLAG_MASK,
|
|
64
|
+
SWAP_EXACT_IN_DISCRIMINATOR: () => chunkAANZBN5X_cjs.SWAP_EXACT_IN_DISCRIMINATOR,
|
|
65
|
+
TOKEN_METADATA_PROGRAM_ID: () => chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
66
|
+
TRANSFER_ADMIN_DISCRIMINATOR: () => chunkAANZBN5X_cjs.TRANSFER_ADMIN_DISCRIMINATOR,
|
|
67
|
+
UNPAUSE_DISCRIMINATOR: () => chunkAANZBN5X_cjs.UNPAUSE_DISCRIMINATOR,
|
|
68
|
+
UPDATE_CONFIG_DISCRIMINATOR: () => chunkAANZBN5X_cjs.UPDATE_CONFIG_DISCRIMINATOR,
|
|
69
|
+
WITHDRAW_VAULT_EXCESS_DISCRIMINATOR: () => chunkAANZBN5X_cjs.WITHDRAW_VAULT_EXCESS_DISCRIMINATOR,
|
|
70
|
+
addLiquidityArgsCodec: () => chunkAANZBN5X_cjs.addLiquidityArgsCodec,
|
|
71
|
+
addressToBase58EncodedBytes: () => chunkAANZBN5X_cjs.addressToBase58EncodedBytes,
|
|
72
|
+
ammConfigDataCodec: () => chunkAANZBN5X_cjs.ammConfigDataCodec,
|
|
73
|
+
areMintsOrdered: () => chunkO2Z5ORGF_cjs.areMintsOrdered,
|
|
74
|
+
base64ToBytes: () => chunkAANZBN5X_cjs.base64ToBytes,
|
|
75
|
+
bytesToBase64: () => chunkAANZBN5X_cjs.bytesToBase64,
|
|
76
|
+
bytesToBase64EncodedBytes: () => chunkAANZBN5X_cjs.bytesToBase64EncodedBytes,
|
|
77
|
+
calculateAccruedFees: () => chunkAANZBN5X_cjs.calculateAccruedFees,
|
|
78
|
+
calculateTwap: () => chunkAANZBN5X_cjs.calculateTwap,
|
|
79
|
+
calculateTwapNumber: () => chunkAANZBN5X_cjs.calculateTwapNumber,
|
|
80
|
+
ceilDiv: () => chunkAANZBN5X_cjs.ceilDiv,
|
|
81
|
+
collectFeesArgsCodec: () => chunkAANZBN5X_cjs.collectFeesArgsCodec,
|
|
82
|
+
collectProtocolFeesArgsCodec: () => chunkAANZBN5X_cjs.collectProtocolFeesArgsCodec,
|
|
83
|
+
comparePoolAndOraclePrices: () => chunkAANZBN5X_cjs.comparePoolAndOraclePrices,
|
|
84
|
+
computePrice0Q64: () => chunkAANZBN5X_cjs.computePrice0Q64,
|
|
85
|
+
computePrice1Q64: () => chunkAANZBN5X_cjs.computePrice1Q64,
|
|
86
|
+
consultTwap: () => chunkAANZBN5X_cjs.consultTwap,
|
|
87
|
+
createAccountMeta: () => chunkAANZBN5X_cjs.createAccountMeta,
|
|
88
|
+
createAddLiquidityInstruction: () => chunkAANZBN5X_cjs.getAddLiquidityInstruction,
|
|
89
|
+
createClosePositionInstruction: () => chunkAANZBN5X_cjs.getClosePositionInstruction,
|
|
90
|
+
createCollectFeesInstruction: () => chunkAANZBN5X_cjs.getCollectFeesInstruction,
|
|
91
|
+
createCollectProtocolFeesInstruction: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstruction,
|
|
92
|
+
createCreatePositionInstruction: () => chunkAANZBN5X_cjs.getCreatePositionInstruction,
|
|
93
|
+
createInitializeConfigInstruction: () => chunkAANZBN5X_cjs.getInitializeConfigInstruction,
|
|
94
|
+
createInitializeOracleInstruction: () => chunkAANZBN5X_cjs.getInitializeOracleInstruction,
|
|
95
|
+
createInitializePoolInstruction: () => chunkAANZBN5X_cjs.getInitializePoolInstruction,
|
|
96
|
+
createOracleConsultInstruction: () => chunkAANZBN5X_cjs.getOracleConsultInstruction,
|
|
97
|
+
createOracleUpdateInstruction: () => chunkAANZBN5X_cjs.getOracleUpdateInstruction,
|
|
98
|
+
createPauseInstruction: () => chunkAANZBN5X_cjs.getPauseInstruction,
|
|
99
|
+
createPositionArgsCodec: () => chunkAANZBN5X_cjs.createPositionArgsCodec,
|
|
100
|
+
createReadonlyRemainingAccountMeta: () => chunkAANZBN5X_cjs.createReadonlyRemainingAccountMeta,
|
|
101
|
+
createRemoveLiquidityInstruction: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstruction,
|
|
102
|
+
createSetFeesInstruction: () => chunkAANZBN5X_cjs.getSetFeesInstruction,
|
|
103
|
+
createSetHookInstruction: () => chunkAANZBN5X_cjs.getSetHookInstruction,
|
|
104
|
+
createSwapExactInInstruction: () => chunkAANZBN5X_cjs.getSwapExactInInstruction,
|
|
103
105
|
createSwapInstruction: () => createSwapInstruction,
|
|
104
|
-
createTransferAdminInstruction: () =>
|
|
105
|
-
createUnpauseInstruction: () =>
|
|
106
|
-
createWithdrawVaultExcessInstruction: () =>
|
|
106
|
+
createTransferAdminInstruction: () => chunkAANZBN5X_cjs.getTransferAdminInstruction,
|
|
107
|
+
createUnpauseInstruction: () => chunkAANZBN5X_cjs.getUnpauseInstruction,
|
|
108
|
+
createWithdrawVaultExcessInstruction: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstruction,
|
|
107
109
|
curveParamsToMarketCap: () => curveParamsToMarketCap,
|
|
108
|
-
decodeAmmConfig: () =>
|
|
109
|
-
decodeOracleState: () =>
|
|
110
|
-
decodePool: () =>
|
|
111
|
-
decodePosition: () =>
|
|
112
|
-
encodeAddLiquidityArgs: () =>
|
|
113
|
-
encodeCollectFeesArgs: () =>
|
|
114
|
-
encodeCollectProtocolFeesArgs: () =>
|
|
115
|
-
encodeCreatePositionArgs: () =>
|
|
116
|
-
encodeInitializeConfigArgs: () =>
|
|
117
|
-
encodeInitializeOracleArgs: () =>
|
|
118
|
-
encodeInitializePoolArgs: () =>
|
|
119
|
-
encodeInstructionData: () =>
|
|
120
|
-
encodeOracleConsultArgs: () =>
|
|
121
|
-
encodeRemoveLiquidityArgs: () =>
|
|
122
|
-
encodeSetFeesArgs: () =>
|
|
123
|
-
encodeSetHookArgs: () =>
|
|
124
|
-
encodeSwapExactInArgs: () =>
|
|
125
|
-
encodeTransferAdminArgs: () =>
|
|
126
|
-
fetchAllPools: () =>
|
|
110
|
+
decodeAmmConfig: () => chunkAANZBN5X_cjs.decodeAmmConfig,
|
|
111
|
+
decodeOracleState: () => chunkAANZBN5X_cjs.decodeOracleState,
|
|
112
|
+
decodePool: () => chunkAANZBN5X_cjs.decodePool,
|
|
113
|
+
decodePosition: () => chunkAANZBN5X_cjs.decodePosition,
|
|
114
|
+
encodeAddLiquidityArgs: () => chunkAANZBN5X_cjs.encodeAddLiquidityArgs,
|
|
115
|
+
encodeCollectFeesArgs: () => chunkAANZBN5X_cjs.encodeCollectFeesArgs,
|
|
116
|
+
encodeCollectProtocolFeesArgs: () => chunkAANZBN5X_cjs.encodeCollectProtocolFeesArgs,
|
|
117
|
+
encodeCreatePositionArgs: () => chunkAANZBN5X_cjs.encodeCreatePositionArgs,
|
|
118
|
+
encodeInitializeConfigArgs: () => chunkAANZBN5X_cjs.encodeInitializeConfigArgs,
|
|
119
|
+
encodeInitializeOracleArgs: () => chunkAANZBN5X_cjs.encodeInitializeOracleArgs,
|
|
120
|
+
encodeInitializePoolArgs: () => chunkAANZBN5X_cjs.encodeInitializePoolArgs,
|
|
121
|
+
encodeInstructionData: () => chunkAANZBN5X_cjs.encodeInstructionData,
|
|
122
|
+
encodeOracleConsultArgs: () => chunkAANZBN5X_cjs.encodeOracleConsultArgs,
|
|
123
|
+
encodeRemoveLiquidityArgs: () => chunkAANZBN5X_cjs.encodeRemoveLiquidityArgs,
|
|
124
|
+
encodeSetFeesArgs: () => chunkAANZBN5X_cjs.encodeSetFeesArgs,
|
|
125
|
+
encodeSetHookArgs: () => chunkAANZBN5X_cjs.encodeSetHookArgs,
|
|
126
|
+
encodeSwapExactInArgs: () => chunkAANZBN5X_cjs.encodeSwapExactInArgs,
|
|
127
|
+
encodeTransferAdminArgs: () => chunkAANZBN5X_cjs.encodeTransferAdminArgs,
|
|
128
|
+
fetchAllPools: () => chunkAANZBN5X_cjs.fetchAllPools,
|
|
127
129
|
fetchConfig: () => fetchConfig,
|
|
128
130
|
fetchConfigWithAddress: () => fetchConfigWithAddress,
|
|
129
|
-
fetchOracle: () =>
|
|
130
|
-
fetchOraclesBatch: () =>
|
|
131
|
-
fetchPool: () =>
|
|
132
|
-
fetchPoolPositions: () =>
|
|
133
|
-
fetchPoolsBatch: () =>
|
|
134
|
-
fetchPosition: () =>
|
|
135
|
-
fetchPositionByParams: () =>
|
|
136
|
-
fetchPositionsBatch: () =>
|
|
137
|
-
fetchUserPositions: () =>
|
|
138
|
-
filterActivePositions: () =>
|
|
139
|
-
filterPoolsByMint: () =>
|
|
140
|
-
getAddLiquidityDiscriminatorBytes: () =>
|
|
141
|
-
getAddLiquidityInstruction: () =>
|
|
142
|
-
getAddLiquidityInstructionAsync: () =>
|
|
143
|
-
getAddLiquidityInstructionDataCodec: () =>
|
|
144
|
-
getAddLiquidityInstructionDataDecoder: () =>
|
|
145
|
-
getAddLiquidityInstructionDataEncoder: () =>
|
|
146
|
-
getAddLiquidityQuote: () =>
|
|
147
|
-
getAddressFromAddressOrSigner: () =>
|
|
148
|
-
getAddressFromRemainingAccount: () =>
|
|
149
|
-
getClosePositionDiscriminatorBytes: () =>
|
|
150
|
-
getClosePositionInstruction: () =>
|
|
151
|
-
getClosePositionInstructionDataCodec: () =>
|
|
152
|
-
getClosePositionInstructionDataDecoder: () =>
|
|
153
|
-
getClosePositionInstructionDataEncoder: () =>
|
|
154
|
-
getCollectFeesDiscriminatorBytes: () =>
|
|
155
|
-
getCollectFeesInstruction: () =>
|
|
156
|
-
getCollectFeesInstructionAsync: () =>
|
|
157
|
-
getCollectFeesInstructionDataCodec: () =>
|
|
158
|
-
getCollectFeesInstructionDataDecoder: () =>
|
|
159
|
-
getCollectFeesInstructionDataEncoder: () =>
|
|
160
|
-
getCollectProtocolFeesDiscriminatorBytes: () =>
|
|
161
|
-
getCollectProtocolFeesInstruction: () =>
|
|
162
|
-
getCollectProtocolFeesInstructionAsync: () =>
|
|
163
|
-
getCollectProtocolFeesInstructionDataCodec: () =>
|
|
164
|
-
getCollectProtocolFeesInstructionDataDecoder: () =>
|
|
165
|
-
getCollectProtocolFeesInstructionDataEncoder: () =>
|
|
166
|
-
getConfigAddress: () =>
|
|
167
|
-
getCreatePositionDiscriminatorBytes: () =>
|
|
168
|
-
getCreatePositionInstruction: () =>
|
|
169
|
-
getCreatePositionInstructionAsync: () =>
|
|
170
|
-
getCreatePositionInstructionDataCodec: () =>
|
|
171
|
-
getCreatePositionInstructionDataDecoder: () =>
|
|
172
|
-
getCreatePositionInstructionDataEncoder: () =>
|
|
131
|
+
fetchOracle: () => chunkAANZBN5X_cjs.fetchOracle,
|
|
132
|
+
fetchOraclesBatch: () => chunkAANZBN5X_cjs.fetchOraclesBatch,
|
|
133
|
+
fetchPool: () => chunkAANZBN5X_cjs.fetchPool,
|
|
134
|
+
fetchPoolPositions: () => chunkAANZBN5X_cjs.fetchPoolPositions,
|
|
135
|
+
fetchPoolsBatch: () => chunkAANZBN5X_cjs.fetchPoolsBatch,
|
|
136
|
+
fetchPosition: () => chunkAANZBN5X_cjs.fetchPosition,
|
|
137
|
+
fetchPositionByParams: () => chunkAANZBN5X_cjs.fetchPositionByParams,
|
|
138
|
+
fetchPositionsBatch: () => chunkAANZBN5X_cjs.fetchPositionsBatch,
|
|
139
|
+
fetchUserPositions: () => chunkAANZBN5X_cjs.fetchUserPositions,
|
|
140
|
+
filterActivePositions: () => chunkAANZBN5X_cjs.filterActivePositions,
|
|
141
|
+
filterPoolsByMint: () => chunkAANZBN5X_cjs.filterPoolsByMint,
|
|
142
|
+
getAddLiquidityDiscriminatorBytes: () => chunkAANZBN5X_cjs.getAddLiquidityDiscriminatorBytes,
|
|
143
|
+
getAddLiquidityInstruction: () => chunkAANZBN5X_cjs.getAddLiquidityInstruction,
|
|
144
|
+
getAddLiquidityInstructionAsync: () => chunkAANZBN5X_cjs.getAddLiquidityInstructionAsync,
|
|
145
|
+
getAddLiquidityInstructionDataCodec: () => chunkAANZBN5X_cjs.getAddLiquidityInstructionDataCodec,
|
|
146
|
+
getAddLiquidityInstructionDataDecoder: () => chunkAANZBN5X_cjs.getAddLiquidityInstructionDataDecoder,
|
|
147
|
+
getAddLiquidityInstructionDataEncoder: () => chunkAANZBN5X_cjs.getAddLiquidityInstructionDataEncoder,
|
|
148
|
+
getAddLiquidityQuote: () => chunkAANZBN5X_cjs.getAddLiquidityQuote,
|
|
149
|
+
getAddressFromAddressOrSigner: () => chunkAANZBN5X_cjs.getAddressFromAddressOrSigner,
|
|
150
|
+
getAddressFromRemainingAccount: () => chunkAANZBN5X_cjs.getAddressFromRemainingAccount,
|
|
151
|
+
getClosePositionDiscriminatorBytes: () => chunkAANZBN5X_cjs.getClosePositionDiscriminatorBytes,
|
|
152
|
+
getClosePositionInstruction: () => chunkAANZBN5X_cjs.getClosePositionInstruction,
|
|
153
|
+
getClosePositionInstructionDataCodec: () => chunkAANZBN5X_cjs.getClosePositionInstructionDataCodec,
|
|
154
|
+
getClosePositionInstructionDataDecoder: () => chunkAANZBN5X_cjs.getClosePositionInstructionDataDecoder,
|
|
155
|
+
getClosePositionInstructionDataEncoder: () => chunkAANZBN5X_cjs.getClosePositionInstructionDataEncoder,
|
|
156
|
+
getCollectFeesDiscriminatorBytes: () => chunkAANZBN5X_cjs.getCollectFeesDiscriminatorBytes,
|
|
157
|
+
getCollectFeesInstruction: () => chunkAANZBN5X_cjs.getCollectFeesInstruction,
|
|
158
|
+
getCollectFeesInstructionAsync: () => chunkAANZBN5X_cjs.getCollectFeesInstructionAsync,
|
|
159
|
+
getCollectFeesInstructionDataCodec: () => chunkAANZBN5X_cjs.getCollectFeesInstructionDataCodec,
|
|
160
|
+
getCollectFeesInstructionDataDecoder: () => chunkAANZBN5X_cjs.getCollectFeesInstructionDataDecoder,
|
|
161
|
+
getCollectFeesInstructionDataEncoder: () => chunkAANZBN5X_cjs.getCollectFeesInstructionDataEncoder,
|
|
162
|
+
getCollectProtocolFeesDiscriminatorBytes: () => chunkAANZBN5X_cjs.getCollectProtocolFeesDiscriminatorBytes,
|
|
163
|
+
getCollectProtocolFeesInstruction: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstruction,
|
|
164
|
+
getCollectProtocolFeesInstructionAsync: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstructionAsync,
|
|
165
|
+
getCollectProtocolFeesInstructionDataCodec: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstructionDataCodec,
|
|
166
|
+
getCollectProtocolFeesInstructionDataDecoder: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstructionDataDecoder,
|
|
167
|
+
getCollectProtocolFeesInstructionDataEncoder: () => chunkAANZBN5X_cjs.getCollectProtocolFeesInstructionDataEncoder,
|
|
168
|
+
getConfigAddress: () => chunkO2Z5ORGF_cjs.getConfigAddress,
|
|
169
|
+
getCreatePositionDiscriminatorBytes: () => chunkAANZBN5X_cjs.getCreatePositionDiscriminatorBytes,
|
|
170
|
+
getCreatePositionInstruction: () => chunkAANZBN5X_cjs.getCreatePositionInstruction,
|
|
171
|
+
getCreatePositionInstructionAsync: () => chunkAANZBN5X_cjs.getCreatePositionInstructionAsync,
|
|
172
|
+
getCreatePositionInstructionDataCodec: () => chunkAANZBN5X_cjs.getCreatePositionInstructionDataCodec,
|
|
173
|
+
getCreatePositionInstructionDataDecoder: () => chunkAANZBN5X_cjs.getCreatePositionInstructionDataDecoder,
|
|
174
|
+
getCreatePositionInstructionDataEncoder: () => chunkAANZBN5X_cjs.getCreatePositionInstructionDataEncoder,
|
|
173
175
|
getErrorMessage: () => getErrorMessage,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
176
|
+
getHookedSpotPoolAddress: () => chunkO2Z5ORGF_cjs.getHookedSpotPoolAddress,
|
|
177
|
+
getInitializeConfigDiscriminatorBytes: () => chunkAANZBN5X_cjs.getInitializeConfigDiscriminatorBytes,
|
|
178
|
+
getInitializeConfigInstruction: () => chunkAANZBN5X_cjs.getInitializeConfigInstruction,
|
|
179
|
+
getInitializeConfigInstructionAsync: () => chunkAANZBN5X_cjs.getInitializeConfigInstructionAsync,
|
|
180
|
+
getInitializeConfigInstructionDataCodec: () => chunkAANZBN5X_cjs.getInitializeConfigInstructionDataCodec,
|
|
181
|
+
getInitializeConfigInstructionDataDecoder: () => chunkAANZBN5X_cjs.getInitializeConfigInstructionDataDecoder,
|
|
182
|
+
getInitializeConfigInstructionDataEncoder: () => chunkAANZBN5X_cjs.getInitializeConfigInstructionDataEncoder,
|
|
183
|
+
getInitializeOracleDiscriminatorBytes: () => chunkAANZBN5X_cjs.getInitializeOracleDiscriminatorBytes,
|
|
184
|
+
getInitializeOracleInstruction: () => chunkAANZBN5X_cjs.getInitializeOracleInstruction,
|
|
185
|
+
getInitializeOracleInstructionAsync: () => chunkAANZBN5X_cjs.getInitializeOracleInstructionAsync,
|
|
186
|
+
getInitializeOracleInstructionDataCodec: () => chunkAANZBN5X_cjs.getInitializeOracleInstructionDataCodec,
|
|
187
|
+
getInitializeOracleInstructionDataDecoder: () => chunkAANZBN5X_cjs.getInitializeOracleInstructionDataDecoder,
|
|
188
|
+
getInitializeOracleInstructionDataEncoder: () => chunkAANZBN5X_cjs.getInitializeOracleInstructionDataEncoder,
|
|
189
|
+
getInitializePoolDiscriminatorBytes: () => chunkAANZBN5X_cjs.getInitializePoolDiscriminatorBytes,
|
|
190
|
+
getInitializePoolInstruction: () => chunkAANZBN5X_cjs.getInitializePoolInstruction,
|
|
191
|
+
getInitializePoolInstructionAsync: () => chunkAANZBN5X_cjs.getInitializePoolInstructionAsync,
|
|
192
|
+
getInitializePoolInstructionDataCodec: () => chunkAANZBN5X_cjs.getInitializePoolInstructionDataCodec,
|
|
193
|
+
getInitializePoolInstructionDataDecoder: () => chunkAANZBN5X_cjs.getInitializePoolInstructionDataDecoder,
|
|
194
|
+
getInitializePoolInstructionDataEncoder: () => chunkAANZBN5X_cjs.getInitializePoolInstructionDataEncoder,
|
|
195
|
+
getInitializeSpotPoolDiscriminatorBytes: () => chunkAANZBN5X_cjs.getInitializeSpotPoolDiscriminatorBytes,
|
|
196
|
+
getInitializeSpotPoolInstruction: () => chunkAANZBN5X_cjs.getInitializeSpotPoolInstruction,
|
|
197
|
+
getInitializeSpotPoolInstructionAsync: () => chunkAANZBN5X_cjs.getInitializeSpotPoolInstructionAsync,
|
|
198
|
+
getInitializeSpotPoolInstructionDataCodec: () => chunkAANZBN5X_cjs.getInitializeSpotPoolInstructionDataCodec,
|
|
199
|
+
getInitializeSpotPoolInstructionDataDecoder: () => chunkAANZBN5X_cjs.getInitializeSpotPoolInstructionDataDecoder,
|
|
200
|
+
getInitializeSpotPoolInstructionDataEncoder: () => chunkAANZBN5X_cjs.getInitializeSpotPoolInstructionDataEncoder,
|
|
201
|
+
getInitializeSpotPoolWithHookDiscriminatorBytes: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookDiscriminatorBytes,
|
|
202
|
+
getInitializeSpotPoolWithHookInstruction: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookInstruction,
|
|
203
|
+
getInitializeSpotPoolWithHookInstructionAsync: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookInstructionAsync,
|
|
204
|
+
getInitializeSpotPoolWithHookInstructionDataCodec: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookInstructionDataCodec,
|
|
205
|
+
getInitializeSpotPoolWithHookInstructionDataDecoder: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookInstructionDataDecoder,
|
|
206
|
+
getInitializeSpotPoolWithHookInstructionDataEncoder: () => chunkAANZBN5X_cjs.getInitializeSpotPoolWithHookInstructionDataEncoder,
|
|
207
|
+
getK: () => chunkAANZBN5X_cjs.getK,
|
|
208
|
+
getLiquidityAddresses: () => chunkO2Z5ORGF_cjs.getLiquidityAddresses,
|
|
200
209
|
getMetadataAddress: () => getMetadataAddress,
|
|
201
|
-
getOracleAddress: () =>
|
|
202
|
-
getOracleAddressFromPool: () =>
|
|
203
|
-
getOracleAge: () =>
|
|
204
|
-
getOracleBufferStats: () =>
|
|
205
|
-
getOracleConsultDiscriminatorBytes: () =>
|
|
206
|
-
getOracleConsultInstruction: () =>
|
|
207
|
-
getOracleConsultInstructionAsync: () =>
|
|
208
|
-
getOracleConsultInstructionDataCodec: () =>
|
|
209
|
-
getOracleConsultInstructionDataDecoder: () =>
|
|
210
|
-
getOracleConsultInstructionDataEncoder: () =>
|
|
211
|
-
getOracleDeviation: () =>
|
|
212
|
-
getOracleForPool: () =>
|
|
213
|
-
getOracleSpotPrices: () =>
|
|
214
|
-
getOracleUpdateDiscriminatorBytes: () =>
|
|
215
|
-
getOracleUpdateInstruction: () =>
|
|
216
|
-
getOracleUpdateInstructionAsync: () =>
|
|
217
|
-
getOracleUpdateInstructionDataCodec: () =>
|
|
218
|
-
getOracleUpdateInstructionDataDecoder: () =>
|
|
219
|
-
getOracleUpdateInstructionDataEncoder: () =>
|
|
220
|
-
getPauseDiscriminatorBytes: () =>
|
|
221
|
-
getPauseInstruction: () =>
|
|
222
|
-
getPauseInstructionDataCodec: () =>
|
|
223
|
-
getPauseInstructionDataDecoder: () =>
|
|
224
|
-
getPauseInstructionDataEncoder: () =>
|
|
225
|
-
getPendingFees: () =>
|
|
226
|
-
getPoolAddress: () =>
|
|
227
|
-
getPoolAddressFromMints: () =>
|
|
228
|
-
getPoolAuthorityAddress: () =>
|
|
229
|
-
getPoolByMints: () =>
|
|
230
|
-
getPoolInitAddresses: () =>
|
|
231
|
-
getPoolVault0Address: () =>
|
|
232
|
-
getPoolVault1Address: () =>
|
|
233
|
-
getPositionAddress: () =>
|
|
234
|
-
getPositionAddressFromParams: () =>
|
|
235
|
-
getPositionValue: () =>
|
|
236
|
-
getPreviewSwapExactInDiscriminatorBytes: () =>
|
|
237
|
-
getPreviewSwapExactInInstruction: () =>
|
|
238
|
-
getPreviewSwapExactInInstructionDataCodec: () =>
|
|
239
|
-
getPreviewSwapExactInInstructionDataDecoder: () =>
|
|
240
|
-
getPreviewSwapExactInInstructionDataEncoder: () =>
|
|
241
|
-
getProtocolFeeOwnerAddress: () =>
|
|
242
|
-
getProtocolFeePositionAddress: () =>
|
|
243
|
-
getRedeemProtocolSharesDiscriminatorBytes: () =>
|
|
244
|
-
getRedeemProtocolSharesInstruction: () =>
|
|
245
|
-
getRedeemProtocolSharesInstructionAsync: () =>
|
|
246
|
-
getRedeemProtocolSharesInstructionDataCodec: () =>
|
|
247
|
-
getRedeemProtocolSharesInstructionDataDecoder: () =>
|
|
248
|
-
getRedeemProtocolSharesInstructionDataEncoder: () =>
|
|
249
|
-
getRemoveLiquidityDiscriminatorBytes: () =>
|
|
250
|
-
getRemoveLiquidityInstruction: () =>
|
|
251
|
-
getRemoveLiquidityInstructionAsync: () =>
|
|
252
|
-
getRemoveLiquidityInstructionDataCodec: () =>
|
|
253
|
-
getRemoveLiquidityInstructionDataDecoder: () =>
|
|
254
|
-
getRemoveLiquidityInstructionDataEncoder: () =>
|
|
255
|
-
getRemoveLiquidityQuote: () =>
|
|
256
|
-
getSetFeesDiscriminatorBytes: () =>
|
|
257
|
-
getSetFeesInstruction: () =>
|
|
258
|
-
getSetFeesInstructionDataCodec: () =>
|
|
259
|
-
getSetFeesInstructionDataDecoder: () =>
|
|
260
|
-
getSetFeesInstructionDataEncoder: () =>
|
|
261
|
-
getSetHookDiscriminatorBytes: () =>
|
|
262
|
-
getSetHookInstruction: () =>
|
|
263
|
-
getSetHookInstructionDataCodec: () =>
|
|
264
|
-
getSetHookInstructionDataDecoder: () =>
|
|
265
|
-
getSetHookInstructionDataEncoder: () =>
|
|
266
|
-
getSpotPoolAddress: () =>
|
|
267
|
-
getSpotPrice0: () =>
|
|
268
|
-
getSpotPrice1: () =>
|
|
269
|
-
getSwapAddresses: () =>
|
|
270
|
-
getSwapExactInDiscriminatorBytes: () =>
|
|
271
|
-
getSwapExactInInstruction: () =>
|
|
272
|
-
getSwapExactInInstructionAsync: () =>
|
|
273
|
-
getSwapExactInInstructionDataCodec: () =>
|
|
274
|
-
getSwapExactInInstructionDataDecoder: () =>
|
|
275
|
-
getSwapExactInInstructionDataEncoder: () =>
|
|
276
|
-
getSwapQuote: () =>
|
|
277
|
-
getSwapQuoteExactOut: () =>
|
|
278
|
-
getTransferAdminDiscriminatorBytes: () =>
|
|
279
|
-
getTransferAdminInstruction: () =>
|
|
280
|
-
getTransferAdminInstructionDataCodec: () =>
|
|
281
|
-
getTransferAdminInstructionDataDecoder: () =>
|
|
282
|
-
getTransferAdminInstructionDataEncoder: () =>
|
|
283
|
-
getTvl: () =>
|
|
284
|
-
getUnpauseDiscriminatorBytes: () =>
|
|
285
|
-
getUnpauseInstruction: () =>
|
|
286
|
-
getUnpauseInstructionDataCodec: () =>
|
|
287
|
-
getUnpauseInstructionDataDecoder: () =>
|
|
288
|
-
getUnpauseInstructionDataEncoder: () =>
|
|
289
|
-
getUpdateConfigDiscriminatorBytes: () =>
|
|
290
|
-
getUpdateConfigInstruction: () =>
|
|
291
|
-
getUpdateConfigInstructionDataCodec: () =>
|
|
292
|
-
getUpdateConfigInstructionDataDecoder: () =>
|
|
293
|
-
getUpdateConfigInstructionDataEncoder: () =>
|
|
294
|
-
getWithdrawVaultExcessDiscriminatorBytes: () =>
|
|
295
|
-
getWithdrawVaultExcessInstruction: () =>
|
|
296
|
-
getWithdrawVaultExcessInstructionAsync: () =>
|
|
297
|
-
getWithdrawVaultExcessInstructionDataCodec: () =>
|
|
298
|
-
getWithdrawVaultExcessInstructionDataDecoder: () =>
|
|
299
|
-
getWithdrawVaultExcessInstructionDataEncoder: () =>
|
|
300
|
-
initializeConfigArgsCodec: () =>
|
|
301
|
-
initializeOracleArgsCodec: () =>
|
|
302
|
-
initializePoolArgsCodec: () =>
|
|
210
|
+
getOracleAddress: () => chunkO2Z5ORGF_cjs.getOracleAddress,
|
|
211
|
+
getOracleAddressFromPool: () => chunkAANZBN5X_cjs.getOracleAddressFromPool,
|
|
212
|
+
getOracleAge: () => chunkAANZBN5X_cjs.getOracleAge,
|
|
213
|
+
getOracleBufferStats: () => chunkAANZBN5X_cjs.getOracleBufferStats,
|
|
214
|
+
getOracleConsultDiscriminatorBytes: () => chunkAANZBN5X_cjs.getOracleConsultDiscriminatorBytes,
|
|
215
|
+
getOracleConsultInstruction: () => chunkAANZBN5X_cjs.getOracleConsultInstruction,
|
|
216
|
+
getOracleConsultInstructionAsync: () => chunkAANZBN5X_cjs.getOracleConsultInstructionAsync,
|
|
217
|
+
getOracleConsultInstructionDataCodec: () => chunkAANZBN5X_cjs.getOracleConsultInstructionDataCodec,
|
|
218
|
+
getOracleConsultInstructionDataDecoder: () => chunkAANZBN5X_cjs.getOracleConsultInstructionDataDecoder,
|
|
219
|
+
getOracleConsultInstructionDataEncoder: () => chunkAANZBN5X_cjs.getOracleConsultInstructionDataEncoder,
|
|
220
|
+
getOracleDeviation: () => chunkAANZBN5X_cjs.getOracleDeviation,
|
|
221
|
+
getOracleForPool: () => chunkAANZBN5X_cjs.getOracleForPool,
|
|
222
|
+
getOracleSpotPrices: () => chunkAANZBN5X_cjs.getOracleSpotPrices,
|
|
223
|
+
getOracleUpdateDiscriminatorBytes: () => chunkAANZBN5X_cjs.getOracleUpdateDiscriminatorBytes,
|
|
224
|
+
getOracleUpdateInstruction: () => chunkAANZBN5X_cjs.getOracleUpdateInstruction,
|
|
225
|
+
getOracleUpdateInstructionAsync: () => chunkAANZBN5X_cjs.getOracleUpdateInstructionAsync,
|
|
226
|
+
getOracleUpdateInstructionDataCodec: () => chunkAANZBN5X_cjs.getOracleUpdateInstructionDataCodec,
|
|
227
|
+
getOracleUpdateInstructionDataDecoder: () => chunkAANZBN5X_cjs.getOracleUpdateInstructionDataDecoder,
|
|
228
|
+
getOracleUpdateInstructionDataEncoder: () => chunkAANZBN5X_cjs.getOracleUpdateInstructionDataEncoder,
|
|
229
|
+
getPauseDiscriminatorBytes: () => chunkAANZBN5X_cjs.getPauseDiscriminatorBytes,
|
|
230
|
+
getPauseInstruction: () => chunkAANZBN5X_cjs.getPauseInstruction,
|
|
231
|
+
getPauseInstructionDataCodec: () => chunkAANZBN5X_cjs.getPauseInstructionDataCodec,
|
|
232
|
+
getPauseInstructionDataDecoder: () => chunkAANZBN5X_cjs.getPauseInstructionDataDecoder,
|
|
233
|
+
getPauseInstructionDataEncoder: () => chunkAANZBN5X_cjs.getPauseInstructionDataEncoder,
|
|
234
|
+
getPendingFees: () => chunkAANZBN5X_cjs.getPendingFees,
|
|
235
|
+
getPoolAddress: () => chunkO2Z5ORGF_cjs.getPoolAddress,
|
|
236
|
+
getPoolAddressFromMints: () => chunkAANZBN5X_cjs.getPoolAddressFromMints,
|
|
237
|
+
getPoolAuthorityAddress: () => chunkO2Z5ORGF_cjs.getPoolAuthorityAddress,
|
|
238
|
+
getPoolByMints: () => chunkAANZBN5X_cjs.getPoolByMints,
|
|
239
|
+
getPoolInitAddresses: () => chunkO2Z5ORGF_cjs.getPoolInitAddresses,
|
|
240
|
+
getPoolVault0Address: () => chunkO2Z5ORGF_cjs.getPoolVault0Address,
|
|
241
|
+
getPoolVault1Address: () => chunkO2Z5ORGF_cjs.getPoolVault1Address,
|
|
242
|
+
getPositionAddress: () => chunkO2Z5ORGF_cjs.getPositionAddress,
|
|
243
|
+
getPositionAddressFromParams: () => chunkAANZBN5X_cjs.getPositionAddressFromParams,
|
|
244
|
+
getPositionValue: () => chunkAANZBN5X_cjs.getPositionValue,
|
|
245
|
+
getPreviewSwapExactInDiscriminatorBytes: () => chunkAANZBN5X_cjs.getPreviewSwapExactInDiscriminatorBytes,
|
|
246
|
+
getPreviewSwapExactInInstruction: () => chunkAANZBN5X_cjs.getPreviewSwapExactInInstruction,
|
|
247
|
+
getPreviewSwapExactInInstructionDataCodec: () => chunkAANZBN5X_cjs.getPreviewSwapExactInInstructionDataCodec,
|
|
248
|
+
getPreviewSwapExactInInstructionDataDecoder: () => chunkAANZBN5X_cjs.getPreviewSwapExactInInstructionDataDecoder,
|
|
249
|
+
getPreviewSwapExactInInstructionDataEncoder: () => chunkAANZBN5X_cjs.getPreviewSwapExactInInstructionDataEncoder,
|
|
250
|
+
getProtocolFeeOwnerAddress: () => chunkO2Z5ORGF_cjs.getProtocolFeeOwnerAddress,
|
|
251
|
+
getProtocolFeePositionAddress: () => chunkO2Z5ORGF_cjs.getProtocolFeePositionAddress,
|
|
252
|
+
getRedeemProtocolSharesDiscriminatorBytes: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesDiscriminatorBytes,
|
|
253
|
+
getRedeemProtocolSharesInstruction: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesInstruction,
|
|
254
|
+
getRedeemProtocolSharesInstructionAsync: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesInstructionAsync,
|
|
255
|
+
getRedeemProtocolSharesInstructionDataCodec: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesInstructionDataCodec,
|
|
256
|
+
getRedeemProtocolSharesInstructionDataDecoder: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesInstructionDataDecoder,
|
|
257
|
+
getRedeemProtocolSharesInstructionDataEncoder: () => chunkAANZBN5X_cjs.getRedeemProtocolSharesInstructionDataEncoder,
|
|
258
|
+
getRemoveLiquidityDiscriminatorBytes: () => chunkAANZBN5X_cjs.getRemoveLiquidityDiscriminatorBytes,
|
|
259
|
+
getRemoveLiquidityInstruction: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstruction,
|
|
260
|
+
getRemoveLiquidityInstructionAsync: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstructionAsync,
|
|
261
|
+
getRemoveLiquidityInstructionDataCodec: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstructionDataCodec,
|
|
262
|
+
getRemoveLiquidityInstructionDataDecoder: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstructionDataDecoder,
|
|
263
|
+
getRemoveLiquidityInstructionDataEncoder: () => chunkAANZBN5X_cjs.getRemoveLiquidityInstructionDataEncoder,
|
|
264
|
+
getRemoveLiquidityQuote: () => chunkAANZBN5X_cjs.getRemoveLiquidityQuote,
|
|
265
|
+
getSetFeesDiscriminatorBytes: () => chunkAANZBN5X_cjs.getSetFeesDiscriminatorBytes,
|
|
266
|
+
getSetFeesInstruction: () => chunkAANZBN5X_cjs.getSetFeesInstruction,
|
|
267
|
+
getSetFeesInstructionDataCodec: () => chunkAANZBN5X_cjs.getSetFeesInstructionDataCodec,
|
|
268
|
+
getSetFeesInstructionDataDecoder: () => chunkAANZBN5X_cjs.getSetFeesInstructionDataDecoder,
|
|
269
|
+
getSetFeesInstructionDataEncoder: () => chunkAANZBN5X_cjs.getSetFeesInstructionDataEncoder,
|
|
270
|
+
getSetHookDiscriminatorBytes: () => chunkAANZBN5X_cjs.getSetHookDiscriminatorBytes,
|
|
271
|
+
getSetHookInstruction: () => chunkAANZBN5X_cjs.getSetHookInstruction,
|
|
272
|
+
getSetHookInstructionDataCodec: () => chunkAANZBN5X_cjs.getSetHookInstructionDataCodec,
|
|
273
|
+
getSetHookInstructionDataDecoder: () => chunkAANZBN5X_cjs.getSetHookInstructionDataDecoder,
|
|
274
|
+
getSetHookInstructionDataEncoder: () => chunkAANZBN5X_cjs.getSetHookInstructionDataEncoder,
|
|
275
|
+
getSpotPoolAddress: () => chunkO2Z5ORGF_cjs.getSpotPoolAddress,
|
|
276
|
+
getSpotPrice0: () => chunkAANZBN5X_cjs.getSpotPrice0,
|
|
277
|
+
getSpotPrice1: () => chunkAANZBN5X_cjs.getSpotPrice1,
|
|
278
|
+
getSwapAddresses: () => chunkO2Z5ORGF_cjs.getSwapAddresses,
|
|
279
|
+
getSwapExactInDiscriminatorBytes: () => chunkAANZBN5X_cjs.getSwapExactInDiscriminatorBytes,
|
|
280
|
+
getSwapExactInInstruction: () => chunkAANZBN5X_cjs.getSwapExactInInstruction,
|
|
281
|
+
getSwapExactInInstructionAsync: () => chunkAANZBN5X_cjs.getSwapExactInInstructionAsync,
|
|
282
|
+
getSwapExactInInstructionDataCodec: () => chunkAANZBN5X_cjs.getSwapExactInInstructionDataCodec,
|
|
283
|
+
getSwapExactInInstructionDataDecoder: () => chunkAANZBN5X_cjs.getSwapExactInInstructionDataDecoder,
|
|
284
|
+
getSwapExactInInstructionDataEncoder: () => chunkAANZBN5X_cjs.getSwapExactInInstructionDataEncoder,
|
|
285
|
+
getSwapQuote: () => chunkAANZBN5X_cjs.getSwapQuote,
|
|
286
|
+
getSwapQuoteExactOut: () => chunkAANZBN5X_cjs.getSwapQuoteExactOut,
|
|
287
|
+
getTransferAdminDiscriminatorBytes: () => chunkAANZBN5X_cjs.getTransferAdminDiscriminatorBytes,
|
|
288
|
+
getTransferAdminInstruction: () => chunkAANZBN5X_cjs.getTransferAdminInstruction,
|
|
289
|
+
getTransferAdminInstructionDataCodec: () => chunkAANZBN5X_cjs.getTransferAdminInstructionDataCodec,
|
|
290
|
+
getTransferAdminInstructionDataDecoder: () => chunkAANZBN5X_cjs.getTransferAdminInstructionDataDecoder,
|
|
291
|
+
getTransferAdminInstructionDataEncoder: () => chunkAANZBN5X_cjs.getTransferAdminInstructionDataEncoder,
|
|
292
|
+
getTvl: () => chunkAANZBN5X_cjs.getTvl,
|
|
293
|
+
getUnpauseDiscriminatorBytes: () => chunkAANZBN5X_cjs.getUnpauseDiscriminatorBytes,
|
|
294
|
+
getUnpauseInstruction: () => chunkAANZBN5X_cjs.getUnpauseInstruction,
|
|
295
|
+
getUnpauseInstructionDataCodec: () => chunkAANZBN5X_cjs.getUnpauseInstructionDataCodec,
|
|
296
|
+
getUnpauseInstructionDataDecoder: () => chunkAANZBN5X_cjs.getUnpauseInstructionDataDecoder,
|
|
297
|
+
getUnpauseInstructionDataEncoder: () => chunkAANZBN5X_cjs.getUnpauseInstructionDataEncoder,
|
|
298
|
+
getUpdateConfigDiscriminatorBytes: () => chunkAANZBN5X_cjs.getUpdateConfigDiscriminatorBytes,
|
|
299
|
+
getUpdateConfigInstruction: () => chunkAANZBN5X_cjs.getUpdateConfigInstruction,
|
|
300
|
+
getUpdateConfigInstructionDataCodec: () => chunkAANZBN5X_cjs.getUpdateConfigInstructionDataCodec,
|
|
301
|
+
getUpdateConfigInstructionDataDecoder: () => chunkAANZBN5X_cjs.getUpdateConfigInstructionDataDecoder,
|
|
302
|
+
getUpdateConfigInstructionDataEncoder: () => chunkAANZBN5X_cjs.getUpdateConfigInstructionDataEncoder,
|
|
303
|
+
getWithdrawVaultExcessDiscriminatorBytes: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessDiscriminatorBytes,
|
|
304
|
+
getWithdrawVaultExcessInstruction: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstruction,
|
|
305
|
+
getWithdrawVaultExcessInstructionAsync: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstructionAsync,
|
|
306
|
+
getWithdrawVaultExcessInstructionDataCodec: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstructionDataCodec,
|
|
307
|
+
getWithdrawVaultExcessInstructionDataDecoder: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstructionDataDecoder,
|
|
308
|
+
getWithdrawVaultExcessInstructionDataEncoder: () => chunkAANZBN5X_cjs.getWithdrawVaultExcessInstructionDataEncoder,
|
|
309
|
+
initializeConfigArgsCodec: () => chunkAANZBN5X_cjs.initializeConfigArgsCodec,
|
|
310
|
+
initializeOracleArgsCodec: () => chunkAANZBN5X_cjs.initializeOracleArgsCodec,
|
|
311
|
+
initializePoolArgsCodec: () => chunkAANZBN5X_cjs.initializePoolArgsCodec,
|
|
303
312
|
isCpmmError: () => isCpmmError,
|
|
304
|
-
isOracleStale: () =>
|
|
305
|
-
isTransactionSigner: () =>
|
|
306
|
-
isqrt: () =>
|
|
313
|
+
isOracleStale: () => chunkAANZBN5X_cjs.isOracleStale,
|
|
314
|
+
isTransactionSigner: () => chunkAANZBN5X_cjs.isTransactionSigner,
|
|
315
|
+
isqrt: () => chunkAANZBN5X_cjs.isqrt,
|
|
307
316
|
marketCapToCurveParams: () => marketCapToCurveParams,
|
|
308
317
|
marketCapToSingleCurveParams: () => marketCapToSingleCurveParams,
|
|
309
318
|
marketCapToTokenPrice: () => marketCapToTokenPrice,
|
|
310
|
-
maxBigInt: () =>
|
|
311
|
-
minBigInt: () =>
|
|
312
|
-
normalizeProgramAccountsResponse: () =>
|
|
313
|
-
numberToQ64: () =>
|
|
314
|
-
observationCodec: () =>
|
|
315
|
-
oracleConsultArgsCodec: () =>
|
|
316
|
-
oracleStateDataCodec: () =>
|
|
317
|
-
parseAddLiquidityInstruction: () =>
|
|
318
|
-
parseClosePositionInstruction: () =>
|
|
319
|
-
parseCollectFeesInstruction: () =>
|
|
320
|
-
parseCollectProtocolFeesInstruction: () =>
|
|
321
|
-
parseCreatePositionInstruction: () =>
|
|
319
|
+
maxBigInt: () => chunkAANZBN5X_cjs.maxBigInt,
|
|
320
|
+
minBigInt: () => chunkAANZBN5X_cjs.minBigInt,
|
|
321
|
+
normalizeProgramAccountsResponse: () => chunkAANZBN5X_cjs.normalizeProgramAccountsResponse,
|
|
322
|
+
numberToQ64: () => chunkAANZBN5X_cjs.numberToQ64,
|
|
323
|
+
observationCodec: () => chunkAANZBN5X_cjs.observationCodec,
|
|
324
|
+
oracleConsultArgsCodec: () => chunkAANZBN5X_cjs.oracleConsultArgsCodec,
|
|
325
|
+
oracleStateDataCodec: () => chunkAANZBN5X_cjs.oracleStateDataCodec,
|
|
326
|
+
parseAddLiquidityInstruction: () => chunkAANZBN5X_cjs.parseAddLiquidityInstruction,
|
|
327
|
+
parseClosePositionInstruction: () => chunkAANZBN5X_cjs.parseClosePositionInstruction,
|
|
328
|
+
parseCollectFeesInstruction: () => chunkAANZBN5X_cjs.parseCollectFeesInstruction,
|
|
329
|
+
parseCollectProtocolFeesInstruction: () => chunkAANZBN5X_cjs.parseCollectProtocolFeesInstruction,
|
|
330
|
+
parseCreatePositionInstruction: () => chunkAANZBN5X_cjs.parseCreatePositionInstruction,
|
|
322
331
|
parseErrorFromLogs: () => parseErrorFromLogs,
|
|
323
|
-
parseInitializeConfigInstruction: () =>
|
|
324
|
-
parseInitializeOracleInstruction: () =>
|
|
325
|
-
parseInitializePoolInstruction: () =>
|
|
326
|
-
parseInitializeSpotPoolInstruction: () =>
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
332
|
+
parseInitializeConfigInstruction: () => chunkAANZBN5X_cjs.parseInitializeConfigInstruction,
|
|
333
|
+
parseInitializeOracleInstruction: () => chunkAANZBN5X_cjs.parseInitializeOracleInstruction,
|
|
334
|
+
parseInitializePoolInstruction: () => chunkAANZBN5X_cjs.parseInitializePoolInstruction,
|
|
335
|
+
parseInitializeSpotPoolInstruction: () => chunkAANZBN5X_cjs.parseInitializeSpotPoolInstruction,
|
|
336
|
+
parseInitializeSpotPoolWithHookInstruction: () => chunkAANZBN5X_cjs.parseInitializeSpotPoolWithHookInstruction,
|
|
337
|
+
parseOracleConsultInstruction: () => chunkAANZBN5X_cjs.parseOracleConsultInstruction,
|
|
338
|
+
parseOracleUpdateInstruction: () => chunkAANZBN5X_cjs.parseOracleUpdateInstruction,
|
|
339
|
+
parsePauseInstruction: () => chunkAANZBN5X_cjs.parsePauseInstruction,
|
|
340
|
+
parsePreviewSwapExactInInstruction: () => chunkAANZBN5X_cjs.parsePreviewSwapExactInInstruction,
|
|
341
|
+
parseRedeemProtocolSharesInstruction: () => chunkAANZBN5X_cjs.parseRedeemProtocolSharesInstruction,
|
|
342
|
+
parseRemoveLiquidityInstruction: () => chunkAANZBN5X_cjs.parseRemoveLiquidityInstruction,
|
|
343
|
+
parseSetFeesInstruction: () => chunkAANZBN5X_cjs.parseSetFeesInstruction,
|
|
344
|
+
parseSetHookInstruction: () => chunkAANZBN5X_cjs.parseSetHookInstruction,
|
|
345
|
+
parseSwapExactInInstruction: () => chunkAANZBN5X_cjs.parseSwapExactInInstruction,
|
|
346
|
+
parseTransferAdminInstruction: () => chunkAANZBN5X_cjs.parseTransferAdminInstruction,
|
|
347
|
+
parseUnpauseInstruction: () => chunkAANZBN5X_cjs.parseUnpauseInstruction,
|
|
348
|
+
parseUpdateConfigInstruction: () => chunkAANZBN5X_cjs.parseUpdateConfigInstruction,
|
|
349
|
+
parseWithdrawVaultExcessInstruction: () => chunkAANZBN5X_cjs.parseWithdrawVaultExcessInstruction,
|
|
350
|
+
poolDataCodec: () => chunkAANZBN5X_cjs.poolDataCodec,
|
|
351
|
+
poolExists: () => chunkAANZBN5X_cjs.poolExists,
|
|
352
|
+
positionDataCodec: () => chunkAANZBN5X_cjs.positionDataCodec,
|
|
353
|
+
q64Div: () => chunkAANZBN5X_cjs.q64Div,
|
|
354
|
+
q64Mul: () => chunkAANZBN5X_cjs.q64Mul,
|
|
355
|
+
q64ToNumber: () => chunkAANZBN5X_cjs.q64ToNumber,
|
|
356
|
+
ratioToNumber: () => chunkAANZBN5X_cjs.ratioToNumber,
|
|
357
|
+
removeLiquidityArgsCodec: () => chunkAANZBN5X_cjs.removeLiquidityArgsCodec,
|
|
358
|
+
setFeesArgsCodec: () => chunkAANZBN5X_cjs.setFeesArgsCodec,
|
|
359
|
+
setHookArgsCodec: () => chunkAANZBN5X_cjs.setHookArgsCodec,
|
|
360
|
+
sortMints: () => chunkO2Z5ORGF_cjs.sortMints,
|
|
361
|
+
sortPoolsByReserves: () => chunkAANZBN5X_cjs.sortPoolsByReserves,
|
|
362
|
+
sortPositionsByShares: () => chunkAANZBN5X_cjs.sortPositionsByShares,
|
|
363
|
+
swapExactInArgsCodec: () => chunkAANZBN5X_cjs.swapExactInArgsCodec,
|
|
364
|
+
transferAdminArgsCodec: () => chunkAANZBN5X_cjs.transferAdminArgsCodec,
|
|
355
365
|
validateMarketCapParameters: () => validateMarketCapParameters,
|
|
356
|
-
warnAccountDecodeFailure: () =>
|
|
366
|
+
warnAccountDecodeFailure: () => chunkAANZBN5X_cjs.warnAccountDecodeFailure
|
|
357
367
|
});
|
|
358
368
|
var addressCodec = kit.getAddressCodec();
|
|
359
369
|
var textEncoder = new TextEncoder();
|
|
360
370
|
async function getMetadataAddress(mint) {
|
|
361
371
|
return kit.getProgramDerivedAddress({
|
|
362
|
-
programAddress:
|
|
372
|
+
programAddress: chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
363
373
|
seeds: [
|
|
364
374
|
textEncoder.encode("metadata"),
|
|
365
|
-
addressCodec.encode(
|
|
375
|
+
addressCodec.encode(chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
366
376
|
addressCodec.encode(mint)
|
|
367
377
|
]
|
|
368
378
|
});
|
|
@@ -675,12 +685,12 @@ function createSwapInstruction(params) {
|
|
|
675
685
|
token0Program,
|
|
676
686
|
token1Program,
|
|
677
687
|
tokenProgram,
|
|
678
|
-
programId =
|
|
688
|
+
programId = chunkAANZBN5X_cjs.CPMM_PROGRAM_ADDRESS
|
|
679
689
|
} = params;
|
|
680
690
|
const trader = typeof user === "string" ? kit.createNoopSigner(user) : user;
|
|
681
691
|
const [vaultIn, vaultOut] = tradeDirection === 0 ? [vault0, vault1] : [vault1, vault0];
|
|
682
692
|
const [userIn, userOut] = tradeDirection === 0 ? [userToken0, userToken1] : [userToken1, userToken0];
|
|
683
|
-
const instruction =
|
|
693
|
+
const instruction = chunkAANZBN5X_cjs.getSwapExactInInstruction(
|
|
684
694
|
{
|
|
685
695
|
config,
|
|
686
696
|
pool,
|
|
@@ -692,8 +702,8 @@ function createSwapInstruction(params) {
|
|
|
692
702
|
userIn,
|
|
693
703
|
userOut,
|
|
694
704
|
trader,
|
|
695
|
-
token0Program: token0Program ?? tokenProgram ??
|
|
696
|
-
token1Program: token1Program ?? tokenProgram ??
|
|
705
|
+
token0Program: token0Program ?? tokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
706
|
+
token1Program: token1Program ?? tokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
697
707
|
oracle,
|
|
698
708
|
amountIn,
|
|
699
709
|
minAmountOut,
|
|
@@ -706,15 +716,15 @@ function createSwapInstruction(params) {
|
|
|
706
716
|
...instruction,
|
|
707
717
|
accounts: [
|
|
708
718
|
...instruction.accounts ?? [],
|
|
709
|
-
...remainingAccounts.map(
|
|
719
|
+
...remainingAccounts.map(chunkAANZBN5X_cjs.createReadonlyRemainingAccountMeta)
|
|
710
720
|
]
|
|
711
721
|
};
|
|
712
722
|
}
|
|
713
723
|
var MAX_FEE_AMOUNT = BigInt("18446744073709551615");
|
|
714
724
|
|
|
715
725
|
// src/solana/client/config.ts
|
|
716
|
-
async function fetchConfig(rpc, programId =
|
|
717
|
-
const [configAddress] = await
|
|
726
|
+
async function fetchConfig(rpc, programId = chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
727
|
+
const [configAddress] = await chunkO2Z5ORGF_cjs.getConfigAddress(programId);
|
|
718
728
|
const response = await rpc.getAccountInfo(configAddress, {
|
|
719
729
|
encoding: "base64",
|
|
720
730
|
commitment
|
|
@@ -722,10 +732,10 @@ async function fetchConfig(rpc, programId = chunk4CI2M2F6_cjs.CPMM_PROGRAM_ID, c
|
|
|
722
732
|
if (!response.value) {
|
|
723
733
|
return null;
|
|
724
734
|
}
|
|
725
|
-
return
|
|
735
|
+
return chunkAANZBN5X_cjs.decodeAmmConfig(chunkAANZBN5X_cjs.base64ToBytes(response.value.data[0]));
|
|
726
736
|
}
|
|
727
|
-
async function fetchConfigWithAddress(rpc, programId =
|
|
728
|
-
const [configAddress] = await
|
|
737
|
+
async function fetchConfigWithAddress(rpc, programId = chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID, commitment) {
|
|
738
|
+
const [configAddress] = await chunkO2Z5ORGF_cjs.getConfigAddress(programId);
|
|
729
739
|
const account = await fetchConfig(rpc, programId, commitment);
|
|
730
740
|
if (!account) {
|
|
731
741
|
return null;
|
|
@@ -2077,10 +2087,10 @@ function getCurveSwapFeeAmount(amountIn, swapFeeBps) {
|
|
|
2077
2087
|
if (amountIn < 0n) {
|
|
2078
2088
|
throw new Error("amountIn must be non-negative");
|
|
2079
2089
|
}
|
|
2080
|
-
if (!Number.isInteger(swapFeeBps) || swapFeeBps < 0 || swapFeeBps > Number(
|
|
2090
|
+
if (!Number.isInteger(swapFeeBps) || swapFeeBps < 0 || swapFeeBps > Number(chunkO2Z5ORGF_cjs.BPS_DENOM)) {
|
|
2081
2091
|
throw new Error("swapFeeBps must be an integer from 0 to 10000");
|
|
2082
2092
|
}
|
|
2083
|
-
return
|
|
2093
|
+
return chunkAANZBN5X_cjs.ceilDiv(amountIn * BigInt(swapFeeBps), chunkO2Z5ORGF_cjs.BPS_DENOM);
|
|
2084
2094
|
}
|
|
2085
2095
|
function phaseLabel(phase) {
|
|
2086
2096
|
switch (phase) {
|
|
@@ -2172,7 +2182,7 @@ function getDopplerLaunchHookV1RemainingAccounts({
|
|
|
2172
2182
|
signedHookRemainingAccounts.push(cosigner);
|
|
2173
2183
|
}
|
|
2174
2184
|
const unsignedHookRemainingAccounts = signedHookRemainingAccounts.map(
|
|
2175
|
-
|
|
2185
|
+
chunkAANZBN5X_cjs.getAddressFromRemainingAccount
|
|
2176
2186
|
);
|
|
2177
2187
|
return {
|
|
2178
2188
|
signedHookRemainingAccounts,
|
|
@@ -3335,10 +3345,10 @@ function createInitializeConfigInstruction(accounts, args, programId = INITIALIZ
|
|
|
3335
3345
|
admin,
|
|
3336
3346
|
config,
|
|
3337
3347
|
programData,
|
|
3338
|
-
systemProgram =
|
|
3348
|
+
systemProgram = chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS
|
|
3339
3349
|
} = accounts;
|
|
3340
3350
|
const keys = [
|
|
3341
|
-
|
|
3351
|
+
chunkAANZBN5X_cjs.createAccountMeta(admin, kit.AccountRole.WRITABLE_SIGNER),
|
|
3342
3352
|
{ address: config, role: kit.AccountRole.WRITABLE },
|
|
3343
3353
|
{ address: programData, role: kit.AccountRole.READONLY },
|
|
3344
3354
|
{ address: systemProgram, role: kit.AccountRole.READONLY }
|
|
@@ -3351,7 +3361,7 @@ function createInitializeConfigInstruction(accounts, args, programId = INITIALIZ
|
|
|
3351
3361
|
function createSetMigratorAllowlistInstruction(accounts, allowlist, programId = INITIALIZER_PROGRAM_ID) {
|
|
3352
3362
|
const { admin, config } = accounts;
|
|
3353
3363
|
const keys = [
|
|
3354
|
-
|
|
3364
|
+
chunkAANZBN5X_cjs.createAccountMeta(admin, kit.AccountRole.WRITABLE_SIGNER),
|
|
3355
3365
|
{ address: config, role: kit.AccountRole.WRITABLE }
|
|
3356
3366
|
];
|
|
3357
3367
|
const data = new Uint8Array(
|
|
@@ -3362,7 +3372,7 @@ function createSetMigratorAllowlistInstruction(accounts, allowlist, programId =
|
|
|
3362
3372
|
function createSetHookAllowlistInstruction(accounts, allowlist, programId = INITIALIZER_PROGRAM_ID) {
|
|
3363
3373
|
const { admin, config } = accounts;
|
|
3364
3374
|
const keys = [
|
|
3365
|
-
|
|
3375
|
+
chunkAANZBN5X_cjs.createAccountMeta(admin, kit.AccountRole.WRITABLE_SIGNER),
|
|
3366
3376
|
{ address: config, role: kit.AccountRole.WRITABLE }
|
|
3367
3377
|
];
|
|
3368
3378
|
const data = new Uint8Array(
|
|
@@ -5454,10 +5464,10 @@ async function getPredictionEntryByMintAddress(market, mint, programId = PREDICT
|
|
|
5454
5464
|
async function getTokenMetadataAddress(mint) {
|
|
5455
5465
|
const encoder = kit.getAddressEncoder();
|
|
5456
5466
|
const [metadataAddress] = await kit.getProgramDerivedAddress({
|
|
5457
|
-
programAddress:
|
|
5467
|
+
programAddress: chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
5458
5468
|
seeds: [
|
|
5459
5469
|
new TextEncoder().encode("metadata"),
|
|
5460
|
-
encoder.encode(
|
|
5470
|
+
encoder.encode(chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID),
|
|
5461
5471
|
encoder.encode(mint)
|
|
5462
5472
|
]
|
|
5463
5473
|
});
|
|
@@ -5488,18 +5498,18 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5488
5498
|
authority,
|
|
5489
5499
|
hookProgram,
|
|
5490
5500
|
migratorProgram,
|
|
5491
|
-
baseTokenProgram =
|
|
5492
|
-
quoteTokenProgram =
|
|
5493
|
-
systemProgram =
|
|
5501
|
+
baseTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5502
|
+
quoteTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5503
|
+
systemProgram = chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5494
5504
|
rent,
|
|
5495
5505
|
metadataAccount,
|
|
5496
|
-
metadataProgram =
|
|
5506
|
+
metadataProgram = chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID,
|
|
5497
5507
|
hookCreateRemainingAccounts = []
|
|
5498
5508
|
} = accounts;
|
|
5499
5509
|
const withMetadata = Boolean(
|
|
5500
5510
|
args.metadataName && args.metadataName.length > 0
|
|
5501
5511
|
);
|
|
5502
|
-
const withToken2022Metadata = withMetadata && baseTokenProgram ===
|
|
5512
|
+
const withToken2022Metadata = withMetadata && baseTokenProgram === chunkO2Z5ORGF_cjs.TOKEN_2022_PROGRAM_ADDRESS;
|
|
5503
5513
|
if (withMetadata && !metadataAccount) {
|
|
5504
5514
|
throw new Error(
|
|
5505
5515
|
"metadataName is set but metadataAccount was not provided. Derive it with await initializer.getTokenMetadataAddress(baseMintAddress)."
|
|
@@ -5507,7 +5517,7 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5507
5517
|
}
|
|
5508
5518
|
const createHooksEnabled = (args.hookFlags & (HF_BEFORE_CREATE | HF_AFTER_CREATE)) !== 0;
|
|
5509
5519
|
const hookCreateRemainingAccountAddresses = hookCreateRemainingAccounts.map(
|
|
5510
|
-
|
|
5520
|
+
chunkAANZBN5X_cjs.getAddressFromAddressOrSigner
|
|
5511
5521
|
);
|
|
5512
5522
|
const swapFeeBps = args.swapFeeBps ?? args.curveFeeBps;
|
|
5513
5523
|
if (swapFeeBps === void 0) {
|
|
@@ -5517,18 +5527,18 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5517
5527
|
{ address: config, role: kit.AccountRole.READONLY },
|
|
5518
5528
|
{ address: launch, role: kit.AccountRole.WRITABLE },
|
|
5519
5529
|
{ address: launchAuthority, role: kit.AccountRole.READONLY },
|
|
5520
|
-
|
|
5530
|
+
chunkAANZBN5X_cjs.createAccountMeta(baseMint, kit.AccountRole.WRITABLE_SIGNER),
|
|
5521
5531
|
{ address: quoteMint, role: kit.AccountRole.READONLY },
|
|
5522
|
-
|
|
5523
|
-
|
|
5532
|
+
chunkAANZBN5X_cjs.createAccountMeta(baseVault, kit.AccountRole.WRITABLE_SIGNER),
|
|
5533
|
+
chunkAANZBN5X_cjs.createAccountMeta(quoteVault, kit.AccountRole.WRITABLE_SIGNER),
|
|
5524
5534
|
{
|
|
5525
5535
|
address: launchFeeState ?? (await getLaunchFeeStateAddress(launch, programId))[0],
|
|
5526
5536
|
role: kit.AccountRole.WRITABLE
|
|
5527
5537
|
},
|
|
5528
|
-
|
|
5538
|
+
chunkAANZBN5X_cjs.createAccountMeta(payer, kit.AccountRole.WRITABLE_SIGNER)
|
|
5529
5539
|
];
|
|
5530
5540
|
keys.push(
|
|
5531
|
-
authority ?
|
|
5541
|
+
authority ? chunkAANZBN5X_cjs.createAccountMeta(authority, kit.AccountRole.READONLY_SIGNER) : { address: programId, role: kit.AccountRole.READONLY }
|
|
5532
5542
|
);
|
|
5533
5543
|
keys.push(
|
|
5534
5544
|
hookProgram ? { address: hookProgram, role: kit.AccountRole.READONLY } : { address: programId, role: kit.AccountRole.READONLY }
|
|
@@ -5561,15 +5571,15 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5561
5571
|
);
|
|
5562
5572
|
if (withToken2022Metadata) {
|
|
5563
5573
|
keys.push({
|
|
5564
|
-
address:
|
|
5574
|
+
address: chunkO2Z5ORGF_cjs.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
5565
5575
|
role: kit.AccountRole.READONLY
|
|
5566
5576
|
});
|
|
5567
5577
|
}
|
|
5568
5578
|
keys.push(
|
|
5569
5579
|
...hookCreateRemainingAccounts.map(
|
|
5570
|
-
(account) =>
|
|
5580
|
+
(account) => chunkAANZBN5X_cjs.createAccountMeta(
|
|
5571
5581
|
account,
|
|
5572
|
-
|
|
5582
|
+
chunkAANZBN5X_cjs.isTransactionSigner(account) ? kit.AccountRole.READONLY_SIGNER : kit.AccountRole.READONLY
|
|
5573
5583
|
)
|
|
5574
5584
|
)
|
|
5575
5585
|
);
|
|
@@ -5593,7 +5603,7 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
5593
5603
|
if (migratorProgram === PREDICTION_MIGRATOR_PROGRAM_ADDRESS) {
|
|
5594
5604
|
const oracleState = args.namespace;
|
|
5595
5605
|
const entryId = args.launchId;
|
|
5596
|
-
const baseMintAddress =
|
|
5606
|
+
const baseMintAddress = chunkAANZBN5X_cjs.getAddressFromAddressOrSigner(baseMint);
|
|
5597
5607
|
const [market] = await getPredictionMarketAddress(oracleState, quoteMint);
|
|
5598
5608
|
const [potVault] = await getPredictionPotVaultAddress(market);
|
|
5599
5609
|
const [marketAuthority] = await getPredictionMarketAuthorityAddress(market);
|
|
@@ -5622,10 +5632,10 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
5622
5632
|
baseMint,
|
|
5623
5633
|
quoteMint,
|
|
5624
5634
|
user,
|
|
5625
|
-
hookProgram =
|
|
5635
|
+
hookProgram = chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5626
5636
|
launchFeeState,
|
|
5627
|
-
baseTokenProgram =
|
|
5628
|
-
quoteTokenProgram =
|
|
5637
|
+
baseTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5638
|
+
quoteTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5629
5639
|
remainingAccounts = []
|
|
5630
5640
|
} = accounts;
|
|
5631
5641
|
const keys = [
|
|
@@ -5637,7 +5647,7 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
5637
5647
|
{ address: userQuoteAccount, role: kit.AccountRole.WRITABLE },
|
|
5638
5648
|
{ address: baseMint, role: kit.AccountRole.READONLY },
|
|
5639
5649
|
{ address: quoteMint, role: kit.AccountRole.READONLY },
|
|
5640
|
-
|
|
5650
|
+
chunkAANZBN5X_cjs.createAccountMeta(user, kit.AccountRole.READONLY_SIGNER),
|
|
5641
5651
|
// hook_program is Optional in the on-chain struct but still occupies a fixed
|
|
5642
5652
|
// slot (token_program follows it). Always emit it — use SYSTEM_PROGRAM_ADDRESS as the
|
|
5643
5653
|
// no-op placeholder when no real hook is configured.
|
|
@@ -5645,7 +5655,7 @@ function createCurveSwapExactInInstruction(accounts, args, programId = INITIALIZ
|
|
|
5645
5655
|
{ address: launchFeeState, role: kit.AccountRole.WRITABLE },
|
|
5646
5656
|
{ address: baseTokenProgram, role: kit.AccountRole.READONLY },
|
|
5647
5657
|
{ address: quoteTokenProgram, role: kit.AccountRole.READONLY },
|
|
5648
|
-
...remainingAccounts.map(
|
|
5658
|
+
...remainingAccounts.map(chunkAANZBN5X_cjs.createReadonlyRemainingAccountMeta)
|
|
5649
5659
|
];
|
|
5650
5660
|
const data = new Uint8Array(
|
|
5651
5661
|
getCurveSwapExactInInstructionDataEncoder().encode(args)
|
|
@@ -5664,9 +5674,9 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
5664
5674
|
launchFeeState,
|
|
5665
5675
|
migratorProgram,
|
|
5666
5676
|
payer,
|
|
5667
|
-
baseTokenProgram =
|
|
5668
|
-
quoteTokenProgram =
|
|
5669
|
-
systemProgram =
|
|
5677
|
+
baseTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5678
|
+
quoteTokenProgram = chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
5679
|
+
systemProgram = chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
5670
5680
|
rent
|
|
5671
5681
|
} = accounts;
|
|
5672
5682
|
const keys = [
|
|
@@ -5679,13 +5689,13 @@ function createMigrateLaunchInstruction(accounts, programId = INITIALIZER_PROGRA
|
|
|
5679
5689
|
{ address: quoteVault, role: kit.AccountRole.WRITABLE },
|
|
5680
5690
|
{ address: launchFeeState, role: kit.AccountRole.READONLY },
|
|
5681
5691
|
{ address: migratorProgram, role: kit.AccountRole.READONLY },
|
|
5682
|
-
|
|
5692
|
+
chunkAANZBN5X_cjs.createAccountMeta(payer, kit.AccountRole.WRITABLE_SIGNER),
|
|
5683
5693
|
{ address: baseTokenProgram, role: kit.AccountRole.READONLY },
|
|
5684
5694
|
{ address: quoteTokenProgram, role: kit.AccountRole.READONLY },
|
|
5685
5695
|
{ address: systemProgram, role: kit.AccountRole.READONLY },
|
|
5686
5696
|
{ address: rent, role: kit.AccountRole.READONLY }
|
|
5687
5697
|
];
|
|
5688
|
-
const data =
|
|
5698
|
+
const data = chunkAANZBN5X_cjs.encodeInstructionData(
|
|
5689
5699
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.migrateLaunch
|
|
5690
5700
|
);
|
|
5691
5701
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -5712,7 +5722,7 @@ function createPreviewSwapExactInInstruction(accounts, args, programId = INITIAL
|
|
|
5712
5722
|
const accountsList = hookProgram ? [...keys, { address: hookProgram, role: kit.AccountRole.READONLY }] : keys;
|
|
5713
5723
|
const accountsWithRemaining = [
|
|
5714
5724
|
...accountsList,
|
|
5715
|
-
...remainingAccounts.map(
|
|
5725
|
+
...remainingAccounts.map(chunkAANZBN5X_cjs.createReadonlyRemainingAccountMeta)
|
|
5716
5726
|
];
|
|
5717
5727
|
const data = new Uint8Array(
|
|
5718
5728
|
getPreviewSwapExactInInstructionDataEncoder2().encode(args)
|
|
@@ -5735,7 +5745,7 @@ function createPreviewMigrationInstruction(accounts, programId = INITIALIZER_PRO
|
|
|
5735
5745
|
{ address: baseVault, role: kit.AccountRole.READONLY },
|
|
5736
5746
|
{ address: quoteVault, role: kit.AccountRole.READONLY }
|
|
5737
5747
|
];
|
|
5738
|
-
const data =
|
|
5748
|
+
const data = chunkAANZBN5X_cjs.encodeInstructionData(
|
|
5739
5749
|
INITIALIZER_INSTRUCTION_DISCRIMINATORS.previewMigration
|
|
5740
5750
|
);
|
|
5741
5751
|
return { programAddress: programId, accounts: keys, data };
|
|
@@ -5790,7 +5800,9 @@ function getCreateSpotPoolArgsEncoder() {
|
|
|
5790
5800
|
["positionId", kit.getU64Encoder()],
|
|
5791
5801
|
["amount0Max", kit.getU64Encoder()],
|
|
5792
5802
|
["amount1Max", kit.getU64Encoder()],
|
|
5793
|
-
["minSharesOut", kit.getU128Encoder()]
|
|
5803
|
+
["minSharesOut", kit.getU128Encoder()],
|
|
5804
|
+
["hookProgram", kit.getAddressEncoder()],
|
|
5805
|
+
["hookFlags", kit.getU32Encoder()]
|
|
5794
5806
|
]);
|
|
5795
5807
|
}
|
|
5796
5808
|
function getCreateSpotPoolArgsDecoder() {
|
|
@@ -5799,7 +5811,9 @@ function getCreateSpotPoolArgsDecoder() {
|
|
|
5799
5811
|
["positionId", kit.getU64Decoder()],
|
|
5800
5812
|
["amount0Max", kit.getU64Decoder()],
|
|
5801
5813
|
["amount1Max", kit.getU64Decoder()],
|
|
5802
|
-
["minSharesOut", kit.getU128Decoder()]
|
|
5814
|
+
["minSharesOut", kit.getU128Decoder()],
|
|
5815
|
+
["hookProgram", kit.getAddressDecoder()],
|
|
5816
|
+
["hookFlags", kit.getU32Decoder()]
|
|
5803
5817
|
]);
|
|
5804
5818
|
}
|
|
5805
5819
|
function getCreateSpotPoolArgsCodec() {
|
|
@@ -5961,7 +5975,9 @@ function getCreateSpotPoolInstructionDataEncoder() {
|
|
|
5961
5975
|
["positionId", kit.getU64Encoder()],
|
|
5962
5976
|
["amount0Max", kit.getU64Encoder()],
|
|
5963
5977
|
["amount1Max", kit.getU64Encoder()],
|
|
5964
|
-
["minSharesOut", kit.getU128Encoder()]
|
|
5978
|
+
["minSharesOut", kit.getU128Encoder()],
|
|
5979
|
+
["hookProgram", kit.getAddressEncoder()],
|
|
5980
|
+
["hookFlags", kit.getU32Encoder()]
|
|
5965
5981
|
]),
|
|
5966
5982
|
(value) => ({ ...value, discriminator: CREATE_SPOT_POOL_DISCRIMINATOR })
|
|
5967
5983
|
);
|
|
@@ -5973,7 +5989,9 @@ function getCreateSpotPoolInstructionDataDecoder() {
|
|
|
5973
5989
|
["positionId", kit.getU64Decoder()],
|
|
5974
5990
|
["amount0Max", kit.getU64Decoder()],
|
|
5975
5991
|
["amount1Max", kit.getU64Decoder()],
|
|
5976
|
-
["minSharesOut", kit.getU128Decoder()]
|
|
5992
|
+
["minSharesOut", kit.getU128Decoder()],
|
|
5993
|
+
["hookProgram", kit.getAddressDecoder()],
|
|
5994
|
+
["hookFlags", kit.getU32Decoder()]
|
|
5977
5995
|
]);
|
|
5978
5996
|
}
|
|
5979
5997
|
function getCreateSpotPoolInstructionDataCodec() {
|
|
@@ -6013,10 +6031,11 @@ async function getCreateSpotPoolInstructionAsync(input, config) {
|
|
|
6013
6031
|
token0Program: { value: input.token0Program ?? null, isWritable: false },
|
|
6014
6032
|
token1Program: { value: input.token1Program ?? null, isWritable: false },
|
|
6015
6033
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
6016
|
-
rent: { value: input.rent ?? null, isWritable: false }
|
|
6034
|
+
rent: { value: input.rent ?? null, isWritable: false },
|
|
6035
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false }
|
|
6017
6036
|
};
|
|
6018
6037
|
const accounts = originalAccounts;
|
|
6019
|
-
const args = { ...input };
|
|
6038
|
+
const args = { ...input, hookProgram: input.hookProgramArg };
|
|
6020
6039
|
if (!accounts.cpmmProgram.value) {
|
|
6021
6040
|
accounts.cpmmProgram.value = "9PSxVPoPfnbZ8Q1uQhgS6ZxvBjFboZtebNsu34umxkgQ";
|
|
6022
6041
|
}
|
|
@@ -6078,7 +6097,8 @@ async function getCreateSpotPoolInstructionAsync(input, config) {
|
|
|
6078
6097
|
getAccountMeta("token0Program", accounts.token0Program),
|
|
6079
6098
|
getAccountMeta("token1Program", accounts.token1Program),
|
|
6080
6099
|
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
6081
|
-
getAccountMeta("rent", accounts.rent)
|
|
6100
|
+
getAccountMeta("rent", accounts.rent),
|
|
6101
|
+
getAccountMeta("hookProgram", accounts.hookProgram)
|
|
6082
6102
|
],
|
|
6083
6103
|
data: getCreateSpotPoolInstructionDataEncoder().encode(
|
|
6084
6104
|
args
|
|
@@ -6117,10 +6137,11 @@ function getCreateSpotPoolInstruction(input, config) {
|
|
|
6117
6137
|
token0Program: { value: input.token0Program ?? null, isWritable: false },
|
|
6118
6138
|
token1Program: { value: input.token1Program ?? null, isWritable: false },
|
|
6119
6139
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false },
|
|
6120
|
-
rent: { value: input.rent ?? null, isWritable: false }
|
|
6140
|
+
rent: { value: input.rent ?? null, isWritable: false },
|
|
6141
|
+
hookProgram: { value: input.hookProgram ?? null, isWritable: false }
|
|
6121
6142
|
};
|
|
6122
6143
|
const accounts = originalAccounts;
|
|
6123
|
-
const args = { ...input };
|
|
6144
|
+
const args = { ...input, hookProgram: input.hookProgramArg };
|
|
6124
6145
|
if (!accounts.cpmmProgram.value) {
|
|
6125
6146
|
accounts.cpmmProgram.value = "9PSxVPoPfnbZ8Q1uQhgS6ZxvBjFboZtebNsu34umxkgQ";
|
|
6126
6147
|
}
|
|
@@ -6152,7 +6173,8 @@ function getCreateSpotPoolInstruction(input, config) {
|
|
|
6152
6173
|
getAccountMeta("token0Program", accounts.token0Program),
|
|
6153
6174
|
getAccountMeta("token1Program", accounts.token1Program),
|
|
6154
6175
|
getAccountMeta("systemProgram", accounts.systemProgram),
|
|
6155
|
-
getAccountMeta("rent", accounts.rent)
|
|
6176
|
+
getAccountMeta("rent", accounts.rent),
|
|
6177
|
+
getAccountMeta("hookProgram", accounts.hookProgram)
|
|
6156
6178
|
],
|
|
6157
6179
|
data: getCreateSpotPoolInstructionDataEncoder().encode(
|
|
6158
6180
|
args
|
|
@@ -6219,10 +6241,12 @@ async function deriveSpotPoolAccounts({
|
|
|
6219
6241
|
token0Account,
|
|
6220
6242
|
token1Account,
|
|
6221
6243
|
positionId = 0n,
|
|
6222
|
-
|
|
6244
|
+
hookProgram = system.SYSTEM_PROGRAM_ADDRESS,
|
|
6245
|
+
hookFlags = 0,
|
|
6246
|
+
cpmmProgram = chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID,
|
|
6223
6247
|
cpmmMigratorProgram = CPMM_MIGRATOR_PROGRAM_ID
|
|
6224
6248
|
}) {
|
|
6225
|
-
const [token0Mint, token1Mint] =
|
|
6249
|
+
const [token0Mint, token1Mint] = chunkO2Z5ORGF_cjs.sortMints(tokenAMint, tokenBMint);
|
|
6226
6250
|
const token0IsA = token0Mint === tokenAMint;
|
|
6227
6251
|
const token0Program = token0IsA ? tokenAProgram : tokenBProgram;
|
|
6228
6252
|
const token1Program = token0IsA ? tokenBProgram : tokenAProgram;
|
|
@@ -6238,38 +6262,47 @@ async function deriveSpotPoolAccounts({
|
|
|
6238
6262
|
});
|
|
6239
6263
|
const user0 = token0Account ?? (token0IsA ? tokenAAccount ?? userA : tokenBAccount ?? userB);
|
|
6240
6264
|
const user1 = token1Account ?? (token0IsA ? tokenBAccount ?? userB : tokenAAccount ?? userA);
|
|
6241
|
-
const
|
|
6265
|
+
const hasHook = hookProgram !== system.SYSTEM_PROGRAM_ADDRESS;
|
|
6266
|
+
if (!hasHook && hookFlags !== 0) {
|
|
6267
|
+
throw new Error("hookFlags must be zero when hookProgram is not provided");
|
|
6268
|
+
}
|
|
6269
|
+
if (hasHook && (hookProgram === token0Program || hookProgram === token1Program)) {
|
|
6270
|
+
throw new Error("hookProgram cannot be one of the pool token programs");
|
|
6271
|
+
}
|
|
6272
|
+
const [pool] = hasHook ? await chunkO2Z5ORGF_cjs.getHookedSpotPoolAddress(
|
|
6242
6273
|
token0Mint,
|
|
6243
6274
|
token1Mint,
|
|
6244
6275
|
swapFeeBps,
|
|
6276
|
+
hookProgram,
|
|
6277
|
+
hookFlags,
|
|
6245
6278
|
cpmmProgram
|
|
6246
|
-
);
|
|
6279
|
+
) : await chunkO2Z5ORGF_cjs.getSpotPoolAddress(token0Mint, token1Mint, swapFeeBps, cpmmProgram);
|
|
6247
6280
|
const protocolFeeOwner = await pda(cpmmProgram, [
|
|
6248
|
-
seed(
|
|
6281
|
+
seed(chunkO2Z5ORGF_cjs.SEED_PROTOCOL_FEE_OWNER),
|
|
6249
6282
|
addressSeed(pool)
|
|
6250
6283
|
]);
|
|
6251
6284
|
return {
|
|
6252
|
-
cpmmConfig: await pda(cpmmProgram, [seed(
|
|
6285
|
+
cpmmConfig: await pda(cpmmProgram, [seed(chunkO2Z5ORGF_cjs.SEED_CONFIG)]),
|
|
6253
6286
|
token0Mint,
|
|
6254
6287
|
token1Mint,
|
|
6255
6288
|
token0Program,
|
|
6256
6289
|
token1Program,
|
|
6257
6290
|
pool,
|
|
6258
6291
|
poolAuthority: await pda(cpmmProgram, [
|
|
6259
|
-
seed(
|
|
6292
|
+
seed(chunkO2Z5ORGF_cjs.SEED_AUTHORITY),
|
|
6260
6293
|
addressSeed(pool)
|
|
6261
6294
|
]),
|
|
6262
|
-
poolVault0: await pda(cpmmProgram, [seed(
|
|
6263
|
-
poolVault1: await pda(cpmmProgram, [seed(
|
|
6295
|
+
poolVault0: await pda(cpmmProgram, [seed(chunkO2Z5ORGF_cjs.SEED_VAULT0), addressSeed(pool)]),
|
|
6296
|
+
poolVault1: await pda(cpmmProgram, [seed(chunkO2Z5ORGF_cjs.SEED_VAULT1), addressSeed(pool)]),
|
|
6264
6297
|
protocolFeeOwner,
|
|
6265
6298
|
protocolFeePosition: await pda(cpmmProgram, [
|
|
6266
|
-
seed(
|
|
6299
|
+
seed(chunkO2Z5ORGF_cjs.SEED_POSITION),
|
|
6267
6300
|
addressSeed(pool),
|
|
6268
6301
|
addressSeed(protocolFeeOwner),
|
|
6269
6302
|
u64Seed(PROTOCOL_FEE_POSITION_ID)
|
|
6270
6303
|
]),
|
|
6271
6304
|
position: await pda(cpmmProgram, [
|
|
6272
|
-
seed(
|
|
6305
|
+
seed(chunkO2Z5ORGF_cjs.SEED_POSITION),
|
|
6273
6306
|
addressSeed(pool),
|
|
6274
6307
|
addressSeed(liquidityOwner),
|
|
6275
6308
|
u64Seed(positionId)
|
|
@@ -6290,7 +6323,7 @@ async function createSpotPoolInstruction(input) {
|
|
|
6290
6323
|
assertSafeInteger("tokenAAmount", input.tokenAAmount);
|
|
6291
6324
|
assertSafeInteger("tokenBAmount", input.tokenBAmount);
|
|
6292
6325
|
assertSafeInteger("minSharesOut", minSharesOut);
|
|
6293
|
-
const cpmmProgram = input.cpmmProgram ??
|
|
6326
|
+
const cpmmProgram = input.cpmmProgram ?? chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID;
|
|
6294
6327
|
const cpmmMigratorProgram = input.cpmmMigratorProgram ?? CPMM_MIGRATOR_PROGRAM_ID;
|
|
6295
6328
|
const accounts = await deriveSpotPoolAccounts({
|
|
6296
6329
|
...input,
|
|
@@ -6300,6 +6333,9 @@ async function createSpotPoolInstruction(input) {
|
|
|
6300
6333
|
positionId
|
|
6301
6334
|
});
|
|
6302
6335
|
const token0IsA = accounts.token0Mint === input.tokenAMint;
|
|
6336
|
+
const hookProgram = input.hookProgram ?? system.SYSTEM_PROGRAM_ADDRESS;
|
|
6337
|
+
const hookFlags = input.hookFlags ?? 0;
|
|
6338
|
+
const hookProgramAccount = hookProgram === system.SYSTEM_PROGRAM_ADDRESS ? [] : [{ address: hookProgram, role: kit.AccountRole.READONLY }];
|
|
6303
6339
|
return {
|
|
6304
6340
|
programAddress: cpmmMigratorProgram,
|
|
6305
6341
|
accounts: [
|
|
@@ -6328,14 +6364,17 @@ async function createSpotPoolInstruction(input) {
|
|
|
6328
6364
|
{
|
|
6329
6365
|
address: input.rent ?? sysvars.SYSVAR_RENT_ADDRESS,
|
|
6330
6366
|
role: kit.AccountRole.READONLY
|
|
6331
|
-
}
|
|
6367
|
+
},
|
|
6368
|
+
...hookProgramAccount
|
|
6332
6369
|
],
|
|
6333
6370
|
data: getCreateSpotPoolInstructionDataEncoder().encode({
|
|
6334
6371
|
swapFeeBps: input.swapFeeBps,
|
|
6335
6372
|
positionId,
|
|
6336
6373
|
amount0Max: token0IsA ? input.tokenAAmount : input.tokenBAmount,
|
|
6337
6374
|
amount1Max: token0IsA ? input.tokenBAmount : input.tokenAAmount,
|
|
6338
|
-
minSharesOut
|
|
6375
|
+
minSharesOut,
|
|
6376
|
+
hookProgram,
|
|
6377
|
+
hookFlags
|
|
6339
6378
|
})
|
|
6340
6379
|
};
|
|
6341
6380
|
}
|
|
@@ -6345,7 +6384,7 @@ async function fetchCpmmMigratorState(rpc, address6) {
|
|
|
6345
6384
|
const response = await rpc.getAccountInfo(address6, { encoding: "base64" }).send();
|
|
6346
6385
|
if (!response.value) return null;
|
|
6347
6386
|
return getCpmmMigratorStateDecoder().decode(
|
|
6348
|
-
|
|
6387
|
+
chunkAANZBN5X_cjs.base64ToBytes(response.value.data[0])
|
|
6349
6388
|
);
|
|
6350
6389
|
}
|
|
6351
6390
|
async function buildCpmmMigrationRemainingAccounts({
|
|
@@ -6356,7 +6395,7 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
6356
6395
|
adminBaseAta,
|
|
6357
6396
|
adminQuoteAta,
|
|
6358
6397
|
recipientAtas,
|
|
6359
|
-
cpmmProgram =
|
|
6398
|
+
cpmmProgram = chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID,
|
|
6360
6399
|
cpmmMigratorProgram = CPMM_MIGRATOR_PROGRAM_ID
|
|
6361
6400
|
}) {
|
|
6362
6401
|
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
@@ -6364,9 +6403,9 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
6364
6403
|
cpmmMigratorProgram
|
|
6365
6404
|
);
|
|
6366
6405
|
const [migrationAuthority] = await getCpmmMigrationAuthorityAddress(cpmmMigratorProgram);
|
|
6367
|
-
const poolInit = await
|
|
6406
|
+
const poolInit = await chunkO2Z5ORGF_cjs.getPoolInitAddresses(baseMint, quoteMint, cpmmProgram);
|
|
6368
6407
|
const pool = poolInit.pool[0];
|
|
6369
|
-
const [launchLpPosition] = await
|
|
6408
|
+
const [launchLpPosition] = await chunkO2Z5ORGF_cjs.getPositionAddress(
|
|
6370
6409
|
pool,
|
|
6371
6410
|
launchAuthority,
|
|
6372
6411
|
0n,
|
|
@@ -6435,7 +6474,13 @@ function encodeCreateSpotPoolPayload(args) {
|
|
|
6435
6474
|
assertSafeInteger("amount0Max", args.amount0Max);
|
|
6436
6475
|
assertSafeInteger("amount1Max", args.amount1Max);
|
|
6437
6476
|
assertSafeInteger("minSharesOut", args.minSharesOut);
|
|
6438
|
-
const encoded = new Uint8Array(
|
|
6477
|
+
const encoded = new Uint8Array(
|
|
6478
|
+
getCreateSpotPoolArgsEncoder().encode({
|
|
6479
|
+
...args,
|
|
6480
|
+
hookProgram: args.hookProgram ?? system.SYSTEM_PROGRAM_ADDRESS,
|
|
6481
|
+
hookFlags: args.hookFlags ?? 0
|
|
6482
|
+
})
|
|
6483
|
+
);
|
|
6439
6484
|
return kit.mergeBytes([
|
|
6440
6485
|
CPMM_MIGRATOR_INSTRUCTION_DISCRIMINATORS.createSpotPool,
|
|
6441
6486
|
encoded
|
|
@@ -6467,14 +6512,14 @@ var launchIdCounter = 0n;
|
|
|
6467
6512
|
var launchTokenPrograms = {
|
|
6468
6513
|
splToken() {
|
|
6469
6514
|
return {
|
|
6470
|
-
baseTokenProgram:
|
|
6471
|
-
quoteTokenProgram:
|
|
6515
|
+
baseTokenProgram: chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
6516
|
+
quoteTokenProgram: chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS
|
|
6472
6517
|
};
|
|
6473
6518
|
},
|
|
6474
6519
|
token2022Base() {
|
|
6475
6520
|
return {
|
|
6476
|
-
baseTokenProgram:
|
|
6477
|
-
quoteTokenProgram:
|
|
6521
|
+
baseTokenProgram: chunkO2Z5ORGF_cjs.TOKEN_2022_PROGRAM_ADDRESS,
|
|
6522
|
+
quoteTokenProgram: chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS
|
|
6478
6523
|
};
|
|
6479
6524
|
}
|
|
6480
6525
|
};
|
|
@@ -6488,7 +6533,7 @@ function createLaunchId() {
|
|
|
6488
6533
|
return bytes;
|
|
6489
6534
|
}
|
|
6490
6535
|
function getSignerAddress(value) {
|
|
6491
|
-
return
|
|
6536
|
+
return chunkAANZBN5X_cjs.getAddressFromAddressOrSigner(value);
|
|
6492
6537
|
}
|
|
6493
6538
|
function hasMetadata(metadata) {
|
|
6494
6539
|
return Boolean(metadata?.metadataName);
|
|
@@ -6504,7 +6549,7 @@ function hashRemainingAccounts(accounts) {
|
|
|
6504
6549
|
return void 0;
|
|
6505
6550
|
}
|
|
6506
6551
|
return computeRemainingAccountsHash(
|
|
6507
|
-
accounts.map(
|
|
6552
|
+
accounts.map(chunkAANZBN5X_cjs.getAddressFromRemainingAccount)
|
|
6508
6553
|
);
|
|
6509
6554
|
}
|
|
6510
6555
|
function isCustomMigrationConfig(migration) {
|
|
@@ -6697,7 +6742,7 @@ async function createLaunch(input) {
|
|
|
6697
6742
|
const programId = getInitializerProgramId(input);
|
|
6698
6743
|
const launchId = input.launchId ?? createLaunchId();
|
|
6699
6744
|
const hookContext = getCreateLaunchHookContext(input);
|
|
6700
|
-
const namespace = input.namespace ??
|
|
6745
|
+
const namespace = input.namespace ?? chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS;
|
|
6701
6746
|
const tokenPrograms = {
|
|
6702
6747
|
...launchTokenPrograms.splToken(),
|
|
6703
6748
|
...input.tokenPrograms
|
|
@@ -6743,10 +6788,10 @@ async function createLaunch(input) {
|
|
|
6743
6788
|
cpmmConfig: migration?.cpmmConfig,
|
|
6744
6789
|
baseTokenProgram: tokenPrograms.baseTokenProgram,
|
|
6745
6790
|
quoteTokenProgram: tokenPrograms.quoteTokenProgram,
|
|
6746
|
-
systemProgram: input.systemProgram ??
|
|
6747
|
-
rent: input.rent ??
|
|
6791
|
+
systemProgram: input.systemProgram ?? chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
6792
|
+
rent: input.rent ?? chunkO2Z5ORGF_cjs.SYSVAR_RENT_ADDRESS,
|
|
6748
6793
|
metadataAccount: addresses.metadataAccount,
|
|
6749
|
-
metadataProgram: input.metadataProgram ??
|
|
6794
|
+
metadataProgram: input.metadataProgram ?? chunkO2Z5ORGF_cjs.TOKEN_METADATA_PROGRAM_ID
|
|
6750
6795
|
},
|
|
6751
6796
|
{
|
|
6752
6797
|
namespace,
|
|
@@ -6781,7 +6826,7 @@ async function createLaunch(input) {
|
|
|
6781
6826
|
accounts: [
|
|
6782
6827
|
...instruction.accounts ?? [],
|
|
6783
6828
|
...(migration?.initRemainingAccounts ?? []).map(
|
|
6784
|
-
|
|
6829
|
+
chunkAANZBN5X_cjs.createReadonlyRemainingAccountMeta
|
|
6785
6830
|
)
|
|
6786
6831
|
]
|
|
6787
6832
|
} : instruction;
|
|
@@ -6907,14 +6952,14 @@ async function fetchLaunch2(rpc, address6, config) {
|
|
|
6907
6952
|
if (!response.value) {
|
|
6908
6953
|
return null;
|
|
6909
6954
|
}
|
|
6910
|
-
return getLaunchDecoder().decode(
|
|
6955
|
+
return getLaunchDecoder().decode(chunkAANZBN5X_cjs.base64ToBytes(response.value.data[0]));
|
|
6911
6956
|
}
|
|
6912
6957
|
async function fetchAllLaunches(rpc, config) {
|
|
6913
6958
|
const programId = config?.programId ?? INITIALIZER_PROGRAM_ID;
|
|
6914
6959
|
const discriminatorFilter = {
|
|
6915
6960
|
memcmp: {
|
|
6916
6961
|
offset: 0n,
|
|
6917
|
-
bytes:
|
|
6962
|
+
bytes: chunkAANZBN5X_cjs.bytesToBase64EncodedBytes(
|
|
6918
6963
|
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
6919
6964
|
),
|
|
6920
6965
|
encoding: "base64"
|
|
@@ -6925,15 +6970,15 @@ async function fetchAllLaunches(rpc, config) {
|
|
|
6925
6970
|
commitment: config?.commitment,
|
|
6926
6971
|
filters: [discriminatorFilter]
|
|
6927
6972
|
}).send();
|
|
6928
|
-
const accounts =
|
|
6973
|
+
const accounts = chunkAANZBN5X_cjs.normalizeProgramAccountsResponse(response);
|
|
6929
6974
|
const launches = [];
|
|
6930
6975
|
const decoder = getLaunchDecoder();
|
|
6931
6976
|
for (const account of accounts) {
|
|
6932
6977
|
try {
|
|
6933
|
-
const launch = decoder.decode(
|
|
6978
|
+
const launch = decoder.decode(chunkAANZBN5X_cjs.base64ToBytes(account.account.data[0]));
|
|
6934
6979
|
launches.push({ address: account.pubkey, account: launch });
|
|
6935
6980
|
} catch {
|
|
6936
|
-
|
|
6981
|
+
chunkAANZBN5X_cjs.warnAccountDecodeFailure("launch", account.pubkey);
|
|
6937
6982
|
}
|
|
6938
6983
|
}
|
|
6939
6984
|
return launches;
|
|
@@ -6943,7 +6988,7 @@ async function fetchLaunchesByAuthority(rpc, authority, config) {
|
|
|
6943
6988
|
const discriminatorFilter = {
|
|
6944
6989
|
memcmp: {
|
|
6945
6990
|
offset: 0n,
|
|
6946
|
-
bytes:
|
|
6991
|
+
bytes: chunkAANZBN5X_cjs.bytesToBase64EncodedBytes(
|
|
6947
6992
|
INITIALIZER_ACCOUNT_DISCRIMINATORS.Launch
|
|
6948
6993
|
),
|
|
6949
6994
|
encoding: "base64"
|
|
@@ -6952,7 +6997,7 @@ async function fetchLaunchesByAuthority(rpc, authority, config) {
|
|
|
6952
6997
|
const authorityFilter = {
|
|
6953
6998
|
memcmp: {
|
|
6954
6999
|
offset: 8n,
|
|
6955
|
-
bytes:
|
|
7000
|
+
bytes: chunkAANZBN5X_cjs.bytesToBase64EncodedBytes(addressCodec6.encode(authority)),
|
|
6956
7001
|
encoding: "base64"
|
|
6957
7002
|
}
|
|
6958
7003
|
};
|
|
@@ -6961,15 +7006,15 @@ async function fetchLaunchesByAuthority(rpc, authority, config) {
|
|
|
6961
7006
|
commitment: config?.commitment,
|
|
6962
7007
|
filters: [discriminatorFilter, authorityFilter]
|
|
6963
7008
|
}).send();
|
|
6964
|
-
const accounts =
|
|
7009
|
+
const accounts = chunkAANZBN5X_cjs.normalizeProgramAccountsResponse(response);
|
|
6965
7010
|
const launches = [];
|
|
6966
7011
|
const decoder = getLaunchDecoder();
|
|
6967
7012
|
for (const account of accounts) {
|
|
6968
7013
|
try {
|
|
6969
|
-
const launch = decoder.decode(
|
|
7014
|
+
const launch = decoder.decode(chunkAANZBN5X_cjs.base64ToBytes(account.account.data[0]));
|
|
6970
7015
|
launches.push({ address: account.pubkey, account: launch });
|
|
6971
7016
|
} catch {
|
|
6972
|
-
|
|
7017
|
+
chunkAANZBN5X_cjs.warnAccountDecodeFailure("launch", account.pubkey);
|
|
6973
7018
|
}
|
|
6974
7019
|
}
|
|
6975
7020
|
return launches;
|
|
@@ -7695,8 +7740,8 @@ async function curveSwapExactIn(input) {
|
|
|
7695
7740
|
const programId = input.programId ?? input.deployment?.initializerProgram ?? INITIALIZER_PROGRAM_ID;
|
|
7696
7741
|
const user = input.user ?? input.payer;
|
|
7697
7742
|
const userAddress = getAddress(user);
|
|
7698
|
-
const baseTokenProgram = input.baseTokenProgram ??
|
|
7699
|
-
const quoteTokenProgram = input.quoteTokenProgram ??
|
|
7743
|
+
const baseTokenProgram = input.baseTokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7744
|
+
const quoteTokenProgram = input.quoteTokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7700
7745
|
const userBaseAccount = await getAssociatedTokenAddress2({
|
|
7701
7746
|
owner: userAddress,
|
|
7702
7747
|
mint: input.baseMint,
|
|
@@ -7773,7 +7818,7 @@ async function curveSwapExactIn(input) {
|
|
|
7773
7818
|
}
|
|
7774
7819
|
async function swapExactIn(input) {
|
|
7775
7820
|
const programId = input.programId ?? input.deployment?.cpmmProgram ?? void 0;
|
|
7776
|
-
const pool = "pool" in input ? input.pool : await
|
|
7821
|
+
const pool = "pool" in input ? input.pool : await chunkAANZBN5X_cjs.getPoolByMints(input.rpc, input.mintA, input.mintB, {
|
|
7777
7822
|
programId
|
|
7778
7823
|
});
|
|
7779
7824
|
if (!pool) {
|
|
@@ -7781,9 +7826,9 @@ async function swapExactIn(input) {
|
|
|
7781
7826
|
}
|
|
7782
7827
|
const user = input.user ?? input.payer;
|
|
7783
7828
|
const userAddress = getAddress(user);
|
|
7784
|
-
const token0Program = input.token0Program ?? input.tokenProgram ??
|
|
7785
|
-
const token1Program = input.token1Program ?? input.tokenProgram ??
|
|
7786
|
-
const quote =
|
|
7829
|
+
const token0Program = input.token0Program ?? input.tokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7830
|
+
const token1Program = input.token1Program ?? input.tokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7831
|
+
const quote = chunkAANZBN5X_cjs.getSwapQuote(
|
|
7787
7832
|
pool.account,
|
|
7788
7833
|
input.amountIn,
|
|
7789
7834
|
input.tradeDirection
|
|
@@ -7872,8 +7917,8 @@ function getDefaultComputeUnitLimit(cpmmMigration) {
|
|
|
7872
7917
|
return cpmmMigration.recipientAtas.length > 0 ? 8e5 : 4e5;
|
|
7873
7918
|
}
|
|
7874
7919
|
function migrateLaunch(input) {
|
|
7875
|
-
const baseTokenProgram = input.baseTokenProgram ??
|
|
7876
|
-
const quoteTokenProgram = input.quoteTokenProgram ??
|
|
7920
|
+
const baseTokenProgram = input.baseTokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7921
|
+
const quoteTokenProgram = input.quoteTokenProgram ?? chunkO2Z5ORGF_cjs.TOKEN_PROGRAM_ADDRESS;
|
|
7877
7922
|
const recipients = input.recipients ? [...input.recipients] : [];
|
|
7878
7923
|
if (recipients.length > 0 && recipients.length !== input.cpmmMigration.recipientAtas.length) {
|
|
7879
7924
|
throw new Error(
|
|
@@ -7907,8 +7952,8 @@ function migrateLaunch(input) {
|
|
|
7907
7952
|
payer: input.payer,
|
|
7908
7953
|
baseTokenProgram,
|
|
7909
7954
|
quoteTokenProgram,
|
|
7910
|
-
systemProgram: input.systemProgram ??
|
|
7911
|
-
rent: input.rent ??
|
|
7955
|
+
systemProgram: input.systemProgram ?? chunkO2Z5ORGF_cjs.SYSTEM_PROGRAM_ADDRESS,
|
|
7956
|
+
rent: input.rent ?? chunkO2Z5ORGF_cjs.SYSVAR_RENT_ADDRESS
|
|
7912
7957
|
},
|
|
7913
7958
|
input.programId ?? input.deployment?.initializerProgram ?? INITIALIZER_PROGRAM_ID
|
|
7914
7959
|
);
|
|
@@ -7973,7 +8018,7 @@ async function assertMigrationQuoteThreshold({
|
|
|
7973
8018
|
return progress;
|
|
7974
8019
|
}
|
|
7975
8020
|
var DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES = {
|
|
7976
|
-
cpmmProgram:
|
|
8021
|
+
cpmmProgram: chunkO2Z5ORGF_cjs.CPMM_PROGRAM_ID,
|
|
7977
8022
|
initializerProgram: INITIALIZER_PROGRAM_ID,
|
|
7978
8023
|
cpmmMigratorProgram: CPMM_MIGRATOR_PROGRAM_ID,
|
|
7979
8024
|
dopplerLaunchHookV1Program: DOPPLER_LAUNCH_HOOK_V1_PROGRAM_ID
|
|
@@ -7989,7 +8034,7 @@ var DOPPLER_SOLANA_MAINNET_PROGRAM_ADDRESSES = {
|
|
|
7989
8034
|
)
|
|
7990
8035
|
};
|
|
7991
8036
|
async function deriveSolanaCpmmDeployment(programs = DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES) {
|
|
7992
|
-
const [cpmmConfig] = await
|
|
8037
|
+
const [cpmmConfig] = await chunkO2Z5ORGF_cjs.getConfigAddress(programs.cpmmProgram);
|
|
7993
8038
|
const [initializerConfig] = await getConfigAddress2(
|
|
7994
8039
|
programs.initializerProgram
|
|
7995
8040
|
);
|