@injectivelabs/sdk-ts 1.20.67 → 1.21.0-alpha.0

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.
Files changed (110) hide show
  1. package/README.md +25 -0
  2. package/dist/cjs/{BaseGrpcConsumer-DVDjYQks.d.cts → BaseGrpcConsumer-CRYBdXm9.d.cts} +1 -1
  3. package/dist/cjs/{ChainGrpcExchangeApi-DEoO0jhR.cjs → ChainGrpcExchangeApi-D2diaVMC.cjs} +2 -73
  4. package/dist/cjs/{ChainRestTendermintApi-BkHzZIRZ.cjs → ChainRestTendermintApi-BSGN-XV3.cjs} +2 -2
  5. package/dist/cjs/{DirectEthSecp256k1Wallet-DfvrKuF8.cjs → DirectEthSecp256k1Wallet-CsOHUTrG.cjs} +1 -1
  6. package/dist/cjs/{ExecArgNeptuneWithdraw-BJHAQJlT.cjs → ExecArgNeptuneWithdraw-CHK2kF7l.cjs} +2 -2
  7. package/dist/cjs/{IndexerGrpcWeb3GwApi-C9VUHKOj.cjs → IndexerGrpcWeb3GwApi-BaCa4M1S.cjs} +4 -2
  8. package/dist/cjs/{MsgBase-jNBijPHQ.cjs → MsgBase-Dt0pa34P.cjs} +93 -36
  9. package/dist/cjs/{MsgSetDenomMetadata-Did-0k6O.cjs → MsgSetDenomMetadata-BKnmW-f2.cjs} +3361 -4248
  10. package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-B3pcJep3.cjs → QueryTradingStrategyContractTotalStrategies-BiIzwy-H.cjs} +2 -2
  11. package/dist/cjs/{StreamManagerV2-DRWQ5QH0.cjs → StreamManagerV2-DftPsZ02.cjs} +2 -2
  12. package/dist/cjs/{accounts-BeV7wTTf.cjs → accounts-C6QIpAkP.cjs} +22 -2
  13. package/dist/cjs/{chain-B3HLDM4b.cjs → chain-D4Z7pAD0.cjs} +120 -206
  14. package/dist/cjs/client/abacus.d.cts +5 -5
  15. package/dist/cjs/client/chain.cjs +4 -5
  16. package/dist/cjs/client/chain.d.cts +12 -12
  17. package/dist/cjs/client/indexer.cjs +3 -3
  18. package/dist/cjs/client/indexer.d.cts +12 -12
  19. package/dist/cjs/client/olp.d.cts +5 -5
  20. package/dist/cjs/client/platformServices.d.cts +5 -5
  21. package/dist/cjs/client/tcAbacus.d.cts +5 -5
  22. package/dist/cjs/client/wasm.cjs +7 -7
  23. package/dist/cjs/client/wasm.d.cts +4 -4
  24. package/dist/cjs/core/accounts.cjs +3 -3
  25. package/dist/cjs/core/accounts.d.cts +11 -11
  26. package/dist/cjs/core/modules.cjs +15 -23
  27. package/dist/cjs/core/modules.d.cts +12 -12
  28. package/dist/cjs/core/tx.cjs +7 -6
  29. package/dist/cjs/core/tx.d.cts +12 -12
  30. package/dist/cjs/cosmjs.cjs +7 -7
  31. package/dist/cjs/cosmjs.d.cts +2 -2
  32. package/dist/cjs/exports.cjs +7 -7
  33. package/dist/cjs/exports.d.cts +2 -2
  34. package/dist/cjs/{index-BtwpJOwb.d.cts → index-5s92DIT3.d.cts} +1 -1
  35. package/dist/{esm/index-B4-RPlmi.d.ts → cjs/index-B7LT8B2g.d.cts} +25673 -26257
  36. package/dist/cjs/{index-CfGvB4c1.d.cts → index-BNqPdwIL.d.cts} +1 -1
  37. package/dist/cjs/{index-iLM1noAM.d.cts → index-ByaAgMci.d.cts} +1 -1
  38. package/dist/{esm/index-CTEvW2RT.d.ts → cjs/index-CBEIfBLI.d.cts} +34 -84
  39. package/dist/{esm/index--I7NYLY5.d.ts → cjs/index-CKFM2Zot.d.cts} +35 -350
  40. package/dist/cjs/{index-Beskv_ry.d.cts → index-CcNtmgW5.d.cts} +2 -2
  41. package/dist/cjs/{index-Bv-5dlo_.d.cts → index-DzI7PClu.d.cts} +1 -1
  42. package/dist/cjs/{index-CY06tllr.d.cts → index-fb-zX9fQ.d.cts} +1 -1
  43. package/dist/cjs/index.cjs +19 -27
  44. package/dist/cjs/index.d.cts +12 -12
  45. package/dist/{esm/light-BFGvKXwS.d.ts → cjs/light-Dyi8qJP_.d.cts} +3 -0
  46. package/dist/cjs/proto/cosmos-tx.d.cts +1 -1
  47. package/dist/cjs/service.cjs +1 -1
  48. package/dist/cjs/service.d.cts +4 -4
  49. package/dist/cjs/{tx-C8efeicO.cjs → tx-U8W1g3W8.cjs} +4 -4
  50. package/dist/cjs/{tx_pb-DSDGNMKS.d.cts → tx_pb-rX24LEP1.d.cts} +58 -107
  51. package/dist/cjs/types/light.d.cts +1 -1
  52. package/dist/cjs/types.d.cts +3 -3
  53. package/dist/cjs/{utils-DZoXzNOj.cjs → utils-CjlVVckg.cjs} +14 -24
  54. package/dist/cjs/utils.cjs +1 -1
  55. package/dist/cjs/utils.d.cts +11 -11
  56. package/dist/esm/{BaseGrpcConsumer-DzOno3EM.d.ts → BaseGrpcConsumer-BfhC9A-3.d.ts} +1 -1
  57. package/dist/esm/{ChainGrpcExchangeApi-N27wNM6N.js → ChainGrpcExchangeApi-YNNZqhBt.js} +2 -73
  58. package/dist/esm/{ChainRestTendermintApi-CfvwCl2L.js → ChainRestTendermintApi-DGLg38SO.js} +2 -2
  59. package/dist/esm/{DirectEthSecp256k1Wallet-Cq8NYHKd.js → DirectEthSecp256k1Wallet-mXW_mPaC.js} +1 -1
  60. package/dist/esm/{ExecArgNeptuneWithdraw-BRrsGhPy.js → ExecArgNeptuneWithdraw-CpaH5nlc.js} +2 -2
  61. package/dist/esm/{IndexerGrpcWeb3GwApi-CG_ZevUX.js → IndexerGrpcWeb3GwApi-BaQI4k4D.js} +4 -2
  62. package/dist/esm/{MsgBase-BC3GNddA.js → MsgBase-D3okqFzc.js} +88 -37
  63. package/dist/esm/{MsgSetDenomMetadata-B7IN-5j2.js → MsgSetDenomMetadata-snSM4b_f.js} +900 -1738
  64. package/dist/esm/{QueryTradingStrategyContractTotalStrategies-DNbF4zfF.js → QueryTradingStrategyContractTotalStrategies-C5T8K9t0.js} +2 -2
  65. package/dist/esm/{StreamManagerV2-IyJuIDxz.js → StreamManagerV2-DayR_Wxb.js} +2 -2
  66. package/dist/esm/{accounts-D2h6m8BF.js → accounts-BNTm8lj5.js} +22 -2
  67. package/dist/esm/{chain-cb8a0SyE.js → chain-Bx2cRWCa.js} +141 -220
  68. package/dist/esm/client/abacus.d.ts +5 -5
  69. package/dist/esm/client/chain.d.ts +12 -12
  70. package/dist/esm/client/chain.js +5 -5
  71. package/dist/esm/client/indexer.d.ts +12 -12
  72. package/dist/esm/client/indexer.js +3 -3
  73. package/dist/esm/client/olp.d.ts +5 -5
  74. package/dist/esm/client/platformServices.d.ts +5 -5
  75. package/dist/esm/client/tcAbacus.d.ts +5 -5
  76. package/dist/esm/client/wasm.d.ts +4 -4
  77. package/dist/esm/client/wasm.js +7 -7
  78. package/dist/esm/core/accounts.d.ts +11 -11
  79. package/dist/esm/core/accounts.js +3 -3
  80. package/dist/esm/core/modules.d.ts +12 -12
  81. package/dist/esm/core/modules.js +10 -10
  82. package/dist/esm/core/tx.d.ts +12 -12
  83. package/dist/esm/core/tx.js +7 -7
  84. package/dist/esm/cosmjs.d.ts +2 -2
  85. package/dist/esm/cosmjs.js +7 -7
  86. package/dist/esm/exports.d.ts +2 -2
  87. package/dist/esm/exports.js +7 -7
  88. package/dist/esm/{index-DG-I0T6b.d.ts → index-BLlbbiGL.d.ts} +1 -1
  89. package/dist/{cjs/index-B8XGu-SI.d.cts → esm/index-BeikP7Cq.d.ts} +35 -350
  90. package/dist/esm/{index-B2tw9CHl.d.ts → index-CQGymzVV.d.ts} +1 -1
  91. package/dist/esm/{index-BtOljr6v.d.ts → index-DhhaPvLx.d.ts} +1 -1
  92. package/dist/{cjs/index-4IPdy0bE.d.cts → esm/index-DjAbTs6N.d.ts} +34 -84
  93. package/dist/{cjs/index-Zlg1uSyt.d.cts → esm/index-DyuSCKzD.d.ts} +25673 -26257
  94. package/dist/esm/{index-CJxCX4wl.d.ts → index-KPxccQ6b.d.ts} +1 -1
  95. package/dist/esm/{index-BHELcAAg.d.ts → index-SCzTXWme.d.ts} +2 -2
  96. package/dist/esm/{index-OpqhooKr.d.ts → index-c0wEF5XN.d.ts} +1 -1
  97. package/dist/esm/index.d.ts +12 -12
  98. package/dist/esm/index.js +13 -13
  99. package/dist/{cjs/light-B-3BDUJ7.d.cts → esm/light-cJI0PSqu.d.ts} +3 -0
  100. package/dist/esm/proto/cosmos-tx.d.ts +1 -1
  101. package/dist/esm/service.d.ts +4 -4
  102. package/dist/esm/service.js +1 -1
  103. package/dist/esm/{tx-C9bEwXA1.js → tx-COcI7kYx.js} +4 -4
  104. package/dist/esm/{tx_pb-Blty6MDM.d.ts → tx_pb-pR8s8ZkE.d.ts} +58 -107
  105. package/dist/esm/types/light.d.ts +1 -1
  106. package/dist/esm/types.d.ts +3 -3
  107. package/dist/esm/{utils-Cs0fKB6M.js → utils-Bprop_i9.js} +14 -24
  108. package/dist/esm/utils.d.ts +11 -11
  109. package/dist/esm/utils.js +1 -1
  110. package/package.json +6 -6
