@injectivelabs/sdk-ts 1.17.2-alpha.9 → 1.17.2
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/cjs/{AbacusGrpcApi-vcp-9fNL.cjs → AbacusGrpcApi-DXSuhb6R.cjs} +1 -1
- package/dist/cjs/{BaseGrpcConsumer-DUwCngI6.cjs → BaseGrpcConsumer-EtEQfhmo.cjs} +47 -6
- package/dist/{esm/BaseGrpcConsumer-BbvNzhrS.d.ts → cjs/BaseGrpcConsumer-Vvj4lzyS.d.cts} +14 -2
- package/dist/cjs/{BaseIndexerGrpcConsumer-BGLVnJtw.cjs → BaseIndexerGrpcConsumer-CW1kTn-_.cjs} +1 -1
- package/dist/cjs/{ChainGrpcExchangeApi-DLpkgEyg.cjs → ChainGrpcExchangeApi-CF9ATYqN.cjs} +3 -3
- package/dist/cjs/{ChainRestTendermintApi-BiZOeKcG.cjs → ChainRestTendermintApi-vL0g-BF-.cjs} +2 -2
- package/dist/cjs/{DirectEthSecp256k1Wallet-CU18lti3.cjs → DirectEthSecp256k1Wallet-CIdxvYjL.cjs} +2 -2
- package/dist/cjs/{ExecArgNeptuneWithdraw-DOHeo3AJ.cjs → ExecArgNeptuneWithdraw-C-NQ72VM.cjs} +1 -1
- package/dist/cjs/{IndexerGrpcWeb3GwApi-BgWT2tWK.cjs → IndexerGrpcWeb3GwApi-C7kkr4Il.cjs} +2 -2
- package/dist/cjs/{MsgSetDenomMetadata-CUoGqV8P.cjs → MsgSetDenomMetadata-CKvxIq_t.cjs} +21 -10
- package/dist/cjs/{OLPGrpcApi-B9O9HcGv.cjs → OLPGrpcApi-BCCb6fBZ.cjs} +1 -1
- package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-Bh8AXm4k.cjs → QueryTradingStrategyContractTotalStrategies-Ayot_18R.cjs} +3 -3
- package/dist/cjs/{IndexerGrpcAccountPortfolioStream-DO5_FF4l.cjs → StreamManagerV2-igv0mn2I.cjs} +1375 -378
- package/dist/cjs/{accounts-CXaUasU5.cjs → accounts-CHKUxDIf.cjs} +1 -1
- package/dist/{esm/any_pb-B1YYUSUf.d.ts → cjs/any_pb-CutLnOUR.d.cts} +2 -2
- package/dist/cjs/{chain-Cs9sNuT1.cjs → chain-CGHrf7gg.cjs} +4 -4
- package/dist/cjs/client/abacus.cjs +2 -2
- package/dist/cjs/client/abacus.d.cts +2 -2
- package/dist/cjs/client/chain.cjs +5 -5
- package/dist/cjs/client/chain.d.cts +9 -9
- package/dist/cjs/client/indexer.cjs +74 -60
- package/dist/cjs/client/indexer.d.cts +10 -10
- package/dist/cjs/client/olp.cjs +3 -3
- package/dist/cjs/client/olp.d.cts +2 -2
- package/dist/cjs/client/wasm.cjs +7 -7
- package/dist/cjs/client/wasm.d.cts +2 -2
- package/dist/cjs/core/accounts.cjs +2 -2
- package/dist/cjs/core/accounts.d.cts +9 -9
- package/dist/cjs/core/modules.cjs +10 -10
- package/dist/cjs/core/modules.d.cts +9 -9
- package/dist/cjs/core/tx.cjs +7 -7
- package/dist/cjs/core/tx.d.cts +9 -9
- package/dist/cjs/cosmjs.cjs +8 -8
- package/dist/cjs/cosmjs.d.cts +3 -3
- package/dist/cjs/exports.cjs +8 -8
- package/dist/cjs/exports.d.cts +3 -3
- package/dist/cjs/{index-Cc5Q73-y.d.cts → index-CGvISJoE.d.cts} +1 -1
- package/dist/cjs/{index-CKBod1ba.d.cts → index-CO3Y9drx.d.cts} +4 -3
- package/dist/cjs/{index-Cc4mqAsR.d.cts → index-D6ubyMlR.d.cts} +1 -1
- package/dist/{esm/index-DdGVE3_u.d.ts → cjs/index-DWbxb1AB.d.cts} +7 -13
- package/dist/cjs/{index-1Wy-0PTh.d.cts → index-DemZnO3c.d.cts} +969 -291
- package/dist/cjs/{index-Cqfc1ppG.d.cts → index-DjRtDAy5.d.cts} +241 -19
- package/dist/cjs/{index-B19YRG03.d.cts → index-lRWP4rKg.d.cts} +1 -1
- package/dist/cjs/index.cjs +92 -70
- package/dist/cjs/index.d.cts +10 -10
- package/dist/cjs/{service-DcwwCSxu.cjs → service-BCLvTVy_.cjs} +2 -2
- package/dist/cjs/service.cjs +3 -3
- package/dist/cjs/service.d.cts +4 -4
- package/dist/cjs/{tx-Cn0j2SRh.cjs → tx-VwbP3UdI.cjs} +6 -6
- package/dist/{esm/tx_pb-TiSRD5ay.d.ts → cjs/tx_pb-D-cNmrlO.d.cts} +4 -3
- package/dist/cjs/{types-NFV4P_J_.cjs → types-BTuy007B.cjs} +135 -7
- package/dist/cjs/types.cjs +7 -1
- package/dist/cjs/types.d.cts +4 -4
- package/dist/cjs/{utils-V1uXtT51.cjs → utils-CDl812vv.cjs} +44 -8
- package/dist/cjs/utils.cjs +3 -1
- package/dist/cjs/utils.d.cts +10 -10
- package/dist/esm/{AbacusGrpcApi-CXaVHTrN.js → AbacusGrpcApi-Ce1hRKuD.js} +1 -1
- package/dist/{cjs/BaseGrpcConsumer-PDufF0fz.d.cts → esm/BaseGrpcConsumer-6x4RlZ16.d.ts} +14 -2
- package/dist/esm/{BaseGrpcConsumer-DptVGP0n.js → BaseGrpcConsumer-BTWyD665.js} +48 -7
- package/dist/esm/{BaseIndexerGrpcConsumer-CjpUoGXy.js → BaseIndexerGrpcConsumer-BTZzA_Eg.js} +1 -1
- package/dist/esm/{ChainGrpcExchangeApi-C-2XsVVs.js → ChainGrpcExchangeApi-DqdCst2Z.js} +3 -3
- package/dist/esm/{ChainRestTendermintApi-CMrAg0Zm.js → ChainRestTendermintApi-BT_yOkAV.js} +2 -2
- package/dist/esm/{DirectEthSecp256k1Wallet-a9KiF9fA.js → DirectEthSecp256k1Wallet-BqxC1b40.js} +2 -2
- package/dist/esm/{ExecArgNeptuneWithdraw-DEljIeLd.js → ExecArgNeptuneWithdraw-uLf3HttI.js} +1 -1
- package/dist/esm/{IndexerGrpcWeb3GwApi-CtUYowus.js → IndexerGrpcWeb3GwApi-B2mgt9tE.js} +2 -2
- package/dist/esm/{MsgSetDenomMetadata-BhJMebO9.js → MsgSetDenomMetadata-CXgkQ3LF.js} +21 -10
- package/dist/esm/{OLPGrpcApi-CMwW7LXZ.js → OLPGrpcApi-DUCfcca_.js} +1 -1
- package/dist/esm/{QueryTradingStrategyContractTotalStrategies-7IjWZLsc.js → QueryTradingStrategyContractTotalStrategies-CZWdw3BE.js} +3 -3
- package/dist/esm/{IndexerGrpcAccountPortfolioStream-3AGGiB1c.js → StreamManagerV2-B9xiJYLj.js} +1116 -203
- package/dist/esm/{accounts-DFC9RYDH.js → accounts-C5HEaz0B.js} +1 -1
- package/dist/{cjs/any_pb-CP-3DVyl.d.cts → esm/any_pb-DBt7qvTr.d.ts} +2 -2
- package/dist/esm/{chain-phKWVf8c.js → chain-CHX5uSpc.js} +4 -4
- package/dist/esm/client/abacus.d.ts +2 -2
- package/dist/esm/client/abacus.js +2 -2
- package/dist/esm/client/chain.d.ts +9 -9
- package/dist/esm/client/chain.js +5 -5
- package/dist/esm/client/indexer.d.ts +10 -10
- package/dist/esm/client/indexer.js +7 -7
- package/dist/esm/client/olp.d.ts +2 -2
- package/dist/esm/client/olp.js +3 -3
- package/dist/esm/client/wasm.d.ts +2 -2
- package/dist/esm/client/wasm.js +7 -7
- package/dist/esm/core/accounts.d.ts +9 -9
- package/dist/esm/core/accounts.js +2 -2
- package/dist/esm/core/modules.d.ts +9 -9
- package/dist/esm/core/modules.js +10 -10
- package/dist/esm/core/tx.d.ts +9 -9
- package/dist/esm/core/tx.js +7 -7
- package/dist/esm/cosmjs.d.ts +3 -3
- package/dist/esm/cosmjs.js +8 -8
- package/dist/esm/exports.d.ts +3 -3
- package/dist/esm/exports.js +8 -8
- package/dist/esm/{index-BOKuUpVZ.d.ts → index--sg5xbEP.d.ts} +1 -1
- package/dist/esm/{index-B1R417vW.d.ts → index-B-SD0p02.d.ts} +241 -19
- package/dist/esm/{index-qFCOVI7n.d.ts → index-BJQt8IpY.d.ts} +1 -1
- package/dist/esm/{index-DS6aJrL5.d.ts → index-C_3bL-y4.d.ts} +1 -1
- package/dist/esm/{index-IV55OZfT.d.ts → index-Ch477yfL.d.ts} +984 -306
- package/dist/esm/{index-aNMYd-s0.d.ts → index-DOyiZiUK.d.ts} +4 -3
- package/dist/{cjs/index-D4uWOVE5.d.cts → esm/index-Dn4OxoMy.d.ts} +7 -13
- package/dist/esm/index.d.ts +10 -10
- package/dist/esm/index.js +18 -18
- package/dist/esm/{service-CoINtWpF.js → service-CnqMmybI.js} +2 -2
- package/dist/esm/service.d.ts +4 -4
- package/dist/esm/service.js +3 -3
- package/dist/esm/{tx-CcaVBSym.js → tx-DsGG15fH.js} +6 -6
- package/dist/{cjs/tx_pb-tECSPcSB.d.cts → esm/tx_pb-zz4o4hHG.d.ts} +4 -3
- package/dist/esm/types-68OuBiEQ.js +162 -0
- package/dist/esm/types.d.ts +4 -4
- package/dist/esm/types.js +2 -2
- package/dist/esm/{utils-DwGoPRTL.js → utils-BFBu_LnJ.js} +33 -9
- package/dist/esm/utils.d.ts +10 -10
- package/dist/esm/utils.js +2 -2
- package/package.json +11 -13
- package/dist/esm/types-Cq0sRR6y.js +0 -70
|
@@ -90,7 +90,31 @@ function isJsonString(str) {
|
|
|
90
90
|
* BigInt-safe JSON replacer function.
|
|
91
91
|
* Converts BigInt values to strings during JSON serialization.
|
|
92
92
|
*/
|
|
93
|
-
const bigIntReplacer = (_key, value) => typeof value === "bigint" ? value
|
|
93
|
+
const bigIntReplacer = (_key, value) => typeof value === "bigint" ? bigIntToString(value) : value;
|
|
94
|
+
/**
|
|
95
|
+
* Converts a potentially bigint value to a number.
|
|
96
|
+
* Handles bigint, string, and other number-like types.
|
|
97
|
+
* Returns 0 for null/undefined values.
|
|
98
|
+
*/
|
|
99
|
+
const bigIntToNumber = (value) => {
|
|
100
|
+
if (value === null || value === void 0) return 0;
|
|
101
|
+
if (typeof value === "bigint") return Number(value);
|
|
102
|
+
if (typeof value === "string") return parseInt(value || "0", 10);
|
|
103
|
+
if (typeof value === "number") return value;
|
|
104
|
+
return parseInt(String(value || "0"), 10);
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Converts a potentially bigint value to a string.
|
|
108
|
+
* Handles bigint, string, and other types that can be converted to string.
|
|
109
|
+
* Returns empty string for null/undefined values.
|
|
110
|
+
*/
|
|
111
|
+
const bigIntToString = (value) => {
|
|
112
|
+
if (value === null || value === void 0) return "";
|
|
113
|
+
if (typeof value === "bigint") return value.toString();
|
|
114
|
+
if (typeof value === "string") return value;
|
|
115
|
+
if (typeof value === "number") return value.toString();
|
|
116
|
+
return String(value || "");
|
|
117
|
+
};
|
|
94
118
|
/**
|
|
95
119
|
* Stringify an object to JSON with BigInt support.
|
|
96
120
|
* Converts BigInt values to strings during serialization to prevent
|
|
@@ -536,7 +560,7 @@ const sanitizeTypedData = (data) => {
|
|
|
536
560
|
return Object.fromEntries(entries);
|
|
537
561
|
}
|
|
538
562
|
case "[object Array]": return data.map((v) => sanitizeTypedData(v));
|
|
539
|
-
case "[object BigInt]": return data
|
|
563
|
+
case "[object BigInt]": return bigIntToString(data);
|
|
540
564
|
default: return data;
|
|
541
565
|
}
|
|
542
566
|
};
|
|
@@ -1022,7 +1046,7 @@ var ChainGrpcCommonTransformer = class ChainGrpcCommonTransformer {
|
|
|
1022
1046
|
}
|
|
1023
1047
|
static grpcPaginationToPaginationV2(pagination) {
|
|
1024
1048
|
return {
|
|
1025
|
-
total: pagination ?
|
|
1049
|
+
total: pagination ? bigIntToNumber(pagination.total) : 0,
|
|
1026
1050
|
next: pagination ? ChainGrpcCommonTransformer.paginationUint8ArrayToString(pagination.nextKey) : ""
|
|
1027
1051
|
};
|
|
1028
1052
|
}
|
|
@@ -1062,15 +1086,16 @@ const grpcPagingToPaging = (pagination) => {
|
|
|
1062
1086
|
};
|
|
1063
1087
|
return {
|
|
1064
1088
|
...pagination,
|
|
1089
|
+
total: bigIntToNumber(pagination.total),
|
|
1065
1090
|
to: parseInt(pagination.to.toString() || "0", 10),
|
|
1066
1091
|
from: parseInt(pagination.from.toString() || "0", 10),
|
|
1067
|
-
|
|
1092
|
+
countBySubaccount: bigIntToNumber(pagination.countBySubaccount)
|
|
1068
1093
|
};
|
|
1069
1094
|
};
|
|
1070
1095
|
/**
|
|
1071
1096
|
* Converts gRPC Paging to ExchangePagination for V2 proto packages.
|
|
1072
1097
|
* Handles both InjectiveAccountsRpcPb.Paging and InjectiveExplorerRpcPb.Paging types.
|
|
1073
|
-
* Supports bigint and string types for the total
|
|
1098
|
+
* Supports bigint and string types for the total and countBySubaccount fields.
|
|
1074
1099
|
*/
|
|
1075
1100
|
const grpcPagingToPagingV2 = (pagination) => {
|
|
1076
1101
|
if (!pagination) return {
|
|
@@ -1078,13 +1103,12 @@ const grpcPagingToPagingV2 = (pagination) => {
|
|
|
1078
1103
|
from: 0,
|
|
1079
1104
|
total: 0
|
|
1080
1105
|
};
|
|
1081
|
-
const total = pagination.total;
|
|
1082
|
-
const totalNumber = typeof total === "bigint" ? Number(total) : typeof total === "string" ? parseInt(total || "0", 10) : parseInt(String(total) || "0", 10);
|
|
1083
1106
|
return {
|
|
1084
1107
|
...pagination,
|
|
1108
|
+
total: bigIntToNumber(pagination.total),
|
|
1085
1109
|
to: parseInt(pagination.to.toString() || "0", 10),
|
|
1086
1110
|
from: parseInt(pagination.from.toString() || "0", 10),
|
|
1087
|
-
|
|
1111
|
+
countBySubaccount: bigIntToNumber(pagination.countBySubaccount)
|
|
1088
1112
|
};
|
|
1089
1113
|
};
|
|
1090
1114
|
const fetchAllWithPagination = async (args, method, result = []) => {
|
|
@@ -1210,6 +1234,18 @@ Object.defineProperty(exports, 'bigIntReplacer', {
|
|
|
1210
1234
|
return bigIntReplacer;
|
|
1211
1235
|
}
|
|
1212
1236
|
});
|
|
1237
|
+
Object.defineProperty(exports, 'bigIntToNumber', {
|
|
1238
|
+
enumerable: true,
|
|
1239
|
+
get: function () {
|
|
1240
|
+
return bigIntToNumber;
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
Object.defineProperty(exports, 'bigIntToString', {
|
|
1244
|
+
enumerable: true,
|
|
1245
|
+
get: function () {
|
|
1246
|
+
return bigIntToString;
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1213
1249
|
Object.defineProperty(exports, 'binaryToBase64', {
|
|
1214
1250
|
enumerable: true,
|
|
1215
1251
|
get: function () {
|
package/dist/cjs/utils.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_utils = require('./utils-
|
|
2
|
+
const require_utils = require('./utils-CDl812vv.cjs');
|
|
3
3
|
const require_time = require('./time-B4xLc27Y.cjs');
|
|
4
4
|
const require_grpc = require('./grpc-DQDVCGpY.cjs');
|
|
5
5
|
let __protobuf_ts_grpcweb_transport = require("@protobuf-ts/grpcweb-transport");
|
|
@@ -21,6 +21,8 @@ exports.amountToCosmosSdkDecAmount = require_utils.amountToCosmosSdkDecAmount;
|
|
|
21
21
|
exports.base64ToUint8Array = require_utils.base64ToUint8Array;
|
|
22
22
|
exports.base64ToUtf8 = require_utils.base64ToUtf8;
|
|
23
23
|
exports.bigIntReplacer = require_utils.bigIntReplacer;
|
|
24
|
+
exports.bigIntToNumber = require_utils.bigIntToNumber;
|
|
25
|
+
exports.bigIntToString = require_utils.bigIntToString;
|
|
24
26
|
exports.binaryToBase64 = require_utils.binaryToBase64;
|
|
25
27
|
exports.concatUint8Arrays = require_utils.concatUint8Arrays;
|
|
26
28
|
exports.cosmosSdkDecToBigNumber = require_utils.cosmosSdkDecToBigNumber;
|
package/dist/cjs/utils.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./tx_pb-
|
|
2
|
-
import "./BaseGrpcConsumer-
|
|
3
|
-
import "./index-
|
|
4
|
-
import "./any_pb-
|
|
5
|
-
import { $c as
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, binaryToBase64, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
|
|
1
|
+
import "./tx_pb-D-cNmrlO.cjs";
|
|
2
|
+
import "./BaseGrpcConsumer-Vvj4lzyS.cjs";
|
|
3
|
+
import "./index-lRWP4rKg.cjs";
|
|
4
|
+
import "./any_pb-CutLnOUR.cjs";
|
|
5
|
+
import { $c as grpcPagingToPagingV2, $l as derivativePriceToChainPrice, $u as ripemd160, Al as getInjectiveAddress, Au as isBrowser, Bl as cosmosSdkDecToBigNumber, Bu as SignTypedDataVersionV4, Cl as uint8ArrayToHex, Cu as spotQuantityToChainQuantityToFixed, Dl as getChecksumAddress, Du as getErrorMessage, El as getAddressFromInjectiveAddress, Eu as bigIntToString, Fl as getDerivativeMarketDecimals, Fu as objectToJson, Gl as denomAmountToChainDenomAmountToFixed, Gu as domainHash, Hl as denomAmountFromChainDenomAmountToFixed, Hu as TypedDataUtilsSanitizeData, Il as getDerivativeMarketTensMultiplier, Iu as protoObjectToJson, Jl as derivativeMarginFromChainMarginToFixed, Ju as privateKeyHashToPublicKey, Kl as denomAmountToGrpcChainDenomAmount, Ku as hashToHex, Ll as getSpotMarketDecimals, Lu as safeBigIntStringify, Ml as getSubaccountId, Mu as isNode, Nl as isCw20ContractAddress, Nu as isReactNative, Ol as getDefaultSubaccountId, Ou as grpcCoinToUiCoin, Pl as removeHexPrefix, Pu as isServerSide, Qc as grpcPagingToPaging, Ql as derivativePriceFromChainPriceToFixed, Qu as publicKeyToAddress, Rl as getSpotMarketTensMultiplier, Ru as sortObjectByKeys, Sl as uint8ArrayToBase64, Su as spotQuantityToChainQuantity, Tl as addHexPrefix, Tu as bigIntToNumber, Ul as denomAmountFromGrpcChainDenomAmount, Uu as TypedMessageV4, Vl as denomAmountFromChainDenomAmount, Vu as TypedDataUtilsHashStruct, Wl as denomAmountToChainDenomAmount, Wu as decompressPubKey, Xc as fetchAllWithPagination, Xl as derivativeMarginToChainMarginToFixed, Xu as privateKeyToPublicKey, Yc as recoverTypedSignaturePubKey, Yl as derivativeMarginToChainMargin, Yu as privateKeyHashToPublicKeyBase64, Zc as grpcPaginationToPagination, Zl as derivativePriceFromChainPrice, Zu as privateKeyToPublicKeyBase64, _l as hexToBuff, _u as spotPriceFromChainPriceToFixed, ad as GrpcWebFetchTransport, al as BECH32_ADDR_VAL_PREFIX, au as formatAmountToAllowableAmount, bl as toBase64, bu as spotQuantityFromChainQuantity, cd as makeTimeoutTimestampInNs, cl as BECH32_PUBKEY_VAL_PREFIX, cu as formatNumberToAllowableTensMultiplier, dd as protobufTimestampToUnixSeconds, dl as base64ToUtf8, du as getExactDecimalsFromNumber, ed as sanitizeTypedData, el as pageRequestToGrpcPageRequestV2, eu as derivativePriceToChainPriceToFixed, fl as binaryToBase64, fu as getSignificantDecimalsFromNumber, gl as hexToBase64, gu as spotPriceFromChainPrice, hl as fromUtf8, hu as numberToCosmosSdkDecString, id as getGrpcWebTransport, il as BECH32_ADDR_CONS_PREFIX, iu as derivativeQuantityToChainQuantityToFixed, jl as getInjectiveAddressFromSubaccountId, ju as isJsonString, kl as getEthereumAddress, ku as hexToNumber, ld as protobufTimestampToDate, ll as DEFAULT_DERIVATION_PATH, lu as formatPriceToAllowableDecimals, ml as fromBase64, mu as isNumber, nd as parseCoins, nl as paginationUint8ArrayToString, nu as derivativeQuantityFromChainQuantityToFixed, od as getGasPriceBasedOnMessage, ol as BECH32_PUBKEY_ACC_PREFIX, ou as formatAmountToAllowableDecimals, pl as concatUint8Arrays, pu as getTensMultiplier, ql as derivativeMarginFromChainMargin, qu as messageHash, rd as ofacList, rl as BECH32_ADDR_ACC_PREFIX, ru as derivativeQuantityToChainQuantity, sd as makeTimeoutTimestamp, sl as BECH32_PUBKEY_CONS_PREFIX, su as formatNumberToAllowableDecimals, td as sha256, tl as paginationRequestFromPagination, tu as derivativeQuantityFromChainQuantity, ud as protobufTimestampToUnixMs, ul as base64ToUint8Array, uu as formatPriceToAllowablePrice, vl as hexToUint8Array, vu as spotPriceToChainPrice, wl as uint8ArrayToString, wu as bigIntReplacer, xl as toUtf8, xu as spotQuantityFromChainQuantityToFixed, yl as stringToUint8Array, yu as spotPriceToChainPriceToFixed, zl as amountToCosmosSdkDecAmount, zu as sortObjectByKeysWithReduce } from "./index-DemZnO3c.cjs";
|
|
6
|
+
import "./index-DWbxb1AB.cjs";
|
|
7
|
+
import "./index-DjRtDAy5.cjs";
|
|
8
|
+
import "./index-CO3Y9drx.cjs";
|
|
9
|
+
import "./index-CGvISJoE.cjs";
|
|
10
|
+
export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
2
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
2
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-BTWyD665.js";
|
|
3
3
|
import { IndexerErrorModule } from "@injectivelabs/exceptions";
|
|
4
4
|
import * as PointsSvcPb from "@injectivelabs/abacus-proto-ts-v2/generated/points_svc_pb";
|
|
5
5
|
import { PointsSvcClient } from "@injectivelabs/abacus-proto-ts-v2/generated/points_svc_pb.client";
|
|
@@ -1805,8 +1805,20 @@ declare class BaseGrpcConsumer {
|
|
|
1805
1805
|
*/
|
|
1806
1806
|
protected retry<TResponse>(grpcCall: () => Promise<TResponse>, retries?: number, delay?: number): Promise<TResponse>;
|
|
1807
1807
|
/**
|
|
1808
|
-
*
|
|
1809
|
-
*
|
|
1808
|
+
* Extracts the ABCI error code from a gRPC error message.
|
|
1809
|
+
* Chain errors contain patterns like: {key:"ABCICode" value:"100"}
|
|
1810
|
+
*/
|
|
1811
|
+
private getABCICodeFromMessage;
|
|
1812
|
+
/**
|
|
1813
|
+
* Extracts the codespace/module from a gRPC error message.
|
|
1814
|
+
* Chain errors contain patterns like: {key:"Codespace" value:"exchange"}
|
|
1815
|
+
*/
|
|
1816
|
+
private getCodespaceFromMessage;
|
|
1817
|
+
/**
|
|
1818
|
+
* Centralized error handler for gRPC calls.
|
|
1819
|
+
* When the error contains chain error details (ABCI code and codespace),
|
|
1820
|
+
* throws a TransactionException which will map the error to a user-friendly message.
|
|
1821
|
+
* Otherwise throws a GrpcUnaryRequestException for generic gRPC errors.
|
|
1810
1822
|
*/
|
|
1811
1823
|
protected handleGrpcError(e: unknown, context: string): never;
|
|
1812
1824
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
2
2
|
import { n as getGrpcWebTransport } from "./grpc-lYZqzL0k.js";
|
|
3
|
-
import { GrpcUnaryRequestException, UnspecifiedErrorCode, grpcErrorCodeToErrorCode } from "@injectivelabs/exceptions";
|
|
3
|
+
import { GrpcUnaryRequestException, TransactionException, UnspecifiedErrorCode, grpcErrorCodeToErrorCode } from "@injectivelabs/exceptions";
|
|
4
4
|
import { RpcError } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/client/base/GrpcWebRpcTransport.ts
|
|
@@ -79,16 +79,57 @@ var BaseGrpcConsumer = class {
|
|
|
79
79
|
return retryGrpcCall();
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* Extracts the ABCI error code from a gRPC error message.
|
|
83
|
+
* Chain errors contain patterns like: {key:"ABCICode" value:"100"}
|
|
84
|
+
*/
|
|
85
|
+
getABCICodeFromMessage(message) {
|
|
86
|
+
const ABCICode = /{key:"ABCICode"[ \t]+value:"(.*?)"}/g.exec(message);
|
|
87
|
+
if (!ABCICode || ABCICode.length < 2) return;
|
|
88
|
+
return Number(ABCICode[1]);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Extracts the codespace/module from a gRPC error message.
|
|
92
|
+
* Chain errors contain patterns like: {key:"Codespace" value:"exchange"}
|
|
93
|
+
*/
|
|
94
|
+
getCodespaceFromMessage(message) {
|
|
95
|
+
const codespace = /{key:"Codespace"[ \t]+value:"(.*?)"}/g.exec(message);
|
|
96
|
+
if (!codespace || codespace.length < 2) return;
|
|
97
|
+
return codespace[1];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Centralized error handler for gRPC calls.
|
|
101
|
+
* When the error contains chain error details (ABCI code and codespace),
|
|
102
|
+
* throws a TransactionException which will map the error to a user-friendly message.
|
|
103
|
+
* Otherwise throws a GrpcUnaryRequestException for generic gRPC errors.
|
|
84
104
|
*/
|
|
85
105
|
handleGrpcError(e, context) {
|
|
86
|
-
if (e instanceof RpcError)
|
|
87
|
-
|
|
106
|
+
if (e instanceof RpcError) {
|
|
107
|
+
const message$1 = e.message;
|
|
108
|
+
const abciCode$1 = this.getABCICodeFromMessage(message$1);
|
|
109
|
+
const codespace$1 = this.getCodespaceFromMessage(message$1);
|
|
110
|
+
if (abciCode$1 && codespace$1) throw new TransactionException(new Error(message$1), {
|
|
111
|
+
code: grpcErrorCodeToErrorCode(Number(e.code)),
|
|
112
|
+
context,
|
|
113
|
+
contextModule: codespace$1,
|
|
114
|
+
contextCode: abciCode$1
|
|
115
|
+
});
|
|
116
|
+
throw new GrpcUnaryRequestException(new Error(message$1), {
|
|
117
|
+
code: grpcErrorCodeToErrorCode(Number(e.code)),
|
|
118
|
+
context,
|
|
119
|
+
contextModule: this.module
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
const error = e;
|
|
123
|
+
const message = (error === null || error === void 0 ? void 0 : error.message) || "";
|
|
124
|
+
const abciCode = this.getABCICodeFromMessage(message);
|
|
125
|
+
const codespace = this.getCodespaceFromMessage(message);
|
|
126
|
+
if (abciCode && codespace) throw new TransactionException(error, {
|
|
127
|
+
code: UnspecifiedErrorCode,
|
|
88
128
|
context,
|
|
89
|
-
contextModule:
|
|
129
|
+
contextModule: codespace,
|
|
130
|
+
contextCode: abciCode
|
|
90
131
|
});
|
|
91
|
-
throw new GrpcUnaryRequestException(
|
|
132
|
+
throw new GrpcUnaryRequestException(error, {
|
|
92
133
|
code: UnspecifiedErrorCode,
|
|
93
134
|
context,
|
|
94
135
|
contextModule: this.module
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as denomAmountFromGrpcChainDenomAmount } from "./utils-
|
|
1
|
+
import { O as denomAmountFromGrpcChainDenomAmount } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { o as ChainModule } from "./ChainRestTendermintApi-
|
|
4
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
3
|
+
import { o as ChainModule } from "./ChainRestTendermintApi-BT_yOkAV.js";
|
|
4
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-BTWyD665.js";
|
|
5
5
|
import { toHumanReadable } from "@injectivelabs/utils";
|
|
6
6
|
import * as InjectiveExchangeV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb";
|
|
7
7
|
import { QueryClient } from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb.client";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Jt as uint8ArrayToString, Kt as uint8ArrayToBase64, l as ChainGrpcCommonTransformer } from "./utils-
|
|
1
|
+
import { Jt as uint8ArrayToString, Kt as uint8ArrayToBase64, l as ChainGrpcCommonTransformer } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-
|
|
3
|
+
import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-BTWyD665.js";
|
|
4
4
|
import { t as BaseRestConsumer } from "./BaseRestConsumer-rK4eS4W8.js";
|
|
5
5
|
import { ChainErrorModule, HttpRequestException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
6
6
|
import * as InjectiveCryptoV1Beta1Ethsecp256k1KeysPb from "@injectivelabs/core-proto-ts-v2/generated/injective/crypto/v1beta1/ethsecp256k1/keys_pb";
|
package/dist/esm/{DirectEthSecp256k1Wallet-a9KiF9fA.js → DirectEthSecp256k1Wallet-BqxC1b40.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Kt as uint8ArrayToBase64, Pt as base64ToUint8Array, qt as uint8ArrayToHex } from "./utils-
|
|
1
|
+
import { Kt as uint8ArrayToBase64, Pt as base64ToUint8Array, qt as uint8ArrayToHex } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { O as getPublicKey, P as PublicKey, n as PrivateKey } from "./accounts-
|
|
3
|
+
import { O as getPublicKey, P as PublicKey, n as PrivateKey } from "./accounts-C5HEaz0B.js";
|
|
4
4
|
import * as CosmosBaseV1Beta1CoinPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb";
|
|
5
5
|
import * as InjectiveTypesV1Beta1AccountPb from "@injectivelabs/core-proto-ts-v2/generated/injective/types/v1beta1/account_pb";
|
|
6
6
|
import * as IbcCoreClientV1ClientPb from "@injectivelabs/core-proto-ts-v2/generated/ibc/core/client/v1/client_pb";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as toBase64,
|
|
1
|
+
import { Wt as toBase64, cn as safeBigIntStringify, zt as fromUtf8 } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
3
|
import { t as MsgBase } from "./MsgBase-BkRgVbdY.js";
|
|
4
4
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Pt as base64ToUint8Array, Ut as stringToUint8Array,
|
|
1
|
+
import { Pt as base64ToUint8Array, Ut as stringToUint8Array, cn as safeBigIntStringify, qt as uint8ArrayToHex, t as recoverTypedSignaturePubKey } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-
|
|
3
|
+
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-BTZzA_Eg.js";
|
|
4
4
|
import * as CosmosTxV1Beta1TxPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb";
|
|
5
5
|
import { DEFAULT_BRIDGE_FEE_DENOM, DEFAULT_BRIDGE_FEE_PRICE, DEFAULT_EXCHANGE_LIMIT, DEFAULT_GAS_LIMIT } from "@injectivelabs/utils";
|
|
6
6
|
import { ErrorType, IndexerErrorModule, TransactionException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ht as hexToUint8Array, It as binaryToBase64, Kt as uint8ArrayToBase64, Lt as concatUint8Arrays, Pt as base64ToUint8Array,
|
|
1
|
+
import { Ht as hexToUint8Array, It as binaryToBase64, Kt as uint8ArrayToBase64, Lt as concatUint8Arrays, Pt as base64ToUint8Array, Zt as bigIntToString, cn as safeBigIntStringify, et as numberToCosmosSdkDecString, ht as messageHash, pt as domainHash, zt as fromUtf8 } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { A as createAny, F as Address } from "./accounts-
|
|
3
|
+
import { A as createAny, F as Address } from "./accounts-C5HEaz0B.js";
|
|
4
4
|
import { n as prepareSignBytes, t as MsgBase } from "./MsgBase-BkRgVbdY.js";
|
|
5
|
-
import { t as ChainGrpcExchangeApi } from "./ChainGrpcExchangeApi-
|
|
6
|
-
import { a as dataToExecData$1, i as ExecArgBase } from "./ExecArgNeptuneWithdraw-
|
|
5
|
+
import { t as ChainGrpcExchangeApi } from "./ChainGrpcExchangeApi-DqdCst2Z.js";
|
|
6
|
+
import { a as dataToExecData$1, i as ExecArgBase } from "./ExecArgNeptuneWithdraw-uLf3HttI.js";
|
|
7
7
|
import { keccak256 } from "viem";
|
|
8
8
|
import { BigNumber, DEFAULT_BRIDGE_FEE_AMOUNT, DEFAULT_BRIDGE_FEE_DENOM, toChainFormat, toPascalCase } from "@injectivelabs/utils";
|
|
9
9
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
@@ -370,13 +370,14 @@ const createBinaryOptionOrder = (args) => {
|
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
372
|
const createMsgAndCancelOrders = (params) => {
|
|
373
|
+
const hasCancelAll = params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0 || params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0 || params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0;
|
|
373
374
|
const message = InjectiveExchangeV1Beta1TxPb.MsgBatchUpdateOrders.create({
|
|
374
375
|
sender: params.injectiveAddress,
|
|
375
|
-
subaccountId: params.subaccountId
|
|
376
|
+
...hasCancelAll && { subaccountId: params.subaccountId }
|
|
376
377
|
});
|
|
377
|
-
if (params.spotMarketIdsToCancelAll) message.spotMarketIdsToCancelAll = params.spotMarketIdsToCancelAll;
|
|
378
|
-
if (params.derivativeMarketIdsToCancelAll) message.derivativeMarketIdsToCancelAll = params.derivativeMarketIdsToCancelAll;
|
|
379
|
-
if (params.binaryOptionsMarketIdsToCancelAll) message.binaryOptionsMarketIdsToCancelAll = params.binaryOptionsMarketIdsToCancelAll;
|
|
378
|
+
if (params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0) message.spotMarketIdsToCancelAll = params.spotMarketIdsToCancelAll;
|
|
379
|
+
if (params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0) message.derivativeMarketIdsToCancelAll = params.derivativeMarketIdsToCancelAll;
|
|
380
|
+
if (params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0) message.binaryOptionsMarketIdsToCancelAll = params.binaryOptionsMarketIdsToCancelAll;
|
|
380
381
|
if (params.spotOrdersToCancel) message.spotOrdersToCancel = params.spotOrdersToCancel.map(({ marketId, subaccountId, orderHash, cid }) => {
|
|
381
382
|
return InjectiveExchangeV1Beta1TxPb.OrderData.create({
|
|
382
383
|
marketId,
|
|
@@ -3857,7 +3858,7 @@ var MsgSubmitProposalExpiryFuturesMarketLaunch = class MsgSubmitProposalExpiryFu
|
|
|
3857
3858
|
type: "exchange/ExpiryFuturesMarketLaunchProposal",
|
|
3858
3859
|
value: {
|
|
3859
3860
|
...value.content.value,
|
|
3860
|
-
expiry: params.market.expiry
|
|
3861
|
+
expiry: bigIntToString(params.market.expiry),
|
|
3861
3862
|
initial_margin_ratio: toChainFormat(params.market.initialMarginRatio).toFixed(),
|
|
3862
3863
|
maintenance_margin_ratio: toChainFormat(params.market.maintenanceMarginRatio).toFixed(),
|
|
3863
3864
|
maker_fee_rate: toChainFormat(params.market.makerFeeRate).toFixed(),
|
|
@@ -4042,6 +4043,16 @@ var MsgTransfer = class MsgTransfer extends MsgBase {
|
|
|
4042
4043
|
|
|
4043
4044
|
//#endregion
|
|
4044
4045
|
//#region src/core/modules/bank/msgs/MsgSend.ts
|
|
4046
|
+
/**
|
|
4047
|
+
* @category Messages
|
|
4048
|
+
}[]
|
|
4049
|
+
srcInjectiveAddress: string
|
|
4050
|
+
dstInjectiveAddress: string
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
export type Proto = CosmosBankV1Beta1TxPb.MsgSend
|
|
4054
|
+
}
|
|
4055
|
+
|
|
4045
4056
|
/**
|
|
4046
4057
|
* @category Messages
|
|
4047
4058
|
*/
|
|
@@ -7094,7 +7105,7 @@ var MsgFundCommunityPool = class MsgFundCommunityPool extends MsgBase {
|
|
|
7094
7105
|
}
|
|
7095
7106
|
toProto() {
|
|
7096
7107
|
const { params } = this;
|
|
7097
|
-
const coins = params.amount.map((amount) => {
|
|
7108
|
+
const coins = (Array.isArray(params.amount) ? params.amount : [params.amount]).map((amount) => {
|
|
7098
7109
|
return CosmosBaseV1Beta1CoinPb.Coin.create({
|
|
7099
7110
|
denom: amount.denom,
|
|
7100
7111
|
amount: amount.amount
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
2
2
|
import { r as protobufTimestampToDate } from "./time-DYEqYFao.js";
|
|
3
|
-
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-
|
|
3
|
+
import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-BTZzA_Eg.js";
|
|
4
4
|
import { IndexerErrorModule } from "@injectivelabs/exceptions";
|
|
5
5
|
import * as DmmPb from "@injectivelabs/olp-proto-ts-v2/generated/dmm_pb";
|
|
6
6
|
import { InjectiveDmmV2RPCClient } from "@injectivelabs/olp-proto-ts-v2/generated/dmm_pb.client";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Gt as toUtf8, It as binaryToBase64, Rt as fromBase64, Wt as toBase64 } from "./utils-
|
|
1
|
+
import { Gt as toUtf8, It as binaryToBase64, Rt as fromBase64, Wt as toBase64 } from "./utils-BFBu_LnJ.js";
|
|
2
2
|
import { t as _defineProperty } from "./defineProperty-Bq6QU9Te.js";
|
|
3
|
-
import { h as ChainGrpcWasmApi } from "./chain-
|
|
4
|
-
import { n as MsgExecuteContractCompat, r as ExecArgNeptuneDeposit, t as ExecArgNeptuneWithdraw } from "./ExecArgNeptuneWithdraw-
|
|
3
|
+
import { h as ChainGrpcWasmApi } from "./chain-CHX5uSpc.js";
|
|
4
|
+
import { n as MsgExecuteContractCompat, r as ExecArgNeptuneDeposit, t as ExecArgNeptuneWithdraw } from "./ExecArgNeptuneWithdraw-uLf3HttI.js";
|
|
5
5
|
import { GeneralException } from "@injectivelabs/exceptions";
|
|
6
6
|
import { Network, getNetworkEndpoints, isMainnet } from "@injectivelabs/networks";
|
|
7
7
|
|