injectivejs 1.9.12 → 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/README.md +26 -22
- 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
|
@@ -5,6 +5,7 @@ const exchange_1 = require("./exchange");
|
|
|
5
5
|
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
6
6
|
const helpers_1 = require("../../../helpers");
|
|
7
7
|
const binary_1 = require("../../../binary");
|
|
8
|
+
const decimals_1 = require("../../../decimals");
|
|
8
9
|
function createBaseEventBatchSpotExecution() {
|
|
9
10
|
return {
|
|
10
11
|
marketId: "",
|
|
@@ -145,7 +146,7 @@ exports.EventBatchDerivativeExecution = {
|
|
|
145
146
|
writer.uint32(24).bool(message.isLiquidation);
|
|
146
147
|
}
|
|
147
148
|
if (message.cumulativeFunding !== undefined) {
|
|
148
|
-
writer.uint32(34).string(message.cumulativeFunding);
|
|
149
|
+
writer.uint32(34).string(decimals_1.Decimal.fromUserInput(message.cumulativeFunding, 18).atomics);
|
|
149
150
|
}
|
|
150
151
|
if (message.executionType !== 0) {
|
|
151
152
|
writer.uint32(40).int32(message.executionType);
|
|
@@ -172,7 +173,7 @@ exports.EventBatchDerivativeExecution = {
|
|
|
172
173
|
message.isLiquidation = reader.bool();
|
|
173
174
|
break;
|
|
174
175
|
case 4:
|
|
175
|
-
message.cumulativeFunding = reader.string();
|
|
176
|
+
message.cumulativeFunding = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
176
177
|
break;
|
|
177
178
|
case 5:
|
|
178
179
|
message.executionType = reader.int32();
|
|
@@ -275,10 +276,10 @@ exports.EventLostFundsFromLiquidation = {
|
|
|
275
276
|
writer.uint32(18).bytes(message.subaccountId);
|
|
276
277
|
}
|
|
277
278
|
if (message.lostFundsFromAvailableDuringPayout !== "") {
|
|
278
|
-
writer.uint32(26).string(message.lostFundsFromAvailableDuringPayout);
|
|
279
|
+
writer.uint32(26).string(decimals_1.Decimal.fromUserInput(message.lostFundsFromAvailableDuringPayout, 18).atomics);
|
|
279
280
|
}
|
|
280
281
|
if (message.lostFundsFromOrderCancels !== "") {
|
|
281
|
-
writer.uint32(34).string(message.lostFundsFromOrderCancels);
|
|
282
|
+
writer.uint32(34).string(decimals_1.Decimal.fromUserInput(message.lostFundsFromOrderCancels, 18).atomics);
|
|
282
283
|
}
|
|
283
284
|
return writer;
|
|
284
285
|
},
|
|
@@ -296,10 +297,10 @@ exports.EventLostFundsFromLiquidation = {
|
|
|
296
297
|
message.subaccountId = reader.bytes();
|
|
297
298
|
break;
|
|
298
299
|
case 3:
|
|
299
|
-
message.lostFundsFromAvailableDuringPayout = reader.string();
|
|
300
|
+
message.lostFundsFromAvailableDuringPayout = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
300
301
|
break;
|
|
301
302
|
case 4:
|
|
302
|
-
message.lostFundsFromOrderCancels = reader.string();
|
|
303
|
+
message.lostFundsFromOrderCancels = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
303
304
|
break;
|
|
304
305
|
default:
|
|
305
306
|
reader.skipType(tag & 7);
|
|
@@ -1381,10 +1382,10 @@ exports.EventPerpetualMarketFundingUpdate = {
|
|
|
1381
1382
|
writer.uint32(24).bool(message.isHourlyFunding);
|
|
1382
1383
|
}
|
|
1383
1384
|
if (message.fundingRate !== undefined) {
|
|
1384
|
-
writer.uint32(34).string(message.fundingRate);
|
|
1385
|
+
writer.uint32(34).string(decimals_1.Decimal.fromUserInput(message.fundingRate, 18).atomics);
|
|
1385
1386
|
}
|
|
1386
1387
|
if (message.markPrice !== undefined) {
|
|
1387
|
-
writer.uint32(42).string(message.markPrice);
|
|
1388
|
+
writer.uint32(42).string(decimals_1.Decimal.fromUserInput(message.markPrice, 18).atomics);
|
|
1388
1389
|
}
|
|
1389
1390
|
return writer;
|
|
1390
1391
|
},
|
|
@@ -1405,10 +1406,10 @@ exports.EventPerpetualMarketFundingUpdate = {
|
|
|
1405
1406
|
message.isHourlyFunding = reader.bool();
|
|
1406
1407
|
break;
|
|
1407
1408
|
case 4:
|
|
1408
|
-
message.fundingRate = reader.string();
|
|
1409
|
+
message.fundingRate = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1409
1410
|
break;
|
|
1410
1411
|
case 5:
|
|
1411
|
-
message.markPrice = reader.string();
|
|
1412
|
+
message.markPrice = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1412
1413
|
break;
|
|
1413
1414
|
default:
|
|
1414
1415
|
reader.skipType(tag & 7);
|
|
@@ -1855,7 +1856,7 @@ exports.DerivativeMarketOrderCancel = {
|
|
|
1855
1856
|
exchange_1.DerivativeMarketOrder.encode(message.marketOrder, writer.uint32(10).fork()).ldelim();
|
|
1856
1857
|
}
|
|
1857
1858
|
if (message.cancelQuantity !== "") {
|
|
1858
|
-
writer.uint32(18).string(message.cancelQuantity);
|
|
1859
|
+
writer.uint32(18).string(decimals_1.Decimal.fromUserInput(message.cancelQuantity, 18).atomics);
|
|
1859
1860
|
}
|
|
1860
1861
|
return writer;
|
|
1861
1862
|
},
|
|
@@ -1870,7 +1871,7 @@ exports.DerivativeMarketOrderCancel = {
|
|
|
1870
1871
|
message.marketOrder = exchange_1.DerivativeMarketOrder.decode(reader, reader.uint32());
|
|
1871
1872
|
break;
|
|
1872
1873
|
case 2:
|
|
1873
|
-
message.cancelQuantity = reader.string();
|
|
1874
|
+
message.cancelQuantity = decimals_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1874
1875
|
break;
|
|
1875
1876
|
default:
|
|
1876
1877
|
reader.skipType(tag & 7);
|