@@ -1,7 +1,7 @@
1
1
  import { a as fromBase64, d as toBase64, f as toUtf8, r as binaryToBase64 } from "./encoding-light-BpntDob-.js";
2
2
  import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
3
- import { g as ChainGrpcWasmApi } from "./chain-cb8a0SyE.js";
4
- import { n as MsgExecuteContractCompat, r as ExecArgNeptuneDeposit, t as ExecArgNeptuneWithdraw } from "./ExecArgNeptuneWithdraw-BRrsGhPy.js";
3
+ import { h as ChainGrpcWasmApi } from "./chain-Bx2cRWCa.js";
4
+ import { n as MsgExecuteContractCompat, r as ExecArgNeptuneDeposit, t as ExecArgNeptuneWithdraw } from "./ExecArgNeptuneWithdraw-CpaH5nlc.js";
5
5
  import { isAbortError, throwIfAborted } from "@injectivelabs/utils";
6
6
  import { GeneralException } from "@injectivelabs/exceptions";
7
7
  import { Network, getNetworkEndpoints, isMainnet } from "@injectivelabs/networks";
@@ -1,12 +1,12 @@
1
1
  import { h as uint8ArrayToString } from "./encoding-light-BpntDob-.js";
2
2
  import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
3
- import { Tt as isJsonString, a as fetchAllWithTokenPagination, bt as bigIntToString, c as grpcPagingToPagingV2, yt as bigIntToNumber } from "./utils-Cs0fKB6M.js";
3
+ import { Tt as isJsonString, a as fetchAllWithTokenPagination, bt as bigIntToString, c as grpcPagingToPagingV2, yt as bigIntToNumber } from "./utils-Bprop_i9.js";
4
4
  import { d as StreamDisconnectReason, f as StreamEvent, g as TradeDirection, h as TokenVerification, i as GrpcStatusCode, l as OrderState, m as TokenType, p as StreamOperation } from "./light-BUFhVek8.js";
5
5
  import { t as StreamState } from "./stream-AVOxjM-h.js";
6
6
  import { n as GrpcWebRpcTransport } from "./BaseGrpcConsumer-lXuwo8W3.js";
7
7
  import { t as BaseIndexerGrpcConsumer } from "./BaseIndexerGrpcConsumer-DIZk8nSX.js";
8
8
  import { t as BaseRestConsumer } from "./BaseRestConsumer-S2OhA510.js";
9
- import { h as WsState, i as IndexerModule, m as WsDisconnectReason, p as GrpcDecodeError, r as closeWebSocketSafely } from "./IndexerGrpcWeb3GwApi-CG_ZevUX.js";
9
+ import { h as WsState, i as IndexerModule, m as WsDisconnectReason, p as GrpcDecodeError, r as closeWebSocketSafely } from "./IndexerGrpcWeb3GwApi-BaQI4k4D.js";
10
10
  import { AbortError, BigNumber, combineAbortSignals, createAbortError, isAbortError, throwIfAborted, toBigNumber, toHumanReadable } from "@injectivelabs/utils";
