@injectivelabs/sdk-ts 1.20.68 → 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
package/README.md CHANGED
@@ -38,6 +38,31 @@ pnpm add @injectivelabs/sdk-ts
38
38
 
39
39
  ---
40
40
 
41
+ ## Core v1.21 compatibility
42
+
43
+ This SDK follows the feature removals in [injective-core #3013](https://github.com/InjectiveLabs/injective-core/pull/3013):
44
+
45
+ - Binary-options message builders and `MsgRewardsOptOut` are removed for both exchange versions. Batch-order inputs no longer accept binary-options operations; nonempty legacy inputs throw during serialization.
46
+ - Exchange queries for trading rewards, reward opt-outs, binary-options markets, historical trade records, and market volatility are removed, along with their SDK transformers and response types.
47
+ - `ChainGrpcWasmXApi` and `ChainGrpcClient.wasmX` are removed. CosmWasm, `MsgExecuteContractCompat`, and `ContractExecutionCompatAuthz` remain supported.
48
+ - Market-launch proposals, insurance funds, and Peggy rate limits reject the retired Coinbase, PriceFeed, and Stork oracle sources. Insurance funds also reject the binary-options expiry flag (`-2`). Provider prices, conditional orders (including TP/SL), fee discounts, volume queries, and perpetual funding remain supported.
49
+
50
+ Other v1.21 changes to be aware of:
51
+
52
+ - **Exchange V2 Amino names changed** from `exchange/<Msg>` to `exchange/v2/<Msg>` (core renamed the `amino.name` proto options). This is a hard cutover for Ledger / Amino / EIP712 v1 signing: this SDK version only signs V2 exchange messages correctly against a v1.21 chain, and earlier SDK versions fail against v1.21. EIP712 v2 and direct signing are unaffected.
53
+ - **EIP712 v1 is unsupported for messages the chain cannot type.** `getEip712TypedData()` throws (use `getEip712TypedDataV2()` / `broadcastV2()`) when one of these is a root message of the transaction: `MsgSubmitProposalPerpetualMarketLaunchV2` (`OpenNotionalCap` oneof), for `MsgUpdateSpotMarketV2`, `MsgUpdateDerivativeMarketV2`, `MsgInstantSpotMarketLaunchV2`, `MsgIncreasePositionMarginV2` and `MsgDecreasePositionMarginV2` (`LegacyDec` fields), and for the consolidated-insurance messages with `math.Int` fields (`MsgCreateConsolidatedInsurancePool`, `MsgUpdateConsolidatedInsurancePolicy`, `MsgUnderwriteConsolidatedInsurancePool`). The gateway rejects all of these for v1 as root messages (`invalid Go type ...`), but prepares them inside `MsgExec` and proposals, so nested they serialize like any other message. `MsgReclaimLockedFundsV2` cannot be signed with EIP712 v1 either: the chain declares its bytes as `uint8[]` but carries their base64 string, which no typed-data encoder can hash, so `getEip712TypedData()` rejects it (use v2).
54
+ - **EIP712 v1 payloads of the remaining V2 messages now follow the chain exactly** (verified against the gateway): zero / empty values are omitted from the typed-data values, an empty `cid` is omitted, `expiration_block` of a good-till-block order is included (it was previously dropped from the values while still declared in the types), `MsgUpdateSubaccountRiskProfileV2` includes and types `credit_line_id` when set, and `MsgUpdateSwapParamsV2` omits an empty allowlist from the types. This changes the v1 signing payload (Ledger / Trezor / private-key wallets using `broadcast()`); `broadcastV2` / EIP712 v2 is unaffected.
55
+ - **`getEip712TypedData()` rejects incomplete EIP712 v1 payloads before wallet signing.** The chain can declare fields that Amino omits, and its v1 hasher cannot hash those missing values. This includes disabled swaps, zero risk-profile enums, market-mode unpinning, insurance-pool resumption, and orders without an expiration block. Use `broadcastV2()` / `getEip712TypedDataV2()` for these cases. Amino serialization and the chain's type declarations are preserved.
56
+ - **`toAmino()` of the V2 exchange messages and `MsgSubmitProposalPerpetualMarketLaunchV2` now matches the chain's amino-json sign bytes** (LegacyDec fields as scaled integers, zero/empty fields omitted, oneof wrapper, amino names read from the proto). This is what Ledger (Cosmos app) signs. The values of `toWeb3Gw()`, `toEip712()` and `toEip712V2()` are unchanged (only the EIP712 v1 `type` strings carry the new `exchange/v2/` names, see the first bullet); the human-readable representation behind `toWeb3Gw()` stays available as `toAminoRaw()`. `MsgSubmitGenericProposal` embeds the inner messages' `toAmino()`, so inner V2 messages are now chain-format (scaled, zero-omitted) in its amino and EIP712 v1 payloads.
57
+ - **`toProto()` now takes human-readable decimals for `MsgUpdateSpotMarketV2`, `MsgUpdateDerivativeMarketV2` and `MsgInstantSpotMarketLaunchV2`** and scales them to the on-chain `LegacyDec` value (x 1e18), like the V2 order messages do. Their direct-sign / binary path previously sent the raw human value, which the chain cannot decode. Callers that worked around this by passing already-scaled values must switch to human-readable values or they will send values 1e18 times too large. As root messages these three are rejected by `getEip712TypedData()` (the chain's v1 typed-data generator cannot type their `LegacyDec` fields), use `getEip712TypedDataV2()`.
58
+ - Permissions `MsgUpdateParams` requires the new `ownerBlacklistQueryMaxGas` (the chain rejects `0`).
59
+ - New messages: `MsgUpdateSubaccountMarketRiskModeV2` and the consolidated-insurance messages (`MsgCreateConsolidatedInsurancePool`, `MsgSetConsolidatedInsurancePoolPause`, `MsgUpdateConsolidatedInsurancePolicy`, `MsgUnderwriteConsolidatedInsurancePool`, `MsgRequestConsolidatedRedemption`). New fields: `MsgLiquidateCrossMarginPoolV2.rfqAction`, `MsgUpdateDerivativeMarketV2.newReferencePriceGateConfig`, `syntheticTradeFeeRate` on the perpetual market launch proposal.
60
+ - `@injectivelabs/ts-types`: the type URLs of removed messages are now defined in `DeprecatedMsgType` (binary options, rewards opt-out, trading rewards, retired oracle relays, WasmX messages, OCR). `MsgType` still includes them, so existing `MsgType` references keep working.
61
+
62
+ Retired protobuf definitions, type URLs, oracle enum values, and Amino mappings remain available for historical decoding. Retired batch fields remain empty in the web3gw / EIP712 payloads to match core's retained protobuf schema (amino-json omits them, like the chain's encoder). Indexer and archive APIs are unchanged; this core PR does not change their service contracts.
63
+
64
+ ---
65
+
41
66
  ## 📖 Documentation
42
67
 
43
68
  - Read more and find example usages on our [Querying Docs](https://docs.ts.injective.network/querying)
@@ -1,4 +1,4 @@
1
- import { _t as UnaryCall, bt as ServerStreamingCall, f as GrpcWebTransportAdditionalOptions, gt as RpcTransport, ht as RpcOptions, vt as DuplexStreamingCall, xt as MethodInfo, yt as ClientStreamingCall } from "./index-4IPdy0bE.cjs";
1
+ import { _t as ServerStreamingCall, f as GrpcWebTransportAdditionalOptions, ft as RpcOptions, gt as ClientStreamingCall, ht as DuplexStreamingCall, mt as UnaryCall, pt as RpcTransport, vt as MethodInfo } from "./index-CBEIfBLI.cjs";
2
2
  import { RetryOptions } from "@injectivelabs/utils";
3
3
 
4
4
  //#region src/client/base/GrpcWebRpcTransport.d.ts
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_defineProperty = require('./defineProperty-C3FP2y9Y.cjs');
3
- const require_utils = require('./utils-DZoXzNOj.cjs');
4
- const require_ChainRestTendermintApi = require('./ChainRestTendermintApi-BkHzZIRZ.cjs');
3
+ const require_utils = require('./utils-CjlVVckg.cjs');
4
+ const require_ChainRestTendermintApi = require('./ChainRestTendermintApi-BSGN-XV3.cjs');
5
5
  const require_BaseGrpcConsumer = require('./BaseGrpcConsumer-BLIJoFic.cjs');
6
6
  let __injectivelabs_utils = require("@injectivelabs/utils");
7
7
  let __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/query_pb");
@@ -70,15 +70,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
70
70
  disqualifiedMarketIdsList: schedule.disqualifiedMarketIds
71
71
  };
72
72
  }
