@whetstone-research/doppler-sdk 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-BESE77DM.js +3840 -0
- package/dist/chunk-BESE77DM.js.map +1 -0
- package/dist/chunk-KJ6W44WF.cjs +4089 -0
- package/dist/chunk-KJ6W44WF.cjs.map +1 -0
- package/dist/{chunk-AKLS6T3R.cjs → chunk-Y6TJIH33.cjs} +36 -24
- package/dist/chunk-Y6TJIH33.cjs.map +1 -0
- package/dist/{chunk-6TOPYGOG.js → chunk-ZUJKBFXW.js} +35 -24
- package/dist/chunk-ZUJKBFXW.js.map +1 -0
- package/dist/{oracle-7PmpwwPx.d.ts → oracle-D1wPWydZ.d.cts} +1 -33
- package/dist/{oracle-7PmpwwPx.d.cts → oracle-D1wPWydZ.d.ts} +1 -33
- package/dist/{pda-PZRHQJMK.cjs → pda-A4PIAS5Y.cjs} +20 -16
- package/dist/pda-A4PIAS5Y.cjs.map +1 -0
- package/dist/{pda-N6ULJYLG.js → pda-JVAD45XJ.js} +3 -3
- package/dist/pda-JVAD45XJ.js.map +1 -0
- package/dist/solana/index.cjs +391 -3247
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +176 -207
- package/dist/solana/index.d.ts +176 -207
- package/dist/solana/index.js +67 -2923
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/react/index.cjs +53 -85
- package/dist/solana/react/index.cjs.map +1 -1
- package/dist/solana/react/index.d.cts +7 -1
- package/dist/solana/react/index.d.ts +7 -1
- package/dist/solana/react/index.js +15 -47
- package/dist/solana/react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6TOPYGOG.js.map +0 -1
- package/dist/chunk-AKLS6T3R.cjs.map +0 -1
- package/dist/chunk-C2D7CIXP.js +0 -977
- package/dist/chunk-C2D7CIXP.js.map +0 -1
- package/dist/chunk-GUGN3EYX.cjs +0 -1069
- package/dist/chunk-GUGN3EYX.cjs.map +0 -1
- package/dist/pda-N6ULJYLG.js.map +0 -1
- package/dist/pda-PZRHQJMK.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkKJ6W44WF_cjs = require('../../chunk-KJ6W44WF.cjs');
|
|
4
|
+
var chunkY6TJIH33_cjs = require('../../chunk-Y6TJIH33.cjs');
|
|
5
5
|
require('../../chunk-Q7SFCCGT.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -10,7 +10,7 @@ var kit = require('@solana/kit');
|
|
|
10
10
|
var AmmContext = react.createContext(null);
|
|
11
11
|
function AmmProvider({
|
|
12
12
|
rpc,
|
|
13
|
-
programId =
|
|
13
|
+
programId = chunkY6TJIH33_cjs.CPMM_PROGRAM_ID,
|
|
14
14
|
commitment = "confirmed",
|
|
15
15
|
refreshInterval = 3e4,
|
|
16
16
|
defaultSlippageBps = 50,
|
|
@@ -91,7 +91,7 @@ function createAmmContextValue(config) {
|
|
|
91
91
|
return {
|
|
92
92
|
rpc,
|
|
93
93
|
endpoint,
|
|
94
|
-
programId: programId ??
|
|
94
|
+
programId: programId ?? chunkY6TJIH33_cjs.CPMM_PROGRAM_ID,
|
|
95
95
|
commitment,
|
|
96
96
|
refreshInterval,
|
|
97
97
|
defaultSlippageBps
|
|
@@ -333,7 +333,7 @@ function usePool(poolAddress, options = {}) {
|
|
|
333
333
|
}
|
|
334
334
|
setError(null);
|
|
335
335
|
try {
|
|
336
|
-
const poolData = await
|
|
336
|
+
const poolData = await chunkKJ6W44WF_cjs.fetchPool(rpc, poolAddress, {
|
|
337
337
|
programId,
|
|
338
338
|
commitment
|
|
339
339
|
});
|
|
@@ -411,7 +411,7 @@ function usePools(poolAddresses, options = {}) {
|
|
|
411
411
|
try {
|
|
412
412
|
const results = await Promise.all(
|
|
413
413
|
poolAddresses.map(
|
|
414
|
-
(addr) =>
|
|
414
|
+
(addr) => chunkKJ6W44WF_cjs.fetchPool(rpc, addr, { programId, commitment }).then((pool) => [addr, pool]).catch(() => [addr, null])
|
|
415
415
|
)
|
|
416
416
|
);
|
|
417
417
|
if (mountedRef.current) {
|
|
@@ -500,9 +500,9 @@ function useSwap(options) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
try {
|
|
503
|
-
const swapQuote =
|
|
504
|
-
const slippageFactor =
|
|
505
|
-
const minAmountOut = swapQuote.amountOut * slippageFactor /
|
|
503
|
+
const swapQuote = chunkKJ6W44WF_cjs.getSwapQuote(pool, state.inputAmount, tradeDirection);
|
|
504
|
+
const slippageFactor = chunkY6TJIH33_cjs.BPS_DENOM - BigInt(state.slippageBps);
|
|
505
|
+
const minAmountOut = swapQuote.amountOut * slippageFactor / chunkY6TJIH33_cjs.BPS_DENOM;
|
|
506
506
|
return {
|
|
507
507
|
...swapQuote,
|
|
508
508
|
minAmountOut,
|
|
@@ -543,14 +543,14 @@ function useSwap(options) {
|
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
try {
|
|
546
|
-
const { amountIn, feeTotal } =
|
|
546
|
+
const { amountIn, feeTotal } = chunkKJ6W44WF_cjs.getSwapQuoteExactOut(
|
|
547
547
|
pool,
|
|
548
548
|
state.outputAmount,
|
|
549
549
|
tradeDirection
|
|
550
550
|
);
|
|
551
|
-
const slippageFactor =
|
|
552
|
-
const maxAmountIn = amountIn * slippageFactor /
|
|
553
|
-
const forwardQuote =
|
|
551
|
+
const slippageFactor = chunkY6TJIH33_cjs.BPS_DENOM + BigInt(state.slippageBps);
|
|
552
|
+
const maxAmountIn = amountIn * slippageFactor / chunkY6TJIH33_cjs.BPS_DENOM;
|
|
553
|
+
const forwardQuote = chunkKJ6W44WF_cjs.getSwapQuote(pool, amountIn, tradeDirection);
|
|
554
554
|
return {
|
|
555
555
|
amountOut: state.outputAmount,
|
|
556
556
|
feeTotal,
|
|
@@ -558,7 +558,7 @@ function useSwap(options) {
|
|
|
558
558
|
// Not calculated for exact out
|
|
559
559
|
feeComp: 0n,
|
|
560
560
|
priceImpact: forwardQuote.priceImpact,
|
|
561
|
-
executionPrice:
|
|
561
|
+
executionPrice: chunkKJ6W44WF_cjs.ratioToNumber(state.outputAmount, amountIn),
|
|
562
562
|
minAmountOut: state.outputAmount,
|
|
563
563
|
maxAmountIn,
|
|
564
564
|
tradeDirection,
|
|
@@ -683,13 +683,13 @@ function useLiquidity(options) {
|
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
try {
|
|
686
|
-
const quote =
|
|
686
|
+
const quote = chunkKJ6W44WF_cjs.getAddLiquidityQuote(
|
|
687
687
|
pool,
|
|
688
688
|
addState.amount0,
|
|
689
689
|
addState.amount1
|
|
690
690
|
);
|
|
691
|
-
const slippageFactor =
|
|
692
|
-
const minSharesOut = quote.sharesOut * slippageFactor /
|
|
691
|
+
const slippageFactor = chunkY6TJIH33_cjs.BPS_DENOM - BigInt(addState.slippageBps);
|
|
692
|
+
const minSharesOut = quote.sharesOut * slippageFactor / chunkY6TJIH33_cjs.BPS_DENOM;
|
|
693
693
|
return {
|
|
694
694
|
...quote,
|
|
695
695
|
minSharesOut,
|
|
@@ -723,10 +723,10 @@ function useLiquidity(options) {
|
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
725
|
try {
|
|
726
|
-
const quote =
|
|
727
|
-
const slippageFactor =
|
|
728
|
-
const minAmount0Out = quote.amount0 * slippageFactor /
|
|
729
|
-
const minAmount1Out = quote.amount1 * slippageFactor /
|
|
726
|
+
const quote = chunkKJ6W44WF_cjs.getRemoveLiquidityQuote(pool, removeState.shares);
|
|
727
|
+
const slippageFactor = chunkY6TJIH33_cjs.BPS_DENOM - BigInt(removeState.slippageBps);
|
|
728
|
+
const minAmount0Out = quote.amount0 * slippageFactor / chunkY6TJIH33_cjs.BPS_DENOM;
|
|
729
|
+
const minAmount1Out = quote.amount1 * slippageFactor / chunkY6TJIH33_cjs.BPS_DENOM;
|
|
730
730
|
return {
|
|
731
731
|
...quote,
|
|
732
732
|
minAmount0Out,
|
|
@@ -843,7 +843,7 @@ function usePosition(poolAddress, positionId = 0n, options = {}) {
|
|
|
843
843
|
setLoading(true);
|
|
844
844
|
setError(null);
|
|
845
845
|
try {
|
|
846
|
-
const { getPositionAddress } = await import('../../pda-
|
|
846
|
+
const { getPositionAddress } = await import('../../pda-A4PIAS5Y.cjs');
|
|
847
847
|
const [posAddr] = await getPositionAddress(
|
|
848
848
|
poolAddress,
|
|
849
849
|
ownerAddress,
|
|
@@ -852,8 +852,8 @@ function usePosition(poolAddress, positionId = 0n, options = {}) {
|
|
|
852
852
|
);
|
|
853
853
|
setPositionAddress(posAddr);
|
|
854
854
|
const [positionData, poolData] = await Promise.all([
|
|
855
|
-
|
|
856
|
-
providedPool ? Promise.resolve(providedPool) :
|
|
855
|
+
chunkKJ6W44WF_cjs.fetchPosition(rpc, posAddr, { programId, commitment }),
|
|
856
|
+
providedPool ? Promise.resolve(providedPool) : chunkKJ6W44WF_cjs.fetchPool(rpc, poolAddress, { programId, commitment })
|
|
857
857
|
]);
|
|
858
858
|
if (mountedRef.current) {
|
|
859
859
|
setPosition(positionData);
|
|
@@ -882,11 +882,11 @@ function usePosition(poolAddress, positionId = 0n, options = {}) {
|
|
|
882
882
|
}, [fetchPositionData]);
|
|
883
883
|
const pendingFees = react.useMemo(() => {
|
|
884
884
|
if (!pool || !position) return null;
|
|
885
|
-
return
|
|
885
|
+
return chunkKJ6W44WF_cjs.getPendingFees(pool, position);
|
|
886
886
|
}, [pool, position]);
|
|
887
887
|
const value = react.useMemo(() => {
|
|
888
888
|
if (!pool || !position) return null;
|
|
889
|
-
return
|
|
889
|
+
return chunkKJ6W44WF_cjs.getPositionValue(pool, position);
|
|
890
890
|
}, [pool, position]);
|
|
891
891
|
react.useEffect(() => {
|
|
892
892
|
mountedRef.current = true;
|
|
@@ -941,7 +941,7 @@ function useUserPositions(poolFilter, options = {}) {
|
|
|
941
941
|
setLoading(true);
|
|
942
942
|
setError(null);
|
|
943
943
|
try {
|
|
944
|
-
const positionsData = await
|
|
944
|
+
const positionsData = await chunkKJ6W44WF_cjs.fetchUserPositions(
|
|
945
945
|
rpc,
|
|
946
946
|
ownerAddress,
|
|
947
947
|
poolFilter,
|
|
@@ -986,44 +986,6 @@ function useUserPositions(poolFilter, options = {}) {
|
|
|
986
986
|
refetch: fetchPositions
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
function createCollectFeesInstruction(accounts, args, programId = chunkAKLS6T3R_cjs.CPMM_PROGRAM_ID) {
|
|
990
|
-
const {
|
|
991
|
-
pool,
|
|
992
|
-
position,
|
|
993
|
-
owner,
|
|
994
|
-
authority,
|
|
995
|
-
vault0,
|
|
996
|
-
vault1,
|
|
997
|
-
token0Mint,
|
|
998
|
-
token1Mint,
|
|
999
|
-
user0,
|
|
1000
|
-
user1,
|
|
1001
|
-
tokenProgram = chunkAKLS6T3R_cjs.TOKEN_PROGRAM_ADDRESS
|
|
1002
|
-
} = accounts;
|
|
1003
|
-
const keys = [
|
|
1004
|
-
{ address: pool, role: kit.AccountRole.WRITABLE },
|
|
1005
|
-
{ address: position, role: kit.AccountRole.WRITABLE },
|
|
1006
|
-
{ address: owner, role: kit.AccountRole.READONLY_SIGNER },
|
|
1007
|
-
{ address: authority, role: kit.AccountRole.READONLY },
|
|
1008
|
-
{ address: vault0, role: kit.AccountRole.WRITABLE },
|
|
1009
|
-
{ address: vault1, role: kit.AccountRole.WRITABLE },
|
|
1010
|
-
{ address: token0Mint, role: kit.AccountRole.READONLY },
|
|
1011
|
-
{ address: token1Mint, role: kit.AccountRole.READONLY },
|
|
1012
|
-
{ address: user0, role: kit.AccountRole.WRITABLE },
|
|
1013
|
-
{ address: user1, role: kit.AccountRole.WRITABLE },
|
|
1014
|
-
{ address: tokenProgram, role: kit.AccountRole.READONLY }
|
|
1015
|
-
];
|
|
1016
|
-
const data = chunkGUGN3EYX_cjs.encodeInstructionData(
|
|
1017
|
-
chunkAKLS6T3R_cjs.INSTRUCTION_DISCRIMINATORS.collectFees,
|
|
1018
|
-
chunkGUGN3EYX_cjs.collectFeesArgsCodec,
|
|
1019
|
-
args
|
|
1020
|
-
);
|
|
1021
|
-
return {
|
|
1022
|
-
programAddress: programId,
|
|
1023
|
-
accounts: keys,
|
|
1024
|
-
data
|
|
1025
|
-
};
|
|
1026
|
-
}
|
|
1027
989
|
var MAX_FEE_AMOUNT = BigInt("18446744073709551615");
|
|
1028
990
|
function useFees(positionAddress, poolAddress, options = {}) {
|
|
1029
991
|
const {
|
|
@@ -1057,7 +1019,7 @@ function useFees(positionAddress, poolAddress, options = {}) {
|
|
|
1057
1019
|
}, [providedPool, providedPosition]);
|
|
1058
1020
|
const fees = react.useMemo(() => {
|
|
1059
1021
|
if (!pool || !position) return null;
|
|
1060
|
-
const { pending0, pending1 } =
|
|
1022
|
+
const { pending0, pending1 } = chunkKJ6W44WF_cjs.getPendingFees(pool, position);
|
|
1061
1023
|
return {
|
|
1062
1024
|
pending0,
|
|
1063
1025
|
pending1,
|
|
@@ -1084,13 +1046,13 @@ function useFees(positionAddress, poolAddress, options = {}) {
|
|
|
1084
1046
|
const promises = [];
|
|
1085
1047
|
if (!providedPosition && positionAddress) {
|
|
1086
1048
|
promises.push(
|
|
1087
|
-
|
|
1049
|
+
chunkKJ6W44WF_cjs.fetchPosition(rpc, positionAddress, { programId, commitment })
|
|
1088
1050
|
);
|
|
1089
1051
|
} else {
|
|
1090
1052
|
promises.push(Promise.resolve(providedPosition));
|
|
1091
1053
|
}
|
|
1092
1054
|
if (!providedPool && poolAddress) {
|
|
1093
|
-
promises.push(
|
|
1055
|
+
promises.push(chunkKJ6W44WF_cjs.fetchPool(rpc, poolAddress, { programId, commitment }));
|
|
1094
1056
|
} else {
|
|
1095
1057
|
promises.push(Promise.resolve(providedPool));
|
|
1096
1058
|
}
|
|
@@ -1138,24 +1100,30 @@ function useFees(positionAddress, poolAddress, options = {}) {
|
|
|
1138
1100
|
const {
|
|
1139
1101
|
max0 = MAX_FEE_AMOUNT,
|
|
1140
1102
|
max1 = MAX_FEE_AMOUNT,
|
|
1103
|
+
token0Program,
|
|
1104
|
+
token1Program,
|
|
1105
|
+
tokenProgram,
|
|
1141
1106
|
userToken0,
|
|
1142
1107
|
userToken1
|
|
1143
1108
|
} = collectOptions;
|
|
1144
|
-
const ix =
|
|
1109
|
+
const ix = chunkKJ6W44WF_cjs.getCollectFeesInstruction(
|
|
1145
1110
|
{
|
|
1146
1111
|
pool: poolAddress,
|
|
1147
1112
|
position: positionAddress,
|
|
1148
|
-
owner: wallet.
|
|
1113
|
+
owner: wallet.signer,
|
|
1149
1114
|
authority: pool.authority,
|
|
1150
1115
|
vault0: pool.vault0,
|
|
1151
1116
|
vault1: pool.vault1,
|
|
1152
1117
|
token0Mint: pool.token0Mint,
|
|
1153
1118
|
token1Mint: pool.token1Mint,
|
|
1154
1119
|
user0: userToken0,
|
|
1155
|
-
user1: userToken1
|
|
1120
|
+
user1: userToken1,
|
|
1121
|
+
token0Program: token0Program ?? tokenProgram ?? chunkY6TJIH33_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
1122
|
+
token1Program: token1Program ?? tokenProgram ?? chunkY6TJIH33_cjs.TOKEN_PROGRAM_ADDRESS,
|
|
1123
|
+
max0,
|
|
1124
|
+
max1
|
|
1156
1125
|
},
|
|
1157
|
-
{
|
|
1158
|
-
programId
|
|
1126
|
+
{ programAddress: programId }
|
|
1159
1127
|
);
|
|
1160
1128
|
const { value: latestBlockhash } = await rpc.getLatestBlockhash({ commitment }).send();
|
|
1161
1129
|
const baseMessage = kit.createTransactionMessage({ version: "legacy" });
|
|
@@ -1243,7 +1211,7 @@ function useFees(positionAddress, poolAddress, options = {}) {
|
|
|
1243
1211
|
function useFeesFromData(pool, position) {
|
|
1244
1212
|
return react.useMemo(() => {
|
|
1245
1213
|
if (!pool || !position) return null;
|
|
1246
|
-
const { pending0, pending1 } =
|
|
1214
|
+
const { pending0, pending1 } = chunkKJ6W44WF_cjs.getPendingFees(pool, position);
|
|
1247
1215
|
return {
|
|
1248
1216
|
pending0,
|
|
1249
1217
|
pending1,
|
|
@@ -1278,9 +1246,9 @@ function useOracle(poolAddress, options = {}) {
|
|
|
1278
1246
|
setLoading(true);
|
|
1279
1247
|
setError(null);
|
|
1280
1248
|
try {
|
|
1281
|
-
const [oracleAddr] = await
|
|
1249
|
+
const [oracleAddr] = await chunkY6TJIH33_cjs.getOracleAddress(poolAddress, programId);
|
|
1282
1250
|
setOracleAddress(oracleAddr);
|
|
1283
|
-
const oracleData = await
|
|
1251
|
+
const oracleData = await chunkKJ6W44WF_cjs.fetchOracle(rpc, oracleAddr, {
|
|
1284
1252
|
programId,
|
|
1285
1253
|
commitment
|
|
1286
1254
|
});
|
|
@@ -1303,34 +1271,34 @@ function useOracle(poolAddress, options = {}) {
|
|
|
1303
1271
|
const twap = react.useCallback(
|
|
1304
1272
|
(windowSeconds) => {
|
|
1305
1273
|
if (!oracle || !oracle.initialized) return null;
|
|
1306
|
-
return
|
|
1274
|
+
return chunkKJ6W44WF_cjs.consultTwap(oracle, windowSeconds);
|
|
1307
1275
|
},
|
|
1308
1276
|
[oracle]
|
|
1309
1277
|
);
|
|
1310
1278
|
const spotPrice = react.useMemo(() => {
|
|
1311
1279
|
if (!oracle || !oracle.initialized) return null;
|
|
1312
|
-
const prices =
|
|
1280
|
+
const prices = chunkKJ6W44WF_cjs.getOracleSpotPrices(oracle);
|
|
1313
1281
|
return { price0: prices.price0, price1: prices.price1 };
|
|
1314
1282
|
}, [oracle]);
|
|
1315
1283
|
const deviation = react.useMemo(() => {
|
|
1316
1284
|
if (!oracle || !oracle.initialized) return null;
|
|
1317
|
-
const dev =
|
|
1285
|
+
const dev = chunkKJ6W44WF_cjs.getOracleDeviation(oracle);
|
|
1318
1286
|
return { deviation0: dev.deviation0, deviation1: dev.deviation1 };
|
|
1319
1287
|
}, [oracle]);
|
|
1320
1288
|
const age = react.useMemo(() => {
|
|
1321
1289
|
if (!oracle || !oracle.initialized) return null;
|
|
1322
|
-
return
|
|
1290
|
+
return chunkKJ6W44WF_cjs.getOracleAge(oracle);
|
|
1323
1291
|
}, [oracle]);
|
|
1324
1292
|
const isStaleCheck = react.useCallback(
|
|
1325
1293
|
(maxAgeSeconds) => {
|
|
1326
1294
|
if (!oracle || !oracle.initialized) return true;
|
|
1327
|
-
return
|
|
1295
|
+
return chunkKJ6W44WF_cjs.isOracleStale(oracle, maxAgeSeconds);
|
|
1328
1296
|
},
|
|
1329
1297
|
[oracle]
|
|
1330
1298
|
);
|
|
1331
1299
|
const bufferStats = react.useMemo(() => {
|
|
1332
1300
|
if (!oracle || !oracle.initialized) return null;
|
|
1333
|
-
const stats =
|
|
1301
|
+
const stats = chunkKJ6W44WF_cjs.getOracleBufferStats(oracle);
|
|
1334
1302
|
return {
|
|
1335
1303
|
capacity: stats.capacity,
|
|
1336
1304
|
filledCount: stats.filledCount,
|
|
@@ -1341,7 +1309,7 @@ function useOracle(poolAddress, options = {}) {
|
|
|
1341
1309
|
const compareWithPool = react.useCallback(
|
|
1342
1310
|
(pool) => {
|
|
1343
1311
|
if (!oracle || !oracle.initialized) return null;
|
|
1344
|
-
return
|
|
1312
|
+
return chunkKJ6W44WF_cjs.comparePoolAndOraclePrices(pool, oracle);
|
|
1345
1313
|
},
|
|
1346
1314
|
[oracle]
|
|
1347
1315
|
);
|
|
@@ -1380,7 +1348,7 @@ function useTwap(poolAddress, windowSeconds, options = {}) {
|
|
|
1380
1348
|
const { oracle, loading, error, refetch } = useOracle(poolAddress, options);
|
|
1381
1349
|
const twap = react.useMemo(() => {
|
|
1382
1350
|
if (!oracle || !oracle.initialized) return null;
|
|
1383
|
-
return
|
|
1351
|
+
return chunkKJ6W44WF_cjs.consultTwap(oracle, windowSeconds);
|
|
1384
1352
|
}, [oracle, windowSeconds]);
|
|
1385
1353
|
return {
|
|
1386
1354
|
twap,
|
|
@@ -1419,7 +1387,7 @@ function useOracles(poolAddresses, options = {}) {
|
|
|
1419
1387
|
const results = await Promise.all(
|
|
1420
1388
|
poolAddresses.map(async (poolAddr) => {
|
|
1421
1389
|
try {
|
|
1422
|
-
const result = await
|
|
1390
|
+
const result = await chunkKJ6W44WF_cjs.getOracleForPool(rpc, poolAddr, {
|
|
1423
1391
|
programId,
|
|
1424
1392
|
commitment
|
|
1425
1393
|
});
|