zo-sdk 0.0.50 → 0.1.0
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 +272 -20
- package/dist/abstract/BaseAPI.cjs +117 -0
- package/dist/abstract/BaseAPI.cjs.map +1 -0
- package/dist/abstract/BaseAPI.d.cts +131 -0
- package/dist/abstract/BaseAPI.d.cts.map +1 -0
- package/dist/abstract/BaseAPI.d.mts +131 -0
- package/dist/abstract/BaseAPI.d.mts.map +1 -0
- package/dist/abstract/BaseAPI.mjs +113 -0
- package/dist/abstract/BaseAPI.mjs.map +1 -0
- package/dist/abstract/BaseDataAPI.cjs +139 -0
- package/dist/abstract/BaseDataAPI.cjs.map +1 -0
- package/dist/abstract/BaseDataAPI.d.cts +89 -0
- package/dist/abstract/BaseDataAPI.d.cts.map +1 -0
- package/dist/abstract/BaseDataAPI.d.mts +89 -0
- package/dist/abstract/BaseDataAPI.d.mts.map +1 -0
- package/dist/abstract/BaseDataAPI.mjs +135 -0
- package/dist/abstract/BaseDataAPI.mjs.map +1 -0
- package/dist/abstract/index.cjs +12 -0
- package/dist/abstract/index.cjs.map +1 -0
- package/dist/abstract/index.d.cts +7 -0
- package/dist/abstract/index.d.cts.map +1 -0
- package/dist/abstract/index.d.mts +7 -0
- package/dist/abstract/index.d.mts.map +1 -0
- package/dist/abstract/index.mjs +7 -0
- package/dist/abstract/index.mjs.map +1 -0
- package/dist/bcs.cjs +42 -0
- package/dist/bcs.cjs.map +1 -0
- package/dist/bcs.d.cts +91 -0
- package/dist/bcs.d.cts.map +1 -0
- package/dist/bcs.d.mts +91 -0
- package/dist/bcs.d.mts.map +1 -0
- package/dist/bcs.mjs +39 -0
- package/dist/bcs.mjs.map +1 -0
- package/dist/consts/deployments-slp-mainnet.json +710 -0
- package/dist/consts/deployments-slp-testnet.json +109 -0
- package/dist/consts/deployments-usdz-mainnet.json +180 -0
- package/dist/consts/deployments-usdz-testnet.json +98 -0
- package/dist/consts/{deployments-mainnet.json → deployments-zlp-mainnet.json} +278 -42
- package/dist/consts/index.cjs +40 -8
- package/dist/consts/index.cjs.map +1 -1
- package/dist/consts/index.d.cts +81 -11
- package/dist/consts/index.d.cts.map +1 -1
- package/dist/consts/index.d.mts +81 -11
- package/dist/consts/index.d.mts.map +1 -1
- package/dist/consts/index.mjs +39 -7
- package/dist/consts/index.mjs.map +1 -1
- package/dist/consts/price_id_to_object_id.mainnet.json +9 -1
- package/dist/data.cjs +2 -2
- package/dist/data.cjs.map +1 -1
- package/dist/data.mjs +2 -2
- package/dist/data.mjs.map +1 -1
- package/dist/factory/SDKFactory.cjs +185 -0
- package/dist/factory/SDKFactory.cjs.map +1 -0
- package/dist/factory/SDKFactory.d.cts +74 -0
- package/dist/factory/SDKFactory.d.cts.map +1 -0
- package/dist/factory/SDKFactory.d.mts +74 -0
- package/dist/factory/SDKFactory.d.mts.map +1 -0
- package/dist/factory/SDKFactory.mjs +179 -0
- package/dist/factory/SDKFactory.mjs.map +1 -0
- package/dist/implementations/SLPAPI.cjs +829 -0
- package/dist/implementations/SLPAPI.cjs.map +1 -0
- package/dist/implementations/SLPAPI.d.cts +120 -0
- package/dist/implementations/SLPAPI.d.cts.map +1 -0
- package/dist/implementations/SLPAPI.d.mts +120 -0
- package/dist/implementations/SLPAPI.d.mts.map +1 -0
- package/dist/implementations/SLPAPI.mjs +825 -0
- package/dist/implementations/SLPAPI.mjs.map +1 -0
- package/dist/implementations/SLPDataAPI.cjs +916 -0
- package/dist/implementations/SLPDataAPI.cjs.map +1 -0
- package/dist/implementations/SLPDataAPI.d.cts +102 -0
- package/dist/implementations/SLPDataAPI.d.cts.map +1 -0
- package/dist/implementations/SLPDataAPI.d.mts +102 -0
- package/dist/implementations/SLPDataAPI.d.mts.map +1 -0
- package/dist/implementations/SLPDataAPI.mjs +912 -0
- package/dist/implementations/SLPDataAPI.mjs.map +1 -0
- package/dist/implementations/USDZAPI.cjs +522 -0
- package/dist/implementations/USDZAPI.cjs.map +1 -0
- package/dist/implementations/USDZAPI.d.cts +118 -0
- package/dist/implementations/USDZAPI.d.cts.map +1 -0
- package/dist/implementations/USDZAPI.d.mts +118 -0
- package/dist/implementations/USDZAPI.d.mts.map +1 -0
- package/dist/implementations/USDZAPI.mjs +518 -0
- package/dist/implementations/USDZAPI.mjs.map +1 -0
- package/dist/implementations/USDZDataAPI.cjs +697 -0
- package/dist/implementations/USDZDataAPI.cjs.map +1 -0
- package/dist/implementations/USDZDataAPI.d.cts +86 -0
- package/dist/implementations/USDZDataAPI.d.cts.map +1 -0
- package/dist/implementations/USDZDataAPI.d.mts +86 -0
- package/dist/implementations/USDZDataAPI.d.mts.map +1 -0
- package/dist/implementations/USDZDataAPI.mjs +693 -0
- package/dist/implementations/USDZDataAPI.mjs.map +1 -0
- package/dist/implementations/ZLPAPI.cjs +809 -0
- package/dist/implementations/ZLPAPI.cjs.map +1 -0
- package/dist/implementations/ZLPAPI.d.cts +121 -0
- package/dist/implementations/ZLPAPI.d.cts.map +1 -0
- package/dist/implementations/ZLPAPI.d.mts +121 -0
- package/dist/implementations/ZLPAPI.d.mts.map +1 -0
- package/dist/implementations/ZLPAPI.mjs +805 -0
- package/dist/implementations/ZLPAPI.mjs.map +1 -0
- package/dist/implementations/ZLPDataAPI.cjs +724 -0
- package/dist/implementations/ZLPDataAPI.cjs.map +1 -0
- package/dist/implementations/ZLPDataAPI.d.cts +83 -0
- package/dist/implementations/ZLPDataAPI.d.cts.map +1 -0
- package/dist/implementations/ZLPDataAPI.d.mts +83 -0
- package/dist/implementations/ZLPDataAPI.d.mts.map +1 -0
- package/dist/implementations/ZLPDataAPI.mjs +720 -0
- package/dist/implementations/ZLPDataAPI.mjs.map +1 -0
- package/dist/implementations/index.cjs +22 -0
- package/dist/implementations/index.cjs.map +1 -0
- package/dist/implementations/index.d.cts +11 -0
- package/dist/implementations/index.d.cts.map +1 -0
- package/dist/implementations/index.d.mts +11 -0
- package/dist/implementations/index.d.mts.map +1 -0
- package/dist/implementations/index.mjs +13 -0
- package/dist/implementations/index.mjs.map +1 -0
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +45 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +45 -0
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/base.cjs +8 -0
- package/dist/interfaces/base.cjs.map +1 -0
- package/dist/interfaces/base.d.cts +293 -0
- package/dist/interfaces/base.d.cts.map +1 -0
- package/dist/interfaces/base.d.mts +293 -0
- package/dist/interfaces/base.d.mts.map +1 -0
- package/dist/interfaces/base.mjs +6 -0
- package/dist/interfaces/base.mjs.map +1 -0
- package/dist/interfaces/index.cjs +29 -0
- package/dist/interfaces/index.cjs.map +1 -0
- package/dist/interfaces/index.d.cts +13 -0
- package/dist/interfaces/index.d.cts.map +1 -0
- package/dist/interfaces/index.d.mts +13 -0
- package/dist/interfaces/index.d.mts.map +1 -0
- package/dist/interfaces/index.mjs +13 -0
- package/dist/interfaces/index.mjs.map +1 -0
- package/dist/interfaces/slp.cjs +9 -0
- package/dist/interfaces/slp.cjs.map +1 -0
- package/dist/interfaces/slp.d.cts +115 -0
- package/dist/interfaces/slp.d.cts.map +1 -0
- package/dist/interfaces/slp.d.mts +115 -0
- package/dist/interfaces/slp.d.mts.map +1 -0
- package/dist/interfaces/slp.mjs +7 -0
- package/dist/interfaces/slp.mjs.map +1 -0
- package/dist/interfaces/usdz.cjs +7 -0
- package/dist/interfaces/usdz.cjs.map +1 -0
- package/dist/interfaces/usdz.d.cts +40 -0
- package/dist/interfaces/usdz.d.cts.map +1 -0
- package/dist/interfaces/usdz.d.mts +40 -0
- package/dist/interfaces/usdz.d.mts.map +1 -0
- package/dist/interfaces/usdz.mjs +6 -0
- package/dist/interfaces/usdz.mjs.map +1 -0
- package/dist/interfaces/zlp.cjs +7 -0
- package/dist/interfaces/zlp.cjs.map +1 -0
- package/dist/interfaces/zlp.d.cts +45 -0
- package/dist/interfaces/zlp.d.cts.map +1 -0
- package/dist/interfaces/zlp.d.mts +45 -0
- package/dist/interfaces/zlp.d.mts.map +1 -0
- package/dist/interfaces/zlp.mjs +6 -0
- package/dist/interfaces/zlp.mjs.map +1 -0
- package/dist/oracle.cjs +7 -35
- package/dist/oracle.cjs.map +1 -1
- package/dist/oracle.d.cts +3 -4
- package/dist/oracle.d.cts.map +1 -1
- package/dist/oracle.d.mts +3 -4
- package/dist/oracle.d.mts.map +1 -1
- package/dist/oracle.mjs +8 -32
- package/dist/oracle.mjs.map +1 -1
- package/package.json +1 -1
- package/src/abstract/BaseAPI.ts +429 -0
- package/src/abstract/BaseDataAPI.ts +204 -0
- package/src/abstract/index.ts +7 -0
- package/src/bcs.ts +45 -0
- package/src/consts/deployments-slp-mainnet.json +710 -0
- package/src/consts/deployments-slp-testnet.json +109 -0
- package/src/consts/deployments-usdz-mainnet.json +180 -0
- package/src/consts/deployments-usdz-testnet.json +98 -0
- package/src/consts/{deployments-mainnet.json → deployments-zlp-mainnet.json} +279 -43
- package/src/consts/index.ts +134 -39
- package/src/consts/price_id_to_object_id.mainnet.json +10 -2
- package/src/data.ts +2 -2
- package/src/factory/SDKFactory.ts +282 -0
- package/src/implementations/SLPAPI.ts +1207 -0
- package/src/implementations/SLPDataAPI.ts +1188 -0
- package/src/implementations/USDZAPI.ts +715 -0
- package/src/implementations/USDZDataAPI.ts +826 -0
- package/src/implementations/ZLPAPI.ts +1130 -0
- package/src/implementations/ZLPDataAPI.ts +856 -0
- package/src/implementations/index.ts +14 -0
- package/src/index.ts +53 -0
- package/src/interfaces/base.ts +556 -0
- package/src/interfaces/index.ts +45 -0
- package/src/interfaces/slp.ts +156 -0
- package/src/interfaces/usdz.ts +71 -0
- package/src/interfaces/zlp.ts +96 -0
- package/src/oracle.ts +12 -42
- package/tsconfig.json +4 -2
- package/dist/consts/staking/deployments-mainnet.json +0 -12
- package/dist/consts/staking/deployments-testnet.json +0 -11
- package/src/consts/staking/deployments-mainnet.json +0 -12
- package/src/consts/staking/deployments-testnet.json +0 -11
- /package/dist/consts/{deployments-testnet.json → deployments-zlp-testnet.json} +0 -0
- /package/src/consts/{deployments-testnet.json → deployments-zlp-testnet.json} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract base class for all DataAPI implementations
|
|
3
|
+
* Provides common functionality and enforces interface contracts
|
|
4
|
+
*/
|
|
5
|
+
import { OracleAPI } from "../oracle.mjs";
|
|
6
|
+
export class BaseDataAPI extends OracleAPI {
|
|
7
|
+
constructor(network, provider, apiEndpoint, connectionURL, lpToken) {
|
|
8
|
+
super(network, provider, connectionURL, lpToken);
|
|
9
|
+
// Cache management
|
|
10
|
+
this.vaultInfoCache = {};
|
|
11
|
+
this.symbolInfoCache = {};
|
|
12
|
+
this.marketInfoCache = null;
|
|
13
|
+
this.positionConfigCache = {};
|
|
14
|
+
this.rebaseFeeModelCache = null;
|
|
15
|
+
this.lastUpdate = 0;
|
|
16
|
+
this.CACHE_DURATION = 1000 * 60 * 3; // 3 minutes
|
|
17
|
+
this.provider = provider;
|
|
18
|
+
this.apiEndpoint = apiEndpoint;
|
|
19
|
+
this.connectionURL = connectionURL;
|
|
20
|
+
this.lpToken = lpToken;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Validates and clears cache if expired
|
|
24
|
+
*/
|
|
25
|
+
validateCache() {
|
|
26
|
+
super.validateCache();
|
|
27
|
+
if (this.lastUpdate + this.CACHE_DURATION < Date.now()) {
|
|
28
|
+
this.clearCache();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Clears all cached data
|
|
33
|
+
*/
|
|
34
|
+
clearCache() {
|
|
35
|
+
this.lastUpdate = Date.now();
|
|
36
|
+
this.vaultInfoCache = {};
|
|
37
|
+
this.symbolInfoCache = {};
|
|
38
|
+
this.marketInfoCache = null;
|
|
39
|
+
this.positionConfigCache = {};
|
|
40
|
+
this.rebaseFeeModelCache = null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Gets cached vault info or fetches if not cached
|
|
44
|
+
*/
|
|
45
|
+
async getCachedVaultInfo(vault) {
|
|
46
|
+
this.validateCache();
|
|
47
|
+
if (!this.vaultInfoCache[vault]) {
|
|
48
|
+
this.vaultInfoCache[vault] = await this.getVaultInfo(vault);
|
|
49
|
+
}
|
|
50
|
+
return this.vaultInfoCache[vault];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets cached symbol info or fetches if not cached
|
|
54
|
+
*/
|
|
55
|
+
async getCachedSymbolInfo(tokenId, long) {
|
|
56
|
+
this.validateCache();
|
|
57
|
+
const key = `${tokenId}_${long}`;
|
|
58
|
+
if (!this.symbolInfoCache[key]) {
|
|
59
|
+
this.symbolInfoCache[key] = await this.getSymbolInfo(tokenId, long);
|
|
60
|
+
}
|
|
61
|
+
return this.symbolInfoCache[key];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets cached market info or fetches if not cached
|
|
65
|
+
*/
|
|
66
|
+
async getCachedMarketInfo() {
|
|
67
|
+
this.validateCache();
|
|
68
|
+
if (!this.marketInfoCache) {
|
|
69
|
+
this.marketInfoCache = await this.getMarketInfo();
|
|
70
|
+
}
|
|
71
|
+
return this.marketInfoCache;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets cached position config or fetches if not cached
|
|
75
|
+
*/
|
|
76
|
+
async getCachedPositionConfig(indexToken, long) {
|
|
77
|
+
this.validateCache();
|
|
78
|
+
const key = `${indexToken}_${long}`;
|
|
79
|
+
if (!this.positionConfigCache[key]) {
|
|
80
|
+
this.positionConfigCache[key] = await this.getPositionConfig(indexToken, long);
|
|
81
|
+
}
|
|
82
|
+
return this.positionConfigCache[key];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Gets cached rebase fee model or fetches if not cached
|
|
86
|
+
*/
|
|
87
|
+
async getCachedRebaseFeeModel() {
|
|
88
|
+
this.validateCache();
|
|
89
|
+
if (!this.rebaseFeeModelCache) {
|
|
90
|
+
this.rebaseFeeModelCache = await this.getRebaseFeeModel();
|
|
91
|
+
}
|
|
92
|
+
return this.rebaseFeeModelCache;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Helper method to handle API requests with error handling
|
|
96
|
+
*/
|
|
97
|
+
async makeAPIRequest(endpoint) {
|
|
98
|
+
try {
|
|
99
|
+
const response = await fetch(`${this.apiEndpoint}${endpoint}`);
|
|
100
|
+
if (!response.ok) {
|
|
101
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
102
|
+
}
|
|
103
|
+
return await response.json();
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error(`Error fetching data from ${endpoint}:`, error);
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Helper method to parse numeric values from API responses
|
|
112
|
+
*/
|
|
113
|
+
parseNumericValue(value, decimals = 0) {
|
|
114
|
+
if (typeof value === 'string') {
|
|
115
|
+
return Number(value) / Math.pow(10, decimals);
|
|
116
|
+
}
|
|
117
|
+
if (typeof value === 'bigint') {
|
|
118
|
+
return Number(value) / Math.pow(10, decimals);
|
|
119
|
+
}
|
|
120
|
+
return Number(value) || 0;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Helper method to parse bigint values from API responses
|
|
124
|
+
*/
|
|
125
|
+
parseBigIntValue(value) {
|
|
126
|
+
if (typeof value === 'string') {
|
|
127
|
+
return BigInt(value);
|
|
128
|
+
}
|
|
129
|
+
if (typeof value === 'bigint') {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
return BigInt(Number(value) || 0);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=BaseDataAPI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseDataA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CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAC/C,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED;;OAEG;IACO,gBAAgB,CAAC,KAAU;QACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Abstract base classes for SDK implementations
|
|
4
|
+
* Provides common functionality and enforces interface contracts
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BaseAPI = exports.BaseDataAPI = void 0;
|
|
8
|
+
var BaseDataAPI_1 = require("./BaseDataAPI.cjs");
|
|
9
|
+
Object.defineProperty(exports, "BaseDataAPI", { enumerable: true, get: function () { return BaseDataAPI_1.BaseDataAPI; } });
|
|
10
|
+
var BaseAPI_1 = require("./BaseAPI.cjs");
|
|
11
|
+
Object.defineProperty(exports, "BaseAPI", { enumerable: true, get: function () { return BaseAPI_1.BaseAPI; } });
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/abstract/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iDAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,yCAAmC;AAA1B,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/abstract/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,0BAAqB;AAC3C,OAAO,EAAE,OAAO,EAAE,sBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/abstract/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,0BAAqB;AAC3C,OAAO,EAAE,OAAO,EAAE,sBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/abstract/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,0BAAqB;AAC3C,OAAO,EAAE,OAAO,EAAE,sBAAiB"}
|
package/dist/bcs.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SymbolsValuation = exports.VaultsValuation = exports.VaultInfo = exports.AggPrice = exports.SRate = exports.SDecimal = exports.Decimal = exports.Rate = void 0;
|
|
4
|
+
const bcs_1 = require("@mysten/bcs");
|
|
5
|
+
exports.Rate = bcs_1.bcs.u128();
|
|
6
|
+
exports.Decimal = bcs_1.bcs.u256();
|
|
7
|
+
exports.SDecimal = bcs_1.bcs.struct('SDecimal', {
|
|
8
|
+
is_positive: bcs_1.bcs.bool(),
|
|
9
|
+
value: bcs_1.bcs.u256(),
|
|
10
|
+
});
|
|
11
|
+
exports.SRate = bcs_1.bcs.struct('SRate', {
|
|
12
|
+
is_positive: bcs_1.bcs.bool(),
|
|
13
|
+
value: bcs_1.bcs.u128(),
|
|
14
|
+
});
|
|
15
|
+
// Agg price
|
|
16
|
+
exports.AggPrice = bcs_1.bcs.struct('AggPrice', {
|
|
17
|
+
price: bcs_1.bcs.u256(), // Decimal
|
|
18
|
+
precision: bcs_1.bcs.u64(),
|
|
19
|
+
});
|
|
20
|
+
// Market
|
|
21
|
+
exports.VaultInfo = bcs_1.bcs.struct('VaultInfo', {
|
|
22
|
+
price: exports.AggPrice,
|
|
23
|
+
value: bcs_1.bcs.u256(), // Decimal
|
|
24
|
+
});
|
|
25
|
+
exports.VaultsValuation = bcs_1.bcs.struct('VaultsValuation', {
|
|
26
|
+
timestamp: bcs_1.bcs.u64(),
|
|
27
|
+
num: bcs_1.bcs.u64(),
|
|
28
|
+
handled: bcs_1.bcs.vector(bcs_1.bcs.struct('Entry', {
|
|
29
|
+
key: bcs_1.bcs.string(), // TypeName
|
|
30
|
+
value: exports.VaultInfo,
|
|
31
|
+
})),
|
|
32
|
+
total_weight: bcs_1.bcs.u256(), // Decimal
|
|
33
|
+
value: bcs_1.bcs.u256(), // Decimal
|
|
34
|
+
});
|
|
35
|
+
exports.SymbolsValuation = bcs_1.bcs.struct('SymbolsValuation', {
|
|
36
|
+
timestamp: bcs_1.bcs.u64(),
|
|
37
|
+
num: bcs_1.bcs.u64(),
|
|
38
|
+
lp_supply_amount: bcs_1.bcs.u256(), // Decimal
|
|
39
|
+
handled: bcs_1.bcs.vector(bcs_1.bcs.string()), // vector<TypeName>
|
|
40
|
+
value: exports.SDecimal,
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=bcs.cjs.map
|
package/dist/bcs.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bcs.cjs","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":";;;AAAA,qCAAkC;AAErB,QAAA,IAAI,GAAG,SAAG,CAAC,IAAI,EAAE,CAAC;AAClB,QAAA,OAAO,GAAG,SAAG,CAAC,IAAI,EAAE,CAAC;AAErB,QAAA,QAAQ,GAAG,SAAG,CAAC,MAAM,CAAC,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EAAE;IACd,gBAAgB,EAAE,SAAG,CAAC,IAAI,EAAE,EAAE,UAAU;IACxC,OAAO,EAAE,SAAG,CAAC,MAAM,CAAC,SAAG,CAAC,MAAM,EAAE,CAAC,EAAE,mBAAmB;IACtD,KAAK,EAAE,gBAAQ;CAChB,CAAC,CAAC"}
|
package/dist/bcs.d.cts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const Rate: import("@mysten/bcs").BcsType<string, string | number | bigint>;
|
|
2
|
+
export declare const Decimal: import("@mysten/bcs").BcsType<string, string | number | bigint>;
|
|
3
|
+
export declare const SDecimal: import("@mysten/bcs").BcsType<{
|
|
4
|
+
is_positive: boolean;
|
|
5
|
+
value: string;
|
|
6
|
+
}, {
|
|
7
|
+
is_positive: boolean;
|
|
8
|
+
value: string | number | bigint;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const SRate: import("@mysten/bcs").BcsType<{
|
|
11
|
+
is_positive: boolean;
|
|
12
|
+
value: string;
|
|
13
|
+
}, {
|
|
14
|
+
is_positive: boolean;
|
|
15
|
+
value: string | number | bigint;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const AggPrice: import("@mysten/bcs").BcsType<{
|
|
18
|
+
price: string;
|
|
19
|
+
precision: string;
|
|
20
|
+
}, {
|
|
21
|
+
price: string | number | bigint;
|
|
22
|
+
precision: string | number | bigint;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const VaultInfo: import("@mysten/bcs").BcsType<{
|
|
25
|
+
price: {
|
|
26
|
+
price: string;
|
|
27
|
+
precision: string;
|
|
28
|
+
};
|
|
29
|
+
value: string;
|
|
30
|
+
}, {
|
|
31
|
+
price: {
|
|
32
|
+
price: string | number | bigint;
|
|
33
|
+
precision: string | number | bigint;
|
|
34
|
+
};
|
|
35
|
+
value: string | number | bigint;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const VaultsValuation: import("@mysten/bcs").BcsType<{
|
|
38
|
+
timestamp: string;
|
|
39
|
+
num: string;
|
|
40
|
+
handled: {
|
|
41
|
+
key: string;
|
|
42
|
+
value: {
|
|
43
|
+
price: {
|
|
44
|
+
price: string;
|
|
45
|
+
precision: string;
|
|
46
|
+
};
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
}[];
|
|
50
|
+
total_weight: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}, {
|
|
53
|
+
timestamp: string | number | bigint;
|
|
54
|
+
num: string | number | bigint;
|
|
55
|
+
handled: Iterable<{
|
|
56
|
+
key: string;
|
|
57
|
+
value: {
|
|
58
|
+
price: {
|
|
59
|
+
price: string | number | bigint;
|
|
60
|
+
precision: string | number | bigint;
|
|
61
|
+
};
|
|
62
|
+
value: string | number | bigint;
|
|
63
|
+
};
|
|
64
|
+
}> & {
|
|
65
|
+
length: number;
|
|
66
|
+
};
|
|
67
|
+
total_weight: string | number | bigint;
|
|
68
|
+
value: string | number | bigint;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const SymbolsValuation: import("@mysten/bcs").BcsType<{
|
|
71
|
+
timestamp: string;
|
|
72
|
+
num: string;
|
|
73
|
+
lp_supply_amount: string;
|
|
74
|
+
handled: string[];
|
|
75
|
+
value: {
|
|
76
|
+
is_positive: boolean;
|
|
77
|
+
value: string;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
timestamp: string | number | bigint;
|
|
81
|
+
num: string | number | bigint;
|
|
82
|
+
lp_supply_amount: string | number | bigint;
|
|
83
|
+
handled: Iterable<string> & {
|
|
84
|
+
length: number;
|
|
85
|
+
};
|
|
86
|
+
value: {
|
|
87
|
+
is_positive: boolean;
|
|
88
|
+
value: string | number | bigint;
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
91
|
+
//# sourceMappingURL=bcs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bcs.d.cts","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,iEAAa,CAAC;AAC/B,eAAO,MAAM,OAAO,iEAAa,CAAC;AAElC,eAAO,MAAM,QAAQ;;;;;;EAGnB,CAAC;AAEH,eAAO,MAAM,KAAK;;;;;;EAGhB,CAAC;AAGH,eAAO,MAAM,QAAQ;;;;;;EAGnB,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;EAGpB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;EAM3B,CAAC"}
|
package/dist/bcs.d.mts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const Rate: import("@mysten/bcs").BcsType<string, string | number | bigint>;
|
|
2
|
+
export declare const Decimal: import("@mysten/bcs").BcsType<string, string | number | bigint>;
|
|
3
|
+
export declare const SDecimal: import("@mysten/bcs").BcsType<{
|
|
4
|
+
is_positive: boolean;
|
|
5
|
+
value: string;
|
|
6
|
+
}, {
|
|
7
|
+
is_positive: boolean;
|
|
8
|
+
value: string | number | bigint;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const SRate: import("@mysten/bcs").BcsType<{
|
|
11
|
+
is_positive: boolean;
|
|
12
|
+
value: string;
|
|
13
|
+
}, {
|
|
14
|
+
is_positive: boolean;
|
|
15
|
+
value: string | number | bigint;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const AggPrice: import("@mysten/bcs").BcsType<{
|
|
18
|
+
price: string;
|
|
19
|
+
precision: string;
|
|
20
|
+
}, {
|
|
21
|
+
price: string | number | bigint;
|
|
22
|
+
precision: string | number | bigint;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const VaultInfo: import("@mysten/bcs").BcsType<{
|
|
25
|
+
price: {
|
|
26
|
+
price: string;
|
|
27
|
+
precision: string;
|
|
28
|
+
};
|
|
29
|
+
value: string;
|
|
30
|
+
}, {
|
|
31
|
+
price: {
|
|
32
|
+
price: string | number | bigint;
|
|
33
|
+
precision: string | number | bigint;
|
|
34
|
+
};
|
|
35
|
+
value: string | number | bigint;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const VaultsValuation: import("@mysten/bcs").BcsType<{
|
|
38
|
+
timestamp: string;
|
|
39
|
+
num: string;
|
|
40
|
+
handled: {
|
|
41
|
+
key: string;
|
|
42
|
+
value: {
|
|
43
|
+
price: {
|
|
44
|
+
price: string;
|
|
45
|
+
precision: string;
|
|
46
|
+
};
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
}[];
|
|
50
|
+
total_weight: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}, {
|
|
53
|
+
timestamp: string | number | bigint;
|
|
54
|
+
num: string | number | bigint;
|
|
55
|
+
handled: Iterable<{
|
|
56
|
+
key: string;
|
|
57
|
+
value: {
|
|
58
|
+
price: {
|
|
59
|
+
price: string | number | bigint;
|
|
60
|
+
precision: string | number | bigint;
|
|
61
|
+
};
|
|
62
|
+
value: string | number | bigint;
|
|
63
|
+
};
|
|
64
|
+
}> & {
|
|
65
|
+
length: number;
|
|
66
|
+
};
|
|
67
|
+
total_weight: string | number | bigint;
|
|
68
|
+
value: string | number | bigint;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const SymbolsValuation: import("@mysten/bcs").BcsType<{
|
|
71
|
+
timestamp: string;
|
|
72
|
+
num: string;
|
|
73
|
+
lp_supply_amount: string;
|
|
74
|
+
handled: string[];
|
|
75
|
+
value: {
|
|
76
|
+
is_positive: boolean;
|
|
77
|
+
value: string;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
timestamp: string | number | bigint;
|
|
81
|
+
num: string | number | bigint;
|
|
82
|
+
lp_supply_amount: string | number | bigint;
|
|
83
|
+
handled: Iterable<string> & {
|
|
84
|
+
length: number;
|
|
85
|
+
};
|
|
86
|
+
value: {
|
|
87
|
+
is_positive: boolean;
|
|
88
|
+
value: string | number | bigint;
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
91
|
+
//# sourceMappingURL=bcs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bcs.d.mts","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,iEAAa,CAAC;AAC/B,eAAO,MAAM,OAAO,iEAAa,CAAC;AAElC,eAAO,MAAM,QAAQ;;;;;;EAGnB,CAAC;AAEH,eAAO,MAAM,KAAK;;;;;;EAGhB,CAAC;AAGH,eAAO,MAAM,QAAQ;;;;;;EAGnB,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;EAGpB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;EAM3B,CAAC"}
|
package/dist/bcs.mjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { bcs } from "@mysten/bcs";
|
|
2
|
+
export const Rate = bcs.u128();
|
|
3
|
+
export const Decimal = bcs.u256();
|
|
4
|
+
export const SDecimal = bcs.struct('SDecimal', {
|
|
5
|
+
is_positive: bcs.bool(),
|
|
6
|
+
value: bcs.u256(),
|
|
7
|
+
});
|
|
8
|
+
export const SRate = bcs.struct('SRate', {
|
|
9
|
+
is_positive: bcs.bool(),
|
|
10
|
+
value: bcs.u128(),
|
|
11
|
+
});
|
|
12
|
+
// Agg price
|
|
13
|
+
export const AggPrice = bcs.struct('AggPrice', {
|
|
14
|
+
price: bcs.u256(), // Decimal
|
|
15
|
+
precision: bcs.u64(),
|
|
16
|
+
});
|
|
17
|
+
// Market
|
|
18
|
+
export const VaultInfo = bcs.struct('VaultInfo', {
|
|
19
|
+
price: AggPrice,
|
|
20
|
+
value: bcs.u256(), // Decimal
|
|
21
|
+
});
|
|
22
|
+
export const VaultsValuation = bcs.struct('VaultsValuation', {
|
|
23
|
+
timestamp: bcs.u64(),
|
|
24
|
+
num: bcs.u64(),
|
|
25
|
+
handled: bcs.vector(bcs.struct('Entry', {
|
|
26
|
+
key: bcs.string(), // TypeName
|
|
27
|
+
value: VaultInfo,
|
|
28
|
+
})),
|
|
29
|
+
total_weight: bcs.u256(), // Decimal
|
|
30
|
+
value: bcs.u256(), // Decimal
|
|
31
|
+
});
|
|
32
|
+
export const SymbolsValuation = bcs.struct('SymbolsValuation', {
|
|
33
|
+
timestamp: bcs.u64(),
|
|
34
|
+
num: bcs.u64(),
|
|
35
|
+
lp_supply_amount: bcs.u256(), // Decimal
|
|
36
|
+
handled: bcs.vector(bcs.string()), // vector<TypeName>
|
|
37
|
+
value: SDecimal,
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=bcs.mjs.map
|
package/dist/bcs.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bcs.mjs","sourceRoot":"","sources":["../src/bcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,oBAAoB;AAElC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;AAC/B,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;IAC7C,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE;IACvB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;IACvC,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE;IACvB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE;CAClB,CAAC,CAAC;AAEH,YAAY;AACZ,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;IAC7C,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE,UA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