@symmetry-hq/sdk 1.0.17 → 1.0.19
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/layouts/oracle.d.ts +2 -2
- package/dist/layouts/oracle.js +2 -2
- package/dist/states/oracles/lstOracle.d.ts +18 -0
- package/dist/states/oracles/lstOracle.js +58 -0
- package/dist/states/oracles/oracle.js +3 -0
- package/package.json +3 -3
- package/src/layouts/oracle.ts +3 -3
- package/src/states/oracles/lstOracle.ts +78 -0
- package/src/states/oracles/oracle.ts +3 -0
- package/dist/src/constants.d.ts +0 -23
- package/dist/src/constants.js +0 -38
- package/dist/src/index.d.ts +0 -816
- package/dist/src/index.js +0 -2208
- package/dist/src/instructions/automation/auction.d.ts +0 -6
- package/dist/src/instructions/automation/auction.js +0 -40
- package/dist/src/instructions/automation/claimBounty.d.ts +0 -12
- package/dist/src/instructions/automation/claimBounty.js +0 -44
- package/dist/src/instructions/automation/flashSwap.d.ts +0 -21
- package/dist/src/instructions/automation/flashSwap.js +0 -74
- package/dist/src/instructions/automation/priceUpdate.d.ts +0 -19
- package/dist/src/instructions/automation/priceUpdate.js +0 -89
- package/dist/src/instructions/automation/rebalanceIntent.d.ts +0 -32
- package/dist/src/instructions/automation/rebalanceIntent.js +0 -117
- package/dist/src/instructions/management/addBounty.d.ts +0 -7
- package/dist/src/instructions/management/addBounty.js +0 -41
- package/dist/src/instructions/management/admin.d.ts +0 -9
- package/dist/src/instructions/management/admin.js +0 -53
- package/dist/src/instructions/management/claimFees.d.ts +0 -15
- package/dist/src/instructions/management/claimFees.js +0 -95
- package/dist/src/instructions/management/createBasket.d.ts +0 -21
- package/dist/src/instructions/management/createBasket.js +0 -98
- package/dist/src/instructions/management/edit.d.ts +0 -51
- package/dist/src/instructions/management/edit.js +0 -477
- package/dist/src/instructions/management/luts.d.ts +0 -30
- package/dist/src/instructions/management/luts.js +0 -99
- package/dist/src/instructions/pda.d.ts +0 -25
- package/dist/src/instructions/pda.js +0 -128
- package/dist/src/instructions/user/deposit.d.ts +0 -20
- package/dist/src/instructions/user/deposit.js +0 -100
- package/dist/src/instructions/user/withdraw.d.ts +0 -8
- package/dist/src/instructions/user/withdraw.js +0 -36
- package/dist/src/jup.d.ts +0 -50
- package/dist/src/jup.js +0 -86
- package/dist/src/keeperMonitor.d.ts +0 -52
- package/dist/src/keeperMonitor.js +0 -624
- package/dist/src/keeperRebalaneHandler.d.ts +0 -32
- package/dist/src/keeperRebalaneHandler.js +0 -278
- package/dist/src/layouts/basket.d.ts +0 -191
- package/dist/src/layouts/basket.js +0 -51
- package/dist/src/layouts/config.d.ts +0 -282
- package/dist/src/layouts/config.js +0 -238
- package/dist/src/layouts/fraction.d.ts +0 -20
- package/dist/src/layouts/fraction.js +0 -164
- package/dist/src/layouts/intents/bounty.d.ts +0 -18
- package/dist/src/layouts/intents/bounty.js +0 -19
- package/dist/src/layouts/intents/intent.d.ts +0 -210
- package/dist/src/layouts/intents/intent.js +0 -97
- package/dist/src/layouts/intents/rebalanceIntent.d.ts +0 -212
- package/dist/src/layouts/intents/rebalanceIntent.js +0 -94
- package/dist/src/layouts/lookupTable.d.ts +0 -7
- package/dist/src/layouts/lookupTable.js +0 -10
- package/dist/src/layouts/oracle.d.ts +0 -66
- package/dist/src/layouts/oracle.js +0 -102
- package/dist/src/states/basket.d.ts +0 -17
- package/dist/src/states/basket.js +0 -511
- package/dist/src/states/config.d.ts +0 -3
- package/dist/src/states/config.js +0 -71
- package/dist/src/states/intents/intent.d.ts +0 -10
- package/dist/src/states/intents/intent.js +0 -317
- package/dist/src/states/intents/rebalanceIntent.d.ts +0 -43
- package/dist/src/states/intents/rebalanceIntent.js +0 -764
- package/dist/src/states/oracles/constants.d.ts +0 -9
- package/dist/src/states/oracles/constants.js +0 -15
- package/dist/src/states/oracles/oracle.d.ts +0 -24
- package/dist/src/states/oracles/oracle.js +0 -173
- package/dist/src/states/oracles/pythOracle.d.ts +0 -148
- package/dist/src/states/oracles/pythOracle.js +0 -738
- package/dist/src/states/oracles/raydiumClmmOracle.d.ts +0 -184
- package/dist/src/states/oracles/raydiumClmmOracle.js +0 -831
- package/dist/src/states/oracles/raydiumCpmmOracle.d.ts +0 -120
- package/dist/src/states/oracles/raydiumCpmmOracle.js +0 -537
- package/dist/src/states/oracles/switchboardOracle.d.ts +0 -0
- package/dist/src/states/oracles/switchboardOracle.js +0 -1
- package/dist/src/states/withdrawBasketFees.d.ts +0 -10
- package/dist/src/states/withdrawBasketFees.js +0 -154
- package/dist/src/txUtils.d.ts +0 -72
- package/dist/src/txUtils.js +0 -423
- package/dist/test.d.ts +0 -1
- package/dist/test.js +0 -564
package/dist/layouts/oracle.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import BN from 'bn.js';
|
|
|
2
2
|
import { Fraction } from './fraction';
|
|
3
3
|
export declare const MAX_ORACLES_PER_TOKEN = 4;
|
|
4
4
|
export declare const MAX_ACCOUNTS_PER_ORACLE = 4;
|
|
5
|
-
export type FormattedOracleType = "pyth" | "raydium_clmm" | "raydium_cpmm" | "
|
|
5
|
+
export type FormattedOracleType = "pyth" | "raydium_clmm" | "raydium_cpmm" | "lst" | "example";
|
|
6
6
|
export declare const ORACLE_TYPES_STRINGS: Map<number, FormattedOracleType>;
|
|
7
7
|
export type FormattedQuote = "usdc" | "wsol" | "usd";
|
|
8
8
|
export declare const QUOTES_STRINGS: Map<number, FormattedQuote>;
|
|
@@ -16,7 +16,7 @@ export declare enum OracleType {
|
|
|
16
16
|
Pyth = 0,
|
|
17
17
|
RaydiumClmm = 1,
|
|
18
18
|
RaydiumCpmm = 2,
|
|
19
|
-
|
|
19
|
+
Lst = 3,
|
|
20
20
|
Example = 4
|
|
21
21
|
}
|
|
22
22
|
export declare enum Quote {
|
package/dist/layouts/oracle.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.ORACLE_TYPES_STRINGS = new Map([
|
|
|
14
14
|
[0, "pyth"],
|
|
15
15
|
[1, "raydium_clmm"],
|
|
16
16
|
[2, "raydium_cpmm"],
|
|
17
|
-
[3, "
|
|
17
|
+
[3, "lst"],
|
|
18
18
|
[255, "example"],
|
|
19
19
|
]);
|
|
20
20
|
exports.QUOTES_STRINGS = new Map([
|
|
@@ -33,7 +33,7 @@ var OracleType;
|
|
|
33
33
|
OracleType[OracleType["Pyth"] = 0] = "Pyth";
|
|
34
34
|
OracleType[OracleType["RaydiumClmm"] = 1] = "RaydiumClmm";
|
|
35
35
|
OracleType[OracleType["RaydiumCpmm"] = 2] = "RaydiumCpmm";
|
|
36
|
-
OracleType[OracleType["
|
|
36
|
+
OracleType[OracleType["Lst"] = 3] = "Lst";
|
|
37
37
|
OracleType[OracleType["Example"] = 4] = "Example";
|
|
38
38
|
})(OracleType || (exports.OracleType = OracleType = {}));
|
|
39
39
|
;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BN from 'bn.js';
|
|
2
|
+
import { AccountInfo, PublicKey } from '@solana/web3.js';
|
|
3
|
+
import { OracleSettings } from '../../layouts/oracle';
|
|
4
|
+
import { OraclePrice } from './oracle';
|
|
5
|
+
export declare class StakePool {
|
|
6
|
+
poolMint: PublicKey;
|
|
7
|
+
lamports: BN;
|
|
8
|
+
supply: BN;
|
|
9
|
+
constructor(params: {
|
|
10
|
+
poolMint: PublicKey;
|
|
11
|
+
lamports: BN;
|
|
12
|
+
supply: BN;
|
|
13
|
+
});
|
|
14
|
+
static decode(buf: Buffer, offset?: number): StakePool;
|
|
15
|
+
}
|
|
16
|
+
export declare class LstOracle {
|
|
17
|
+
static fetch(oracleParams: OracleSettings, accountInfos: AccountInfo<Buffer>[], wsolPrice: OraclePrice, usdcPrice: OraclePrice): OraclePrice;
|
|
18
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LstOracle = exports.StakePool = void 0;
|
|
7
|
+
const bn_js_1 = __importDefault(require("bn.js"));
|
|
8
|
+
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
9
|
+
const web3_js_1 = require("@solana/web3.js");
|
|
10
|
+
const constants_1 = require("../../constants");
|
|
11
|
+
const oracle_1 = require("../../layouts/oracle");
|
|
12
|
+
const oracle_2 = require("./oracle");
|
|
13
|
+
// stake pool program IDs (mainnet)
|
|
14
|
+
const STAKE_POOL_PROGRAM_ID = new web3_js_1.PublicKey("SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy");
|
|
15
|
+
const SANCTUM_STAKE_POOL_PROGRAM_ID = new web3_js_1.PublicKey("SP12tWFxD9oJsVWNavTTBZvMbA6gkAmxtVgxdqvyvhY");
|
|
16
|
+
class StakePool {
|
|
17
|
+
constructor(params) {
|
|
18
|
+
this.poolMint = params.poolMint;
|
|
19
|
+
this.lamports = params.lamports;
|
|
20
|
+
this.supply = params.supply;
|
|
21
|
+
}
|
|
22
|
+
static decode(buf, offset = 0) {
|
|
23
|
+
let poolMint = new web3_js_1.PublicKey(buf.subarray(162, 162 + 32));
|
|
24
|
+
let lamports = new bn_js_1.default(buf.subarray(258, 258 + 8), "le");
|
|
25
|
+
let supply = new bn_js_1.default(buf.subarray(266, 266 + 8), "le");
|
|
26
|
+
return new StakePool({
|
|
27
|
+
poolMint,
|
|
28
|
+
lamports,
|
|
29
|
+
supply,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.StakePool = StakePool;
|
|
34
|
+
class LstOracle {
|
|
35
|
+
static fetch(oracleParams, accountInfos, wsolPrice, usdcPrice) {
|
|
36
|
+
//@ts-ignore
|
|
37
|
+
let state = null;
|
|
38
|
+
try {
|
|
39
|
+
const stateAi = accountInfos[0];
|
|
40
|
+
const parsedState = StakePool.decode(stateAi.data, 8);
|
|
41
|
+
state = parsedState;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return new oracle_2.OraclePrice(new decimal_js_1.default(0), new decimal_js_1.default(0), 0);
|
|
45
|
+
}
|
|
46
|
+
let price = new decimal_js_1.default(state.lamports.toString())
|
|
47
|
+
.div(new decimal_js_1.default(state.supply.toString()));
|
|
48
|
+
let quoteDecimals = (oracleParams.quote == oracle_1.Quote.Usdc) ? constants_1.USDC_DECIMALS : ((oracleParams.quote == oracle_1.Quote.Wsol) ? constants_1.WSOL_DECIMALS : 0);
|
|
49
|
+
price = price.mul(decimal_js_1.default.pow(10, quoteDecimals - oracleParams.tokenDecimals));
|
|
50
|
+
let quotePrice = (oracleParams.quote === oracle_1.Quote.Usdc) ? usdcPrice :
|
|
51
|
+
((oracleParams.quote === oracle_1.Quote.Wsol) ? wsolPrice :
|
|
52
|
+
new oracle_2.OraclePrice(new decimal_js_1.default(1), new decimal_js_1.default(0), 0));
|
|
53
|
+
price = price.mul(quotePrice.price);
|
|
54
|
+
let conf = price.mul(new decimal_js_1.default(oracleParams.confThreshBps)).div(new decimal_js_1.default(constants_1.HUNDRED_PERCENT_BPS));
|
|
55
|
+
return new oracle_2.OraclePrice(price, conf, Date.now(), true);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.LstOracle = LstOracle;
|
|
@@ -12,6 +12,7 @@ const constants_2 = require("./constants");
|
|
|
12
12
|
const pythOracle_1 = require("./pythOracle");
|
|
13
13
|
const raydiumClmmOracle_1 = require("./raydiumClmmOracle");
|
|
14
14
|
const raydiumCpmmOracle_1 = require("./raydiumCpmmOracle");
|
|
15
|
+
const lstOracle_1 = require("./lstOracle");
|
|
15
16
|
class OraclePrice {
|
|
16
17
|
constructor(price, conf, updateTime, validated) {
|
|
17
18
|
this.price = price;
|
|
@@ -101,6 +102,8 @@ class PriceAggregator {
|
|
|
101
102
|
return raydiumClmmOracle_1.RaydiumCLMMOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
102
103
|
case oracle_1.OracleType.RaydiumCpmm:
|
|
103
104
|
return raydiumCpmmOracle_1.RaydiumCPMMOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
105
|
+
case oracle_1.OracleType.Lst:
|
|
106
|
+
return lstOracle_1.LstOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
104
107
|
default:
|
|
105
108
|
throw new Error(`Invalid oracle type: ${settings.oracleType}`);
|
|
106
109
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symmetry-hq/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Symmetry V3 SDK",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"types": "dist/
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepare": "npm run build",
|
|
9
9
|
"build": "tsc",
|
package/src/layouts/oracle.ts
CHANGED
|
@@ -7,12 +7,12 @@ import { HUNDRED_PERCENT_BPS, USDC_DECIMALS, WSOL_DECIMALS } from '../constants'
|
|
|
7
7
|
export const MAX_ORACLES_PER_TOKEN = 4;
|
|
8
8
|
export const MAX_ACCOUNTS_PER_ORACLE = 4;
|
|
9
9
|
|
|
10
|
-
export type FormattedOracleType = "pyth" | "raydium_clmm" | "raydium_cpmm" | "
|
|
10
|
+
export type FormattedOracleType = "pyth" | "raydium_clmm" | "raydium_cpmm" | "lst" | "example";
|
|
11
11
|
export const ORACLE_TYPES_STRINGS: Map<number, FormattedOracleType> = new Map([
|
|
12
12
|
[0, "pyth"],
|
|
13
13
|
[1, "raydium_clmm"],
|
|
14
14
|
[2, "raydium_cpmm"],
|
|
15
|
-
[3, "
|
|
15
|
+
[3, "lst"],
|
|
16
16
|
[255, "example"],
|
|
17
17
|
]);
|
|
18
18
|
|
|
@@ -40,7 +40,7 @@ export enum OracleType {
|
|
|
40
40
|
Pyth = 0,
|
|
41
41
|
RaydiumClmm = 1,
|
|
42
42
|
RaydiumCpmm = 2,
|
|
43
|
-
|
|
43
|
+
Lst = 3,
|
|
44
44
|
Example = 4,
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import BN from 'bn.js';
|
|
2
|
+
import Decimal from 'decimal.js';
|
|
3
|
+
import { AccountInfo, PublicKey } from '@solana/web3.js';
|
|
4
|
+
|
|
5
|
+
import { HUNDRED_PERCENT_BPS, USDC_DECIMALS, WSOL_DECIMALS } from '../../constants';
|
|
6
|
+
import { OracleSettings, OracleType, Quote } from '../../layouts/oracle';
|
|
7
|
+
import { OraclePrice } from './oracle';
|
|
8
|
+
|
|
9
|
+
// stake pool program IDs (mainnet)
|
|
10
|
+
const STAKE_POOL_PROGRAM_ID = new PublicKey("SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy");
|
|
11
|
+
const SANCTUM_STAKE_POOL_PROGRAM_ID = new PublicKey("SP12tWFxD9oJsVWNavTTBZvMbA6gkAmxtVgxdqvyvhY");
|
|
12
|
+
|
|
13
|
+
export class StakePool {
|
|
14
|
+
poolMint: PublicKey;
|
|
15
|
+
lamports: BN; // u64
|
|
16
|
+
supply: BN; // u64
|
|
17
|
+
|
|
18
|
+
constructor(params: {
|
|
19
|
+
poolMint: PublicKey,
|
|
20
|
+
lamports: BN,
|
|
21
|
+
supply: BN,
|
|
22
|
+
}) {
|
|
23
|
+
this.poolMint = params.poolMint;
|
|
24
|
+
this.lamports = params.lamports;
|
|
25
|
+
this.supply = params.supply;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static decode(buf: Buffer, offset: number = 0): StakePool {
|
|
29
|
+
let poolMint = new PublicKey(buf.subarray(162, 162 + 32));
|
|
30
|
+
let lamports = new BN(buf.subarray(258, 258 + 8), "le");
|
|
31
|
+
let supply = new BN(buf.subarray(266, 266 + 8), "le");
|
|
32
|
+
|
|
33
|
+
return new StakePool({
|
|
34
|
+
poolMint,
|
|
35
|
+
lamports,
|
|
36
|
+
supply,
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class LstOracle {
|
|
42
|
+
|
|
43
|
+
static fetch(
|
|
44
|
+
oracleParams: OracleSettings,
|
|
45
|
+
accountInfos: AccountInfo<Buffer>[],
|
|
46
|
+
wsolPrice: OraclePrice,
|
|
47
|
+
usdcPrice: OraclePrice,
|
|
48
|
+
): OraclePrice {
|
|
49
|
+
//@ts-ignore
|
|
50
|
+
let state: StakePool = null;
|
|
51
|
+
try {
|
|
52
|
+
const stateAi = accountInfos[0];
|
|
53
|
+
const parsedState = StakePool.decode(stateAi.data, 8);
|
|
54
|
+
state = parsedState;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
return new OraclePrice(new Decimal(0), new Decimal(0), 0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let price = new Decimal(state.lamports.toString())
|
|
60
|
+
.div(new Decimal(state.supply.toString()));
|
|
61
|
+
|
|
62
|
+
let quoteDecimals =
|
|
63
|
+
(oracleParams.quote == Quote.Usdc) ? USDC_DECIMALS : (
|
|
64
|
+
(oracleParams.quote == Quote.Wsol) ? WSOL_DECIMALS : 0);
|
|
65
|
+
price = price.mul(Decimal.pow(10, quoteDecimals - oracleParams.tokenDecimals));
|
|
66
|
+
|
|
67
|
+
let quotePrice =
|
|
68
|
+
(oracleParams.quote === Quote.Usdc) ? usdcPrice :
|
|
69
|
+
((oracleParams.quote === Quote.Wsol) ? wsolPrice :
|
|
70
|
+
new OraclePrice(new Decimal(1), new Decimal(0), 0));
|
|
71
|
+
price = price.mul(quotePrice.price);
|
|
72
|
+
|
|
73
|
+
let conf = price.mul(new Decimal(oracleParams.confThreshBps)).div(new Decimal(HUNDRED_PERCENT_BPS));
|
|
74
|
+
|
|
75
|
+
return new OraclePrice(price, conf, Date.now(), true);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RaydiumCLMMOracle
|
|
16
16
|
} from './raydiumClmmOracle';
|
|
17
17
|
import { RaydiumCPMMOracle } from './raydiumCpmmOracle';
|
|
18
|
+
import { LstOracle } from './lstOracle';
|
|
18
19
|
|
|
19
20
|
export class OraclePrice {
|
|
20
21
|
price: Decimal;
|
|
@@ -134,6 +135,8 @@ export class PriceAggregator{
|
|
|
134
135
|
return RaydiumCLMMOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
135
136
|
case OracleType.RaydiumCpmm:
|
|
136
137
|
return RaydiumCPMMOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
138
|
+
case OracleType.Lst:
|
|
139
|
+
return LstOracle.fetch(settings, loadedAccounts, wsolPrice, usdcPrice);
|
|
137
140
|
default:
|
|
138
141
|
throw new Error(`Invalid oracle type: ${settings.oracleType}`);
|
|
139
142
|
}
|
package/dist/src/constants.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from '@solana/web3.js';
|
|
2
|
-
import Decimal from 'decimal.js';
|
|
3
|
-
export declare const COMPUTE_UNITS = 1000000;
|
|
4
|
-
export declare const PRIORITY_FEE = 25000;
|
|
5
|
-
export declare const VAULTS_V3_PROGRAM_ID: PublicKey;
|
|
6
|
-
export declare const METADATA_PROGRAM_ID: PublicKey;
|
|
7
|
-
export declare const ADDRESS_LOOKUP_TABLE_PROGRAM_ID: PublicKey;
|
|
8
|
-
export declare const RENT_SYSVAR_ID: PublicKey;
|
|
9
|
-
export declare const MINTS: Record<string, Record<string, PublicKey>>;
|
|
10
|
-
export declare const PYTHNET_CUSTODY_PRICE_WSOL_ACCOUNT: PublicKey;
|
|
11
|
-
export declare const PYTHNET_CUSTODY_PRICE_USDC_ACCOUNT: PublicKey;
|
|
12
|
-
export declare const INTENT_TASK_DATA_SIZE = 600;
|
|
13
|
-
export declare const MAX_MANAGERS_PER_VAULT = 10;
|
|
14
|
-
export declare const MAX_TRANSFER_TOKENS = 10;
|
|
15
|
-
export declare const X64: Decimal;
|
|
16
|
-
export declare const HUNDRED_PERCENT_BPS = 10000;
|
|
17
|
-
export declare const WSOL_DECIMALS = 9;
|
|
18
|
-
export declare const USDC_DECIMALS = 6;
|
|
19
|
-
export declare const MAX_SUPPORTED_TOKENS_PER_VAULT: number;
|
|
20
|
-
export declare const MAX_ORACLES_PER_TOKEN: number;
|
|
21
|
-
export declare const MAX_EXTRA_DATA_PER_ORACLE: number;
|
|
22
|
-
export declare const LUT_EXTEND_BATCH_SIZE = 20;
|
|
23
|
-
export declare const UPDATE_TOKEN_PRICES_MAX_ACCOUNTS = 50;
|
package/dist/src/constants.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UPDATE_TOKEN_PRICES_MAX_ACCOUNTS = exports.LUT_EXTEND_BATCH_SIZE = exports.MAX_EXTRA_DATA_PER_ORACLE = exports.MAX_ORACLES_PER_TOKEN = exports.MAX_SUPPORTED_TOKENS_PER_VAULT = exports.USDC_DECIMALS = exports.WSOL_DECIMALS = exports.HUNDRED_PERCENT_BPS = exports.X64 = exports.MAX_TRANSFER_TOKENS = exports.MAX_MANAGERS_PER_VAULT = exports.INTENT_TASK_DATA_SIZE = exports.PYTHNET_CUSTODY_PRICE_USDC_ACCOUNT = exports.PYTHNET_CUSTODY_PRICE_WSOL_ACCOUNT = exports.MINTS = exports.RENT_SYSVAR_ID = exports.ADDRESS_LOOKUP_TABLE_PROGRAM_ID = exports.METADATA_PROGRAM_ID = exports.VAULTS_V3_PROGRAM_ID = exports.PRIORITY_FEE = exports.COMPUTE_UNITS = void 0;
|
|
7
|
-
const web3_js_1 = require("@solana/web3.js");
|
|
8
|
-
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
9
|
-
exports.COMPUTE_UNITS = 1000000;
|
|
10
|
-
exports.PRIORITY_FEE = 25000;
|
|
11
|
-
exports.VAULTS_V3_PROGRAM_ID = new web3_js_1.PublicKey("BASKT7aKd8n7ibpUbwLP3Wiyxyi3yoiXsxBk4Hpumate");
|
|
12
|
-
exports.METADATA_PROGRAM_ID = new web3_js_1.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");
|
|
13
|
-
exports.ADDRESS_LOOKUP_TABLE_PROGRAM_ID = new web3_js_1.PublicKey("AddressLookupTab1e1111111111111111111111111");
|
|
14
|
-
exports.RENT_SYSVAR_ID = new web3_js_1.PublicKey("SysvarRent111111111111111111111111111111111");
|
|
15
|
-
exports.MINTS = {
|
|
16
|
-
"devnet": {
|
|
17
|
-
"WSOL": new web3_js_1.PublicKey("So11111111111111111111111111111111111111112"),
|
|
18
|
-
"USDC": new web3_js_1.PublicKey("USDCoctVLVnvTXBEuP9s8hntucdJokbo17RwHuNXemT"),
|
|
19
|
-
},
|
|
20
|
-
"mainnet": {
|
|
21
|
-
"WSOL": new web3_js_1.PublicKey("So11111111111111111111111111111111111111112"),
|
|
22
|
-
"USDC": new web3_js_1.PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
exports.PYTHNET_CUSTODY_PRICE_WSOL_ACCOUNT = new web3_js_1.PublicKey("7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE");
|
|
26
|
-
exports.PYTHNET_CUSTODY_PRICE_USDC_ACCOUNT = new web3_js_1.PublicKey("Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX");
|
|
27
|
-
exports.INTENT_TASK_DATA_SIZE = 600;
|
|
28
|
-
exports.MAX_MANAGERS_PER_VAULT = 10;
|
|
29
|
-
exports.MAX_TRANSFER_TOKENS = 10;
|
|
30
|
-
exports.X64 = new decimal_js_1.default(2).pow(new decimal_js_1.default(64));
|
|
31
|
-
exports.HUNDRED_PERCENT_BPS = 10000;
|
|
32
|
-
exports.WSOL_DECIMALS = 9;
|
|
33
|
-
exports.USDC_DECIMALS = 6;
|
|
34
|
-
exports.MAX_SUPPORTED_TOKENS_PER_VAULT = 100;
|
|
35
|
-
exports.MAX_ORACLES_PER_TOKEN = 4;
|
|
36
|
-
exports.MAX_EXTRA_DATA_PER_ORACLE = 4;
|
|
37
|
-
exports.LUT_EXTEND_BATCH_SIZE = 20;
|
|
38
|
-
exports.UPDATE_TOKEN_PRICES_MAX_ACCOUNTS = 50;
|