11
11
  import { GeneralException, GrpcErrorCode, GrpcUnaryRequestException, HttpRequestException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
12
12
  import * as InjectiveRFQExchangeRpcPb from "@injectivelabs/indexer-proto-ts-v2/generated/injective_rfq_rpc_pb";
@@ -1,9 +1,9 @@
1
1
  import { f as toUtf8, l as hexToUint8Array, m as uint8ArrayToHex, p as uint8ArrayToBase64, t as base64ToUint8Array, u as stringToUint8Array } from "./encoding-light-BpntDob-.js";
2
2
  import { i as BECH32_PUBKEY_ACC_PREFIX, n as BECH32_ADDR_CONS_PREFIX, r as BECH32_ADDR_VAL_PREFIX, s as DEFAULT_DERIVATION_PATH, t as BECH32_ADDR_ACC_PREFIX } from "./constants-J9ftgKqC.js";
3
3
  import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
4
- import { J as numberToCosmosSdkDecString, at as TypedDataUtilsSanitizeData, jt as safeBigIntStringify, ot as decompressPubKey, r as recoverTypedSignaturePubKey } from "./utils-Cs0fKB6M.js";
4
+ import { J as numberToCosmosSdkDecString, at as TypedDataUtilsSanitizeData, jt as safeBigIntStringify, ot as decompressPubKey, r as recoverTypedSignaturePubKey } from "./utils-Bprop_i9.js";
5
5
  import { a as getEthereumAddress, o as getInjectiveAddress } from "./address-light-CwLNB73Y.js";
6
- import { t as MsgBase } from "./MsgBase-BC3GNddA.js";
6
+ import { t as MsgBase } from "./MsgBase-D3okqFzc.js";
7
7
  import * as CosmosTxV1Beta1TxPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb";
8
8
  import { hashTypedData, keccak256, toBytes } from "viem";
9
9
  import { DEFAULT_GAS_LIMIT, getDefaultStdFee, getStdFee, toBigNumber, toChainFormat } from "@injectivelabs/utils";
@@ -548,12 +548,32 @@ const getEipTxContext = ({ accountNumber, sequence, fee, timeoutHeight, chainId,
548
548
  };
549
549
  };
550
550
 
551
+ //#endregion
552
+ //#region src/core/tx/eip712/validate.ts
553
+ const EIP712_V1_HINT = "Please use EIP712_v2";
554
+ /** The chain cannot hash a declared v1 field whose Amino value was omitted, or a non-array for an array type. */
555
+ const assertEip712V1Values = (value, types, type = "MsgValue", path = "value") => {
556
+ const fields = types.get(type);
557
+ if (!fields) return;
558
+ for (const field of fields) {
559
+ const fieldPath = `${path}.${field.name}`;
560
+ const fieldValue = typeof value === "object" && value !== null ? value[field.name] : void 0;
561
+ if (fieldValue === void 0 || fieldValue === null) throw new GeneralException(/* @__PURE__ */ new Error(`EIP712_v1 cannot sign an omitted field (${fieldPath}). Please use EIP712_v2`));
562
+ if (field.type.endsWith("[]")) {
563
+ if (!Array.isArray(fieldValue)) throw new GeneralException(/* @__PURE__ */ new Error(`EIP712_v1 cannot sign a non-array value for an array field (${fieldPath}). ${EIP712_V1_HINT}`));
564
+ fieldValue.forEach((entry, index) => assertEip712V1Values(entry, types, field.type.slice(0, -2), `${fieldPath}[${index}]`));
565
+ } else assertEip712V1Values(fieldValue, types, field.type, fieldPath);
566
+ }
567
+ };
568
+
551
569
  //#endregion
552
570
  //#region src/core/tx/eip712/eip712.ts
553
571
  const getEip712TypedData = ({ msgs, tx, fee, evmChainId }) => {
554
572
  const messages = Array.isArray(msgs) ? msgs : [msgs];
573
+ messages.forEach((m) => m.assertEip712V1Supported());
555
574
  const eip712Msgs = messages.map((m) => m.toEip712());
556
575
  const eip712MessageTypes = messages[0].toEip712Types();
576
+ eip712Msgs.forEach((message, index) => assertEip712V1Values(message.value, eip712MessageTypes, "MsgValue", `msgs[${index}].value`));
557
577
  return {
558
578
  ...getTypesIncludingFeeOptions({
559
579
  fee,
@@ -1,8 +1,8 @@
1
1
  import { d as toBase64, h as uint8ArrayToString, o as fromUtf8, p as uint8ArrayToBase64, t as base64ToUint8Array } from "./encoding-light-BpntDob-.js";
2
2
  import { t as _defineProperty } from "./defineProperty-BwBXXd7t.js";
3
- import { Bt as protobufTimestampToDate, Ht as protobufTimestampToUnixSeconds, S as denomAmountFromGrpcChainDenomAmount, bt as bigIntToString, f as ChainGrpcCommonTransformer, i as fetchAllWithPagination } from "./utils-Cs0fKB6M.js";
3
+ import { Bt as protobufTimestampToDate, Ht as protobufTimestampToUnixSeconds, S as denomAmountFromGrpcChainDenomAmount, bt as bigIntToString, f as ChainGrpcCommonTransformer, i as fetchAllWithPagination } from "./utils-Bprop_i9.js";
4
4
  import { n as bytesToHex } from "./address-light-CwLNB73Y.js";
5
- import { o as ChainModule, p as BondStatus } from "./ChainRestTendermintApi-CfvwCl2L.js";
5
+ import { o as ChainModule, p as BondStatus } from "./ChainRestTendermintApi-DGLg38SO.js";
6
6
  import { t as BaseGrpcConsumer } from "./BaseGrpcConsumer-lXuwo8W3.js";
7
7
  import { t as BaseRestConsumer } from "./BaseRestConsumer-S2OhA510.js";
8
8
  import { isAbortError, throwIfAborted, toBigNumber, toHumanReadable } from "@injectivelabs/utils";
@@ -24,28 +24,26 @@ import * as CosmosAuthzV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/gene
24
24
  import { QueryClient as QueryClient$6 } from "@injectivelabs/core-proto-ts-v2/generated/cosmos/authz/v1beta1/query_pb.client";
25
25
  import * as InjectivePeggyV1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/peggy/v1/query_pb";
26
26
  import { QueryClient as QueryClient$7 } from "@injectivelabs/core-proto-ts-v2/generated/injective/peggy/v1/query_pb.client";
27
- import * as InjectiveWasmxV1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/wasmx/v1/query_pb";
28
- import { QueryClient as QueryClient$8 } from "@injectivelabs/core-proto-ts-v2/generated/injective/wasmx/v1/query_pb.client";
29
27
  import * as InjectiveErc20V1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/erc20/v1beta1/query_pb";
30
- import { QueryClient as QueryClient$9 } from "@injectivelabs/core-proto-ts-v2/generated/injective/erc20/v1beta1/query_pb.client";
28
+ import { QueryClient as QueryClient$8 } from "@injectivelabs/core-proto-ts-v2/generated/injective/erc20/v1beta1/query_pb.client";
31
29
  import * as InjectiveOracleV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/query_pb";
32
- import { QueryClient as QueryClient$10 } from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/query_pb.client";
30
+ import { QueryClient as QueryClient$9 } from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/query_pb.client";
33
31
  import * as InjectiveTxFeesV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/txfees/v1beta1/query_pb";
34
- import { QueryClient as QueryClient$11 } from "@injectivelabs/core-proto-ts-v2/generated/injective/txfees/v1beta1/query_pb.client";
32
+ import { QueryClient as QueryClient$10 } from "@injectivelabs/core-proto-ts-v2/generated/injective/txfees/v1beta1/query_pb.client";
35
33
  import * as InjectiveAuctionV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/auction/v1beta1/query_pb";
36
- import { QueryClient as QueryClient$12 } from "@injectivelabs/core-proto-ts-v2/generated/injective/auction/v1beta1/query_pb.client";
34
+ import { QueryClient as QueryClient$11 } from "@injectivelabs/core-proto-ts-v2/generated/injective/auction/v1beta1/query_pb.client";
37
35
  import * as CosmosStakingV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/staking/v1beta1/query_pb";
38
- import { QueryClient as QueryClient$13 } from "@injectivelabs/core-proto-ts-v2/generated/cosmos/staking/v1beta1/query_pb.client";
36
+ import { QueryClient as QueryClient$12 } from "@injectivelabs/core-proto-ts-v2/generated/cosmos/staking/v1beta1/query_pb.client";
39
37
  import * as InjectiveExchangeV2QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/query_pb";
40
- import { QueryClient as QueryClient$14 } from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/query_pb.client";
38
+ import { QueryClient as QueryClient$13 } from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/query_pb.client";
41
39
  import * as InjectivePermissionsV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/permissions/v1beta1/query_pb";
42
- import { QueryClient as QueryClient$15 } from "@injectivelabs/core-proto-ts-v2/generated/injective/permissions/v1beta1/query_pb.client";
40
+ import { QueryClient as QueryClient$14 } from "@injectivelabs/core-proto-ts-v2/generated/injective/permissions/v1beta1/query_pb.client";
43
41
  import * as CosmosDistributionV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/distribution/v1beta1/query_pb";
44
- import { QueryClient as QueryClient$16 } from "@injectivelabs/core-proto-ts-v2/generated/cosmos/distribution/v1beta1/query_pb.client";
42
+ import { QueryClient as QueryClient$15 } from "@injectivelabs/core-proto-ts-v2/generated/cosmos/distribution/v1beta1/query_pb.client";
45
43
  import * as InjectiveTokenFactoryV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/tokenfactory/v1beta1/query_pb";
46
- import { QueryClient as QueryClient$17 } from "@injectivelabs/core-proto-ts-v2/generated/injective/tokenfactory/v1beta1/query_pb.client";
44
+ import { QueryClient as QueryClient$16 } from "@injectivelabs/core-proto-ts-v2/generated/injective/tokenfactory/v1beta1/query_pb.client";
47
45
  import * as InjectiveInsuranceV1Beta1QueryPb from "@injectivelabs/core-proto-ts-v2/generated/injective/insurance/v1beta1/query_pb";
48
- import { QueryClient as QueryClient$18 } from "@injectivelabs/core-proto-ts-v2/generated/injective/insurance/v1beta1/query_pb.client";
46
+ import { QueryClient as QueryClient$17 } from "@injectivelabs/core-proto-ts-v2/generated/injective/insurance/v1beta1/query_pb.client";
49
47
  import { StatusCodes } from "http-status-codes";
50
48
 
51
49
  //#region src/client/chain/transformers/ChainGrpcGovTransformer.ts
@@ -908,49 +906,6 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
908
906
  ttlTimestamp: Number(info.ttlTimestamp)
909
907
  } : void 0;
910
908
  }
911
- static grpcPointsMultiplierToPointsMultiplier(point) {
912
- return {
913
- makerPointsMultiplier: point.makerPointsMultiplier,
914
- takerPointsMultiplier: point.takerPointsMultiplier
915
- };
916
- }
917
- static grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info) {
918
- return info ? {
919
- boostedSpotMarketIdsList: info.boostedSpotMarketIds,
920
- spotMarketMultipliersList: info.spotMarketMultipliers.map(ChainGrpcExchangeTransformerV2.grpcPointsMultiplierToPointsMultiplier),
921
- boostedDerivativeMarketIdsList: info.boostedDerivativeMarketIds,
922
- derivativeMarketMultipliersList: info.derivativeMarketMultipliers.map(ChainGrpcExchangeTransformerV2.grpcPointsMultiplierToPointsMultiplier)
923
- } : void 0;
924
- }
925
- static grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(info) {
926
- return info ? {
927
- campaignDurationSeconds: Number(info.campaignDurationSeconds),
928
- quoteDenomsList: info.quoteDenoms,
929
- tradingRewardBoostInfo: ChainGrpcExchangeTransformerV2.grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info.tradingRewardBoostInfo),
930
- disqualifiedMarketIdsList: info.disqualifiedMarketIds
931
- } : void 0;
932
- }
933
- static grpcCampaignRewardPoolToCampaignRewardPool(pool) {
934
- return {
935
- startTimestamp: Number(pool.startTimestamp),
936
- maxCampaignRewardsList: pool.maxCampaignRewards.map((coin) => ({
937
- amount: coin.amount,
938
- denom: coin.denom
939
- }))
940
- };
941
- }
942
- static tradingRewardsCampaignResponseToTradingRewardsCampaign(response) {
943
- return {
944
- tradingRewardCampaignInfo: ChainGrpcExchangeTransformerV2.grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(response.tradingRewardCampaignInfo),
945
- tradingRewardPoolCampaignScheduleList: response.tradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformerV2.grpcCampaignRewardPoolToCampaignRewardPool),
946
- pendingTradingRewardPoolCampaignScheduleList: response.pendingTradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformerV2.grpcCampaignRewardPoolToCampaignRewardPool),
947
- totalTradeRewardPoints: response.totalTradeRewardPoints,
948
- pendingTotalTradeRewardPointsList: response.pendingTotalTradeRewardPoints
949
- };
950
- }
951
- static isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response) {
952
- return { isOptedOut: response.isOptedOut };
953
- }
954
909
  static activeStakeGrantResponseToActiveStakeGrant(response) {
955
910
  if (!response.grant || !response.effectiveGrant) throw new Error("Active stake grant not found in response");
956
911
  return {
@@ -1055,12 +1010,13 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1055
1010
  feeReserveTotal: response.feeReserveTotal,
1056
1011
  orderLockRequirement: response.orderLockRequirement,
1057
1012
  positiveUpnlHaircutRate: response.positiveUpnlHaircutRate,
1058
- healthFactor: response.healthFactor
1013
+ healthFactor: response.healthFactor,
1014
+ ratchetedMaintenanceMarginTotal: response.ratchetedMaintenanceMarginTotal,
1015
+ crossMarginUtilRatio: response.crossMarginUtilRatio,
1016
+ positionOrderLockRequirement: response.positionOrderLockRequirement,
1017
+ nonPositionOrderLockRequirement: response.nonPositionOrderLockRequirement
1059
1018
  };
1060
1019
  }
