injectivejs 1.9.13 → 1.9.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/cosmos/base/v1beta1/coin.js +5 -4
- package/cosmos/distribution/v1beta1/distribution.js +11 -10
- package/cosmos/gov/v1beta1/gov.js +3 -2
- package/cosmos/staking/v1beta1/staking.js +15 -14
- package/cosmos/staking/v1beta1/tx.js +3 -2
- package/decimals.d.ts +20 -0
- package/decimals.js +102 -0
- package/esm/cosmos/base/v1beta1/coin.js +5 -4
- package/esm/cosmos/distribution/v1beta1/distribution.js +11 -10
- package/esm/cosmos/gov/v1beta1/gov.js +3 -2
- package/esm/cosmos/staking/v1beta1/staking.js +15 -14
- package/esm/cosmos/staking/v1beta1/tx.js +3 -2
- package/esm/decimals.js +98 -0
- package/esm/injective/auction/v1beta1/auction.js +3 -2
- package/esm/injective/exchange/v1beta1/events.js +13 -12
- package/esm/injective/exchange/v1beta1/exchange.js +183 -182
- package/esm/injective/exchange/v1beta1/genesis.js +5 -4
- package/esm/injective/exchange/v1beta1/proposal.js +99 -98
- package/esm/injective/exchange/v1beta1/query.js +89 -88
- package/esm/injective/exchange/v1beta1/tx.js +81 -80
- package/esm/injective/ocr/v1beta1/ocr.js +17 -16
- package/esm/injective/oracle/v1beta1/events.js +13 -12
- package/esm/injective/oracle/v1beta1/oracle.js +31 -30
- package/esm/injective/oracle/v1beta1/query.js +13 -12
- package/esm/injective/oracle/v1beta1/tx.js +5 -4
- package/esm/injective/stream/v1beta1/query.js +21 -20
- package/injective/auction/v1beta1/auction.js +3 -2
- package/injective/exchange/v1beta1/events.js +13 -12
- package/injective/exchange/v1beta1/exchange.js +183 -182
- package/injective/exchange/v1beta1/genesis.js +5 -4
- package/injective/exchange/v1beta1/proposal.js +99 -98
- package/injective/exchange/v1beta1/query.js +89 -88
- package/injective/exchange/v1beta1/tx.js +81 -80
- package/injective/ocr/v1beta1/ocr.js +17 -16
- package/injective/oracle/v1beta1/events.js +13 -12
- package/injective/oracle/v1beta1/oracle.js +31 -30
- package/injective/oracle/v1beta1/query.js +13 -12
- package/injective/oracle/v1beta1/tx.js +5 -4
- package/injective/stream/v1beta1/query.js +21 -20
- package/package.json +8 -8
|
@@ -6,6 +6,7 @@ const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
|
6
6
|
const exchange_1 = require("./exchange");
|
|
7
7
|
const distribution_1 = require("../../../cosmos/distribution/v1beta1/distribution");
|
|
8
8
|
const binary_1 = require("../../../binary");
|
|
9
|
+
const decimals_1 = require("../../../decimals");
|
|
9
10
|
const helpers_1 = require("../../../helpers");
|
|
10
11
|
function createBaseMsgUpdateSpotMarket() {
|
|
11
12
|
return {
|
|
@@ -37,13 +38,13 @@ exports.MsgUpdateSpotMarket = {
|
|
|
37
38
|
writer.uint32(26).string(message.newTicker);
|
|
38
39
|
}
|
|
39
40
|
if (message.newMinPriceTickSize !== "") {
|
|
40
|
-
writer.uint32(34).string(message.newMinPriceTickSize);
|
|
41
|
+
writer.uint32(34).string(decimals_1.Decimal.fromUserInput(message.newMinPriceTickSize, 18).atomics);
|
|
41
42
|
}
|
|
42
43
|
if (message.newMinQuantityTickSize !== "") {
|
|
43
|
-
writer.uint32(42).string(message.newMinQuantityTickSize);
|
|
44
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.newMinQuantityTickSize, 18).atomics);
|
|
44
45
|
}
|
|
45
46
|
if (message.newMinNotional !== "") {
|
|
46
|
-
writer.uint32(50).string(message.newMinNotional);
|
|
47
|
+
writer.uint32(50).string(decimals_1.Decimal.fromUserInput(message.newMinNotional, 18).atomics);
|
|
47
48
|
}
|
|
48
49
|
return writer;
|
|
49
50
|
},
|
|
@@ -64,13 +65,13 @@ exports.MsgUpdateSpotMarket = {
|
|
|
64
65
|
message.newTicker = reader.string();
|
|
65
66
|
break;
|
|
66
67
|
case 4:
|
|
67
|
-
message.newMinPriceTickSize = reader.string();
|
|
68
|
+
message.newMinPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
68
69
|
break;
|
|
69
70
|
case 5:
|
|
70
|
-
message.newMinQuantityTickSize = reader.string();
|
|
71
|
+
message.newMinQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
71
72
|
break;
|
|
72
73
|
case 6:
|
|
73
|
-
message.newMinNotional = reader.string();
|
|
74
|
+
message.newMinNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
74
75
|
break;
|
|
75
76
|
default:
|
|
76
77
|
reader.skipType(tag & 7);
|
|
@@ -233,19 +234,19 @@ exports.MsgUpdateDerivativeMarket = {
|
|
|
233
234
|
writer.uint32(26).string(message.newTicker);
|
|
234
235
|
}
|
|
235
236
|
if (message.newMinPriceTickSize !== "") {
|
|
236
|
-
writer.uint32(34).string(message.newMinPriceTickSize);
|
|
237
|
+
writer.uint32(34).string(decimals_1.Decimal.fromUserInput(message.newMinPriceTickSize, 18).atomics);
|
|
237
238
|
}
|
|
238
239
|
if (message.newMinQuantityTickSize !== "") {
|
|
239
|
-
writer.uint32(42).string(message.newMinQuantityTickSize);
|
|
240
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.newMinQuantityTickSize, 18).atomics);
|
|
240
241
|
}
|
|
241
242
|
if (message.newMinNotional !== "") {
|
|
242
|
-
writer.uint32(50).string(message.newMinNotional);
|
|
243
|
+
writer.uint32(50).string(decimals_1.Decimal.fromUserInput(message.newMinNotional, 18).atomics);
|
|
243
244
|
}
|
|
244
245
|
if (message.newInitialMarginRatio !== "") {
|
|
245
|
-
writer.uint32(58).string(message.newInitialMarginRatio);
|
|
246
|
+
writer.uint32(58).string(decimals_1.Decimal.fromUserInput(message.newInitialMarginRatio, 18).atomics);
|
|
246
247
|
}
|
|
247
248
|
if (message.newMaintenanceMarginRatio !== "") {
|
|
248
|
-
writer.uint32(66).string(message.newMaintenanceMarginRatio);
|
|
249
|
+
writer.uint32(66).string(decimals_1.Decimal.fromUserInput(message.newMaintenanceMarginRatio, 18).atomics);
|
|
249
250
|
}
|
|
250
251
|
return writer;
|
|
251
252
|
},
|
|
@@ -266,19 +267,19 @@ exports.MsgUpdateDerivativeMarket = {
|
|
|
266
267
|
message.newTicker = reader.string();
|
|
267
268
|
break;
|
|
268
269
|
case 4:
|
|
269
|
-
message.newMinPriceTickSize = reader.string();
|
|
270
|
+
message.newMinPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
270
271
|
break;
|
|
271
272
|
case 5:
|
|
272
|
-
message.newMinQuantityTickSize = reader.string();
|
|
273
|
+
message.newMinQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
273
274
|
break;
|
|
274
275
|
case 6:
|
|
275
|
-
message.newMinNotional = reader.string();
|
|
276
|
+
message.newMinNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
276
277
|
break;
|
|
277
278
|
case 7:
|
|
278
|
-
message.newInitialMarginRatio = reader.string();
|
|
279
|
+
message.newInitialMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
279
280
|
break;
|
|
280
281
|
case 8:
|
|
281
|
-
message.newMaintenanceMarginRatio = reader.string();
|
|
282
|
+
message.newMaintenanceMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
282
283
|
break;
|
|
283
284
|
default:
|
|
284
285
|
reader.skipType(tag & 7);
|
|
@@ -1291,13 +1292,13 @@ exports.MsgInstantSpotMarketLaunch = {
|
|
|
1291
1292
|
writer.uint32(34).string(message.quoteDenom);
|
|
1292
1293
|
}
|
|
1293
1294
|
if (message.minPriceTickSize !== "") {
|
|
1294
|
-
writer.uint32(42).string(message.minPriceTickSize);
|
|
1295
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.minPriceTickSize, 18).atomics);
|
|
1295
1296
|
}
|
|
1296
1297
|
if (message.minQuantityTickSize !== "") {
|
|
1297
|
-
writer.uint32(50).string(message.minQuantityTickSize);
|
|
1298
|
+
writer.uint32(50).string(decimals_1.Decimal.fromUserInput(message.minQuantityTickSize, 18).atomics);
|
|
1298
1299
|
}
|
|
1299
1300
|
if (message.minNotional !== "") {
|
|
1300
|
-
writer.uint32(58).string(message.minNotional);
|
|
1301
|
+
writer.uint32(58).string(decimals_1.Decimal.fromUserInput(message.minNotional, 18).atomics);
|
|
1301
1302
|
}
|
|
1302
1303
|
return writer;
|
|
1303
1304
|
},
|
|
@@ -1321,13 +1322,13 @@ exports.MsgInstantSpotMarketLaunch = {
|
|
|
1321
1322
|
message.quoteDenom = reader.string();
|
|
1322
1323
|
break;
|
|
1323
1324
|
case 5:
|
|
1324
|
-
message.minPriceTickSize = reader.string();
|
|
1325
|
+
message.minPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1325
1326
|
break;
|
|
1326
1327
|
case 6:
|
|
1327
|
-
message.minQuantityTickSize = reader.string();
|
|
1328
|
+
message.minQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1328
1329
|
break;
|
|
1329
1330
|
case 7:
|
|
1330
|
-
message.minNotional = reader.string();
|
|
1331
|
+
message.minNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1331
1332
|
break;
|
|
1332
1333
|
default:
|
|
1333
1334
|
reader.skipType(tag & 7);
|
|
@@ -1513,25 +1514,25 @@ exports.MsgInstantPerpetualMarketLaunch = {
|
|
|
1513
1514
|
writer.uint32(56).int32(message.oracleType);
|
|
1514
1515
|
}
|
|
1515
1516
|
if (message.makerFeeRate !== "") {
|
|
1516
|
-
writer.uint32(66).string(message.makerFeeRate);
|
|
1517
|
+
writer.uint32(66).string(decimals_1.Decimal.fromUserInput(message.makerFeeRate, 18).atomics);
|
|
1517
1518
|
}
|
|
1518
1519
|
if (message.takerFeeRate !== "") {
|
|
1519
|
-
writer.uint32(74).string(message.takerFeeRate);
|
|
1520
|
+
writer.uint32(74).string(decimals_1.Decimal.fromUserInput(message.takerFeeRate, 18).atomics);
|
|
1520
1521
|
}
|
|
1521
1522
|
if (message.initialMarginRatio !== "") {
|
|
1522
|
-
writer.uint32(82).string(message.initialMarginRatio);
|
|
1523
|
+
writer.uint32(82).string(decimals_1.Decimal.fromUserInput(message.initialMarginRatio, 18).atomics);
|
|
1523
1524
|
}
|
|
1524
1525
|
if (message.maintenanceMarginRatio !== "") {
|
|
1525
|
-
writer.uint32(90).string(message.maintenanceMarginRatio);
|
|
1526
|
+
writer.uint32(90).string(decimals_1.Decimal.fromUserInput(message.maintenanceMarginRatio, 18).atomics);
|
|
1526
1527
|
}
|
|
1527
1528
|
if (message.minPriceTickSize !== "") {
|
|
1528
|
-
writer.uint32(98).string(message.minPriceTickSize);
|
|
1529
|
+
writer.uint32(98).string(decimals_1.Decimal.fromUserInput(message.minPriceTickSize, 18).atomics);
|
|
1529
1530
|
}
|
|
1530
1531
|
if (message.minQuantityTickSize !== "") {
|
|
1531
|
-
writer.uint32(106).string(message.minQuantityTickSize);
|
|
1532
|
+
writer.uint32(106).string(decimals_1.Decimal.fromUserInput(message.minQuantityTickSize, 18).atomics);
|
|
1532
1533
|
}
|
|
1533
1534
|
if (message.minNotional !== "") {
|
|
1534
|
-
writer.uint32(114).string(message.minNotional);
|
|
1535
|
+
writer.uint32(114).string(decimals_1.Decimal.fromUserInput(message.minNotional, 18).atomics);
|
|
1535
1536
|
}
|
|
1536
1537
|
return writer;
|
|
1537
1538
|
},
|
|
@@ -1564,25 +1565,25 @@ exports.MsgInstantPerpetualMarketLaunch = {
|
|
|
1564
1565
|
message.oracleType = reader.int32();
|
|
1565
1566
|
break;
|
|
1566
1567
|
case 8:
|
|
1567
|
-
message.makerFeeRate = reader.string();
|
|
1568
|
+
message.makerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1568
1569
|
break;
|
|
1569
1570
|
case 9:
|
|
1570
|
-
message.takerFeeRate = reader.string();
|
|
1571
|
+
message.takerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1571
1572
|
break;
|
|
1572
1573
|
case 10:
|
|
1573
|
-
message.initialMarginRatio = reader.string();
|
|
1574
|
+
message.initialMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1574
1575
|
break;
|
|
1575
1576
|
case 11:
|
|
1576
|
-
message.maintenanceMarginRatio = reader.string();
|
|
1577
|
+
message.maintenanceMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1577
1578
|
break;
|
|
1578
1579
|
case 12:
|
|
1579
|
-
message.minPriceTickSize = reader.string();
|
|
1580
|
+
message.minPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1580
1581
|
break;
|
|
1581
1582
|
case 13:
|
|
1582
|
-
message.minQuantityTickSize = reader.string();
|
|
1583
|
+
message.minQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1583
1584
|
break;
|
|
1584
1585
|
case 14:
|
|
1585
|
-
message.minNotional = reader.string();
|
|
1586
|
+
message.minNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1586
1587
|
break;
|
|
1587
1588
|
default:
|
|
1588
1589
|
reader.skipType(tag & 7);
|
|
@@ -1801,10 +1802,10 @@ exports.MsgInstantBinaryOptionsMarketLaunch = {
|
|
|
1801
1802
|
writer.uint32(48).uint32(message.oracleScaleFactor);
|
|
1802
1803
|
}
|
|
1803
1804
|
if (message.makerFeeRate !== "") {
|
|
1804
|
-
writer.uint32(58).string(message.makerFeeRate);
|
|
1805
|
+
writer.uint32(58).string(decimals_1.Decimal.fromUserInput(message.makerFeeRate, 18).atomics);
|
|
1805
1806
|
}
|
|
1806
1807
|
if (message.takerFeeRate !== "") {
|
|
1807
|
-
writer.uint32(66).string(message.takerFeeRate);
|
|
1808
|
+
writer.uint32(66).string(decimals_1.Decimal.fromUserInput(message.takerFeeRate, 18).atomics);
|
|
1808
1809
|
}
|
|
1809
1810
|
if (message.expirationTimestamp !== BigInt(0)) {
|
|
1810
1811
|
writer.uint32(72).int64(message.expirationTimestamp);
|
|
@@ -1819,13 +1820,13 @@ exports.MsgInstantBinaryOptionsMarketLaunch = {
|
|
|
1819
1820
|
writer.uint32(98).string(message.quoteDenom);
|
|
1820
1821
|
}
|
|
1821
1822
|
if (message.minPriceTickSize !== "") {
|
|
1822
|
-
writer.uint32(106).string(message.minPriceTickSize);
|
|
1823
|
+
writer.uint32(106).string(decimals_1.Decimal.fromUserInput(message.minPriceTickSize, 18).atomics);
|
|
1823
1824
|
}
|
|
1824
1825
|
if (message.minQuantityTickSize !== "") {
|
|
1825
|
-
writer.uint32(114).string(message.minQuantityTickSize);
|
|
1826
|
+
writer.uint32(114).string(decimals_1.Decimal.fromUserInput(message.minQuantityTickSize, 18).atomics);
|
|
1826
1827
|
}
|
|
1827
1828
|
if (message.minNotional !== "") {
|
|
1828
|
-
writer.uint32(122).string(message.minNotional);
|
|
1829
|
+
writer.uint32(122).string(decimals_1.Decimal.fromUserInput(message.minNotional, 18).atomics);
|
|
1829
1830
|
}
|
|
1830
1831
|
return writer;
|
|
1831
1832
|
},
|
|
@@ -1855,10 +1856,10 @@ exports.MsgInstantBinaryOptionsMarketLaunch = {
|
|
|
1855
1856
|
message.oracleScaleFactor = reader.uint32();
|
|
1856
1857
|
break;
|
|
1857
1858
|
case 7:
|
|
1858
|
-
message.makerFeeRate = reader.string();
|
|
1859
|
+
message.makerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1859
1860
|
break;
|
|
1860
1861
|
case 8:
|
|
1861
|
-
message.takerFeeRate = reader.string();
|
|
1862
|
+
message.takerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1862
1863
|
break;
|
|
1863
1864
|
case 9:
|
|
1864
1865
|
message.expirationTimestamp = reader.int64();
|
|
@@ -1873,13 +1874,13 @@ exports.MsgInstantBinaryOptionsMarketLaunch = {
|
|
|
1873
1874
|
message.quoteDenom = reader.string();
|
|
1874
1875
|
break;
|
|
1875
1876
|
case 13:
|
|
1876
|
-
message.minPriceTickSize = reader.string();
|
|
1877
|
+
message.minPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1877
1878
|
break;
|
|
1878
1879
|
case 14:
|
|
1879
|
-
message.minQuantityTickSize = reader.string();
|
|
1880
|
+
message.minQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1880
1881
|
break;
|
|
1881
1882
|
case 15:
|
|
1882
|
-
message.minNotional = reader.string();
|
|
1883
|
+
message.minNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1883
1884
|
break;
|
|
1884
1885
|
default:
|
|
1885
1886
|
reader.skipType(tag & 7);
|
|
@@ -2109,25 +2110,25 @@ exports.MsgInstantExpiryFuturesMarketLaunch = {
|
|
|
2109
2110
|
writer.uint32(64).int64(message.expiry);
|
|
2110
2111
|
}
|
|
2111
2112
|
if (message.makerFeeRate !== "") {
|
|
2112
|
-
writer.uint32(74).string(message.makerFeeRate);
|
|
2113
|
+
writer.uint32(74).string(decimals_1.Decimal.fromUserInput(message.makerFeeRate, 18).atomics);
|
|
2113
2114
|
}
|
|
2114
2115
|
if (message.takerFeeRate !== "") {
|
|
2115
|
-
writer.uint32(82).string(message.takerFeeRate);
|
|
2116
|
+
writer.uint32(82).string(decimals_1.Decimal.fromUserInput(message.takerFeeRate, 18).atomics);
|
|
2116
2117
|
}
|
|
2117
2118
|
if (message.initialMarginRatio !== "") {
|
|
2118
|
-
writer.uint32(90).string(message.initialMarginRatio);
|
|
2119
|
+
writer.uint32(90).string(decimals_1.Decimal.fromUserInput(message.initialMarginRatio, 18).atomics);
|
|
2119
2120
|
}
|
|
2120
2121
|
if (message.maintenanceMarginRatio !== "") {
|
|
2121
|
-
writer.uint32(98).string(message.maintenanceMarginRatio);
|
|
2122
|
+
writer.uint32(98).string(decimals_1.Decimal.fromUserInput(message.maintenanceMarginRatio, 18).atomics);
|
|
2122
2123
|
}
|
|
2123
2124
|
if (message.minPriceTickSize !== "") {
|
|
2124
|
-
writer.uint32(106).string(message.minPriceTickSize);
|
|
2125
|
+
writer.uint32(106).string(decimals_1.Decimal.fromUserInput(message.minPriceTickSize, 18).atomics);
|
|
2125
2126
|
}
|
|
2126
2127
|
if (message.minQuantityTickSize !== "") {
|
|
2127
|
-
writer.uint32(114).string(message.minQuantityTickSize);
|
|
2128
|
+
writer.uint32(114).string(decimals_1.Decimal.fromUserInput(message.minQuantityTickSize, 18).atomics);
|
|
2128
2129
|
}
|
|
2129
2130
|
if (message.minNotional !== "") {
|
|
2130
|
-
writer.uint32(122).string(message.minNotional);
|
|
2131
|
+
writer.uint32(122).string(decimals_1.Decimal.fromUserInput(message.minNotional, 18).atomics);
|
|
2131
2132
|
}
|
|
2132
2133
|
return writer;
|
|
2133
2134
|
},
|
|
@@ -2163,25 +2164,25 @@ exports.MsgInstantExpiryFuturesMarketLaunch = {
|
|
|
2163
2164
|
message.expiry = reader.int64();
|
|
2164
2165
|
break;
|
|
2165
2166
|
case 9:
|
|
2166
|
-
message.makerFeeRate = reader.string();
|
|
2167
|
+
message.makerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2167
2168
|
break;
|
|
2168
2169
|
case 10:
|
|
2169
|
-
message.takerFeeRate = reader.string();
|
|
2170
|
+
message.takerFeeRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2170
2171
|
break;
|
|
2171
2172
|
case 11:
|
|
2172
|
-
message.initialMarginRatio = reader.string();
|
|
2173
|
+
message.initialMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2173
2174
|
break;
|
|
2174
2175
|
case 12:
|
|
2175
|
-
message.maintenanceMarginRatio = reader.string();
|
|
2176
|
+
message.maintenanceMarginRatio = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2176
2177
|
break;
|
|
2177
2178
|
case 13:
|
|
2178
|
-
message.minPriceTickSize = reader.string();
|
|
2179
|
+
message.minPriceTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2179
2180
|
break;
|
|
2180
2181
|
case 14:
|
|
2181
|
-
message.minQuantityTickSize = reader.string();
|
|
2182
|
+
message.minQuantityTickSize = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2182
2183
|
break;
|
|
2183
2184
|
case 15:
|
|
2184
|
-
message.minNotional = reader.string();
|
|
2185
|
+
message.minNotional = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2185
2186
|
break;
|
|
2186
2187
|
default:
|
|
2187
2188
|
reader.skipType(tag & 7);
|
|
@@ -2561,13 +2562,13 @@ exports.SpotMarketOrderResults = {
|
|
|
2561
2562
|
},
|
|
2562
2563
|
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
2563
2564
|
if (message.quantity !== "") {
|
|
2564
|
-
writer.uint32(10).string(message.quantity);
|
|
2565
|
+
writer.uint32(10).string(decimals_1.Decimal.fromUserInput(message.quantity, 18).atomics);
|
|
2565
2566
|
}
|
|
2566
2567
|
if (message.price !== "") {
|
|
2567
|
-
writer.uint32(18).string(message.price);
|
|
2568
|
+
writer.uint32(18).string(decimals_1.Decimal.fromUserInput(message.price, 18).atomics);
|
|
2568
2569
|
}
|
|
2569
2570
|
if (message.fee !== "") {
|
|
2570
|
-
writer.uint32(26).string(message.fee);
|
|
2571
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.fee, 18).atomics);
|
|
2571
2572
|
}
|
|
2572
2573
|
return writer;
|
|
2573
2574
|
},
|
|
@@ -2579,13 +2580,13 @@ exports.SpotMarketOrderResults = {
|
|
|
2579
2580
|
const tag = reader.uint32();
|
|
2580
2581
|
switch (tag >>> 3) {
|
|
2581
2582
|
case 1:
|
|
2582
|
-
message.quantity = reader.string();
|
|
2583
|
+
message.quantity = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2583
2584
|
break;
|
|
2584
2585
|
case 2:
|
|
2585
|
-
message.price = reader.string();
|
|
2586
|
+
message.price = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2586
2587
|
break;
|
|
2587
2588
|
case 3:
|
|
2588
|
-
message.fee = reader.string();
|
|
2589
|
+
message.fee = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2589
2590
|
break;
|
|
2590
2591
|
default:
|
|
2591
2592
|
reader.skipType(tag & 7);
|
|
@@ -4419,19 +4420,19 @@ exports.DerivativeMarketOrderResults = {
|
|
|
4419
4420
|
},
|
|
4420
4421
|
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
4421
4422
|
if (message.quantity !== "") {
|
|
4422
|
-
writer.uint32(10).string(message.quantity);
|
|
4423
|
+
writer.uint32(10).string(decimals_1.Decimal.fromUserInput(message.quantity, 18).atomics);
|
|
4423
4424
|
}
|
|
4424
4425
|
if (message.price !== "") {
|
|
4425
|
-
writer.uint32(18).string(message.price);
|
|
4426
|
+
writer.uint32(18).string(decimals_1.Decimal.fromUserInput(message.price, 18).atomics);
|
|
4426
4427
|
}
|
|
4427
4428
|
if (message.fee !== "") {
|
|
4428
|
-
writer.uint32(26).string(message.fee);
|
|
4429
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.fee, 18).atomics);
|
|
4429
4430
|
}
|
|
4430
4431
|
if (message.positionDelta !== undefined) {
|
|
4431
4432
|
exchange_1.PositionDelta.encode(message.positionDelta, writer.uint32(34).fork()).ldelim();
|
|
4432
4433
|
}
|
|
4433
4434
|
if (message.payout !== "") {
|
|
4434
|
-
writer.uint32(42).string(message.payout);
|
|
4435
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.payout, 18).atomics);
|
|
4435
4436
|
}
|
|
4436
4437
|
return writer;
|
|
4437
4438
|
},
|
|
@@ -4443,19 +4444,19 @@ exports.DerivativeMarketOrderResults = {
|
|
|
4443
4444
|
const tag = reader.uint32();
|
|
4444
4445
|
switch (tag >>> 3) {
|
|
4445
4446
|
case 1:
|
|
4446
|
-
message.quantity = reader.string();
|
|
4447
|
+
message.quantity = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
4447
4448
|
break;
|
|
4448
4449
|
case 2:
|
|
4449
|
-
message.price = reader.string();
|
|
4450
|
+
message.price = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
4450
4451
|
break;
|
|
4451
4452
|
case 3:
|
|
4452
|
-
message.fee = reader.string();
|
|
4453
|
+
message.fee = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
4453
4454
|
break;
|
|
4454
4455
|
case 4:
|
|
4455
4456
|
message.positionDelta = exchange_1.PositionDelta.decode(reader, reader.uint32());
|
|
4456
4457
|
break;
|
|
4457
4458
|
case 5:
|
|
4458
|
-
message.payout = reader.string();
|
|
4459
|
+
message.payout = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
4459
4460
|
break;
|
|
4460
4461
|
default:
|
|
4461
4462
|
reader.skipType(tag & 7);
|
|
@@ -6096,7 +6097,7 @@ exports.MsgIncreasePositionMargin = {
|
|
|
6096
6097
|
writer.uint32(34).string(message.marketId);
|
|
6097
6098
|
}
|
|
6098
6099
|
if (message.amount !== "") {
|
|
6099
|
-
writer.uint32(42).string(message.amount);
|
|
6100
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.amount, 18).atomics);
|
|
6100
6101
|
}
|
|
6101
6102
|
return writer;
|
|
6102
6103
|
},
|
|
@@ -6120,7 +6121,7 @@ exports.MsgIncreasePositionMargin = {
|
|
|
6120
6121
|
message.marketId = reader.string();
|
|
6121
6122
|
break;
|
|
6122
6123
|
case 5:
|
|
6123
|
-
message.amount = reader.string();
|
|
6124
|
+
message.amount = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
6124
6125
|
break;
|
|
6125
6126
|
default:
|
|
6126
6127
|
reader.skipType(tag & 7);
|
|
@@ -6278,7 +6279,7 @@ exports.MsgDecreasePositionMargin = {
|
|
|
6278
6279
|
writer.uint32(34).string(message.marketId);
|
|
6279
6280
|
}
|
|
6280
6281
|
if (message.amount !== "") {
|
|
6281
|
-
writer.uint32(42).string(message.amount);
|
|
6282
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.amount, 18).atomics);
|
|
6282
6283
|
}
|
|
6283
6284
|
return writer;
|
|
6284
6285
|
},
|
|
@@ -6302,7 +6303,7 @@ exports.MsgDecreasePositionMargin = {
|
|
|
6302
6303
|
message.marketId = reader.string();
|
|
6303
6304
|
break;
|
|
6304
6305
|
case 5:
|
|
6305
|
-
message.amount = reader.string();
|
|
6306
|
+
message.amount = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
6306
6307
|
break;
|
|
6307
6308
|
default:
|
|
6308
6309
|
reader.skipType(tag & 7);
|
|
@@ -7101,7 +7102,7 @@ exports.MsgAdminUpdateBinaryOptionsMarket = {
|
|
|
7101
7102
|
writer.uint32(18).string(message.marketId);
|
|
7102
7103
|
}
|
|
7103
7104
|
if (message.settlementPrice !== undefined) {
|
|
7104
|
-
writer.uint32(26).string(message.settlementPrice);
|
|
7105
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.settlementPrice, 18).atomics);
|
|
7105
7106
|
}
|
|
7106
7107
|
if (message.expirationTimestamp !== BigInt(0)) {
|
|
7107
7108
|
writer.uint32(32).int64(message.expirationTimestamp);
|
|
@@ -7128,7 +7129,7 @@ exports.MsgAdminUpdateBinaryOptionsMarket = {
|
|
|
7128
7129
|
message.marketId = reader.string();
|
|
7129
7130
|
break;
|
|
7130
7131
|
case 3:
|
|
7131
|
-
message.settlementPrice = reader.string();
|
|
7132
|
+
message.settlementPrice = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
7132
7133
|
break;
|
|
7133
7134
|
case 4:
|
|
7134
7135
|
message.expirationTimestamp = reader.int64();
|
|
@@ -6,6 +6,7 @@ const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
|
6
6
|
const binary_1 = require("../../../binary");
|
|
7
7
|
const helpers_1 = require("../../../helpers");
|
|
8
8
|
const registry_1 = require("../../../registry");
|
|
9
|
+
const decimals_1 = require("../../../decimals");
|
|
9
10
|
function createBaseParams() {
|
|
10
11
|
return {
|
|
11
12
|
linkDenom: "",
|
|
@@ -402,10 +403,10 @@ exports.ModuleParams = {
|
|
|
402
403
|
writer.uint32(10).string(message.feedId);
|
|
403
404
|
}
|
|
404
405
|
if (message.minAnswer !== "") {
|
|
405
|
-
writer.uint32(18).string(message.minAnswer);
|
|
406
|
+
writer.uint32(18).string(decimals_1.Decimal.fromUserInput(message.minAnswer, 18).atomics);
|
|
406
407
|
}
|
|
407
408
|
if (message.maxAnswer !== "") {
|
|
408
|
-
writer.uint32(26).string(message.maxAnswer);
|
|
409
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.maxAnswer, 18).atomics);
|
|
409
410
|
}
|
|
410
411
|
if (message.linkPerObservation !== "") {
|
|
411
412
|
writer.uint32(34).string(message.linkPerObservation);
|
|
@@ -441,10 +442,10 @@ exports.ModuleParams = {
|
|
|
441
442
|
message.feedId = reader.string();
|
|
442
443
|
break;
|
|
443
444
|
case 2:
|
|
444
|
-
message.minAnswer = reader.string();
|
|
445
|
+
message.minAnswer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
445
446
|
break;
|
|
446
447
|
case 3:
|
|
447
|
-
message.maxAnswer = reader.string();
|
|
448
|
+
message.maxAnswer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
448
449
|
break;
|
|
449
450
|
case 4:
|
|
450
451
|
message.linkPerObservation = reader.string();
|
|
@@ -846,10 +847,10 @@ exports.FeedProperties = {
|
|
|
846
847
|
writer.uint32(42).bytes(message.offchainConfig);
|
|
847
848
|
}
|
|
848
849
|
if (message.minAnswer !== "") {
|
|
849
|
-
writer.uint32(50).string(message.minAnswer);
|
|
850
|
+
writer.uint32(50).string(decimals_1.Decimal.fromUserInput(message.minAnswer, 18).atomics);
|
|
850
851
|
}
|
|
851
852
|
if (message.maxAnswer !== "") {
|
|
852
|
-
writer.uint32(58).string(message.maxAnswer);
|
|
853
|
+
writer.uint32(58).string(decimals_1.Decimal.fromUserInput(message.maxAnswer, 18).atomics);
|
|
853
854
|
}
|
|
854
855
|
if (message.linkPerObservation !== "") {
|
|
855
856
|
writer.uint32(66).string(message.linkPerObservation);
|
|
@@ -888,10 +889,10 @@ exports.FeedProperties = {
|
|
|
888
889
|
message.offchainConfig = reader.bytes();
|
|
889
890
|
break;
|
|
890
891
|
case 6:
|
|
891
|
-
message.minAnswer = reader.string();
|
|
892
|
+
message.minAnswer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
892
893
|
break;
|
|
893
894
|
case 7:
|
|
894
|
-
message.maxAnswer = reader.string();
|
|
895
|
+
message.maxAnswer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
895
896
|
break;
|
|
896
897
|
case 8:
|
|
897
898
|
message.linkPerObservation = reader.string();
|
|
@@ -1403,7 +1404,7 @@ exports.Transmission = {
|
|
|
1403
1404
|
},
|
|
1404
1405
|
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1405
1406
|
if (message.answer !== "") {
|
|
1406
|
-
writer.uint32(10).string(message.answer);
|
|
1407
|
+
writer.uint32(10).string(decimals_1.Decimal.fromUserInput(message.answer, 18).atomics);
|
|
1407
1408
|
}
|
|
1408
1409
|
if (message.observationsTimestamp !== BigInt(0)) {
|
|
1409
1410
|
writer.uint32(16).int64(message.observationsTimestamp);
|
|
@@ -1421,7 +1422,7 @@ exports.Transmission = {
|
|
|
1421
1422
|
const tag = reader.uint32();
|
|
1422
1423
|
switch (tag >>> 3) {
|
|
1423
1424
|
case 1:
|
|
1424
|
-
message.answer = reader.string();
|
|
1425
|
+
message.answer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1425
1426
|
break;
|
|
1426
1427
|
case 2:
|
|
1427
1428
|
message.observationsTimestamp = reader.int64();
|
|
@@ -1585,7 +1586,7 @@ exports.Report = {
|
|
|
1585
1586
|
writer.uint32(18).bytes(message.observers);
|
|
1586
1587
|
}
|
|
1587
1588
|
for (const v of message.observations) {
|
|
1588
|
-
writer.uint32(26).string(v);
|
|
1589
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(v, 18).atomics);
|
|
1589
1590
|
}
|
|
1590
1591
|
return writer;
|
|
1591
1592
|
},
|
|
@@ -1603,7 +1604,7 @@ exports.Report = {
|
|
|
1603
1604
|
message.observers = reader.bytes();
|
|
1604
1605
|
break;
|
|
1605
1606
|
case 3:
|
|
1606
|
-
message.observations.push(reader.string());
|
|
1607
|
+
message.observations.push(decimals_1.Decimal.fromAtomics(reader.string(), 18).toString());
|
|
1607
1608
|
break;
|
|
1608
1609
|
default:
|
|
1609
1610
|
reader.skipType(tag & 7);
|
|
@@ -2172,7 +2173,7 @@ exports.EventNewTransmission = {
|
|
|
2172
2173
|
writer.uint32(16).uint32(message.aggregatorRoundId);
|
|
2173
2174
|
}
|
|
2174
2175
|
if (message.answer !== "") {
|
|
2175
|
-
writer.uint32(26).string(message.answer);
|
|
2176
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.answer, 18).atomics);
|
|
2176
2177
|
}
|
|
2177
2178
|
if (message.transmitter !== "") {
|
|
2178
2179
|
writer.uint32(34).string(message.transmitter);
|
|
@@ -2181,7 +2182,7 @@ exports.EventNewTransmission = {
|
|
|
2181
2182
|
writer.uint32(40).int64(message.observationsTimestamp);
|
|
2182
2183
|
}
|
|
2183
2184
|
for (const v of message.observations) {
|
|
2184
|
-
writer.uint32(50).string(v);
|
|
2185
|
+
writer.uint32(50).string(decimals_1.Decimal.fromUserInput(v, 18).atomics);
|
|
2185
2186
|
}
|
|
2186
2187
|
if (message.observers.length !== 0) {
|
|
2187
2188
|
writer.uint32(58).bytes(message.observers);
|
|
@@ -2208,7 +2209,7 @@ exports.EventNewTransmission = {
|
|
|
2208
2209
|
message.aggregatorRoundId = reader.uint32();
|
|
2209
2210
|
break;
|
|
2210
2211
|
case 3:
|
|
2211
|
-
message.answer = reader.string();
|
|
2212
|
+
message.answer = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
2212
2213
|
break;
|
|
2213
2214
|
case 4:
|
|
2214
2215
|
message.transmitter = reader.string();
|
|
@@ -2217,7 +2218,7 @@ exports.EventNewTransmission = {
|
|
|
2217
2218
|
message.observationsTimestamp = reader.int64();
|
|
2218
2219
|
break;
|
|
2219
2220
|
case 6:
|
|
2220
|
-
message.observations.push(reader.string());
|
|
2221
|
+
message.observations.push(decimals_1.Decimal.fromAtomics(reader.string(), 18).toString());
|
|
2221
2222
|
break;
|
|
2222
2223
|
case 7:
|
|
2223
2224
|
message.observers = reader.bytes();
|