73
- static tradingRewardsCampaignResponseToTradingRewardsCampaign(response) {
74
- return {
75
- tradingRewardCampaignInfo: ChainGrpcExchangeTransformer.grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(response.tradingRewardCampaignInfo),
76
- tradingRewardPoolCampaignScheduleList: response.tradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformer.grpcCampaignRewardPoolToCampaignRewardPool),
77
- pendingTradingRewardPoolCampaignScheduleList: response.pendingTradingRewardPoolCampaignSchedule.map(ChainGrpcExchangeTransformer.grpcCampaignRewardPoolToCampaignRewardPool),
78
- totalTradeRewardPoints: response.totalTradeRewardPoints,
79
- pendingTotalTradeRewardPointsList: response.pendingTotalTradeRewardPoints
80
- };
81
- }
82
73
  static feeDiscountAccountInfoResponseToFeeDiscountAccountInfo(response) {
83
74
  return {
84
75
  tierLevel: Number(response.tierLevel),
@@ -102,39 +93,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
102
93
  ttlTimestamp: parseInt(info.ttlTimestamp.toString(), 10)
103
94
  };
104
95
  }
105
- static grpcPointsMultiplierToPointsMultiplier(point) {
106
- return {
107
- makerPointsMultiplier: point.makerPointsMultiplier,
108
- takerPointsMultiplier: point.takerPointsMultiplier
109
- };
110
- }
111
- static grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info) {
112
- if (!info) return;
113
- return {
114
- boostedSpotMarketIdsList: info.boostedSpotMarketIds,
115
- boostedDerivativeMarketIdsList: info.boostedDerivativeMarketIds,
116
- spotMarketMultipliersList: info.spotMarketMultipliers.map(ChainGrpcExchangeTransformer.grpcPointsMultiplierToPointsMultiplier),
117
- derivativeMarketMultipliersList: info.derivativeMarketMultipliers.map(ChainGrpcExchangeTransformer.grpcPointsMultiplierToPointsMultiplier)
118
- };
119
- }
120
- static grpcTradingRewardCampaignInfoToTradingRewardCampaignInfo(info) {
121
- if (!info) return;
122
- return {
123
- campaignDurationSeconds: parseInt(info.campaignDurationSeconds.toString(), 10),
124
- quoteDenomsList: info.quoteDenoms,
125
- tradingRewardBoostInfo: ChainGrpcExchangeTransformer.grpcTradingRewardCampaignBoostInfoToTradingRewardCampaignBoostInfo(info.tradingRewardBoostInfo),
126
- disqualifiedMarketIdsList: info.disqualifiedMarketIds
127
- };
128
- }
129
- static grpcCampaignRewardPoolToCampaignRewardPool(pool) {
130
- return {
131
- startTimestamp: parseInt(pool.startTimestamp.toString(), 10),
132
- maxCampaignRewardsList: pool.maxCampaignRewards.map((coin) => ({
133
- amount: coin.amount,
134
- denom: coin.denom
135
- }))
136
- };
137
- }
138
96
  static grpcPositionToPosition(position) {
139
97
  return {
140
98
  islong: position.isLong,
@@ -150,9 +108,6 @@ var ChainGrpcExchangeTransformer = class ChainGrpcExchangeTransformer {
150
108
  };
151
109
  });