1061
- static tradeRewardPointsResponseToTradeRewardPoints(response) {
1062
- return { accountTradeRewardPoints: response.accountTradeRewardPoints };
1063
- }
1064
1020
  static openInterestResponseToOpenInterest(response) {
1065
1021
  return { amount: response.amount ? {
1066
1022
  marketId: response.amount.marketId,
@@ -1152,7 +1108,7 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1152
1108
  return response.markets.map(ChainGrpcExchangeTransformerV2.grpcFullDerivativeMarketToDerivativeMarket);
1153
1109
  }
1154
1110
  static grpcFullDerivativeMarketToDerivativeMarket(market) {
1155
- var _market$info, _perpetualMarketInfo$, _perpetualMarketInfo$2, _perpetualMarketInfo$3, _perpetualMarketInfo$4;
1111
+ var _market$info, _perpetualMarketInfo$, _perpetualMarketInfo$2, _perpetualMarketInfo$3, _perpetualMarketInfo$4, _perpetualMarketInfo$5;
1156
1112
  const marketInfo = market.market;
1157
1113
  const perpetualMarketInfo = ((_market$info = market.info) === null || _market$info === void 0 ? void 0 : _market$info.oneofKind) === "perpetualInfo" ? market.info.perpetualInfo.marketInfo : void 0;
1158
1114
  return {
@@ -1175,11 +1131,14 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1175
1131
  oracleBase: marketInfo.oracleBase,
1176
1132
  oracleQuote: marketInfo.oracleQuote,
1177
1133
  oracleScaleFactor: marketInfo.oracleScaleFactor,
1134
+ syntheticTradeFeeRate: marketInfo.syntheticTradeFeeRate,
1135
+ referencePriceGateConfig: marketInfo.referencePriceGateConfig,
1178
1136
  perpetualMarketInfo: {
1179
1137
  hourlyFundingRateCap: (_perpetualMarketInfo$ = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.hourlyFundingRateCap) !== null && _perpetualMarketInfo$ !== void 0 ? _perpetualMarketInfo$ : "0",
1180
1138
  hourlyInterestRate: (_perpetualMarketInfo$2 = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.hourlyInterestRate) !== null && _perpetualMarketInfo$2 !== void 0 ? _perpetualMarketInfo$2 : "0",
1181
1139
  nextFundingTimestamp: Number((_perpetualMarketInfo$3 = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.nextFundingTimestamp) !== null && _perpetualMarketInfo$3 !== void 0 ? _perpetualMarketInfo$3 : 0),
1182
- fundingInterval: Number((_perpetualMarketInfo$4 = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.fundingInterval) !== null && _perpetualMarketInfo$4 !== void 0 ? _perpetualMarketInfo$4 : 0)
1140
+ fundingInterval: Number((_perpetualMarketInfo$4 = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.fundingInterval) !== null && _perpetualMarketInfo$4 !== void 0 ? _perpetualMarketInfo$4 : 0),
1141
+ fundingImpactNotional: (_perpetualMarketInfo$5 = perpetualMarketInfo === null || perpetualMarketInfo === void 0 ? void 0 : perpetualMarketInfo.fundingImpactNotional) !== null && _perpetualMarketInfo$5 !== void 0 ? _perpetualMarketInfo$5 : "0"
1183
1142
  }
1184
1143
  };
1185
1144
  }
@@ -1241,7 +1200,8 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1241
1200
  hourlyFundingRateCap: response.info.hourlyFundingRateCap,
1242
1201
  hourlyInterestRate: response.info.hourlyInterestRate,
1243
1202
  nextFundingTimestamp: Number(response.info.nextFundingTimestamp),
1244
- fundingInterval: Number(response.info.fundingInterval)
1203
+ fundingInterval: Number(response.info.fundingInterval),
1204
+ fundingImpactNotional: response.info.fundingImpactNotional
1245
1205
  } : void 0 };
