injectivejs 1.9.14 → 1.9.16
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 +1 -1
- package/binary.d.ts +1 -1
- package/binary.js +1 -1
- package/cosmos/authz/v1beta1/tx.rpc.func.d.ts +3 -3
- package/cosmos/bank/v1beta1/tx.rpc.func.d.ts +4 -4
- package/cosmos/base/v1beta1/coin.js +7 -7
- package/cosmos/distribution/v1beta1/distribution.js +16 -16
- package/cosmos/distribution/v1beta1/tx.rpc.func.d.ts +7 -7
- package/cosmos/feegrant/v1beta1/tx.rpc.func.d.ts +3 -3
- package/cosmos/gov/v1/tx.rpc.func.d.ts +7 -7
- package/cosmos/gov/v1beta1/gov.js +4 -4
- package/cosmos/gov/v1beta1/tx.rpc.func.d.ts +4 -4
- package/cosmos/group/v1/tx.rpc.func.d.ts +14 -14
- package/cosmos/staking/v1beta1/staking.js +22 -22
- package/cosmos/staking/v1beta1/tx.js +4 -4
- package/cosmos/staking/v1beta1/tx.rpc.func.d.ts +7 -7
- package/cosmos/vesting/v1beta1/tx.rpc.func.d.ts +3 -3
- package/cosmwasm/wasm/v1/tx.rpc.func.d.ts +17 -17
- package/esm/binary.js +1 -1
- package/esm/cosmos/base/v1beta1/coin.js +3 -3
- package/esm/cosmos/distribution/v1beta1/distribution.js +6 -6
- package/esm/cosmos/gov/v1beta1/gov.js +2 -2
- package/esm/cosmos/staking/v1beta1/staking.js +8 -8
- package/esm/cosmos/staking/v1beta1/tx.js +2 -2
- package/esm/extern.js +1 -1
- package/esm/helper-func-types.js +1 -1
- package/esm/helpers.js +1 -1
- package/esm/injective/auction/v1beta1/auction.js +2 -2
- package/esm/injective/exchange/v1beta1/events.js +7 -7
- package/esm/injective/exchange/v1beta1/exchange.js +92 -92
- package/esm/injective/exchange/v1beta1/genesis.js +3 -3
- package/esm/injective/exchange/v1beta1/proposal.js +50 -50
- package/esm/injective/exchange/v1beta1/query.js +45 -45
- package/esm/injective/exchange/v1beta1/tx.js +41 -41
- package/esm/injective/ocr/v1beta1/ocr.js +9 -9
- package/esm/injective/oracle/v1beta1/events.js +7 -7
- package/esm/injective/oracle/v1beta1/oracle.js +16 -16
- package/esm/injective/oracle/v1beta1/query.js +7 -7
- package/esm/injective/oracle/v1beta1/tx.js +3 -3
- package/esm/injective/stream/v1beta1/query.js +11 -11
- package/esm/registry.js +1 -1
- package/esm/types.js +1 -1
- package/esm/utf8.js +1 -1
- package/esm/varint.js +1 -1
- package/extern.d.ts +1 -1
- package/extern.js +1 -1
- package/helper-func-types.d.ts +3 -66
- package/helper-func-types.js +1 -1
- package/helpers.d.ts +1 -1
- package/helpers.js +1 -1
- package/ibc/applications/transfer/v1/tx.rpc.func.d.ts +2 -2
- package/ibc/core/channel/v1/tx.rpc.func.d.ts +19 -19
- package/ibc/core/client/v1/tx.rpc.func.d.ts +7 -7
- package/ibc/core/connection/v1/tx.rpc.func.d.ts +5 -5
- package/injective/auction/v1beta1/auction.js +4 -4
- package/injective/auction/v1beta1/tx.rpc.func.d.ts +2 -2
- package/injective/exchange/v1beta1/events.js +19 -19
- package/injective/exchange/v1beta1/exchange.js +274 -274
- package/injective/exchange/v1beta1/genesis.js +7 -7
- package/injective/exchange/v1beta1/proposal.js +148 -148
- package/injective/exchange/v1beta1/query.js +133 -133
- package/injective/exchange/v1beta1/tx.js +121 -121
- package/injective/exchange/v1beta1/tx.rpc.func.d.ts +35 -35
- package/injective/insurance/v1beta1/tx.rpc.func.d.ts +4 -4
- package/injective/ocr/v1beta1/ocr.js +25 -25
- package/injective/ocr/v1beta1/tx.rpc.func.d.ts +9 -9
- package/injective/oracle/v1beta1/events.js +19 -19
- package/injective/oracle/v1beta1/oracle.js +46 -46
- package/injective/oracle/v1beta1/query.js +19 -19
- package/injective/oracle/v1beta1/tx.js +7 -7
- package/injective/oracle/v1beta1/tx.rpc.func.d.ts +8 -8
- package/injective/peggy/v1/msgs.rpc.func.d.ts +14 -14
- package/injective/permissions/v1beta1/tx.rpc.func.d.ts +7 -7
- package/injective/stream/v1beta1/query.js +31 -31
- package/injective/tokenfactory/v1beta1/tx.rpc.func.d.ts +6 -6
- package/injective/wasmx/v1/tx.rpc.func.d.ts +6 -6
- package/package.json +8 -8
- package/registry.d.ts +1 -1
- package/registry.js +1 -1
- package/types.d.ts +1 -1
- package/types.js +1 -1
- package/utf8.d.ts +1 -1
- package/utf8.js +1 -1
- package/varint.d.ts +1 -1
- package/varint.js +1 -1
- package/decimals.d.ts +0 -20
- package/decimals.js +0 -102
- package/esm/decimals.js +0 -98
|
@@ -7,7 +7,7 @@ const exchange_1 = require("../../exchange/v1beta1/exchange");
|
|
|
7
7
|
const coin_1 = require("../../../cosmos/base/v1beta1/coin");
|
|
8
8
|
const binary_1 = require("../../../binary");
|
|
9
9
|
const helpers_1 = require("../../../helpers");
|
|
10
|
-
const
|
|
10
|
+
const math_1 = require("@interchainjs/math");
|
|
11
11
|
var OrderUpdateStatus;
|
|
12
12
|
(function (OrderUpdateStatus) {
|
|
13
13
|
OrderUpdateStatus[OrderUpdateStatus["Unspecified"] = 0] = "Unspecified";
|
|
@@ -1350,16 +1350,16 @@ exports.Position = {
|
|
|
1350
1350
|
writer.uint32(24).bool(message.isLong);
|
|
1351
1351
|
}
|
|
1352
1352
|
if (message.quantity !== "") {
|
|
1353
|
-
writer.uint32(34).string(
|
|
1353
|
+
writer.uint32(34).string(math_1.Decimal.fromUserInput(message.quantity, 18).atomics);
|
|
1354
1354
|
}
|
|
1355
1355
|
if (message.entryPrice !== "") {
|
|
1356
|
-
writer.uint32(42).string(
|
|
1356
|
+
writer.uint32(42).string(math_1.Decimal.fromUserInput(message.entryPrice, 18).atomics);
|
|
1357
1357
|
}
|
|
1358
1358
|
if (message.margin !== "") {
|
|
1359
|
-
writer.uint32(50).string(
|
|
1359
|
+
writer.uint32(50).string(math_1.Decimal.fromUserInput(message.margin, 18).atomics);
|
|
1360
1360
|
}
|
|
1361
1361
|
if (message.cumulativeFundingEntry !== "") {
|
|
1362
|
-
writer.uint32(58).string(
|
|
1362
|
+
writer.uint32(58).string(math_1.Decimal.fromUserInput(message.cumulativeFundingEntry, 18).atomics);
|
|
1363
1363
|
}
|
|
1364
1364
|
return writer;
|
|
1365
1365
|
},
|
|
@@ -1380,16 +1380,16 @@ exports.Position = {
|
|
|
1380
1380
|
message.isLong = reader.bool();
|
|
1381
1381
|
break;
|
|
1382
1382
|
case 4:
|
|
1383
|
-
message.quantity =
|
|
1383
|
+
message.quantity = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1384
1384
|
break;
|
|
1385
1385
|
case 5:
|
|
1386
|
-
message.entryPrice =
|
|
1386
|
+
message.entryPrice = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1387
1387
|
break;
|
|
1388
1388
|
case 6:
|
|
1389
|
-
message.margin =
|
|
1389
|
+
message.margin = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1390
1390
|
break;
|
|
1391
1391
|
case 7:
|
|
1392
|
-
message.cumulativeFundingEntry =
|
|
1392
|
+
message.cumulativeFundingEntry = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1393
1393
|
break;
|
|
1394
1394
|
default:
|
|
1395
1395
|
reader.skipType(tag & 7);
|
|
@@ -1439,10 +1439,10 @@ exports.Position = {
|
|
|
1439
1439
|
obj.market_id = message.marketId === "" ? undefined : message.marketId;
|
|
1440
1440
|
obj.subaccount_id = message.subaccountId === "" ? undefined : message.subaccountId;
|
|
1441
1441
|
obj.isLong = message.isLong === false ? undefined : message.isLong;
|
|
1442
|
-
obj.quantity = message.quantity === "" ? undefined : message.quantity;
|
|
1443
|
-
obj.entry_price = message.entryPrice === "" ? undefined : message.entryPrice;
|
|
1444
|
-
obj.margin = message.margin === "" ? undefined : message.margin;
|
|
1445
|
-
obj.cumulative_funding_entry = message.cumulativeFundingEntry === "" ? undefined : message.cumulativeFundingEntry;
|
|
1442
|
+
obj.quantity = message.quantity === "" ? undefined : math_1.Decimal.fromUserInput(message.quantity, 18).atomics;
|
|
1443
|
+
obj.entry_price = message.entryPrice === "" ? undefined : math_1.Decimal.fromUserInput(message.entryPrice, 18).atomics;
|
|
1444
|
+
obj.margin = message.margin === "" ? undefined : math_1.Decimal.fromUserInput(message.margin, 18).atomics;
|
|
1445
|
+
obj.cumulative_funding_entry = message.cumulativeFundingEntry === "" ? undefined : math_1.Decimal.fromUserInput(message.cumulativeFundingEntry, 18).atomics;
|
|
1446
1446
|
return obj;
|
|
1447
1447
|
},
|
|
1448
1448
|
fromAminoMsg(object) {
|
|
@@ -1482,7 +1482,7 @@ exports.OraclePrice = {
|
|
|
1482
1482
|
writer.uint32(10).string(message.symbol);
|
|
1483
1483
|
}
|
|
1484
1484
|
if (message.price !== "") {
|
|
1485
|
-
writer.uint32(18).string(
|
|
1485
|
+
writer.uint32(18).string(math_1.Decimal.fromUserInput(message.price, 18).atomics);
|
|
1486
1486
|
}
|
|
1487
1487
|
if (message.type !== "") {
|
|
1488
1488
|
writer.uint32(26).string(message.type);
|
|
@@ -1500,7 +1500,7 @@ exports.OraclePrice = {
|
|
|
1500
1500
|
message.symbol = reader.string();
|
|
1501
1501
|
break;
|
|
1502
1502
|
case 2:
|
|
1503
|
-
message.price =
|
|
1503
|
+
message.price = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1504
1504
|
break;
|
|
1505
1505
|
case 3:
|
|
1506
1506
|
message.type = reader.string();
|
|
@@ -1535,7 +1535,7 @@ exports.OraclePrice = {
|
|
|
1535
1535
|
toAmino(message) {
|
|
1536
1536
|
const obj = {};
|
|
1537
1537
|
obj.symbol = message.symbol === "" ? undefined : message.symbol;
|
|
1538
|
-
obj.price = message.price === "" ? undefined : message.price;
|
|
1538
|
+
obj.price = message.price === "" ? undefined : math_1.Decimal.fromUserInput(message.price, 18).atomics;
|
|
1539
1539
|
obj.type = message.type === "" ? undefined : message.type;
|
|
1540
1540
|
return obj;
|
|
1541
1541
|
},
|
|
@@ -1590,16 +1590,16 @@ exports.SpotTrade = {
|
|
|
1590
1590
|
writer.uint32(26).string(message.executionType);
|
|
1591
1591
|
}
|
|
1592
1592
|
if (message.quantity !== "") {
|
|
1593
|
-
writer.uint32(34).string(
|
|
1593
|
+
writer.uint32(34).string(math_1.Decimal.fromUserInput(message.quantity, 18).atomics);
|
|
1594
1594
|
}
|
|
1595
1595
|
if (message.price !== "") {
|
|
1596
|
-
writer.uint32(42).string(
|
|
1596
|
+
writer.uint32(42).string(math_1.Decimal.fromUserInput(message.price, 18).atomics);
|
|
1597
1597
|
}
|
|
1598
1598
|
if (message.subaccountId !== "") {
|
|
1599
1599
|
writer.uint32(50).string(message.subaccountId);
|
|
1600
1600
|
}
|
|
1601
1601
|
if (message.fee !== "") {
|
|
1602
|
-
writer.uint32(58).string(
|
|
1602
|
+
writer.uint32(58).string(math_1.Decimal.fromUserInput(message.fee, 18).atomics);
|
|
1603
1603
|
}
|
|
1604
1604
|
if (message.orderHash.length !== 0) {
|
|
1605
1605
|
writer.uint32(66).bytes(message.orderHash);
|
|
@@ -1632,16 +1632,16 @@ exports.SpotTrade = {
|
|
|
1632
1632
|
message.executionType = reader.string();
|
|
1633
1633
|
break;
|
|
1634
1634
|
case 4:
|
|
1635
|
-
message.quantity =
|
|
1635
|
+
message.quantity = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1636
1636
|
break;
|
|
1637
1637
|
case 5:
|
|
1638
|
-
message.price =
|
|
1638
|
+
message.price = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1639
1639
|
break;
|
|
1640
1640
|
case 6:
|
|
1641
1641
|
message.subaccountId = reader.string();
|
|
1642
1642
|
break;
|
|
1643
1643
|
case 7:
|
|
1644
|
-
message.fee =
|
|
1644
|
+
message.fee = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1645
1645
|
break;
|
|
1646
1646
|
case 8:
|
|
1647
1647
|
message.orderHash = reader.bytes();
|
|
@@ -1719,10 +1719,10 @@ exports.SpotTrade = {
|
|
|
1719
1719
|
obj.market_id = message.marketId === "" ? undefined : message.marketId;
|
|
1720
1720
|
obj.is_buy = message.isBuy === false ? undefined : message.isBuy;
|
|
1721
1721
|
obj.executionType = message.executionType === "" ? undefined : message.executionType;
|
|
1722
|
-
obj.quantity = message.quantity === "" ? undefined : message.quantity;
|
|
1723
|
-
obj.price = message.price === "" ? undefined : message.price;
|
|
1722
|
+
obj.quantity = message.quantity === "" ? undefined : math_1.Decimal.fromUserInput(message.quantity, 18).atomics;
|
|
1723
|
+
obj.price = message.price === "" ? undefined : math_1.Decimal.fromUserInput(message.price, 18).atomics;
|
|
1724
1724
|
obj.subaccount_id = message.subaccountId === "" ? undefined : message.subaccountId;
|
|
1725
|
-
obj.fee = message.fee === "" ? undefined : message.fee;
|
|
1725
|
+
obj.fee = message.fee === "" ? undefined : math_1.Decimal.fromUserInput(message.fee, 18).atomics;
|
|
1726
1726
|
obj.order_hash = message.orderHash ? (0, helpers_1.base64FromBytes)(message.orderHash) : undefined;
|
|
1727
1727
|
obj.fee_recipient_address = message.feeRecipientAddress === null ? undefined : message.feeRecipientAddress;
|
|
1728
1728
|
obj.cid = message.cid === "" ? undefined : message.cid;
|
|
@@ -1786,10 +1786,10 @@ exports.DerivativeTrade = {
|
|
|
1786
1786
|
exchange_1.PositionDelta.encode(message.positionDelta, writer.uint32(42).fork()).ldelim();
|
|
1787
1787
|
}
|
|
1788
1788
|
if (message.payout !== "") {
|
|
1789
|
-
writer.uint32(50).string(
|
|
1789
|
+
writer.uint32(50).string(math_1.Decimal.fromUserInput(message.payout, 18).atomics);
|
|
1790
1790
|
}
|
|
1791
1791
|
if (message.fee !== "") {
|
|
1792
|
-
writer.uint32(58).string(
|
|
1792
|
+
writer.uint32(58).string(math_1.Decimal.fromUserInput(message.fee, 18).atomics);
|
|
1793
1793
|
}
|
|
1794
1794
|
if (message.orderHash !== "") {
|
|
1795
1795
|
writer.uint32(66).string(message.orderHash);
|
|
@@ -1828,10 +1828,10 @@ exports.DerivativeTrade = {
|
|
|
1828
1828
|
message.positionDelta = exchange_1.PositionDelta.decode(reader, reader.uint32());
|
|
1829
1829
|
break;
|
|
1830
1830
|
case 6:
|
|
1831
|
-
message.payout =
|
|
1831
|
+
message.payout = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1832
1832
|
break;
|
|
1833
1833
|
case 7:
|
|
1834
|
-
message.fee =
|
|
1834
|
+
message.fee = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
1835
1835
|
break;
|
|
1836
1836
|
case 8:
|
|
1837
1837
|
message.orderHash = reader.string();
|
|
@@ -1911,8 +1911,8 @@ exports.DerivativeTrade = {
|
|
|
1911
1911
|
obj.executionType = message.executionType === "" ? undefined : message.executionType;
|
|
1912
1912
|
obj.subaccount_id = message.subaccountId === "" ? undefined : message.subaccountId;
|
|
1913
1913
|
obj.position_delta = message.positionDelta ? exchange_1.PositionDelta.toAmino(message.positionDelta) : undefined;
|
|
1914
|
-
obj.payout = message.payout === "" ? undefined : message.payout;
|
|
1915
|
-
obj.fee = message.fee === "" ? undefined : message.fee;
|
|
1914
|
+
obj.payout = message.payout === "" ? undefined : math_1.Decimal.fromUserInput(message.payout, 18).atomics;
|
|
1915
|
+
obj.fee = message.fee === "" ? undefined : math_1.Decimal.fromUserInput(message.fee, 18).atomics;
|
|
1916
1916
|
obj.order_hash = message.orderHash === "" ? undefined : message.orderHash;
|
|
1917
1917
|
obj.fee_recipient_address = message.feeRecipientAddress === null ? undefined : message.feeRecipientAddress;
|
|
1918
1918
|
obj.cid = message.cid === "" ? undefined : message.cid;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SigningClientResolver } from "../../../helper-func-types";
|
|
2
2
|
import { MsgCreateDenom, MsgMint, MsgBurn, MsgChangeAdmin, MsgSetDenomMetadata, MsgUpdateParams } from "./tx";
|
|
3
|
-
export declare const createCreateDenom: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgCreateDenom | MsgCreateDenom[], fee: import("../../../
|
|
4
|
-
export declare const createMint: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgMint | MsgMint[], fee: import("../../../
|
|
5
|
-
export declare const createBurn: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgBurn | MsgBurn[], fee: import("../../../
|
|
6
|
-
export declare const createChangeAdmin: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgChangeAdmin | MsgChangeAdmin[], fee: import("../../../
|
|
7
|
-
export declare const createSetDenomMetadata: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgSetDenomMetadata | MsgSetDenomMetadata[], fee: import("../../../
|
|
8
|
-
export declare const createUpdateParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateParams | MsgUpdateParams[], fee: import("../../../
|
|
3
|
+
export declare const createCreateDenom: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgCreateDenom | MsgCreateDenom[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
4
|
+
export declare const createMint: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgMint | MsgMint[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
5
|
+
export declare const createBurn: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgBurn | MsgBurn[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
6
|
+
export declare const createChangeAdmin: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgChangeAdmin | MsgChangeAdmin[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
7
|
+
export declare const createSetDenomMetadata: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgSetDenomMetadata | MsgSetDenomMetadata[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
8
|
+
export declare const createUpdateParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateParams | MsgUpdateParams[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SigningClientResolver } from "../../../helper-func-types";
|
|
2
2
|
import { MsgUpdateContract, MsgActivateContract, MsgDeactivateContract, MsgExecuteContractCompat, MsgUpdateParams, MsgRegisterContract } from "./tx";
|
|
3
|
-
export declare const createUpdateRegistryContractParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateContract | MsgUpdateContract[], fee: import("../../../
|
|
4
|
-
export declare const createActivateRegistryContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgActivateContract | MsgActivateContract[], fee: import("../../../
|
|
5
|
-
export declare const createDeactivateRegistryContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgDeactivateContract | MsgDeactivateContract[], fee: import("../../../
|
|
6
|
-
export declare const createExecuteContractCompat: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgExecuteContractCompat | MsgExecuteContractCompat[], fee: import("../../../
|
|
7
|
-
export declare const createUpdateParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateParams | MsgUpdateParams[], fee: import("../../../
|
|
8
|
-
export declare const createRegisterContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgRegisterContract | MsgRegisterContract[], fee: import("../../../
|
|
3
|
+
export declare const createUpdateRegistryContractParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateContract | MsgUpdateContract[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
4
|
+
export declare const createActivateRegistryContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgActivateContract | MsgActivateContract[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
5
|
+
export declare const createDeactivateRegistryContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgDeactivateContract | MsgDeactivateContract[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
6
|
+
export declare const createExecuteContractCompat: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgExecuteContractCompat | MsgExecuteContractCompat[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
7
|
+
export declare const createUpdateParams: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgUpdateParams | MsgUpdateParams[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
|
8
|
+
export declare const createRegisterContract: (clientResolver?: SigningClientResolver) => (signerAddress: string, message: MsgRegisterContract | MsgRegisterContract[], fee: import("../../../types").StdFee | "auto", memo: string) => Promise<import("../../../types").DeliverTxResponse>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "injectivejs",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.16",
|
|
4
4
|
"description": "Injectivejs is a JavaScript library for interacting with injective sdk.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"prepare": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@interchainjs/cosmos": "1.9.
|
|
29
|
-
"@interchainjs/cosmos-types": "1.9.
|
|
30
|
-
"@interchainjs/encoding": "1.9.
|
|
31
|
-
"@interchainjs/pubkey": "1.9.
|
|
32
|
-
"@interchainjs/types": "1.9.
|
|
33
|
-
"@interchainjs/utils": "1.9.
|
|
28
|
+
"@interchainjs/cosmos": "1.9.16",
|
|
29
|
+
"@interchainjs/cosmos-types": "1.9.16",
|
|
30
|
+
"@interchainjs/encoding": "1.9.16",
|
|
31
|
+
"@interchainjs/pubkey": "1.9.16",
|
|
32
|
+
"@interchainjs/types": "1.9.16",
|
|
33
|
+
"@interchainjs/utils": "1.9.16",
|
|
34
34
|
"@noble/hashes": "^1.3.1",
|
|
35
35
|
"decimal.js": "^10.4.3"
|
|
36
36
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"cosmjs",
|
|
42
42
|
"wallet"
|
|
43
43
|
],
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "cd2022e7cfe9bf09c256ecf65f164778f9f61365"
|
|
45
45
|
}
|
package/registry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
2
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
4
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
5
|
*/
|
package/registry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
3
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
4
4
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
5
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
6
|
*/
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
2
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
4
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
5
|
*/
|
package/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
3
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
4
4
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
5
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
6
|
*/
|
package/utf8.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
2
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
4
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
5
|
*/
|
package/utf8.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
2
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
4
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
5
|
*/
|
package/varint.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
2
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
3
3
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
4
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
5
|
*/
|
package/varint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.
|
|
3
|
+
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.25
|
|
4
4
|
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
5
|
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
6
|
*/
|
package/decimals.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.20
|
|
3
|
-
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
-
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* A type for arbitrary precision, non-negative decimals.
|
|
8
|
-
*
|
|
9
|
-
* Instances of this class are immutable.
|
|
10
|
-
*/
|
|
11
|
-
export declare class Decimal {
|
|
12
|
-
static fromUserInput(input: string, fractionalDigits: number): Decimal;
|
|
13
|
-
static fromAtomics(atomics: string, fractionalDigits: number): Decimal;
|
|
14
|
-
private static verifyFractionalDigits;
|
|
15
|
-
get atomics(): string;
|
|
16
|
-
get fractionalDigits(): number;
|
|
17
|
-
private readonly data;
|
|
18
|
-
private constructor();
|
|
19
|
-
toString(): string;
|
|
20
|
-
}
|
package/decimals.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.20
|
|
4
|
-
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
|
-
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Decimal = void 0;
|
|
9
|
-
// The largest value we need is 18 (Ether).
|
|
10
|
-
const maxFractionalDigits = 30;
|
|
11
|
-
/**
|
|
12
|
-
* A type for arbitrary precision, non-negative decimals.
|
|
13
|
-
*
|
|
14
|
-
* Instances of this class are immutable.
|
|
15
|
-
*/
|
|
16
|
-
class Decimal {
|
|
17
|
-
static fromUserInput(input, fractionalDigits) {
|
|
18
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
19
|
-
const badCharacter = input.match(/[^0-9.]/);
|
|
20
|
-
if (badCharacter) {
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
22
|
-
throw new Error(`Invalid character at position ${badCharacter.index + 1}`);
|
|
23
|
-
}
|
|
24
|
-
let whole;
|
|
25
|
-
let fractional;
|
|
26
|
-
if (input === "") {
|
|
27
|
-
whole = "0";
|
|
28
|
-
fractional = "";
|
|
29
|
-
}
|
|
30
|
-
else if (input.search(/\./) === -1) {
|
|
31
|
-
// integer format, no separator
|
|
32
|
-
whole = input;
|
|
33
|
-
fractional = "";
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const parts = input.split(".");
|
|
37
|
-
switch (parts.length) {
|
|
38
|
-
case 0:
|
|
39
|
-
case 1:
|
|
40
|
-
throw new Error("Fewer than two elements in split result. This must not happen here.");
|
|
41
|
-
case 2:
|
|
42
|
-
if (!parts[1])
|
|
43
|
-
throw new Error("Fractional part missing");
|
|
44
|
-
whole = parts[0];
|
|
45
|
-
fractional = parts[1].replace(/0+$/, "");
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
throw new Error("More than one separator found");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (fractional.length > fractionalDigits) {
|
|
52
|
-
throw new Error("Got more fractional digits than supported");
|
|
53
|
-
}
|
|
54
|
-
const quantity = `${whole}${fractional.padEnd(fractionalDigits, "0")}`;
|
|
55
|
-
return new Decimal(quantity, fractionalDigits);
|
|
56
|
-
}
|
|
57
|
-
static fromAtomics(atomics, fractionalDigits) {
|
|
58
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
59
|
-
return new Decimal(atomics, fractionalDigits);
|
|
60
|
-
}
|
|
61
|
-
static verifyFractionalDigits(fractionalDigits) {
|
|
62
|
-
if (!Number.isInteger(fractionalDigits))
|
|
63
|
-
throw new Error("Fractional digits is not an integer");
|
|
64
|
-
if (fractionalDigits < 0)
|
|
65
|
-
throw new Error("Fractional digits must not be negative");
|
|
66
|
-
if (fractionalDigits > maxFractionalDigits) {
|
|
67
|
-
throw new Error(`Fractional digits must not exceed ${maxFractionalDigits}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
get atomics() {
|
|
71
|
-
return this.data.atomics.toString();
|
|
72
|
-
}
|
|
73
|
-
get fractionalDigits() {
|
|
74
|
-
return this.data.fractionalDigits;
|
|
75
|
-
}
|
|
76
|
-
data;
|
|
77
|
-
constructor(atomics, fractionalDigits) {
|
|
78
|
-
if (!atomics.match(/^[0-9]+$/)) {
|
|
79
|
-
throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");
|
|
80
|
-
}
|
|
81
|
-
this.data = {
|
|
82
|
-
atomics: BigInt(atomics),
|
|
83
|
-
fractionalDigits: fractionalDigits,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
toString() {
|
|
87
|
-
const factor = BigInt(10) ** BigInt(this.data.fractionalDigits);
|
|
88
|
-
const whole = this.data.atomics / factor;
|
|
89
|
-
const fractional = this.data.atomics % factor;
|
|
90
|
-
if (fractional === 0n) {
|
|
91
|
-
return whole.toString();
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
const fullFractionalPart = fractional
|
|
95
|
-
.toString()
|
|
96
|
-
.padStart(this.data.fractionalDigits, "0");
|
|
97
|
-
const trimmedFractionalPart = fullFractionalPart.replace(/0+$/, "");
|
|
98
|
-
return `${whole.toString()}.${trimmedFractionalPart}`;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.Decimal = Decimal;
|
package/esm/decimals.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.11.20
|
|
3
|
-
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
-
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
-
*/
|
|
6
|
-
// The largest value we need is 18 (Ether).
|
|
7
|
-
const maxFractionalDigits = 30;
|
|
8
|
-
/**
|
|
9
|
-
* A type for arbitrary precision, non-negative decimals.
|
|
10
|
-
*
|
|
11
|
-
* Instances of this class are immutable.
|
|
12
|
-
*/
|
|
13
|
-
export class Decimal {
|
|
14
|
-
static fromUserInput(input, fractionalDigits) {
|
|
15
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
16
|
-
const badCharacter = input.match(/[^0-9.]/);
|
|
17
|
-
if (badCharacter) {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19
|
-
throw new Error(`Invalid character at position ${badCharacter.index + 1}`);
|
|
20
|
-
}
|
|
21
|
-
let whole;
|
|
22
|
-
let fractional;
|
|
23
|
-
if (input === "") {
|
|
24
|
-
whole = "0";
|
|
25
|
-
fractional = "";
|
|
26
|
-
}
|
|
27
|
-
else if (input.search(/\./) === -1) {
|
|
28
|
-
// integer format, no separator
|
|
29
|
-
whole = input;
|
|
30
|
-
fractional = "";
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
const parts = input.split(".");
|
|
34
|
-
switch (parts.length) {
|
|
35
|
-
case 0:
|
|
36
|
-
case 1:
|
|
37
|
-
throw new Error("Fewer than two elements in split result. This must not happen here.");
|
|
38
|
-
case 2:
|
|
39
|
-
if (!parts[1])
|
|
40
|
-
throw new Error("Fractional part missing");
|
|
41
|
-
whole = parts[0];
|
|
42
|
-
fractional = parts[1].replace(/0+$/, "");
|
|
43
|
-
break;
|
|
44
|
-
default:
|
|
45
|
-
throw new Error("More than one separator found");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (fractional.length > fractionalDigits) {
|
|
49
|
-
throw new Error("Got more fractional digits than supported");
|
|
50
|
-
}
|
|
51
|
-
const quantity = `${whole}${fractional.padEnd(fractionalDigits, "0")}`;
|
|
52
|
-
return new Decimal(quantity, fractionalDigits);
|
|
53
|
-
}
|
|
54
|
-
static fromAtomics(atomics, fractionalDigits) {
|
|
55
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
56
|
-
return new Decimal(atomics, fractionalDigits);
|
|
57
|
-
}
|
|
58
|
-
static verifyFractionalDigits(fractionalDigits) {
|
|
59
|
-
if (!Number.isInteger(fractionalDigits))
|
|
60
|
-
throw new Error("Fractional digits is not an integer");
|
|
61
|
-
if (fractionalDigits < 0)
|
|
62
|
-
throw new Error("Fractional digits must not be negative");
|
|
63
|
-
if (fractionalDigits > maxFractionalDigits) {
|
|
64
|
-
throw new Error(`Fractional digits must not exceed ${maxFractionalDigits}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
get atomics() {
|
|
68
|
-
return this.data.atomics.toString();
|
|
69
|
-
}
|
|
70
|
-
get fractionalDigits() {
|
|
71
|
-
return this.data.fractionalDigits;
|
|
72
|
-
}
|
|
73
|
-
data;
|
|
74
|
-
constructor(atomics, fractionalDigits) {
|
|
75
|
-
if (!atomics.match(/^[0-9]+$/)) {
|
|
76
|
-
throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");
|
|
77
|
-
}
|
|
78
|
-
this.data = {
|
|
79
|
-
atomics: BigInt(atomics),
|
|
80
|
-
fractionalDigits: fractionalDigits,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
toString() {
|
|
84
|
-
const factor = BigInt(10) ** BigInt(this.data.fractionalDigits);
|
|
85
|
-
const whole = this.data.atomics / factor;
|
|
86
|
-
const fractional = this.data.atomics % factor;
|
|
87
|
-
if (fractional === 0n) {
|
|
88
|
-
return whole.toString();
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const fullFractionalPart = fractional
|
|
92
|
-
.toString()
|
|
93
|
-
.padStart(this.data.fractionalDigits, "0");
|
|
94
|
-
const trimmedFractionalPart = fullFractionalPart.replace(/0+$/, "");
|
|
95
|
-
return `${whole.toString()}.${trimmedFractionalPart}`;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|