152
110
  }
153
- static isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response) {
154
- return { isOptedOut: response.isOptedOut };
155
- }
156
111
  static activeStakeGrantResponseToActiveStakeGrant(response) {
157
112
  return {
158
113
  grant: response.grant,
@@ -296,25 +251,6 @@ var ChainGrpcExchangeApi = class extends require_BaseGrpcConsumer.BaseGrpcConsum
296
251
  const response = await this.executeGrpcCall(request, this.client.feeDiscountAccountInfo.bind(this.client), options);
297
252
  return ChainGrpcExchangeTransformer.feeDiscountAccountInfoResponseToFeeDiscountAccountInfo(response);
298
253
  }
299
- async fetchTradingRewardsCampaign(options) {
300
- (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
301
- const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryTradeRewardCampaignRequest.create();
302
- const response = await this.executeGrpcCall(request, this.client.tradeRewardCampaign.bind(this.client), options);
303
- return ChainGrpcExchangeTransformer.tradingRewardsCampaignResponseToTradingRewardsCampaign(response);
304
- }
305
- async fetchTradeRewardPoints(injectiveAddresses, options) {
306
- (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
307
- const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryTradeRewardPointsRequest.create();
308
- request.accounts = injectiveAddresses;
309
- return (await this.executeGrpcCall(request, this.client.tradeRewardPoints.bind(this.client), options)).accountTradeRewardPoints;
310
- }
311
- async fetchPendingTradeRewardPoints(injectiveAddresses, timestamp, options) {
312
- (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
313
- const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryTradeRewardPointsRequest.create();
314
- request.accounts = injectiveAddresses;
315
- if (timestamp) request.pendingPoolTimestamp = BigInt(timestamp);
316
- return (await this.executeGrpcCall(request, this.client.pendingTradeRewardPoints.bind(this.client), options)).accountTradeRewardPoints;
317
- }
318
254
  async fetchPositions(options) {
319
255
  (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
320
256
  const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryPositionsRequest.create();
@@ -327,13 +263,6 @@ var ChainGrpcExchangeApi = class extends require_BaseGrpcConsumer.BaseGrpcConsum
327
263
  request.subaccountId = subaccountId;
328
264
  return await this.executeGrpcCall(request, this.client.subaccountTradeNonce.bind(this.client), options);
329
265
  }
330
- async fetchIsOptedOutOfRewards(account, options) {
331
- (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
332
- const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryIsOptedOutOfRewardsRequest.create();
333
- request.account = account;
334
- const response = await this.executeGrpcCall(request, this.client.isOptedOutOfRewards.bind(this.client), options);
335
- return ChainGrpcExchangeTransformer.isOptedOutOfRewardsResponseToIsOptedOutOfRewards(response);
336
- }
337
266
  async fetchActiveStakeGrant(account, options) {
338
267
  (0, __injectivelabs_utils.throwIfAborted)(options === null || options === void 0 ? void 0 : options.signal);
339
268
  const request = __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_query_pb.QueryActiveStakeGrantRequest.create();
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
3
3
  const require_defineProperty = require('./defineProperty-C3FP2y9Y.cjs');
4
- const require_utils = require('./utils-DZoXzNOj.cjs');
4
+ const require_utils = require('./utils-CjlVVckg.cjs');
5
5
  const require_BaseGrpcConsumer = require('./BaseGrpcConsumer-BLIJoFic.cjs');
6
6
  const require_BaseRestConsumer = require('./BaseRestConsumer-BPrYlltM.cjs');
7
7
  let __injectivelabs_utils = require("@injectivelabs/utils");
@@ -10,11 +10,11 @@ let __injectivelabs_core_proto_ts_v2_generated_injective_crypto_v1beta1_ethsecp2
10
10
  __injectivelabs_core_proto_ts_v2_generated_injective_crypto_v1beta1_ethsecp256k1_keys_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_injective_crypto_v1beta1_ethsecp256k1_keys_pb);
11
11
  let __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_exchange_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/exchange_pb");
12
12
  __injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_exchange_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_injective_exchange_v1beta1_exchange_pb);
13
- let __injectivelabs_core_proto_ts_v2_generated_injective_oracle_v1beta1_oracle_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/oracle_pb");
14
13
  let __injectivelabs_core_proto_ts_v2_generated_cosmos_gov_v1_gov_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/gov/v1/gov_pb");
15
14
  __injectivelabs_core_proto_ts_v2_generated_cosmos_gov_v1_gov_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_gov_v1_gov_pb);
16
15
  let __injectivelabs_core_proto_ts_v2_generated_cosmwasm_wasm_v1_types_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmwasm/wasm/v1/types_pb");
17
16
  __injectivelabs_core_proto_ts_v2_generated_cosmwasm_wasm_v1_types_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmwasm_wasm_v1_types_pb);
17
+ let __injectivelabs_core_proto_ts_v2_generated_injective_oracle_v1beta1_oracle_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/oracle_pb");
18
18
  let __injectivelabs_core_proto_ts_v2_generated_injective_permissions_v1beta1_permissions_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/permissions/v1beta1/permissions_pb");
19
19
  __injectivelabs_core_proto_ts_v2_generated_injective_permissions_v1beta1_permissions_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_injective_permissions_v1beta1_permissions_pb);
20
20
  let __injectivelabs_core_proto_ts_v2_generated_injective_types_v1beta1_account_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/types/v1beta1/account_pb");
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
3
3
  const require_defineProperty = require('./defineProperty-C3FP2y9Y.cjs');
4
- const require_accounts = require('./accounts-BeV7wTTf.cjs');
4
+ const require_accounts = require('./accounts-C6QIpAkP.cjs');
5
5
  let __injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb");
6
6
  __injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb);
7
7
  let __injectivelabs_core_proto_ts_v2_generated_injective_types_v1beta1_account_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/types/v1beta1/account_pb");
@@ -1,8 +1,8 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
3
3
  const require_defineProperty = require('./defineProperty-C3FP2y9Y.cjs');
4
- const require_utils = require('./utils-DZoXzNOj.cjs');
5
- const require_MsgBase = require('./MsgBase-jNBijPHQ.cjs');
4
+ const require_utils = require('./utils-CjlVVckg.cjs');
5
+ const require_MsgBase = require('./MsgBase-Dt0pa34P.cjs');
6
6
  let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
7
7
  let __injectivelabs_core_proto_ts_v2_generated_injective_wasmx_v1_tx_pb = require("@injectivelabs/core-proto-ts-v2/generated/injective/wasmx/v1/tx_pb");
8
8
  __injectivelabs_core_proto_ts_v2_generated_injective_wasmx_v1_tx_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_injective_wasmx_v1_tx_pb);
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
3
3
  const require_defineProperty = require('./defineProperty-C3FP2y9Y.cjs');