1246
1206
  }
1247
1207
  static expiryFuturesMarketInfoResponseToExpiryFuturesMarketInfo(response) {
@@ -1259,7 +1219,10 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1259
1219
  return { state: response.state ? {
1260
1220
  cumulativeFunding: response.state.cumulativeFunding,
1261
1221
  cumulativePrice: response.state.cumulativePrice,
1262
- lastTimestamp: Number(response.state.lastTimestamp)
1222
+ lastTimestamp: Number(response.state.lastTimestamp),
1223
+ periodStart: Number(response.state.periodStart),
1224
+ lastPremium: response.state.lastPremium,
1225
+ lastSampleTimestamp: Number(response.state.lastSampleTimestamp)
1263
1226
  } : void 0 };
1264
1227
  }
1265
1228
  static feeDiscountTierStatisticsResponseToFeeDiscountTierStatistics(response) {
@@ -1268,19 +1231,6 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1268
1231
  count: Number(statistic.count)
1269
1232
  })) };
1270
1233
  }
1271
- static historicalTradeRecordsResponseToHistoricalTradeRecords(response) {
1272
- return { tradeRecords: response.tradeRecords.map((records) => ({
1273
- marketId: records.marketId,
1274
- latestTradeRecords: records.latestTradeRecords.map(ChainGrpcExchangeTransformerV2.grpcTradeRecordToTradeRecord)
1275
- })) };
1276
- }
1277
- static grpcTradeRecordToTradeRecord(record) {
1278
- return {
1279
- timestamp: Number(record.timestamp),
1280
- price: record.price,
1281
- quantity: record.quantity
1282
- };
1283
- }
1284
1234
  static grantAuthorizationsResponseToGrantAuthorizations(response) {
1285
1235
  return {
1286
1236
  totalGrantAmount: response.totalGrantAmount,
@@ -1322,56 +1272,6 @@ var ChainGrpcExchangeTransformerV2 = class ChainGrpcExchangeTransformerV2 {
1322
1272
  } : void 0
1323
1273
  })) };
1324
1274
  }
1325
- static binaryOptionsMarketsResponseToBinaryOptionsMarkets(response) {
1326
- return { markets: response.markets.map((market) => ({
1327
- ticker: market.ticker,
1328
- oracleSymbol: market.oracleSymbol,
1329
- oracleProvider: market.oracleProvider,
1330
- oracleType: market.oracleType,
1331
- oracleScaleFactor: market.oracleScaleFactor,
1332
- expirationTimestamp: Number(market.expirationTimestamp),
1333
- settlementTimestamp: Number(market.settlementTimestamp),
1334
- admin: market.admin,
1335
- quoteDenom: market.quoteDenom,
1336
- marketId: market.marketId,
1337
- makerFeeRate: market.makerFeeRate,
1338
- takerFeeRate: market.takerFeeRate,
1339
- relayerFeeShareRate: market.relayerFeeShareRate,
1340
- status: market.status,
1341
- minPriceTickSize: market.minPriceTickSize,
1342
- minQuantityTickSize: market.minQuantityTickSize,
1343
- settlementPrice: market.settlementPrice,
1344
- minNotional: market.minNotional,
1345
- adminPermissions: market.adminPermissions,
1346
- quoteDecimals: market.quoteDecimals,
1347
- openNotionalCap: market.openNotionalCap && market.openNotionalCap.cap.oneofKind !== void 0 ? {
1348
- type: market.openNotionalCap.cap.oneofKind === "capped" ? "capped" : "uncapped",
1349
- value: market.openNotionalCap.cap.oneofKind === "capped" ? market.openNotionalCap.cap.capped.value : void 0
1350
- } : void 0,
1351
- hasDisabledMinimalProtocolFee: market.hasDisabledMinimalProtocolFee,
1352
- forcePausedInfo: market.forcePausedInfo ? {
1353
- reason: market.forcePausedInfo.reason,
1354
- markPriceAtPausing: market.forcePausedInfo.markPriceAtPausing
1355
- } : void 0
1356
- })) };
1357
- }
1358
- static marketVolatilityResponseToMarketVolatility(response) {
1359
- return {
1360
- volatility: response.volatility,
1361
- historyMetadata: response.historyMetadata ? {
1362
- groupCount: response.historyMetadata.groupCount,
1363
- recordsSampleSize: response.historyMetadata.recordsSampleSize,
1364
- mean: response.historyMetadata.mean,
1365
- twap: response.historyMetadata.twap,
1366
- firstTimestamp: Number(response.historyMetadata.firstTimestamp),
1367
- lastTimestamp: Number(response.historyMetadata.lastTimestamp),
1368
- minPrice: response.historyMetadata.minPrice,
1369
- maxPrice: response.historyMetadata.maxPrice,
1370
- medianPrice: response.historyMetadata.medianPrice
1371
- } : void 0,
1372
- rawHistory: response.rawHistory.map(ChainGrpcExchangeTransformerV2.grpcTradeRecordToTradeRecord)
1373
- };
1374
- }
1375
1275
  };
1376
1276
 
1377
1277
  //#endregion
