@symmetry-hq/temp-v3-sdk 0.0.13 → 0.0.14
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/src/states/basket.js +3 -3
- package/dist/test.js +2 -1
- package/package.json +1 -1
- package/src/states/basket.ts +3 -3
- package/test.ts +8 -7
|
@@ -231,7 +231,7 @@ function addFieldsToBasket(basket) {
|
|
|
231
231
|
min_oracles_thresh: asset.oracleAggregator.minOraclesThresh,
|
|
232
232
|
oracles: asset.oracleAggregator.oracles.map(oracle => ({
|
|
233
233
|
oracle_settings: {
|
|
234
|
-
oracle_type: ["
|
|
234
|
+
oracle_type: ["pyth", "raydium_cpmm", "raydium_clmm", "switchboard", "example"][oracle.oracleSettings.oracleType],
|
|
235
235
|
num_required_accounts: oracle.oracleSettings.numRequiredAccounts,
|
|
236
236
|
weight: oracle.oracleSettings.weight,
|
|
237
237
|
is_required: oracle.oracleSettings.isRequired == 1 ? true : false,
|
|
@@ -247,8 +247,8 @@ function addFieldsToBasket(basket) {
|
|
|
247
247
|
quote: oracle.oracleSettings.quote == 0 ? "Usdc" : "Wsol",
|
|
248
248
|
side: oracle.oracleSettings.side == 0 ? "Base" : "Quote",
|
|
249
249
|
},
|
|
250
|
-
accounts_to_load_lut_ids: oracle.accountsToLoadLutIds.map(id => id
|
|
251
|
-
accounts_to_load_lut_indices: oracle.accountsToLoadLutIndices.map(index => index
|
|
250
|
+
accounts_to_load_lut_ids: oracle.accountsToLoadLutIds.map(id => id),
|
|
251
|
+
accounts_to_load_lut_indices: oracle.accountsToLoadLutIndices.map(index => index),
|
|
252
252
|
})),
|
|
253
253
|
min_conf_bps: asset.oracleAggregator.minConfBps,
|
|
254
254
|
conf_thresh_bps: asset.oracleAggregator.confThreshBps,
|
package/dist/test.js
CHANGED
|
@@ -21,7 +21,7 @@ function testStates() {
|
|
|
21
21
|
console.log(wallet.publicKey.toBase58());
|
|
22
22
|
let sdk = new src_1.SymmetryCore({
|
|
23
23
|
connection: connection,
|
|
24
|
-
network: "
|
|
24
|
+
network: "devnet",
|
|
25
25
|
});
|
|
26
26
|
console.log("SDK created:", wallet.publicKey.toBase58());
|
|
27
27
|
console.log("Total baskets: ", (yield sdk.fetchAllBaskets()).length);
|
|
@@ -30,6 +30,7 @@ function testStates() {
|
|
|
30
30
|
let basket = yield sdk.fetchBasket("GrBFFvtdRL25o7gcRnV1kGvz1Qc7iscUmDp1ZvyBSyUa");
|
|
31
31
|
basket = yield sdk.loadBasketPrice(basket);
|
|
32
32
|
console.log(basket.formatted);
|
|
33
|
+
return;
|
|
33
34
|
let tests = {
|
|
34
35
|
createGlobalConfig: false, // TESTED
|
|
35
36
|
editGlobalConfig: false, // TESTED
|
package/package.json
CHANGED
package/src/states/basket.ts
CHANGED
|
@@ -226,7 +226,7 @@ export function addFieldsToBasket(basket: Basket): Basket {
|
|
|
226
226
|
min_oracles_thresh: asset.oracleAggregator.minOraclesThresh,
|
|
227
227
|
oracles: asset.oracleAggregator.oracles.map(oracle => ({
|
|
228
228
|
oracle_settings: {
|
|
229
|
-
oracle_type: ["
|
|
229
|
+
oracle_type: ["pyth","raydium_cpmm","raydium_clmm","switchboard","example"][oracle.oracleSettings.oracleType],
|
|
230
230
|
num_required_accounts: oracle.oracleSettings.numRequiredAccounts,
|
|
231
231
|
weight: oracle.oracleSettings.weight,
|
|
232
232
|
is_required: oracle.oracleSettings.isRequired == 1 ? true : false,
|
|
@@ -242,8 +242,8 @@ export function addFieldsToBasket(basket: Basket): Basket {
|
|
|
242
242
|
quote: oracle.oracleSettings.quote == 0 ? "Usdc" : "Wsol",
|
|
243
243
|
side: oracle.oracleSettings.side == 0 ? "Base" : "Quote",
|
|
244
244
|
},
|
|
245
|
-
accounts_to_load_lut_ids: oracle.accountsToLoadLutIds.map(id => id
|
|
246
|
-
accounts_to_load_lut_indices: oracle.accountsToLoadLutIndices.map(index => index
|
|
245
|
+
accounts_to_load_lut_ids: oracle.accountsToLoadLutIds.map(id => id),
|
|
246
|
+
accounts_to_load_lut_indices: oracle.accountsToLoadLutIndices.map(index => index),
|
|
247
247
|
})),
|
|
248
248
|
min_conf_bps: asset.oracleAggregator.minConfBps,
|
|
249
249
|
conf_thresh_bps: asset.oracleAggregator.confThreshBps,
|
package/test.ts
CHANGED
|
@@ -14,7 +14,7 @@ async function testStates() {
|
|
|
14
14
|
|
|
15
15
|
let sdk = new SymmetryCore({
|
|
16
16
|
connection: connection,
|
|
17
|
-
network: "
|
|
17
|
+
network: "devnet",
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
console.log("SDK created:", wallet.publicKey.toBase58());
|
|
@@ -25,7 +25,8 @@ async function testStates() {
|
|
|
25
25
|
let basket = await sdk.fetchBasket("GrBFFvtdRL25o7gcRnV1kGvz1Qc7iscUmDp1ZvyBSyUa");
|
|
26
26
|
basket = await sdk.loadBasketPrice(basket);
|
|
27
27
|
console.log(basket.formatted);
|
|
28
|
-
|
|
28
|
+
return;
|
|
29
|
+
|
|
29
30
|
let tests = {
|
|
30
31
|
|
|
31
32
|
createGlobalConfig: false, // TESTED
|
|
@@ -63,14 +64,14 @@ async function testStates() {
|
|
|
63
64
|
rebalanceBasket: false, // NOT TESTED
|
|
64
65
|
rebalanceBasketCustom: false, // NOT TESTED
|
|
65
66
|
|
|
66
|
-
startPriceUpdates: false,
|
|
67
|
-
updateTokenPrices: false,
|
|
68
|
-
updateTokenPricesCustom: false,
|
|
67
|
+
startPriceUpdates: false, // NOT TESTED
|
|
68
|
+
updateTokenPrices: false, // NOT TESTED
|
|
69
|
+
updateTokenPricesCustom: false, // NOT TESTED
|
|
69
70
|
|
|
70
|
-
rebalanceSwap: false,
|
|
71
|
+
rebalanceSwap: false, // NOT TESTED
|
|
71
72
|
|
|
72
73
|
redeemTokens: false, // NOT TESTED
|
|
73
|
-
claimBounty: false,
|
|
74
|
+
claimBounty: false, // NOT TESTED
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
if (tests.createBasket) {
|