4
- const require_utils = require('./utils-DZoXzNOj.cjs');
4
+ const require_utils = require('./utils-CjlVVckg.cjs');
5
5
  const require_BaseIndexerGrpcConsumer = require('./BaseIndexerGrpcConsumer-C59DoCx1.cjs');
6
6
  let __injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb");
7
7
  __injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb);
@@ -158,7 +158,7 @@ var IndexerGrpcTransactionApi = class extends require_BaseIndexerGrpcConsumer.Ba
158
158
  return this.initClient(__injectivelabs_indexer_proto_ts_v2_generated_injective_exchange_rpc_pb_client.InjectiveExchangeRPCClient);
159
159
  }
160
160
  async prepareTxRequest(args) {
161
- const { address, chainId, message, memo, estimateGas = true, gasLimit = __injectivelabs_utils.DEFAULT_GAS_LIMIT, feeDenom = __injectivelabs_utils.DEFAULT_BRIDGE_FEE_DENOM, feePrice = __injectivelabs_utils.DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight } = args;
161
+ const { address, chainId, message, memo, estimateGas = true, gasLimit = __injectivelabs_utils.DEFAULT_GAS_LIMIT, feeDenom = __injectivelabs_utils.DEFAULT_BRIDGE_FEE_DENOM, feePrice = __injectivelabs_utils.DEFAULT_BRIDGE_FEE_PRICE, timeoutHeight, eip712Version } = args;
162
162
  const txFeeAmount = __injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb.Coin.create();
163
163
  txFeeAmount.denom = feeDenom;
164
164
  txFeeAmount.amount = feePrice;
@@ -172,6 +172,7 @@ var IndexerGrpcTransactionApi = class extends require_BaseIndexerGrpcConsumer.Ba
172
172
  prepareTxRequest.msgs = (Array.isArray(message) ? message : [message]).map((message$1) => require_encoding_light.stringToUint8Array(require_utils.safeBigIntStringify(message$1)));
173
173
  if (timeoutHeight !== void 0) prepareTxRequest.timeoutHeight = BigInt(timeoutHeight);
174
174
  if (memo) prepareTxRequest.memo = typeof memo === "number" ? memo.toString() : memo;
175
+ if (eip712Version) prepareTxRequest.eip712Wrapper = eip712Version;
175
176
  return await this.executeGrpcCall(prepareTxRequest, this.client.prepareTx.bind(this.client));
176
177
  }