@@ -1435,7 +1335,10 @@ var ChainGrpcPermissionsTransformer = class ChainGrpcPermissionsTransformer {
1435
1335
  static moduleParamsResponseToModuleParams(response) {
1436
1336
  const params = response.params;
1437
1337
  if (!params) throw new Error("Params not found in response");
1438
- return { wasmHookQueryMaxGas: params.contractHookMaxGas.toString() };
1338
+ return {
1339
+ wasmHookQueryMaxGas: params.contractHookMaxGas.toString(),
1340
+ ownerBlacklistQueryMaxGas: params.ownerBlacklistQueryMaxGas.toString()
1341
+ };
1439
1342
  }
1440
1343
  static nameSpaceDenomsResponseToNameSpaceDenoms(response) {
1441
1344
  return response.denoms.map((denom) => denom);
@@ -1585,6 +1488,63 @@ var ChainGrpcInsuranceFundTransformer = class ChainGrpcInsuranceFundTransformer
1585
1488
  static insuranceFundsResponseToInsuranceFunds(response) {
1586
1489
  return response.funds.map((fund) => ChainGrpcInsuranceFundTransformer.grpcInsuranceFundToInsuranceFund(fund));
1587
1490
  }
1491
+ static grpcConsolidatedPoolToConsolidatedPool(pool) {
1492
+ var _pool$redemptionNotic;
1493
+ return {
1494
+ depositDenom: pool.depositDenom,
1495
+ shareDenom: pool.shareDenom,
1496
+ quoteDecimals: pool.quoteDecimals,
1497
+ redemptionNoticePeriodDuration: Number(((_pool$redemptionNotic = pool.redemptionNoticePeriodDuration) === null || _pool$redemptionNotic === void 0 ? void 0 : _pool$redemptionNotic.seconds) || 0n),
1498
+ balance: pool.balance,
1499
+ totalShare: pool.totalShare,
1500
+ maxDrawPerMarket: pool.maxDrawPerMarket,
1501
+ paused: pool.paused,
1502
+ reservedBalance: pool.reservedBalance,
1503
+ pendingReservationRedemptions: Number(pool.pendingReservationRedemptions)
1504
+ };
1505
+ }
1506
+ static grpcConsolidatedPolicyToConsolidatedPolicy(policy) {
1507
+ return {
1508
+ marketId: policy.marketId,
1509
+ poolDenom: policy.poolDenom,
1510
+ maxDraw: policy.maxDraw,
1511
+ outstandingDraw: policy.outstandingDraw,
1512
+ netPrefunding: policy.netPrefunding,
1513
+ reservedAmount: policy.reservedAmount
1514
+ };
1515
+ }
1516
+ static grpcConsolidatedRedemptionToConsolidatedRedemption(schedule) {
1517
+ var _schedule$claimableRe, _schedule$shares, _schedule$shares2;
1518
+ return {
1519
+ id: Number(schedule.id),
1520
+ poolDenom: schedule.poolDenom,
1521
+ redeemer: schedule.redeemer,
1522
+ claimableRedemptionTime: Number(((_schedule$claimableRe = schedule.claimableRedemptionTime) === null || _schedule$claimableRe === void 0 ? void 0 : _schedule$claimableRe.seconds) || 0n),
1523
+ shares: {
1524
+ denom: ((_schedule$shares = schedule.shares) === null || _schedule$shares === void 0 ? void 0 : _schedule$shares.denom) || "",
1525
+ amount: ((_schedule$shares2 = schedule.shares) === null || _schedule$shares2 === void 0 ? void 0 : _schedule$shares2.amount) || "0"
1526
+ },
1527
+ waitingForReservedCash: schedule.waitingForReservedCash
1528
+ };
1529
+ }
1530
+ static consolidatedPoolsResponseToConsolidatedPools(response) {
1531
+ return response.pools.map(ChainGrpcInsuranceFundTransformer.grpcConsolidatedPoolToConsolidatedPool);
1532
+ }
1533
+ static consolidatedPolicyResponseToConsolidatedPolicy(response) {
1534
+ return response.policy ? ChainGrpcInsuranceFundTransformer.grpcConsolidatedPolicyToConsolidatedPolicy(response.policy) : void 0;
1535
+ }
1536
+ static consolidatedPoliciesResponseToConsolidatedPolicies(response) {
1537
+ return {
1538
+ policies: response.policies.map(ChainGrpcInsuranceFundTransformer.grpcConsolidatedPolicyToConsolidatedPolicy),
1539
+ pagination: ChainGrpcCommonTransformer.grpcPaginationToPaginationV2(response.pagination)
1540
+ };
1541
+ }
1542
+ static consolidatedRedemptionsResponseToConsolidatedRedemptions(response) {
1543
+ return {
1544
+ schedules: response.schedules.map(ChainGrpcInsuranceFundTransformer.grpcConsolidatedRedemptionToConsolidatedRedemption),
1545
+ pagination: ChainGrpcCommonTransformer.grpcPaginationToPaginationV2(response.pagination)
1546
+ };
1547
+ }
1588
1548
  static redemptionsResponseToRedemptions(response) {
1589
1549
  return response.amount.map((amount) => {
1590
1550
  return {
@@ -2036,31 +1996,6 @@ var ChainGrpcPeggyApi = class extends BaseGrpcConsumer {
2036
1996
  }
2037
1997
  };
2038
1998
 
2039
- //#endregion
2040
- //#region src/client/chain/grpc/ChainGrpcWasmXApi.ts
2041
- /**
2042
- * @category Chain Grpc API
2043
- */
2044
- var ChainGrpcWasmXApi = class extends BaseGrpcConsumer {
2045
- constructor(..._args) {
2046
- super(..._args);
2047
- _defineProperty(this, "module", ChainModule.WasmX);
2048
- }
2049
- get client() {
2050
- return this.initClient(QueryClient$8);
2051
- }
2052
- async fetchModuleParams(options) {
2053
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2054
- const request = InjectiveWasmxV1QueryPb.QueryWasmxParamsRequest.create();
2055
- return await this.executeGrpcCall(request, this.client.wasmxParams.bind(this.client), options);
2056
- }
2057
- async fetchModuleState(options) {
2058
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2059
- const request = InjectiveWasmxV1QueryPb.QueryModuleStateRequest.create();
2060
- return (await this.executeGrpcCall(request, this.client.wasmxModuleState.bind(this.client), options)).state;
2061
- }
2062
- };
2063
-
2064
1999
  //#endregion
2065
2000
  //#region src/client/chain/grpc/ChainGrpcErc20Api.ts
2066
2001
  const MAX_LIMIT_FOR_SUPPLY = 1e4;
@@ -2073,7 +2008,7 @@ var ChainGrpcErc20Api = class extends BaseGrpcConsumer {
2073
2008
  _defineProperty(this, "module", ChainModule.Erc20);
2074
2009
  }
2075
2010
  get client() {
2076
- return this.initClient(QueryClient$9);
2011
+ return this.initClient(QueryClient$8);
2077
2012
  }
2078
2013
  async fetchModuleParams(options) {
2079
2014
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2122,7 +2057,7 @@ var ChainGrpcOracleApi = class extends BaseGrpcConsumer {
2122
2057
  _defineProperty(this, "module", ChainModule.Oracle);
2123
2058
  }
2124
2059
  get client() {
2125
- return this.initClient(QueryClient$10);
2060
+ return this.initClient(QueryClient$9);
2126
2061
  }
2127
2062
  async fetchModuleParams(options) {
2128
2063
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2142,7 +2077,7 @@ var ChainGrpcTxFeesApi = class extends BaseGrpcConsumer {
2142
2077
  _defineProperty(this, "module", ChainModule.TxFees);
2143
2078
  }
2144
2079
  get client() {
2145
- return this.initClient(QueryClient$11);
2080
+ return this.initClient(QueryClient$10);
2146
2081
  }
2147
2082
  async fetchModuleParams(options) {
2148
2083
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2169,7 +2104,7 @@ var ChainGrpcAuctionApi = class extends BaseGrpcConsumer {
2169
2104
  _defineProperty(this, "module", ChainModule.Auction);
2170
2105
  }
2171
2106
  get client() {
2172
- return this.initClient(QueryClient$12);
2107
+ return this.initClient(QueryClient$11);
2173
2108
  }
2174
2109
  async fetchModuleParams(options) {
2175
2110
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2208,7 +2143,7 @@ var ChainGrpcStakingApi = class extends BaseGrpcConsumer {
2208
2143
  _defineProperty(this, "module", ChainModule.Staking);
2209
2144
  }
2210
2145
  get client() {
2211
- return this.initClient(QueryClient$13);
2146
+ return this.initClient(QueryClient$12);
2212
2147
  }
2213
2148
  async fetchModuleParams(options) {
2214
2149
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2438,7 +2373,7 @@ var ChainGrpcExchangeApiV2 = class extends BaseGrpcConsumer {
2438
2373
  _defineProperty(this, "module", ChainModule.Exchange);
2439
2374
  }
2440
2375
  get client() {
2441
- return this.initClient(QueryClient$14);
2376
+ return this.initClient(QueryClient$13);
2442
2377
  }
2443
2378
  async fetchModuleParams(options) {
2444
2379
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -2465,27 +2400,6 @@ var ChainGrpcExchangeApiV2 = class extends BaseGrpcConsumer {
2465
2400
  const response = await this.executeGrpcCall(request, this.client.feeDiscountAccountInfo.bind(this.client), options);
2466
2401
  return ChainGrpcExchangeTransformerV2.feeDiscountAccountInfoResponseToFeeDiscountAccountInfo(response);
2467
2402
  }
2468
- async fetchTradingRewardsCampaign(options) {
2469
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2470
- const request = InjectiveExchangeV2QueryPb.QueryTradeRewardCampaignRequest.create();
2471
- const response = await this.executeGrpcCall(request, this.client.tradeRewardCampaign.bind(this.client), options);
2472
- return ChainGrpcExchangeTransformerV2.tradingRewardsCampaignResponseToTradingRewardsCampaign(response);
2473
- }
2474
- async fetchTradeRewardPoints(injectiveAddresses, options) {
2475
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2476
- const request = InjectiveExchangeV2QueryPb.QueryTradeRewardPointsRequest.create();
2477
- request.accounts = injectiveAddresses;
2478
- const response = await this.executeGrpcCall(request, this.client.tradeRewardPoints.bind(this.client), options);
2479
- return ChainGrpcExchangeTransformerV2.tradeRewardPointsResponseToTradeRewardPoints(response);
2480
- }
2481
- async fetchPendingTradeRewardPoints(injectiveAddresses, timestamp, options) {
2482
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2483
- const request = InjectiveExchangeV2QueryPb.QueryTradeRewardPointsRequest.create();
2484
- request.accounts = injectiveAddresses;
2485
- if (timestamp !== void 0) request.pendingPoolTimestamp = BigInt(timestamp);
2486
- const response = await this.executeGrpcCall(request, this.client.pendingTradeRewardPoints.bind(this.client), options);
2487
- return ChainGrpcExchangeTransformerV2.tradeRewardPointsResponseToTradeRewardPoints(response);
2488
- }
2489
2403
  async fetchPositions(options) {
2490
2404
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2491
2405
  const request = InjectiveExchangeV2QueryPb.QueryPositionsRequest.create();
@@ -2498,13 +2412,6 @@ var ChainGrpcExchangeApiV2 = class extends BaseGrpcConsumer {
2498
2412
  request.subaccountId = subaccountId;
2499
2413
  return { nonce: (await this.executeGrpcCall(request, this.client.subaccountTradeNonce.bind(this.client), options)).nonce };
2500
2414
  }
2501
- async fetchIsOptedOutOfRewards(account, options) {
2502
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2503
- const request = InjectiveExchangeV2QueryPb.QueryIsOptedOutOfRewardsRequest.create();
2504
- request.account = account;
2505
- const response = await this.executeGrpcCall(request, this.client.isOptedOutOfRewards.bind(this.client), options);
2506
- return ChainGrpcExchangeTransformerV2.isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response);
2507
- }
2508
2415
  async fetchActiveStakeGrant(account, options) {
2509
2416
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2510
2417
  const request = InjectiveExchangeV2QueryPb.QueryActiveStakeGrantRequest.create();
@@ -2846,33 +2753,6 @@ var ChainGrpcExchangeApiV2 = class extends BaseGrpcConsumer {
2846
2753
  request.vaultAddress = vaultAddress;
2847
2754
  return { marketId: (await this.executeGrpcCall(request, this.client.queryMarketIDFromVault.bind(this.client), options)).marketId };
2848
2755
  }
2849
- async fetchHistoricalTradeRecords(marketId, options) {
2850
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2851
- const request = InjectiveExchangeV2QueryPb.QueryHistoricalTradeRecordsRequest.create();
2852
- request.marketId = marketId;
2853
- const response = await this.executeGrpcCall(request, this.client.historicalTradeRecords.bind(this.client), options);
2854
- return ChainGrpcExchangeTransformerV2.historicalTradeRecordsResponseToHistoricalTradeRecords(response);
2855
- }
2856
- async fetchOptedOutOfRewardsAccounts(options) {
2857
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2858
- const request = InjectiveExchangeV2QueryPb.QueryOptedOutOfRewardsAccountsRequest.create();
2859
- return { accounts: (await this.executeGrpcCall(request, this.client.optedOutOfRewardsAccounts.bind(this.client), options)).accounts };
2860
- }
2861
- async fetchMarketVolatility({ marketId, tradeHistoryOptions }, options) {
2862
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2863
- const request = InjectiveExchangeV2QueryPb.QueryMarketVolatilityRequest.create();
2864
- request.marketId = marketId;
2865
- if (tradeHistoryOptions) request.tradeHistoryOptions = tradeHistoryOptions;
2866
- const response = await this.executeGrpcCall(request, this.client.marketVolatility.bind(this.client), options);
2867
- return ChainGrpcExchangeTransformerV2.marketVolatilityResponseToMarketVolatility(response);
2868
- }
2869
- async fetchBinaryOptionsMarkets(status, options) {
2870
- throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2871
- const request = InjectiveExchangeV2QueryPb.QueryBinaryMarketsRequest.create();
2872
- if (status) request.status = status;
2873
- const response = await this.executeGrpcCall(request, this.client.binaryOptionsMarkets.bind(this.client), options);
2874
- return ChainGrpcExchangeTransformerV2.binaryOptionsMarketsResponseToBinaryOptionsMarkets(response);
2875
- }
2876
2756
  async fetchTraderDerivativeConditionalOrders({ subaccountId, marketId }, options) {
2877
2757
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
2878
2758
  const request = InjectiveExchangeV2QueryPb.QueryTraderDerivativeConditionalOrdersRequest.create();
@@ -2921,7 +2801,7 @@ var ChainGrpcPermissionsApi = class extends BaseGrpcConsumer {
2921
2801
  _defineProperty(this, "module", ChainModule.Permissions);
2922
2802
  }
2923
2803
  get client() {
2924
- return this.initClient(QueryClient$15);
2804
+ return this.initClient(QueryClient$14);
2925
2805
  }
2926
2806
  async fetchModuleParams(options) {
2927
2807
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -3025,7 +2905,7 @@ var ChainGrpcDistributionApi = class extends BaseGrpcConsumer {
3025
2905
  _defineProperty(this, "module", ChainModule.Distribution);
3026
2906
  }
3027
2907
  get client() {
3028
- return this.initClient(QueryClient$16);
2908
+ return this.initClient(QueryClient$15);
3029
2909
  }
3030
2910
  async fetchModuleParams(options) {
3031
2911
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -3088,7 +2968,7 @@ var ChainGrpcTokenFactoryApi = class extends BaseGrpcConsumer {
3088
2968
  _defineProperty(this, "module", ChainModule.WasmX);
3089
2969
  }
3090
2970
  get client() {
3091
- return this.initClient(QueryClient$17);
2971
+ return this.initClient(QueryClient$16);
3092
2972
  }
3093
2973
  async fetchDenomsFromCreator(creator, options) {
3094
2974
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -3130,7 +3010,7 @@ var ChainGrpcInsuranceFundApi = class extends BaseGrpcConsumer {
3130
3010
  _defineProperty(this, "module", ChainModule.InsuranceFund);
3131
3011
  }
3132
3012
  get client() {
3133
- return this.initClient(QueryClient$18);
3013
+ return this.initClient(QueryClient$17);
3134
3014
  }
3135
3015
  async fetchModuleParams(options) {
3136
3016
  throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
@@ -3167,6 +3047,47 @@ var ChainGrpcInsuranceFundApi = class extends BaseGrpcConsumer {
3167
3047
  const response = await this.executeGrpcCall(request, this.client.pendingRedemptions.bind(this.client), options);
3168
3048
  return ChainGrpcInsuranceFundTransformer.redemptionsResponseToRedemptions(response);
3169
3049
  }
3050
+ /** chain v1.21+, empty `depositDenom` returns every consolidated pool */
3051
+ async fetchConsolidatedInsurancePools({ depositDenom } = {}, options) {
3052
+ throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
3053
+ const request = InjectiveInsuranceV1Beta1QueryPb.QueryConsolidatedInsurancePoolsRequest.create();
3054
+ if (depositDenom) request.depositDenom = depositDenom;
3055
+ const response = await this.executeGrpcCall(request, this.client.consolidatedInsurancePools.bind(this.client), options);
3056
+ return ChainGrpcInsuranceFundTransformer.consolidatedPoolsResponseToConsolidatedPools(response);
3057
+ }
3058
+ async fetchConsolidatedInsurancePolicy(marketId, options) {
3059
+ throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
3060
+ const request = InjectiveInsuranceV1Beta1QueryPb.QueryConsolidatedInsurancePolicyRequest.create();
3061
+ request.marketId = marketId;
3062
+ const response = await this.executeGrpcCall(request, this.client.consolidatedInsurancePolicy.bind(this.client), options);
3063
+ return ChainGrpcInsuranceFundTransformer.consolidatedPolicyResponseToConsolidatedPolicy(response);
3064
+ }
3065
+ /**
3066
+ * chain v1.21+, empty `poolDenom` returns every policy.
3067
+ * Key-only pagination: use `key`, offset / total-count scans are rejected by the chain.
3068
+ */
3069
+ async fetchConsolidatedInsurancePolicies({ poolDenom, pagination } = {}, options) {
3070
+ throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
3071
+ const request = InjectiveInsuranceV1Beta1QueryPb.QueryConsolidatedInsurancePoliciesRequest.create();
3072
+ if (poolDenom) request.poolDenom = poolDenom;
3073
+ const paginationForRequest = ChainGrpcCommonTransformer.pageRequestToGrpcPageRequestV2(pagination);
3074
+ if (paginationForRequest) request.pagination = paginationForRequest;
3075
+ const response = await this.executeGrpcCall(request, this.client.consolidatedInsurancePolicies.bind(this.client), options);
3076
+ return ChainGrpcInsuranceFundTransformer.consolidatedPoliciesResponseToConsolidatedPolicies(response);
3077
+ }
3078
+ /**
3079
+ * chain v1.21+, empty `redeemer` returns every pending schedule.
3080
+ * Key-only pagination: use `key`, offset / total-count scans are rejected by the chain.
3081
+ */
3082
+ async fetchConsolidatedRedemptions({ redeemer, pagination } = {}, options) {
3083
+ throwIfAborted(options === null || options === void 0 ? void 0 : options.signal);
3084
+ const request = InjectiveInsuranceV1Beta1QueryPb.QueryConsolidatedRedemptionsRequest.create();
3085
+ if (redeemer) request.redeemer = redeemer;
3086
+ const paginationForRequest = ChainGrpcCommonTransformer.pageRequestToGrpcPageRequestV2(pagination);
3087
+ if (paginationForRequest) request.pagination = paginationForRequest;
3088
+ const response = await this.executeGrpcCall(request, this.client.consolidatedRedemptions.bind(this.client), options);
3089
+ return ChainGrpcInsuranceFundTransformer.consolidatedRedemptionsResponseToConsolidatedRedemptions(response);
3090
+ }
3170
3091
  };
3171
3092
 
3172
3093
  //#endregion
@@ -3259,4 +3180,4 @@ var ChainRestWasmApi = class extends BaseRestConsumer {
3259
3180
  };
3260
3181
 
3261
3182
  //#endregion
3262
- export { ChainGrpcErc20Transformer as A, ChainGrpcTokenFactoryTransformer as C, ChainGrpcStakingTransformer as D, ChainGrpcExchangeTransformerV2 as E, ChainGrpcBankTransformer as F, ChainGrpcEvmTransformer as I, ChainGrpcGovTransformer as L, ChainGrpcAuthZTransformer as M, ChainGrpcWasmTransformer as N, ChainGrpcAuctionTransformer as O, ChainGrpcMintTransformer as P, ChainGrpcInsuranceFundTransformer as S, ChainGrpcPermissionsTransformer as T, ChainGrpcMintApi as _, ChainGrpcDistributionApi as a, ChainGrpcIbcApi as b, ChainGrpcStakingApi as c, ChainGrpcOracleApi as d, ChainGrpcErc20Api as f, ChainGrpcWasmApi as g, ChainGrpcAuthZApi as h, ChainGrpcTokenFactoryApi as i, ChainGrpcPeggyTransformer as j, ChainGrpcTxFeesTransformer as k, ChainGrpcAuctionApi as l, ChainGrpcPeggyApi as m, ChainRestBankApi as n, ChainGrpcPermissionsApi as o, ChainGrpcWasmXApi as p, ChainGrpcInsuranceFundApi as r, ChainGrpcExchangeApiV2 as s, ChainRestWasmApi as t, ChainGrpcTxFeesApi as u, ChainGrpcBankApi as v, ChainGrpcDistributionTransformer as w, ChainGrpcGovApi as x, ChainGrpcEvmApi as y };
3183
+ export { ChainGrpcPeggyTransformer as A, ChainGrpcDistributionTransformer as C, ChainGrpcAuctionTransformer as D, ChainGrpcStakingTransformer as E, ChainGrpcEvmTransformer as F, ChainGrpcGovTransformer as I, ChainGrpcWasmTransformer as M, ChainGrpcMintTransformer as N, ChainGrpcTxFeesTransformer as O, ChainGrpcBankTransformer as P, ChainGrpcTokenFactoryTransformer as S, ChainGrpcExchangeTransformerV2 as T, ChainGrpcBankApi as _, ChainGrpcDistributionApi as a, ChainGrpcGovApi as b, ChainGrpcStakingApi as c, ChainGrpcOracleApi as d, ChainGrpcErc20Api as f, ChainGrpcMintApi as g, ChainGrpcWasmApi as h, ChainGrpcTokenFactoryApi as i, ChainGrpcAuthZTransformer as j, ChainGrpcErc20Transformer as k, ChainGrpcAuctionApi as l, ChainGrpcAuthZApi as m, ChainRestBankApi as n, ChainGrpcPermissionsApi as o, ChainGrpcPeggyApi as p, ChainGrpcInsuranceFundApi as r, ChainGrpcExchangeApiV2 as s, ChainRestWasmApi as t, ChainGrpcTxFeesApi as u, ChainGrpcEvmApi as v, ChainGrpcPermissionsTransformer as w, ChainGrpcInsuranceFundTransformer as x, ChainGrpcIbcApi as y };