zo-sdk 0.1.26 → 0.1.27
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/consts/deployments-usdz-mainnet.json +10 -30
- package/dist/implementations/SLPDataAPI.cjs +4 -2
- package/dist/implementations/SLPDataAPI.cjs.map +1 -1
- package/dist/implementations/SLPDataAPI.d.cts.map +1 -1
- package/dist/implementations/SLPDataAPI.d.mts.map +1 -1
- package/dist/implementations/SLPDataAPI.mjs +4 -2
- package/dist/implementations/SLPDataAPI.mjs.map +1 -1
- package/dist/implementations/USDZDataAPI.cjs +3 -1
- package/dist/implementations/USDZDataAPI.cjs.map +1 -1
- package/dist/implementations/USDZDataAPI.d.cts.map +1 -1
- package/dist/implementations/USDZDataAPI.d.mts.map +1 -1
- package/dist/implementations/USDZDataAPI.mjs +3 -1
- package/dist/implementations/USDZDataAPI.mjs.map +1 -1
- package/dist/implementations/ZBTCVCDataAPI.cjs +4 -1
- package/dist/implementations/ZBTCVCDataAPI.cjs.map +1 -1
- package/dist/implementations/ZBTCVCDataAPI.d.cts.map +1 -1
- package/dist/implementations/ZBTCVCDataAPI.d.mts.map +1 -1
- package/dist/implementations/ZBTCVCDataAPI.mjs +4 -1
- package/dist/implementations/ZBTCVCDataAPI.mjs.map +1 -1
- package/dist/implementations/ZLPDataAPI.cjs +4 -1
- package/dist/implementations/ZLPDataAPI.cjs.map +1 -1
- package/dist/implementations/ZLPDataAPI.d.cts.map +1 -1
- package/dist/implementations/ZLPDataAPI.d.mts.map +1 -1
- package/dist/implementations/ZLPDataAPI.mjs +4 -1
- package/dist/implementations/ZLPDataAPI.mjs.map +1 -1
- package/package.json +1 -1
- package/src/consts/deployments-usdz-mainnet.json +11 -31
- package/src/consts/deployments-zlp-mainnet.json +1 -1
- package/src/implementations/SLPDataAPI.ts +9 -4
- package/src/implementations/USDZDataAPI.ts +8 -3
- package/src/implementations/ZBTCVCDataAPI.ts +9 -3
- package/src/implementations/ZLPDataAPI.ts +9 -3
|
@@ -20,72 +20,52 @@
|
|
|
20
20
|
},
|
|
21
21
|
"symbols": {
|
|
22
22
|
"long_sui": {
|
|
23
|
-
"supported_collaterals": [
|
|
24
|
-
"nusdc"
|
|
25
|
-
],
|
|
23
|
+
"supported_collaterals": ["nusdc"],
|
|
26
24
|
"funding_fee_model": "0x23267c3d23e60eb1a574e979cc3b24f0c1aa88079a37598e81925d1f8f14d648",
|
|
27
25
|
"position_config": "0xd6db43851591a5b6113204805dfeb10d77bb2f44bb25aa2cfc093ce096e0f070"
|
|
28
26
|
},
|
|
29
27
|
"short_sui": {
|
|
30
|
-
"supported_collaterals": [
|
|
31
|
-
"nusdc"
|
|
32
|
-
],
|
|
28
|
+
"supported_collaterals": ["nusdc"],
|
|
33
29
|
"funding_fee_model": "0x67edfd197121f4b07aeeaa38b78806ba6567c1affb7af6c28ebc2cb4e8f43d47",
|
|
34
30
|
"position_config": "0x2a991952d39a4e82d8f0435f5b7125feea87dc8348125f221774fa21e1818088"
|
|
35
31
|
},
|
|
36
32
|
"long_btc": {
|
|
37
|
-
"supported_collaterals": [
|
|
38
|
-
"nusdc"
|
|
39
|
-
],
|
|
33
|
+
"supported_collaterals": ["nusdc"],
|
|
40
34
|
"funding_fee_model": "0x4e85e90f9f32d0c5ba932fd64db8c4a8c379ab973310961ccab94f449eee7e40",
|
|
41
35
|
"position_config": "0xdd865bfc98ce4d6f55e8407f67cb23582e8c033d8b4b7bf8acc897f23dc8c50f"
|
|
42
36
|
},
|
|
43
37
|
"short_btc": {
|
|
44
|
-
"supported_collaterals": [
|
|
45
|
-
"nusdc"
|
|
46
|
-
],
|
|
38
|
+
"supported_collaterals": ["nusdc"],
|
|
47
39
|
"funding_fee_model": "0xb5f85180baedc61fe9cbc9cb2318f03615941ba8a0b487b15382d8bb2bc12f09",
|
|
48
40
|
"position_config": "0xf927e26f9c1205252f0a267e63a344adb2af4218bde52d7866a2b0540618fb70"
|
|
49
41
|
},
|
|
50
42
|
"long_xrp": {
|
|
51
|
-
"supported_collaterals": [
|
|
52
|
-
"nusdc"
|
|
53
|
-
],
|
|
43
|
+
"supported_collaterals": ["nusdc"],
|
|
54
44
|
"funding_fee_model": "0xa41f73c98046707dd7c2a9d5dff5d6ce31eb7daa65accc0c67ae0cb1e7a3bf30",
|
|
55
45
|
"position_config": "0xd157fd40d016c50d9494744937e35aa34be805f3dd3cd89aeba1c0d772fcf762"
|
|
56
46
|
},
|
|
57
47
|
"short_xrp": {
|
|
58
|
-
"supported_collaterals": [
|
|
59
|
-
"nusdc"
|
|
60
|
-
],
|
|
48
|
+
"supported_collaterals": ["nusdc"],
|
|
61
49
|
"funding_fee_model": "0xc2be41515db4ef64c317a105d701f254e9f289ce9c1af0c8ccfa30397c319283",
|
|
62
50
|
"position_config": "0x1337dda7dc5cf86fec6e89749c01f736c3d032317620f7f49746062c56a2d410"
|
|
63
51
|
},
|
|
64
52
|
"long_eth": {
|
|
65
|
-
"supported_collaterals": [
|
|
66
|
-
"nusdc"
|
|
67
|
-
],
|
|
53
|
+
"supported_collaterals": ["nusdc"],
|
|
68
54
|
"funding_fee_model": "0x9710b35f31f6cf6c4a4393d6f7bdff7583cd685e27c30ef7e635b7077e422b85",
|
|
69
55
|
"position_config": "0x8f0dd8f9f1831c72962652feeba61d28c4dfb0e68d62d74731787e33c606ff44"
|
|
70
56
|
},
|
|
71
57
|
"short_eth": {
|
|
72
|
-
"supported_collaterals": [
|
|
73
|
-
"nusdc"
|
|
74
|
-
],
|
|
58
|
+
"supported_collaterals": ["nusdc"],
|
|
75
59
|
"funding_fee_model": "0x79d8ba118acf62db188dfdd5960dff262ed2b1ea1f1cfd38b6a41e10064779fd",
|
|
76
60
|
"position_config": "0x235a35cccc4eb265b53296883d50ad5bff62d93b36092207bb2abb20aad8605a"
|
|
77
61
|
},
|
|
78
62
|
"long_sol": {
|
|
79
|
-
"supported_collaterals": [
|
|
80
|
-
"nusdc"
|
|
81
|
-
],
|
|
63
|
+
"supported_collaterals": ["nusdc"],
|
|
82
64
|
"funding_fee_model": "0x980f2f29c144ed4dd0fae2ce2c4755c9b9ff8b642b594bfae331686c56b2dc2a",
|
|
83
65
|
"position_config": "0x3465448bedeeccaf128e80fa26dc8954dcc6df5be91db8b848aa4d2c1c8dde10"
|
|
84
66
|
},
|
|
85
67
|
"short_sol": {
|
|
86
|
-
"supported_collaterals": [
|
|
87
|
-
"nusdc"
|
|
88
|
-
],
|
|
68
|
+
"supported_collaterals": ["nusdc"],
|
|
89
69
|
"funding_fee_model": "0x7ee95a8538e7d840da05ef29e346fd20f2b2899ec6f9c5003e13d40813d7544a",
|
|
90
70
|
"position_config": "0xeeade97837afe6af686d1710df71a301c2527e2498aecf843a9535ffb312e650"
|
|
91
71
|
}
|
|
@@ -281,4 +261,4 @@
|
|
|
281
261
|
"admin_cap": "0xe339faca7f7558bdf8256e7174d0543e5db99befcd0e5b9bef9c421cecabc195",
|
|
282
262
|
"acl_control": "0x2de40211db8cc6aac0fe01acd8ea53943a577fa9ce13e0419ef1b821b75c8b9b"
|
|
283
263
|
}
|
|
284
|
-
}
|
|
264
|
+
}
|
|
@@ -517,9 +517,14 @@ export class SLPDataAPI extends BaseDataAPI implements ISLPDataAPI {
|
|
|
517
517
|
|
|
518
518
|
const pool = await this.getStakePoolV2()
|
|
519
519
|
|
|
520
|
-
const credentials = rawCredentialsData
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
const credentials = rawCredentialsData
|
|
521
|
+
.filter(
|
|
522
|
+
(item: any) =>
|
|
523
|
+
item.data.type ===
|
|
524
|
+
`${this.sharedConfig.zoStaking.package}::pool::Credential<${this.consts.sudoCore.package}::slp::SLP, ${this.consts.sudoCore.package}::slp::SLP>`
|
|
525
|
+
).map((item: any) =>
|
|
526
|
+
SLPDataAPI.parseCredential(item, pool),
|
|
527
|
+
)
|
|
523
528
|
return {
|
|
524
529
|
credentials,
|
|
525
530
|
amount: credentials.reduce(
|
|
@@ -1274,7 +1279,7 @@ export class SLPDataAPI extends BaseDataAPI implements ISLPDataAPI {
|
|
|
1274
1279
|
}
|
|
1275
1280
|
|
|
1276
1281
|
// Use appropriate refresh method based on version
|
|
1277
|
-
if (isNewVersion
|
|
1282
|
+
if (isNewVersion) {
|
|
1278
1283
|
SLPDataAPI.refreshPoolV2(pool, Math.floor(Date.now() / 1000))
|
|
1279
1284
|
} else {
|
|
1280
1285
|
SLPDataAPI.refreshPool(pool, Math.floor(Date.now() / 1000))
|
|
@@ -76,9 +76,14 @@ export class USDZDataAPI extends BaseDataAPI implements IUSDZDataAPI {
|
|
|
76
76
|
|
|
77
77
|
const pool = await this.getStakePool()
|
|
78
78
|
|
|
79
|
-
const credentials = rawCredentialsData
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
const credentials = rawCredentialsData
|
|
80
|
+
.filter(
|
|
81
|
+
(item: any) =>
|
|
82
|
+
item.data.type ===
|
|
83
|
+
`${this.sharedConfig.zoStaking.package}::pool::Credential<${this.consts.zoCore.package}::usdz::USDZ, 0x2::sui::SUI>`
|
|
84
|
+
).map((item: any) =>
|
|
85
|
+
USDZDataAPI.parseCredential(item, pool),
|
|
86
|
+
)
|
|
82
87
|
return {
|
|
83
88
|
credentials,
|
|
84
89
|
amount: credentials.reduce(
|
|
@@ -76,9 +76,15 @@ export class ZBTCVCDataAPI extends BaseDataAPI implements IZBTCVCDataAPI {
|
|
|
76
76
|
|
|
77
77
|
const pool = await this.getStakePool()
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
// TODO: Update reward coin type once available
|
|
80
|
+
const credentials = rawCredentialsData
|
|
81
|
+
.filter(
|
|
82
|
+
(item: any) =>
|
|
83
|
+
item.data.type ===
|
|
84
|
+
`${this.sharedConfig.zoStaking.package}::pool::Credential<${this.consts.zoCore.package}::zbtcvc::ZBTCVC, 0x2::sui::SUI>`
|
|
85
|
+
).map((item: any) =>
|
|
86
|
+
ZBTCVCDataAPI.parseCredential(item, pool),
|
|
87
|
+
)
|
|
82
88
|
return {
|
|
83
89
|
credentials,
|
|
84
90
|
amount: credentials.reduce(
|
|
@@ -77,9 +77,15 @@ export class ZLPDataAPI extends BaseDataAPI implements IZLPDataAPI {
|
|
|
77
77
|
|
|
78
78
|
const pool = await this.getStakePool()
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
// TODO: Update reward coin type once available
|
|
81
|
+
const credentials = rawCredentialsData
|
|
82
|
+
.filter(
|
|
83
|
+
(item: any) =>
|
|
84
|
+
item.data.type ===
|
|
85
|
+
`${this.sharedConfig.zoStaking.package}::pool::Credential<${this.consts.zoCore.package}::zlp::ZLP, 0x2::sui::SUI>`
|
|
86
|
+
).map((item: any) =>
|
|
87
|
+
ZLPDataAPI.parseCredential(item, pool),
|
|
88
|
+
)
|
|
83
89
|
return {
|
|
84
90
|
credentials,
|
|
85
91
|
amount: credentials.reduce(
|