@nexusmutual/sdk 1.26.0-rc.0 → 1.26.0-rc.1
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/data/products.json +24 -24
- package/dist/index.d.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.js +27 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27426,7 +27426,7 @@ var products_default = [
|
|
|
27426
27426
|
"cbBTC"
|
|
27427
27427
|
],
|
|
27428
27428
|
isPrivate: false,
|
|
27429
|
-
timestamp:
|
|
27429
|
+
timestamp: 1757074607,
|
|
27430
27430
|
minPrice: 100
|
|
27431
27431
|
},
|
|
27432
27432
|
{
|
|
@@ -27788,7 +27788,7 @@ var products_default = [
|
|
|
27788
27788
|
"cbBTC"
|
|
27789
27789
|
],
|
|
27790
27790
|
isPrivate: false,
|
|
27791
|
-
timestamp:
|
|
27791
|
+
timestamp: 1733326763,
|
|
27792
27792
|
minPrice: 100
|
|
27793
27793
|
},
|
|
27794
27794
|
{
|
|
@@ -27931,7 +27931,7 @@ var products_default = [
|
|
|
27931
27931
|
"USDC"
|
|
27932
27932
|
],
|
|
27933
27933
|
isPrivate: false,
|
|
27934
|
-
timestamp:
|
|
27934
|
+
timestamp: 1758283931,
|
|
27935
27935
|
minPrice: 100
|
|
27936
27936
|
},
|
|
27937
27937
|
{
|
|
@@ -28370,7 +28370,7 @@ var products_default = [
|
|
|
28370
28370
|
"cbBTC"
|
|
28371
28371
|
],
|
|
28372
28372
|
isPrivate: false,
|
|
28373
|
-
timestamp:
|
|
28373
|
+
timestamp: 1758283931,
|
|
28374
28374
|
minPrice: 100
|
|
28375
28375
|
},
|
|
28376
28376
|
{
|
|
@@ -28910,7 +28910,7 @@ var products_default = [
|
|
|
28910
28910
|
"USDC"
|
|
28911
28911
|
],
|
|
28912
28912
|
isPrivate: false,
|
|
28913
|
-
timestamp:
|
|
28913
|
+
timestamp: 1723127459,
|
|
28914
28914
|
minPrice: 100
|
|
28915
28915
|
},
|
|
28916
28916
|
{
|
|
@@ -29080,7 +29080,7 @@ var products_default = [
|
|
|
29080
29080
|
"cbBTC"
|
|
29081
29081
|
],
|
|
29082
29082
|
isPrivate: false,
|
|
29083
|
-
timestamp:
|
|
29083
|
+
timestamp: 1764188807,
|
|
29084
29084
|
minPrice: 100
|
|
29085
29085
|
},
|
|
29086
29086
|
{
|
|
@@ -29099,7 +29099,7 @@ var products_default = [
|
|
|
29099
29099
|
"cbBTC"
|
|
29100
29100
|
],
|
|
29101
29101
|
isPrivate: false,
|
|
29102
|
-
timestamp:
|
|
29102
|
+
timestamp: 1749739367,
|
|
29103
29103
|
minPrice: 100
|
|
29104
29104
|
},
|
|
29105
29105
|
{
|
|
@@ -29667,7 +29667,7 @@ var products_default = [
|
|
|
29667
29667
|
"USDC"
|
|
29668
29668
|
],
|
|
29669
29669
|
isPrivate: false,
|
|
29670
|
-
timestamp:
|
|
29670
|
+
timestamp: 1757074607,
|
|
29671
29671
|
minPrice: 50
|
|
29672
29672
|
},
|
|
29673
29673
|
{
|
|
@@ -29752,7 +29752,7 @@ var products_default = [
|
|
|
29752
29752
|
"ETH"
|
|
29753
29753
|
],
|
|
29754
29754
|
isPrivate: false,
|
|
29755
|
-
timestamp:
|
|
29755
|
+
timestamp: 1757074607,
|
|
29756
29756
|
minPrice: 100
|
|
29757
29757
|
},
|
|
29758
29758
|
{
|
|
@@ -29786,7 +29786,7 @@ var products_default = [
|
|
|
29786
29786
|
"cbBTC"
|
|
29787
29787
|
],
|
|
29788
29788
|
isPrivate: false,
|
|
29789
|
-
timestamp:
|
|
29789
|
+
timestamp: 1757074607,
|
|
29790
29790
|
minPrice: 75
|
|
29791
29791
|
},
|
|
29792
29792
|
{
|
|
@@ -29805,7 +29805,7 @@ var products_default = [
|
|
|
29805
29805
|
"cbBTC"
|
|
29806
29806
|
],
|
|
29807
29807
|
isPrivate: false,
|
|
29808
|
-
timestamp:
|
|
29808
|
+
timestamp: 1758283931,
|
|
29809
29809
|
minPrice: 100
|
|
29810
29810
|
},
|
|
29811
29811
|
{
|
|
@@ -29843,7 +29843,7 @@ var products_default = [
|
|
|
29843
29843
|
"cbBTC"
|
|
29844
29844
|
],
|
|
29845
29845
|
isPrivate: false,
|
|
29846
|
-
timestamp:
|
|
29846
|
+
timestamp: 1739447471,
|
|
29847
29847
|
minPrice: 235
|
|
29848
29848
|
},
|
|
29849
29849
|
{
|
|
@@ -29898,7 +29898,7 @@ var products_default = [
|
|
|
29898
29898
|
"ETH"
|
|
29899
29899
|
],
|
|
29900
29900
|
isPrivate: true,
|
|
29901
|
-
timestamp:
|
|
29901
|
+
timestamp: 1741267523,
|
|
29902
29902
|
minPrice: 95
|
|
29903
29903
|
},
|
|
29904
29904
|
{
|
|
@@ -30226,7 +30226,7 @@ var products_default = [
|
|
|
30226
30226
|
"USDC"
|
|
30227
30227
|
],
|
|
30228
30228
|
isPrivate: true,
|
|
30229
|
-
timestamp:
|
|
30229
|
+
timestamp: 1743603467,
|
|
30230
30230
|
minPrice: 1586
|
|
30231
30231
|
},
|
|
30232
30232
|
{
|
|
@@ -30243,7 +30243,7 @@ var products_default = [
|
|
|
30243
30243
|
"USDC"
|
|
30244
30244
|
],
|
|
30245
30245
|
isPrivate: false,
|
|
30246
|
-
timestamp:
|
|
30246
|
+
timestamp: 1757074607,
|
|
30247
30247
|
minPrice: 150
|
|
30248
30248
|
},
|
|
30249
30249
|
{
|
|
@@ -30454,7 +30454,7 @@ var products_default = [
|
|
|
30454
30454
|
"cbBTC"
|
|
30455
30455
|
],
|
|
30456
30456
|
isPrivate: false,
|
|
30457
|
-
timestamp:
|
|
30457
|
+
timestamp: 1758283931,
|
|
30458
30458
|
minPrice: 100
|
|
30459
30459
|
},
|
|
30460
30460
|
{
|
|
@@ -30543,7 +30543,7 @@ var products_default = [
|
|
|
30543
30543
|
"USDC"
|
|
30544
30544
|
],
|
|
30545
30545
|
isPrivate: false,
|
|
30546
|
-
timestamp:
|
|
30546
|
+
timestamp: 1757074607,
|
|
30547
30547
|
minPrice: 50
|
|
30548
30548
|
},
|
|
30549
30549
|
{
|
|
@@ -30594,7 +30594,7 @@ var products_default = [
|
|
|
30594
30594
|
"USDC"
|
|
30595
30595
|
],
|
|
30596
30596
|
isPrivate: false,
|
|
30597
|
-
timestamp:
|
|
30597
|
+
timestamp: 1752834371,
|
|
30598
30598
|
minPrice: 300
|
|
30599
30599
|
},
|
|
30600
30600
|
{
|
|
@@ -30715,7 +30715,7 @@ var products_default = [
|
|
|
30715
30715
|
"USDC"
|
|
30716
30716
|
],
|
|
30717
30717
|
isPrivate: false,
|
|
30718
|
-
timestamp:
|
|
30718
|
+
timestamp: 1753877075,
|
|
30719
30719
|
minPrice: 100
|
|
30720
30720
|
},
|
|
30721
30721
|
{
|
|
@@ -30823,7 +30823,7 @@ var products_default = [
|
|
|
30823
30823
|
"USDC"
|
|
30824
30824
|
],
|
|
30825
30825
|
isPrivate: false,
|
|
30826
|
-
timestamp:
|
|
30826
|
+
timestamp: 1755778907,
|
|
30827
30827
|
minPrice: 100
|
|
30828
30828
|
},
|
|
30829
30829
|
{
|
|
@@ -30969,7 +30969,7 @@ var products_default = [
|
|
|
30969
30969
|
"cbBTC"
|
|
30970
30970
|
],
|
|
30971
30971
|
isPrivate: true,
|
|
30972
|
-
timestamp:
|
|
30972
|
+
timestamp: 1758283931,
|
|
30973
30973
|
minPrice: 100
|
|
30974
30974
|
},
|
|
30975
30975
|
{
|
|
@@ -31039,7 +31039,7 @@ var products_default = [
|
|
|
31039
31039
|
"USDC"
|
|
31040
31040
|
],
|
|
31041
31041
|
isPrivate: false,
|
|
31042
|
-
timestamp:
|
|
31042
|
+
timestamp: 1759764875,
|
|
31043
31043
|
minPrice: 100
|
|
31044
31044
|
},
|
|
31045
31045
|
{
|
|
@@ -31090,7 +31090,7 @@ var products_default = [
|
|
|
31090
31090
|
"ETH"
|
|
31091
31091
|
],
|
|
31092
31092
|
isPrivate: true,
|
|
31093
|
-
timestamp:
|
|
31093
|
+
timestamp: 1759407239,
|
|
31094
31094
|
minPrice: 100
|
|
31095
31095
|
},
|
|
31096
31096
|
{
|
|
@@ -31107,7 +31107,7 @@ var products_default = [
|
|
|
31107
31107
|
"ETH"
|
|
31108
31108
|
],
|
|
31109
31109
|
isPrivate: true,
|
|
31110
|
-
timestamp:
|
|
31110
|
+
timestamp: 1759407239,
|
|
31111
31111
|
minPrice: 100
|
|
31112
31112
|
},
|
|
31113
31113
|
{
|
|
@@ -31784,8 +31784,9 @@ var Quote = class extends NexusSDKBase {
|
|
|
31784
31784
|
}
|
|
31785
31785
|
try {
|
|
31786
31786
|
const { quote } = await this.getQuote(quoteParams);
|
|
31787
|
+
const premium = paymentAssetEnum === 255 /* NXM */ ? quote.premiumInNXM : quote.premiumInAsset;
|
|
31787
31788
|
const maxPremiumInAsset = this.calculatePremiumWithCommissionAndSlippage(
|
|
31788
|
-
BigInt(
|
|
31789
|
+
BigInt(premium),
|
|
31789
31790
|
commissionRatio || BUY_COVER_COMMISSION_RATIO_BY_PRODUCT_TYPE[productType],
|
|
31790
31791
|
slippageValue
|
|
31791
31792
|
);
|
|
@@ -31812,7 +31813,7 @@ var Quote = class extends NexusSDKBase {
|
|
|
31812
31813
|
period: period * 60 * 60 * 24,
|
|
31813
31814
|
// seconds
|
|
31814
31815
|
maxPremiumInAsset: maxPremiumInAsset.toString(),
|
|
31815
|
-
paymentAsset:
|
|
31816
|
+
paymentAsset: paymentAssetEnum,
|
|
31816
31817
|
commissionRatio: commissionRatio || BUY_COVER_COMMISSION_RATIO_BY_PRODUCT_TYPE[productType],
|
|
31817
31818
|
commissionDestination: commissionDestination || BUY_COVER_COMMISSION_DESTINATION_BY_PRODUCT_TYPE[productType],
|
|
31818
31819
|
ipfsData
|