177
178
  async prepareExchangeTxRequest(args) {
@@ -225,6 +226,7 @@ var IndexerGrpcTransactionApi = class extends require_BaseIndexerGrpcConsumer.Ba
225
226
  broadcastTxRequest.tx = require_encoding_light.stringToUint8Array(require_utils.safeBigIntStringify(parsedTypedData.message));
226
227
  broadcastTxRequest.feePayer = txResponse.feePayer;
227
228
  broadcastTxRequest.feePayerSig = txResponse.feePayerSig;
229
+ if (txResponse.signMode === "SIGN_MODE_EIP712_V3") broadcastTxRequest.signMode = txResponse.signMode;
228
230
  broadcastTxRequest.msgs = (Array.isArray(message) ? message : [message]).map((message$1) => require_encoding_light.stringToUint8Array(require_utils.safeBigIntStringify(message$1)));
229
231
  return await this.executeGrpcCall(broadcastTxRequest, this.client.broadcastTx.bind(this.client));
230
232
  }
@@ -27,14 +27,15 @@ const objectKeysToEip712Types = ({ object, messageType, primaryType = "MsgValue"
27
27
  "proposal_id",
28
28
  "creation_height",
29
29
  "contract_hook_max_gas",
30
- "expiration_block"
30
+ "owner_blacklist_query_max_gas",
31
+ "expiration_block",
32
+ "redemption_notice_period_seconds"
31
33
  ];
32
34
  const stringFieldsWithNumberValue = [
33
35
  "timeout_timestamp",
34
36
  "revision_height",
35
37
  "revision_number"
36
38
  ];
37
- const stringFieldsToOmitIfEmpty = ["cid"];
38
39
  const fieldsToOmitIfEmpty = ["admin_info", "order"];
39
40
  const output = /* @__PURE__ */ new Map();
40
41
  const types = new Array();
@@ -52,7 +53,7 @@ const objectKeysToEip712Types = ({ object, messageType, primaryType = "MsgValue"
52
53
  type: numberTypeToReflectionNumberType(property, messageType)
53
54
  });
54
55
  else if (type === "string") {
55
- if (stringFieldsToOmitIfEmpty.includes(property) && !propertyValue) continue;
56
+ if (!propertyValue) continue;
56
57
  if (stringFieldsWithNumberValue.includes(property)) {
57
58
  types.push({
58
59
  name: property,
@@ -129,6 +130,27 @@ const objectKeysToEip712Types = ({ object, messageType, primaryType = "MsgValue"
129
130
  return output;
130
131
  };
131
132
  /**
133
+ * A wrapper (MsgExec, a proposal) infers its schema from the values it embeds,
134
+ * which cannot declare what a child omits or what a child's own rules decide.
135
+ * Replaces the schema inferred for the child at `nestedPrimaryType` with the
136
+ * child's own `toEip712Types()`, renamed to where it sits in the wrapper: type
137
+ * names are the path of the field (`TypeSwapParams` is `TypeMsgsValueSwapParams`
138
+ * under `msgs[].value`)
139
+ */
140
+ const graftEip712Types = (types, nestedPrimaryType, childTypes) => {
141
+ const rename = (name) => name === "MsgValue" ? nestedPrimaryType : nestedPrimaryType + name.replace(/^Type/, "");
142
+ const renameFieldType = (type) => {
143
+ const name = type.replace(/\[\]$/, "");
144
+ return childTypes.has(name) ? rename(name) + type.slice(name.length) : type;
145
+ };
146
+ for (const name of [...types.keys()]) if (name.startsWith(nestedPrimaryType)) types.delete(name);
147
+ for (const [name, fields] of childTypes) types.set(rename(name), fields.map((field) => ({
148
+ ...field,
149
+ type: renameFieldType(field.type)
150
+ })));
151
+ return types;
152
+ };
153
+ /**
132
154
  * The chain always includes expiration_block in order type schemas
133
155
  * even when the EIP712 v1 message value omits zero-valued fields.
134
156
  * Patch the resolved type map to add it to any of the given keys
@@ -175,6 +197,10 @@ const numberTypeToReflectionNumberType = (property, messageType) => {
175
197
  "exchange/MsgInstantSpotMarketLaunch": {
176
198
  base_decimals: "uint32",
177
199
  quote_decimals: "uint32"
200
+ },
201
+ "exchange/v2/MsgInstantSpotMarketLaunch": {
202
+ base_decimals: "uint32",
203
+ quote_decimals: "uint32"
178
204
  }
179
205
  };
180
206
  if (msgTypeKey && messageTypeToNumberTypeMaps[msgTypeKey] && property) {
@@ -191,11 +217,16 @@ const numberTypeToReflectionNumberType = (property, messageType) => {
191
217
  case "admin_permissions": return "uint32";
192
218
  case "oracle_scale_factor": return "uint32";
193
219
  case "oracle_type": return "int32";
220
+ case "reference_price_source": return "int32";
221
+ case "reference_window_seconds": return "uint32";
222
+ case "max_open_deviation_bps": return "uint32";
194
223
  case "exponent": return "uint32";
195
224
  case "round": return "uint64";
196
225
  case "expiry": return "int64";
197
226
  case "creation_height": return "int64";
198
227
  case "expiration_block": return "int64";
228
+ case "redemption_notice_period_seconds": return "int64";
229
+ case "quote_decimals": return "uint32";
199
230
  case "option": return "int32";
200
231
  case "proposal_id": return "uint64";
201
232
  default: return "uint64";
@@ -289,8 +320,8 @@ const protoTypeToAminoType = (type) => {
289
320
  case "injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal": return "exchange/BinaryOptionsMarketParamUpdateProposal";
290
321
  case "injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal": return "exchange/BinaryOptionsMarketLaunchProposal";
291
322
  case "injective.exchange.v1beta1.MsgTransferAndExecute": return "exchange/MsgTransferAndExecute";
292
- case "injective.exchange.v2.MsgUpdateSpotMarket": return "exchange/MsgUpdateSpotMarket";
293
- case "injective.exchange.v2.MsgUpdateDerivativeMarket": return "exchange/MsgUpdateDerivativeMarket";
323
+ case "injective.exchange.v2.MsgUpdateSpotMarket": return "exchange/v2/MsgUpdateSpotMarket";
324
+ case "injective.exchange.v2.MsgUpdateDerivativeMarket": return "exchange/v2/MsgUpdateDerivativeMarket";
294
325
  case "injective.exchange.v1beta1.CreateSpotLimitOrderAuthz": return "exchange/CreateSpotLimitOrderAuthz";
295
326
  case "injective.exchange.v1beta1.CreateSpotMarketOrderAuthz": return "exchange/CreateSpotMarketOrderAuthz";
296
327
  case "injective.exchange.v1beta1.BatchCreateSpotLimitOrdersAuthz": return "exchange/BatchCreateSpotLimitOrdersAuthz";
@@ -302,38 +333,44 @@ const protoTypeToAminoType = (type) => {
302
333
  case "injective.exchange.v1beta1.CancelDerivativeOrderAuthz": return "exchange/CancelDerivativeOrderAuthz";
303
334
  case "injective.exchange.v1beta1.BatchCancelDerivativeOrdersAuthz": return "exchange/BatchCancelDerivativeOrdersAuthz";
304
335
  case "injective.exchange.v1beta1.BatchUpdateOrdersAuthz": return "exchange/BatchUpdateOrdersAuthz";
305
- case "injective.exchange.v2.MsgUpdateSwapParams": return "exchange/MsgUpdateSwapParams";
306
- case "injective.exchange.v2.MsgSetDelegationTransferReceivers": return "exchange/MsgSetDelegationTransferReceivers";
307
- case "injective.exchange.v2.MsgDeposit": return "exchange/MsgDeposit";
308
- case "injective.exchange.v2.MsgWithdraw": return "exchange/MsgWithdraw";
336
+ case "injective.exchange.v2.MsgUpdateSwapParams": return "exchange/v2/MsgUpdateSwapParams";
337
+ case "injective.exchange.v2.MsgUpdateSubaccountMarketRiskMode": return "exchange/v2/MsgUpdateSubaccountMarketRiskMode";
338
+ case "injective.exchange.v2.MsgSetDelegationTransferReceivers": return "exchange/v2/MsgSetDelegationTransferReceivers";
339
+ case "injective.exchange.v2.MsgDeposit": return "exchange/v2/MsgDeposit";
340
+ case "injective.exchange.v2.MsgWithdraw": return "exchange/v2/MsgWithdraw";
309
341
  case "injective.exchange.v2.MsgSignData": return "exchange/MsgSignData";
310
- case "injective.exchange.v2.MsgRewardsOptOut": return "exchange/MsgRewardsOptOut";
311
- case "injective.exchange.v2.MsgCancelSpotOrder": return "exchange/MsgCancelSpotOrder";
312
- case "injective.exchange.v2.MsgExternalTransfer": return "exchange/MsgExternalTransfer";
313
- case "injective.exchange.v2.MsgBatchUpdateOrders": return "exchange/MsgBatchUpdateOrders";
314
- case "injective.exchange.v2.MsgLiquidatePosition": return "exchange/MsgLiquidatePosition";
315
- case "injective.exchange.v2.MsgReclaimLockedFunds": return "exchange/MsgReclaimLockedFunds";
316
- case "injective.exchange.v2.MsgAuthorizeStakeGrants": return "exchange/MsgAuthorizeStakeGrants";
317
- case "injective.exchange.v2.MsgCancelDerivativeOrder": return "exchange/MsgCancelDerivativeOrder";
318
- case "injective.exchange.v2.MsgBatchCancelSpotOrders": return "exchange/MsgBatchCancelSpotOrders";
319
- case "injective.exchange.v2.MsgCreateSpotLimitOrder": return "exchange/MsgCreateSpotLimitOrder";
320
- case "injective.exchange.v2.MsgCreateSpotMarketOrder": return "exchange/MsgCreateSpotMarketOrder";
321
- case "injective.exchange.v2.MsgIncreasePositionMargin": return "exchange/MsgIncreasePositionMargin";
322
- case "injective.exchange.v2.MsgDecreasePositionMargin": return "exchange/MsgDecreasePositionMargin";
323
- case "injective.exchange.v2.MsgInstantSpotMarketLaunch": return "exchange/MsgInstantSpotMarketLaunch";
324
- case "injective.exchange.v2.MsgCancelBinaryOptionsOrder": return "exchange/MsgCancelBinaryOptionsOrder";
325
- case "injective.exchange.v2.MsgCreateDerivativeLimitOrder": return "exchange/MsgCreateDerivativeLimitOrder";
326
- case "injective.exchange.v2.MsgBatchCancelDerivativeOrders": return "exchange/MsgBatchCancelDerivativeOrders";
327
- case "injective.exchange.v2.MsgCreateDerivativeMarketOrder": return "exchange/MsgCreateDerivativeMarketOrder";
328
- case "injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder": return "exchange/MsgCreateBinaryOptionsLimitOrder";
329
- case "injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket": return "exchange/MsgAdminUpdateBinaryOptionsMarket";
330
- case "injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders": return "exchange/MsgBatchCancelBinaryOptionsOrders";
331
- case "injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder": return "exchange/MsgCreateBinaryOptionsMarketOrder";
332
- case "injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch": return "exchange/MsgInstantBinaryOptionsMarketLaunch";
342
+ case "injective.exchange.v2.MsgRewardsOptOut": return "exchange/v2/MsgRewardsOptOut";
343
+ case "injective.exchange.v2.MsgCancelSpotOrder": return "exchange/v2/MsgCancelSpotOrder";
344
+ case "injective.exchange.v2.MsgExternalTransfer": return "exchange/v2/MsgExternalTransfer";
345
+ case "injective.exchange.v2.MsgBatchUpdateOrders": return "exchange/v2/MsgBatchUpdateOrders";
346
+ case "injective.exchange.v2.MsgLiquidatePosition": return "exchange/v2/MsgLiquidatePosition";
347
+ case "injective.exchange.v2.MsgReclaimLockedFunds": return "exchange/v2/MsgReclaimLockedFunds";
348
+ case "injective.exchange.v2.MsgAuthorizeStakeGrants": return "exchange/v2/MsgAuthorizeStakeGrants";
349
+ case "injective.exchange.v2.MsgCancelDerivativeOrder": return "exchange/v2/MsgCancelDerivativeOrder";
350
+ case "injective.exchange.v2.MsgBatchCancelSpotOrders": return "exchange/v2/MsgBatchCancelSpotOrders";
351
+ case "injective.exchange.v2.MsgCreateSpotLimitOrder": return "exchange/v2/MsgCreateSpotLimitOrder";
352
+ case "injective.exchange.v2.MsgCreateSpotMarketOrder": return "exchange/v2/MsgCreateSpotMarketOrder";
353
+ case "injective.exchange.v2.MsgIncreasePositionMargin": return "exchange/v2/MsgIncreasePositionMargin";
354
+ case "injective.exchange.v2.MsgDecreasePositionMargin": return "exchange/v2/MsgDecreasePositionMargin";
355
+ case "injective.exchange.v2.MsgInstantSpotMarketLaunch": return "exchange/v2/MsgInstantSpotMarketLaunch";
356
+ case "injective.exchange.v2.MsgCancelBinaryOptionsOrder": return "exchange/v2/MsgCancelBinaryOptionsOrder";
357
+ case "injective.exchange.v2.MsgCreateDerivativeLimitOrder": return "exchange/v2/MsgCreateDerivativeLimitOrder";
358
+ case "injective.exchange.v2.MsgBatchCancelDerivativeOrders": return "exchange/v2/MsgBatchCancelDerivativeOrders";
359
+ case "injective.exchange.v2.MsgCreateDerivativeMarketOrder": return "exchange/v2/MsgCreateDerivativeMarketOrder";
360
+ case "injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder": return "exchange/v2/MsgCreateBinaryOptionsLimitOrder";
361
+ case "injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket": return "exchange/v2/MsgAdminUpdateBinaryOptionsMarket";
362
+ case "injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders": return "exchange/v2/MsgBatchCancelBinaryOptionsOrders";
363
+ case "injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder": return "exchange/v2/MsgCreateBinaryOptionsMarketOrder";
364
+ case "injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch": return "exchange/v2/MsgInstantBinaryOptionsMarketLaunch";
333
365
  case "injective.auction.v1beta1.MsgBid": return "auction/MsgBid";
334
366
  case "injective.insurance.v1beta1.MsgCreateInsuranceFund": return "insurance/MsgCreateInsuranceFund";
335
367
  case "injective.insurance.v1beta1.MsgUnderwrite": return "insurance/MsgUnderwrite";
336
368
  case "injective.insurance.v1beta1.MsgRequestRedemption": return "insurance/MsgRequestRedemption";
369
+ case "injective.insurance.v1beta1.MsgCreateConsolidatedInsurancePool": return "insurance/MsgCreateConsolidatedInsurancePool";
370
+ case "injective.insurance.v1beta1.MsgSetConsolidatedInsurancePoolPause": return "insurance/MsgSetConsolidatedInsurancePoolPause";
371
+ case "injective.insurance.v1beta1.MsgUpdateConsolidatedInsurancePolicy": return "insurance/MsgUpdateConsolidatedInsurancePolicy";
372
+ case "injective.insurance.v1beta1.MsgUnderwriteConsolidatedInsurancePool": return "insurance/MsgUnderwriteConsolidatedInsurancePool";
373
+ case "injective.insurance.v1beta1.MsgRequestConsolidatedRedemption": return "insurance/MsgRequestConsolidatedRedemption";
337
374
  case "injective.peggy.v1beta1.MsgSetOrchestratorAddresses": return "peggy/MsgSetOrchestratorAddresses";
338
375
  case "injective.peggy.v1beta1.MsgValsetConfirm": return "peggy/MsgValsetConfirm";
339
376
  case "injective.peggy.v1beta1.MsgSendToEth": return "peggy/MsgSendToEth";
@@ -353,8 +390,8 @@ const protoTypeToAminoType = (type) => {
353
390
  case "injective.peggy.v1beta1.MsgSubmitBadSignatureEvidence": return "peggy/MsgSubmitBadSignatureEvidence";
354
391
  case "injective.peggy.v1beta1.BlacklistEthereumAddressesProposal": return "peggy/BlacklistEthereumAddressesProposal";
355
392
  case "injective.peggy.v1beta1.RevokeEthereumBlacklistProposal": return "peggy/RevokeEthereumBlacklistProposal";
356
- case "injective.wasmx.v1beta1.ContractRegistrationRequestProposal": return "wasmx/ContractRegistrationRequestProposal";
357
- case "injective.wasmx.v1beta1.BatchContractRegistrationRequestProposal": return "wasmx/BatchContractRegistrationRequestProposal";
393
+ case "injective.wasmx.v1.ContractRegistrationRequestProposal": return "wasmx/ContractRegistrationRequestProposal";
394
+ case "injective.wasmx.v1.BatchContractRegistrationRequestProposal": return "wasmx/BatchContractRegistrationRequestProposal";
358
395
  case "injective.tokenfactory.v1beta1.MsgCreateDenom": return "injective/tokenfactory/create-denom";
359
396
  case "injective.tokenfactory.v1beta1.MsgMint": return "injective/tokenfactory/mint";
360
397
  case "injective.tokenfactory.v1beta1.MsgBurn": return "injective/tokenfactory/burn";
@@ -424,17 +461,27 @@ var MsgBase = class {
424
461
  return JSON.stringify(prepareSignBytes(this.toData()));
425
462
  }
426
463
  /**
464
+ * The full-field, human-readable object behind toWeb3Gw (proto-JSON keeps zero
465
+ * values) and the EIP712 v1 types (the chain lists every field in the types).
466
+ * Defaults to toAmino(); messages whose toAmino() follows the chain's aminojson
467
+ * sign bytes (Ledger), which omit zero values, override this.
468
+ */
469
+ toAminoRaw() {
470
+ return this.toAmino();
471
+ }
472
+ /**
427
473
  * Returns the types of the message for EIP712
428
474
  */
429
475
  toEip712Types() {
430
- const amino = this.toAmino();
476
+ const amino = this.toAminoRaw();
431
477
  return objectKeysToEip712Types({
432
478
  object: amino.value,
433
479
  messageType: amino.type
434
480
  });
435
481
  }
436
482
  /**
437
- * Returns the values of the message for EIP712
483
+ * Returns the values of the message for EIP712: the chain derives the v1 typed
484
+ * data values from its amino-json, so this is toAmino()
438
485
  */
439
486
  toEip712() {
440
487
  return this.toAmino();
@@ -445,10 +492,14 @@ var MsgBase = class {
445
492
  toEip712V2() {
446
493
  return this.toWeb3Gw();
447
494
  }
495
+ assertEip712V1Supported() {
496
+ if (!this.constructor.eip712V1Supported) throw new __injectivelabs_exceptions.GeneralException(/* @__PURE__ */ new Error(`EIP712_v1 is not supported for ${this.constructor.name}. Please use EIP712_v2`));
497
+ }
448
498
  toDirectSignJSON() {
449
499
  return JSON.stringify(prepareSignBytes(this.toDirectSign()));
450
500
  }
451
501
  };
502
+ require_defineProperty._defineProperty(MsgBase, "eip712V1Supported", true);
452
503
 
453
504
  //#endregion
454
505
  Object.defineProperty(exports, 'MsgBase', {
@@ -463,6 +514,12 @@ Object.defineProperty(exports, 'getObjectEip712PropertyType', {
463
514
  return getObjectEip712PropertyType;
464
515
  }
465
516
  });
517
+ Object.defineProperty(exports, 'graftEip712Types', {
518
+ enumerable: true,
519
+ get: function () {
520
+ return graftEip712Types;
521
+ }
522
+ });
466
523
  Object.defineProperty(exports, 'numberTypeToReflectionNumberType', {
467
524
  enumerable: true,
468
525
  get: function () {