@injectivelabs/sdk-ts 1.19.5 → 1.19.7

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 (45) hide show
  1. package/dist/cjs/{DirectEthSecp256k1Wallet-B47wfyu3.cjs → DirectEthSecp256k1Wallet-BWF4bTRg.cjs} +1 -1
  2. package/dist/cjs/{ExecArgNeptuneWithdraw-DJWhAi2w.cjs → ExecArgNeptuneWithdraw-DNeBN5p6.cjs} +1 -1
  3. package/dist/cjs/{MsgBase-B3DOk7mn.cjs → MsgBase-CAiwUyBz.cjs} +53 -1
  4. package/dist/cjs/{MsgSetDenomMetadata-CDhuDaSe.cjs → MsgSetDenomMetadata-D_4OBR5E.cjs} +3148 -567
  5. package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-BiIMpmJw.cjs → QueryTradingStrategyContractTotalStrategies-HVnqU1yl.cjs} +1 -1
  6. package/dist/cjs/{accounts-CCczSIa8.cjs → accounts-Rcz0OUDn.cjs} +1 -1
  7. package/dist/cjs/client/chain.d.cts +1 -1
  8. package/dist/cjs/client/indexer.d.cts +1 -1
  9. package/dist/cjs/client/wasm.cjs +3 -3
  10. package/dist/cjs/core/accounts.cjs +2 -2
  11. package/dist/cjs/core/accounts.d.cts +1 -1
  12. package/dist/cjs/core/modules.cjs +31 -5
  13. package/dist/cjs/core/modules.d.cts +2 -2
  14. package/dist/cjs/core/tx.cjs +4 -3
  15. package/dist/cjs/core/tx.d.cts +2 -2
  16. package/dist/cjs/cosmjs.cjs +4 -4
  17. package/dist/cjs/exports.cjs +4 -4
  18. package/dist/cjs/{index-DTxdqmry.d.cts → index-BVB1oke3.d.cts} +4516 -1407
  19. package/dist/cjs/index.cjs +33 -6
  20. package/dist/cjs/index.d.cts +2 -2
  21. package/dist/cjs/{tx-D7F4nbJj.cjs → tx-BLPNQat_.cjs} +1 -1
  22. package/dist/cjs/utils.d.cts +1 -1
  23. package/dist/esm/{DirectEthSecp256k1Wallet-bZZ4bjk5.js → DirectEthSecp256k1Wallet-6nqAaBW9.js} +1 -1
  24. package/dist/esm/{ExecArgNeptuneWithdraw-DRCUYj-r.js → ExecArgNeptuneWithdraw-mI_hNm4-.js} +1 -1
  25. package/dist/esm/{MsgBase-De14KlFJ.js → MsgBase-CpH99FqH.js} +48 -2
  26. package/dist/esm/{MsgSetDenomMetadata-_b5Klju5.js → MsgSetDenomMetadata-BKIPNfgv.js} +2874 -451
  27. package/dist/esm/{QueryTradingStrategyContractTotalStrategies-BhAe-C30.js → QueryTradingStrategyContractTotalStrategies-D6IBqS_q.js} +1 -1
  28. package/dist/esm/{accounts-B_eo5rUB.js → accounts-C3KF9pTp.js} +1 -1
  29. package/dist/esm/client/chain.d.ts +1 -1
  30. package/dist/esm/client/indexer.d.ts +1 -1
  31. package/dist/esm/client/wasm.js +3 -3
  32. package/dist/esm/core/accounts.d.ts +1 -1
  33. package/dist/esm/core/accounts.js +2 -2
  34. package/dist/esm/core/modules.d.ts +2 -2
  35. package/dist/esm/core/modules.js +6 -6
  36. package/dist/esm/core/tx.d.ts +2 -2
  37. package/dist/esm/core/tx.js +4 -4
  38. package/dist/esm/cosmjs.js +4 -4
  39. package/dist/esm/exports.js +4 -4
  40. package/dist/esm/{index-CJdlojfN.d.ts → index-pJ7IiPlL.d.ts} +4516 -1407
  41. package/dist/esm/index.d.ts +2 -2
  42. package/dist/esm/index.js +7 -7
  43. package/dist/esm/{tx-Cb1fEFK8.js → tx-QGNUs1B0.js} +1 -1
  44. package/dist/esm/utils.d.ts +1 -1
  45. package/package.json +5 -5
@@ -1,18 +1,20 @@
1
- import { Ht as concatUint8Arrays, Vt as binaryToBase64, Wt as fromUtf8, Zt as uint8ArrayToBase64, et as numberToCosmosSdkDecString, ht as messageHash, nn as bigIntToString, pn as safeBigIntStringify, pt as domainHash, qt as hexToUint8Array, zt as base64ToUint8Array } from "./utils-XYJbh13N.js";
1
+ import { Ht as concatUint8Arrays, Jt as stringToUint8Array, Qt as uint8ArrayToHex, Vt as binaryToBase64, Wt as fromUtf8, Xt as toUtf8, Zt as uint8ArrayToBase64, et as numberToCosmosSdkDecString, ht as messageHash, m as getEthereumAddress, nn as bigIntToString, pn as safeBigIntStringify, pt as domainHash, qt as hexToUint8Array, zt as base64ToUint8Array } from "./utils-XYJbh13N.js";
2
2
  import { t as _defineProperty } from "./defineProperty-HO0rQlTT.js";
3
- import { I as Address, j as createAny } from "./accounts-B_eo5rUB.js";
4
- import { n as prepareSignBytes, t as MsgBase } from "./MsgBase-De14KlFJ.js";
3
+ import { I as Address, j as createAny } from "./accounts-C3KF9pTp.js";
4
+ import { a as objectKeysToEip712Types, n as prepareSignBytes, o as patchOrderTypesWithExpirationBlock, t as MsgBase } from "./MsgBase-CpH99FqH.js";
5
5
  import { t as ChainGrpcExchangeApi } from "./ChainGrpcExchangeApi-BApB4VXN.js";
6
- import { a as dataToExecData$1, i as ExecArgBase } from "./ExecArgNeptuneWithdraw-DRCUYj-r.js";
6
+ import { a as dataToExecData$1, i as ExecArgBase } from "./ExecArgNeptuneWithdraw-mI_hNm4-.js";
7
7
  import { keccak256 } from "viem";
8
8
  import { BigNumber, DEFAULT_BRIDGE_FEE_AMOUNT, DEFAULT_BRIDGE_FEE_DENOM, toBigNumber, toChainFormat, toPascalCase } from "@injectivelabs/utils";
9
9
  import { GeneralException } from "@injectivelabs/exceptions";
10
10
  import * as GoogleProtobufAnyPbPb from "@injectivelabs/core-proto-ts-v2/generated/google/protobuf/any_pb";
11
11
  import * as CosmosBaseV1Beta1CoinPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb";
12
12
  import * as InjectiveExchangeV1Beta1TxPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/tx_pb";
13
- import * as InjectiveExchangeV1Beta1ExchangePb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/exchange_pb";
14
13
  import * as InjectiveExchangeV2TxPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/tx_pb";
14
+ import * as InjectiveExchangeV1Beta1ExchangePb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v1beta1/exchange_pb";
15
+ import * as InjectiveExchangeV2OrderPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/order_pb";
15
16
  import * as InjectiveOracleV1Beta1OraclePb from "@injectivelabs/core-proto-ts-v2/generated/injective/oracle/v1beta1/oracle_pb";
17
+ import * as InjectiveExchangeV2MarketPb from "@injectivelabs/core-proto-ts-v2/generated/injective/exchange/v2/market_pb";
16
18
  import { getNetworkEndpoints } from "@injectivelabs/networks";
17
19
  import * as CosmosGovV1GovPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/gov/v1/gov_pb";
18
20
  import * as CosmwasmWasmV1TypesPb from "@injectivelabs/core-proto-ts-v2/generated/cosmwasm/wasm/v1/types_pb";
@@ -161,6 +163,171 @@ var MsgWithdraw = class MsgWithdraw extends MsgBase {
161
163
  }
162
164
  };
163
165
 
166
+ //#endregion
167
+ //#region src/core/modules/exchange/msgs/MsgDepositV2.ts
168
+ /**
169
+ * @category Messages
170
+ */
171
+ var MsgDepositV2 = class MsgDepositV2 extends MsgBase {
172
+ static fromJSON(params) {
173
+ return new MsgDepositV2(params);
174
+ }
175
+ toProto() {
176
+ const { params } = this;
177
+ const amountCoin = CosmosBaseV1Beta1CoinPb.Coin.create({
178
+ denom: params.amount.denom,
179
+ amount: params.amount.amount
180
+ });
181
+ return InjectiveExchangeV2TxPb.MsgDeposit.create({
182
+ sender: params.injectiveAddress,
183
+ subaccountId: params.subaccountId,
184
+ amount: amountCoin
185
+ });
186
+ }
187
+ toData() {
188
+ const proto = this.toProto();
189
+ return {
190
+ "@type": "/injective.exchange.v2.MsgDeposit",
191
+ ...proto
192
+ };
193
+ }
194
+ toAmino() {
195
+ const proto = this.toProto();
196
+ return {
197
+ type: "exchange/MsgDeposit",
198
+ value: {
199
+ sender: proto.sender,
200
+ subaccount_id: proto.subaccountId,
201
+ amount: proto.amount
202
+ }
203
+ };
204
+ }
205
+ toWeb3Gw() {
206
+ const { value } = this.toAmino();
207
+ return {
208
+ "@type": "/injective.exchange.v2.MsgDeposit",
209
+ ...value
210
+ };
211
+ }
212
+ toDirectSign() {
213
+ return {
214
+ type: "/injective.exchange.v2.MsgDeposit",
215
+ message: this.toProto()
216
+ };
217
+ }
218
+ toBinary() {
219
+ return InjectiveExchangeV2TxPb.MsgDeposit.toBinary(this.toProto());
220
+ }
221
+ };
222
+
223
+ //#endregion
224
+ //#region src/core/modules/exchange/msgs/MsgSignDataV2.ts
225
+ /**
226
+ * @category Messages
227
+ */
228
+ var MsgSignDataV2 = class MsgSignDataV2 extends MsgBase {
229
+ static fromJSON(params) {
230
+ return new MsgSignDataV2(params);
231
+ }
232
+ toProto() {
233
+ const { params } = this;
234
+ return InjectiveExchangeV2TxPb.MsgSignData.create({
235
+ signer: hexToUint8Array(getEthereumAddress(params.sender)),
236
+ data: stringToUint8Array(toUtf8(params.data))
237
+ });
238
+ }
239
+ toData() {
240
+ const proto = this.toProto();
241
+ return {
242
+ "@type": "/injective.exchange.v2.MsgSignData",
243
+ ...proto
244
+ };
245
+ }
246
+ toAmino() {
247
+ const proto = this.toProto();
248
+ return {
249
+ type: "sign/MsgSignData",
250
+ value: {
251
+ signer: uint8ArrayToHex(proto.signer),
252
+ data: toUtf8(proto.data)
253
+ }
254
+ };
255
+ }
256
+ toWeb3Gw() {
257
+ const { value } = this.toAmino();
258
+ return {
259
+ "@type": "/injective.exchange.v2.MsgSignData",
260
+ ...value
261
+ };
262
+ }
263
+ toDirectSign() {
264
+ return {
265
+ type: "/injective.exchange.v2.MsgSignData",
266
+ message: this.toProto()
267
+ };
268
+ }
269
+ toBinary() {
270
+ return InjectiveExchangeV2TxPb.MsgSignData.toBinary(this.toProto());
271
+ }
272
+ };
273
+
274
+ //#endregion
275
+ //#region src/core/modules/exchange/msgs/MsgWithdrawV2.ts
276
+ /**
277
+ * @category Messages
278
+ */
279
+ var MsgWithdrawV2 = class MsgWithdrawV2 extends MsgBase {
280
+ static fromJSON(params) {
281
+ return new MsgWithdrawV2(params);
282
+ }
283
+ toProto() {
284
+ const { params } = this;
285
+ const amountCoin = CosmosBaseV1Beta1CoinPb.Coin.create({
286
+ denom: params.amount.denom,
287
+ amount: params.amount.amount
288
+ });
289
+ return InjectiveExchangeV2TxPb.MsgWithdraw.create({
290
+ sender: params.injectiveAddress,
291
+ subaccountId: params.subaccountId,
292
+ amount: amountCoin
293
+ });
294
+ }
295
+ toData() {
296
+ const proto = this.toProto();
297
+ return {
298
+ "@type": "/injective.exchange.v2.MsgWithdraw",
299
+ ...proto
300
+ };
301
+ }
302
+ toAmino() {
303
+ const proto = this.toProto();
304
+ return {
305
+ type: "exchange/MsgWithdraw",
306
+ value: {
307
+ sender: proto.sender,
308
+ subaccount_id: proto.subaccountId,
309
+ amount: proto.amount
310
+ }
311
+ };
312
+ }
313
+ toWeb3Gw() {
314
+ const { value } = this.toAmino();
315
+ return {
316
+ "@type": "/injective.exchange.v2.MsgWithdraw",
317
+ ...value
318
+ };
319
+ }
320
+ toDirectSign() {
321
+ return {
322
+ type: "/injective.exchange.v2.MsgWithdraw",
323
+ message: this.toProto()
324
+ };
325
+ }
326
+ toBinary() {
327
+ return InjectiveExchangeV2TxPb.MsgWithdraw.toBinary(this.toProto());
328
+ }
329
+ };
330
+
164
331
  //#endregion
165
332
  //#region src/core/modules/exchange/msgs/MsgRewardsOptOut.ts
166
333
  /**
@@ -262,6 +429,50 @@ var MsgCancelSpotOrder = class MsgCancelSpotOrder extends MsgBase {
262
429
  }
263
430
  };
264
431
 
432
+ //#endregion
433
+ //#region src/core/modules/exchange/msgs/MsgRewardsOptOutV2.ts
434
+ /**
435
+ * @category Messages
436
+ */
437
+ var MsgRewardsOptOutV2 = class MsgRewardsOptOutV2 extends MsgBase {
438
+ static fromJSON(params) {
439
+ return new MsgRewardsOptOutV2(params);
440
+ }
441
+ toProto() {
442
+ const { params } = this;
443
+ return InjectiveExchangeV2TxPb.MsgRewardsOptOut.create({ sender: params.sender });
444
+ }
445
+ toData() {
446
+ const proto = this.toProto();
447
+ return {
448
+ "@type": "/injective.exchange.v2.MsgRewardsOptOut",
449
+ ...proto
450
+ };
451
+ }
452
+ toAmino() {
453
+ return {
454
+ type: "exchange/MsgRewardsOptOut",
455
+ value: { sender: this.toProto().sender }
456
+ };
457
+ }
458
+ toWeb3Gw() {
459
+ const { value } = this.toAmino();
460
+ return {
461
+ "@type": "/injective.exchange.v2.MsgRewardsOptOut",
462
+ ...value
463
+ };
464
+ }
465
+ toDirectSign() {
466
+ return {
467
+ type: "/injective.exchange.v2.MsgRewardsOptOut",
468
+ message: this.toProto()
469
+ };
470
+ }
471
+ toBinary() {
472
+ return InjectiveExchangeV2TxPb.MsgRewardsOptOut.toBinary(this.toProto());
473
+ }
474
+ };
475
+
265
476
  //#endregion
266
477
  //#region src/core/modules/exchange/msgs/MsgExternalTransfer.ts
267
478
  /**
@@ -323,7 +534,7 @@ var MsgExternalTransfer = class MsgExternalTransfer extends MsgBase {
323
534
 
324
535
  //#endregion
325
536
  //#region src/core/modules/exchange/msgs/MsgBatchUpdateOrders.ts
326
- const createSpotOrder = (args) => {
537
+ const createSpotOrder$1 = (args) => {
327
538
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
328
539
  subaccountId: args.subaccountId,
329
540
  feeRecipient: args.feeRecipient,
@@ -338,7 +549,7 @@ const createSpotOrder = (args) => {
338
549
  triggerPrice: args.triggerPrice
339
550
  });
340
551
  };
341
- const createDerivativeOrder = (args) => {
552
+ const createDerivativeOrder$1 = (args) => {
342
553
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
343
554
  subaccountId: args.subaccountId,
344
555
  feeRecipient: args.feeRecipient,
@@ -354,7 +565,7 @@ const createDerivativeOrder = (args) => {
354
565
  triggerPrice: args.triggerPrice
355
566
  });
356
567
  };
357
- const createBinaryOptionOrder = (args) => {
568
+ const createBinaryOptionOrder$1 = (args) => {
358
569
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
359
570
  subaccountId: args.subaccountId,
360
571
  feeRecipient: args.feeRecipient,
@@ -370,7 +581,7 @@ const createBinaryOptionOrder = (args) => {
370
581
  triggerPrice: args.triggerPrice
371
582
  });
372
583
  };
373
- const createMsgAndCancelOrders = (params) => {
584
+ const createMsgAndCancelOrders$1 = (params) => {
374
585
  const hasCancelAll = params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0 || params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0 || params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0;
375
586
  const message = InjectiveExchangeV1Beta1TxPb.MsgBatchUpdateOrders.create({
376
587
  sender: params.injectiveAddress,
@@ -414,7 +625,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
414
625
  }
415
626
  toProto() {
416
627
  const { params } = this;
417
- const message = createMsgAndCancelOrders(params);
628
+ const message = createMsgAndCancelOrders$1(params);
418
629
  if (params.spotOrdersToCreate) message.spotOrdersToCreate = params.spotOrdersToCreate.map((args) => {
419
630
  const paramsFromArgs = {
420
631
  ...args,
@@ -422,7 +633,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
422
633
  triggerPrice: toChainFormat(args.triggerPrice || 0).toFixed(),
423
634
  quantity: toChainFormat(args.quantity).toFixed()
424
635
  };
425
- return createSpotOrder({
636
+ return createSpotOrder$1({
426
637
  ...args,
427
638
  ...paramsFromArgs,
428
639
  subaccountId: params.subaccountId
@@ -436,7 +647,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
436
647
  triggerPrice: toChainFormat(args.triggerPrice || 0).toFixed(),
437
648
  quantity: toChainFormat(args.quantity).toFixed()
438
649
  };
439
- return createDerivativeOrder({
650
+ return createDerivativeOrder$1({
440
651
  ...args,
441
652
  ...paramsFromArgs,
442
653
  subaccountId: params.subaccountId
@@ -450,7 +661,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
450
661
  triggerPrice: toChainFormat(args.triggerPrice || 0).toFixed(),
451
662
  quantity: toChainFormat(args.quantity).toFixed()
452
663
  };
453
- return createBinaryOptionOrder({
664
+ return createBinaryOptionOrder$1({
454
665
  ...args,
455
666
  ...paramsFromArgs,
456
667
  subaccountId: params.subaccountId
@@ -467,7 +678,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
467
678
  }
468
679
  toAmino() {
469
680
  const { params } = this;
470
- const message = createMsgAndCancelOrders(params);
681
+ const message = createMsgAndCancelOrders$1(params);
471
682
  if (params.spotOrdersToCreate) message.spotOrdersToCreate = params.spotOrdersToCreate.map((args) => {
472
683
  const paramsFromArgs = {
473
684
  ...args,
@@ -475,7 +686,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
475
686
  triggerPrice: args.triggerPrice || "0",
476
687
  quantity: args.quantity
477
688
  };
478
- return createSpotOrder({
689
+ return createSpotOrder$1({
479
690
  ...args,
480
691
  ...paramsFromArgs,
481
692
  subaccountId: params.subaccountId
@@ -489,7 +700,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
489
700
  triggerPrice: args.triggerPrice || "0",
490
701
  quantity: args.quantity
491
702
  };
492
- return createDerivativeOrder({
703
+ return createDerivativeOrder$1({
493
704
  ...args,
494
705
  ...paramsFromArgs,
495
706
  subaccountId: params.subaccountId
@@ -503,7 +714,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
503
714
  triggerPrice: args.triggerPrice || "0",
504
715
  quantity: args.quantity
505
716
  };
506
- return createBinaryOptionOrder({
717
+ return createBinaryOptionOrder$1({
507
718
  ...args,
508
719
  ...paramsFromArgs,
509
720
  subaccountId: params.subaccountId
@@ -572,7 +783,7 @@ var MsgBatchUpdateOrders = class MsgBatchUpdateOrders extends MsgBase {
572
783
 
573
784
  //#endregion
574
785
  //#region src/core/modules/exchange/msgs/MsgLiquidatePosition.ts
575
- const createMessage$6 = (params) => {
786
+ const createMessage$12 = (params) => {
576
787
  const message = InjectiveExchangeV1Beta1TxPb.MsgLiquidatePosition.create({
577
788
  sender: params.injectiveAddress,
578
789
  subaccountId: params.subaccountId,
@@ -605,7 +816,7 @@ var MsgLiquidatePosition = class MsgLiquidatePosition extends MsgBase {
605
816
  }
606
817
  toProto() {
607
818
  const { params: initialParams } = this;
608
- return createMessage$6({
819
+ return createMessage$12({
609
820
  ...initialParams,
610
821
  order: initialParams.order ? {
611
822
  ...initialParams.order,
@@ -706,6 +917,65 @@ var MsgLiquidatePosition = class MsgLiquidatePosition extends MsgBase {
706
917
  }
707
918
  };
708
919
 
920
+ //#endregion
921
+ //#region src/core/modules/exchange/msgs/MsgCancelSpotOrderV2.ts
922
+ /**
923
+ * @category Messages
924
+ * No toEip712/toEip712V2 override needed — spot cancel has no order_mask field, so base-class defaults (toAmino/toWeb3Gw) are correct.
925
+ */
926
+ var MsgCancelSpotOrderV2 = class MsgCancelSpotOrderV2 extends MsgBase {
927
+ static fromJSON(params) {
928
+ return new MsgCancelSpotOrderV2(params);
929
+ }
930
+ toProto() {
931
+ const { params } = this;
932
+ if (!params.orderHash && !params.cid) throw new GeneralException(/* @__PURE__ */ new Error("either orderHash or cid must be provided"));
933
+ return InjectiveExchangeV2TxPb.MsgCancelSpotOrder.create({
934
+ sender: params.injectiveAddress,
935
+ marketId: params.marketId,
936
+ subaccountId: params.subaccountId,
937
+ orderHash: params.orderHash || "",
938
+ cid: params.cid || ""
939
+ });
940
+ }
941
+ toData() {
942
+ const proto = this.toProto();
943
+ return {
944
+ "@type": "/injective.exchange.v2.MsgCancelSpotOrder",
945
+ ...proto
946
+ };
947
+ }
948
+ toAmino() {
949
+ const proto = this.toProto();
950
+ return {
951
+ type: "exchange/MsgCancelSpotOrder",
952
+ value: {
953
+ sender: proto.sender,
954
+ market_id: proto.marketId,
955
+ subaccount_id: proto.subaccountId,
956
+ order_hash: proto.orderHash,
957
+ cid: proto.cid
958
+ }
959
+ };
960
+ }
961
+ toWeb3Gw() {
962
+ const { value } = this.toAmino();
963
+ return {
964
+ "@type": "/injective.exchange.v2.MsgCancelSpotOrder",
965
+ ...value
966
+ };
967
+ }
968
+ toDirectSign() {
969
+ return {
970
+ type: "/injective.exchange.v2.MsgCancelSpotOrder",
971
+ message: this.toProto()
972
+ };
973
+ }
974
+ toBinary() {
975
+ return InjectiveExchangeV2TxPb.MsgCancelSpotOrder.toBinary(this.toProto());
976
+ }
977
+ };
978
+
709
979
  //#endregion
710
980
  //#region src/core/modules/exchange/msgs/MsgReclaimLockedFunds.ts
711
981
  /**
@@ -763,7 +1033,7 @@ var MsgReclaimLockedFunds = class MsgReclaimLockedFunds extends MsgBase {
763
1033
 
764
1034
  //#endregion
765
1035
  //#region src/core/modules/exchange/msgs/MsgUpdateSpotMarketV2.ts
766
- const createMessage$5 = (params) => {
1036
+ const createMessage$11 = (params) => {
767
1037
  return InjectiveExchangeV2TxPb.MsgUpdateSpotMarket.create({
768
1038
  admin: params.admin,
769
1039
  marketId: params.marketId,
@@ -782,7 +1052,7 @@ var MsgUpdateSpotMarketV2 = class MsgUpdateSpotMarketV2 extends MsgBase {
782
1052
  }
783
1053
  toProto() {
784
1054
  const { params: initialParams } = this;
785
- return createMessage$5({
1055
+ return createMessage$11({
786
1056
  ...initialParams,
787
1057
  newMinNotional: toChainFormat(initialParams.newMinNotional || "0").toFixed(),
788
1058
  newMinQuantityTickSize: toChainFormat(initialParams.newMinQuantityTickSize || "0").toFixed(),
@@ -848,39 +1118,1875 @@ var MsgUpdateSpotMarketV2 = class MsgUpdateSpotMarketV2 extends MsgBase {
848
1118
  };
849
1119
 
850
1120
  //#endregion
851
- //#region src/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.ts
852
- const createMessage$4 = (params) => {
853
- return InjectiveExchangeV2TxPb.MsgCancelPostOnlyMode.create({ sender: params.sender });
854
- };
1121
+ //#region src/core/modules/exchange/msgs/MsgExternalTransferV2.ts
855
1122
  /**
856
1123
  * @category Messages
857
1124
  */
858
- var MsgCancelPostOnlyModeV2 = class MsgCancelPostOnlyModeV2 extends MsgBase {
1125
+ var MsgExternalTransferV2 = class MsgExternalTransferV2 extends MsgBase {
859
1126
  static fromJSON(params) {
860
- return new MsgCancelPostOnlyModeV2(params);
1127
+ return new MsgExternalTransferV2(params);
861
1128
  }
862
1129
  toProto() {
863
- const { params: initialParams } = this;
864
- return createMessage$4({ ...initialParams });
1130
+ const { params } = this;
1131
+ const amountCoin = CosmosBaseV1Beta1CoinPb.Coin.create({
1132
+ denom: params.amount.denom,
1133
+ amount: params.amount.amount
1134
+ });
1135
+ return InjectiveExchangeV2TxPb.MsgExternalTransfer.create({
1136
+ sender: params.injectiveAddress,
1137
+ sourceSubaccountId: params.srcSubaccountId,
1138
+ destinationSubaccountId: params.dstSubaccountId,
1139
+ amount: amountCoin
1140
+ });
865
1141
  }
866
1142
  toData() {
867
1143
  const proto = this.toProto();
868
1144
  return {
869
- "@type": "/injective.exchange.v2.MsgCancelPostOnlyMode",
1145
+ "@type": "/injective.exchange.v2.MsgExternalTransfer",
870
1146
  ...proto
871
1147
  };
872
1148
  }
873
1149
  toAmino() {
874
- const { params } = this;
1150
+ const proto = this.toProto();
875
1151
  return {
876
- type: "exchange/MsgCancelPostOnlyMode",
877
- value: { sender: createMessage$4(params).sender }
878
- };
879
- }
1152
+ type: "exchange/MsgExternalTransfer",
1153
+ value: {
1154
+ sender: proto.sender,
1155
+ source_subaccount_id: proto.sourceSubaccountId,
1156
+ destination_subaccount_id: proto.destinationSubaccountId,
1157
+ amount: proto.amount
1158
+ }
1159
+ };
1160
+ }
1161
+ toWeb3Gw() {
1162
+ const { value } = this.toAmino();
1163
+ return {
1164
+ "@type": "/injective.exchange.v2.MsgExternalTransfer",
1165
+ ...value
1166
+ };
1167
+ }
1168
+ toDirectSign() {
1169
+ return {
1170
+ type: "/injective.exchange.v2.MsgExternalTransfer",
1171
+ message: this.toProto()
1172
+ };
1173
+ }
1174
+ toBinary() {
1175
+ return InjectiveExchangeV2TxPb.MsgExternalTransfer.toBinary(this.toProto());
1176
+ }
1177
+ };
1178
+
1179
+ //#endregion
1180
+ //#region src/core/modules/exchange/msgs/MsgBatchUpdateOrdersV2.ts
1181
+ const createSpotOrder = (args) => {
1182
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1183
+ subaccountId: args.subaccountId,
1184
+ feeRecipient: args.feeRecipient,
1185
+ price: args.price,
1186
+ quantity: args.quantity,
1187
+ cid: args.cid
1188
+ });
1189
+ return InjectiveExchangeV2OrderPb.SpotOrder.create({
1190
+ marketId: args.marketId,
1191
+ orderType: args.orderType,
1192
+ orderInfo,
1193
+ triggerPrice: args.triggerPrice,
1194
+ expirationBlock: args.expirationBlock ? BigInt(args.expirationBlock) : BigInt(0)
1195
+ });
1196
+ };
1197
+ const createDerivativeOrder = (args) => {
1198
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1199
+ subaccountId: args.subaccountId,
1200
+ feeRecipient: args.feeRecipient,
1201
+ price: args.price,
1202
+ quantity: args.quantity,
1203
+ cid: args.cid
1204
+ });
1205
+ return InjectiveExchangeV2OrderPb.DerivativeOrder.create({
1206
+ marketId: args.marketId,
1207
+ orderType: args.orderType,
1208
+ orderInfo,
1209
+ margin: args.margin,
1210
+ triggerPrice: args.triggerPrice,
1211
+ expirationBlock: args.expirationBlock ? BigInt(args.expirationBlock) : BigInt(0)
1212
+ });
1213
+ };
1214
+ const createBinaryOptionOrder = (args) => {
1215
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1216
+ subaccountId: args.subaccountId,
1217
+ feeRecipient: args.feeRecipient,
1218
+ price: args.price,
1219
+ quantity: args.quantity,
1220
+ cid: args.cid
1221
+ });
1222
+ return InjectiveExchangeV2OrderPb.DerivativeOrder.create({
1223
+ marketId: args.marketId,
1224
+ orderType: args.orderType,
1225
+ orderInfo,
1226
+ margin: args.margin,
1227
+ triggerPrice: args.triggerPrice,
1228
+ expirationBlock: args.expirationBlock ? BigInt(args.expirationBlock) : BigInt(0)
1229
+ });
1230
+ };
1231
+ const buildSpotOrders = (orders, subaccountId, fmt, fmtOpt) => orders.map((args) => createSpotOrder({
1232
+ ...args,
1233
+ price: fmt(args.price),
1234
+ triggerPrice: fmtOpt(args.triggerPrice),
1235
+ quantity: fmt(args.quantity),
1236
+ subaccountId
1237
+ }));
1238
+ const buildDerivativeOrders = (orders, subaccountId, fmt, fmtOpt) => orders.map((args) => createDerivativeOrder({
1239
+ ...args,
1240
+ price: fmt(args.price),
1241
+ margin: fmt(args.margin),
1242
+ triggerPrice: fmtOpt(args.triggerPrice),
1243
+ quantity: fmt(args.quantity),
1244
+ subaccountId
1245
+ }));
1246
+ const buildBinaryOptionOrders = (orders, subaccountId, fmt, fmtOpt) => orders.map((args) => createBinaryOptionOrder({
1247
+ ...args,
1248
+ price: fmt(args.price),
1249
+ margin: fmt(args.margin),
1250
+ triggerPrice: fmtOpt(args.triggerPrice),
1251
+ quantity: fmt(args.quantity),
1252
+ subaccountId
1253
+ }));
1254
+ const createMsgAndCancelOrders = (params) => {
1255
+ const hasCancelAll = params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0 || params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0 || params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0;
1256
+ const message = InjectiveExchangeV2TxPb.MsgBatchUpdateOrders.create({
1257
+ sender: params.injectiveAddress,
1258
+ ...hasCancelAll && { subaccountId: params.subaccountId }
1259
+ });
1260
+ if (params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0) message.spotMarketIdsToCancelAll = params.spotMarketIdsToCancelAll;
1261
+ if (params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0) message.derivativeMarketIdsToCancelAll = params.derivativeMarketIdsToCancelAll;
1262
+ if (params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0) message.binaryOptionsMarketIdsToCancelAll = params.binaryOptionsMarketIdsToCancelAll;
1263
+ if (params.spotOrdersToCancel) message.spotOrdersToCancel = params.spotOrdersToCancel.map(({ marketId, subaccountId, orderHash, cid }) => {
1264
+ return InjectiveExchangeV2TxPb.OrderData.create({
1265
+ marketId,
1266
+ subaccountId,
1267
+ orderHash,
1268
+ cid
1269
+ });
1270
+ });
1271
+ if (params.derivativeOrdersToCancel) message.derivativeOrdersToCancel = params.derivativeOrdersToCancel.map(({ marketId, subaccountId, orderHash, cid }) => {
1272
+ return InjectiveExchangeV2TxPb.OrderData.create({
1273
+ marketId,
1274
+ subaccountId,
1275
+ orderHash,
1276
+ cid
1277
+ });
1278
+ });
1279
+ if (params.binaryOptionsOrdersToCancel) message.binaryOptionsOrdersToCancel = params.binaryOptionsOrdersToCancel.map(({ marketId, subaccountId, orderHash, cid }) => {
1280
+ return InjectiveExchangeV2TxPb.OrderData.create({
1281
+ marketId,
1282
+ subaccountId,
1283
+ orderHash,
1284
+ cid
1285
+ });
1286
+ });
1287
+ return message;
1288
+ };
1289
+ /**
1290
+ * @category Messages
1291
+ */
1292
+ var MsgBatchUpdateOrdersV2 = class MsgBatchUpdateOrdersV2 extends MsgBase {
1293
+ static fromJSON(params) {
1294
+ return new MsgBatchUpdateOrdersV2(params);
1295
+ }
1296
+ toProto() {
1297
+ const { params } = this;
1298
+ const message = createMsgAndCancelOrders(params);
1299
+ const fmt = (v) => toChainFormat(v).toFixed();
1300
+ const fmtOpt = (v) => toChainFormat(v || 0).toFixed();
1301
+ if (params.spotOrdersToCreate) message.spotOrdersToCreate = buildSpotOrders(params.spotOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1302
+ if (params.derivativeOrdersToCreate) message.derivativeOrdersToCreate = buildDerivativeOrders(params.derivativeOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1303
+ if (params.binaryOptionsOrdersToCreate) message.binaryOptionsOrdersToCreate = buildBinaryOptionOrders(params.binaryOptionsOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1304
+ if (params.spotMarketOrdersToCreate) message.spotMarketOrdersToCreate = buildSpotOrders(params.spotMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1305
+ if (params.derivativeMarketOrdersToCreate) message.derivativeMarketOrdersToCreate = buildDerivativeOrders(params.derivativeMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1306
+ if (params.binaryOptionsMarketOrdersToCreate) message.binaryOptionsMarketOrdersToCreate = buildBinaryOptionOrders(params.binaryOptionsMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1307
+ return message;
1308
+ }
1309
+ toData() {
1310
+ const proto = this.toProto();
1311
+ return {
1312
+ "@type": "/injective.exchange.v2.MsgBatchUpdateOrders",
1313
+ ...proto
1314
+ };
1315
+ }
1316
+ toAmino() {
1317
+ const { params } = this;
1318
+ const message = createMsgAndCancelOrders(params);
1319
+ const fmt = (v) => v;
1320
+ const fmtOpt = (v) => v || "0";
1321
+ if (params.spotOrdersToCreate) message.spotOrdersToCreate = buildSpotOrders(params.spotOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1322
+ if (params.derivativeOrdersToCreate) message.derivativeOrdersToCreate = buildDerivativeOrders(params.derivativeOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1323
+ if (params.binaryOptionsOrdersToCreate) message.binaryOptionsOrdersToCreate = buildBinaryOptionOrders(params.binaryOptionsOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1324
+ if (params.spotMarketOrdersToCreate) message.spotMarketOrdersToCreate = buildSpotOrders(params.spotMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1325
+ if (params.derivativeMarketOrdersToCreate) message.derivativeMarketOrdersToCreate = buildDerivativeOrders(params.derivativeMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1326
+ if (params.binaryOptionsMarketOrdersToCreate) message.binaryOptionsMarketOrdersToCreate = buildBinaryOptionOrders(params.binaryOptionsMarketOrdersToCreate, params.subaccountId, fmt, fmtOpt);
1327
+ const orderInfoToSnakeCase = (orderInfo) => ({
1328
+ subaccount_id: orderInfo.subaccountId,
1329
+ fee_recipient: orderInfo.feeRecipient,
1330
+ price: orderInfo.price,
1331
+ quantity: orderInfo.quantity,
1332
+ cid: orderInfo.cid
1333
+ });
1334
+ const spotOrderToSnakeCase = (order) => ({
1335
+ market_id: order.marketId,
1336
+ order_type: order.orderType,
1337
+ order_info: orderInfoToSnakeCase(order.orderInfo),
1338
+ trigger_price: order.triggerPrice,
1339
+ expiration_block: String(order.expirationBlock)
1340
+ });
1341
+ const derivativeOrderToSnakeCase = (order) => ({
1342
+ market_id: order.marketId,
1343
+ order_type: order.orderType,
1344
+ order_info: orderInfoToSnakeCase(order.orderInfo),
1345
+ margin: order.margin,
1346
+ trigger_price: order.triggerPrice,
1347
+ expiration_block: String(order.expirationBlock)
1348
+ });
1349
+ const orderDataToSnakeCase = (orderData) => ({
1350
+ market_id: orderData.marketId,
1351
+ subaccount_id: orderData.subaccountId,
1352
+ order_hash: orderData.orderHash,
1353
+ cid: orderData.cid
1354
+ });
1355
+ return {
1356
+ type: "exchange/MsgBatchUpdateOrders",
1357
+ value: {
1358
+ sender: message.sender,
1359
+ subaccount_id: message.subaccountId,
1360
+ spot_market_ids_to_cancel_all: message.spotMarketIdsToCancelAll,
1361
+ derivative_market_ids_to_cancel_all: message.derivativeMarketIdsToCancelAll,
1362
+ spot_orders_to_cancel: message.spotOrdersToCancel.map(orderDataToSnakeCase),
1363
+ derivative_orders_to_cancel: message.derivativeOrdersToCancel.map(orderDataToSnakeCase),
1364
+ spot_orders_to_create: message.spotOrdersToCreate.map(spotOrderToSnakeCase),
1365
+ derivative_orders_to_create: message.derivativeOrdersToCreate.map(derivativeOrderToSnakeCase),
1366
+ binary_options_orders_to_cancel: message.binaryOptionsOrdersToCancel.map(orderDataToSnakeCase),
1367
+ binary_options_market_ids_to_cancel_all: message.binaryOptionsMarketIdsToCancelAll,
1368
+ binary_options_orders_to_create: message.binaryOptionsOrdersToCreate.map(derivativeOrderToSnakeCase),
1369
+ spot_market_orders_to_create: message.spotMarketOrdersToCreate.map(spotOrderToSnakeCase),
1370
+ derivative_market_orders_to_create: message.derivativeMarketOrdersToCreate.map(derivativeOrderToSnakeCase),
1371
+ binary_options_market_orders_to_create: message.binaryOptionsMarketOrdersToCreate.map(derivativeOrderToSnakeCase)
1372
+ }
1373
+ };
1374
+ }
1375
+ toWeb3Gw() {
1376
+ const { value } = this.toAmino();
1377
+ return {
1378
+ "@type": "/injective.exchange.v2.MsgBatchUpdateOrders",
1379
+ ...value
1380
+ };
1381
+ }
1382
+ toEip712() {
1383
+ var _msgValue$spot_market, _msgValue$derivative_, _msgValue$spot_orders, _msgValue$derivative_2, _msgValue$binary_opti, _msgValue$binary_opti2;
1384
+ const { params } = this;
1385
+ const { value, type } = this.toAmino();
1386
+ const spotOrderToEip712 = (order, args) => ({
1387
+ market_id: order.market_id,
1388
+ order_info: {
1389
+ subaccount_id: order.order_info.subaccount_id,
1390
+ fee_recipient: order.order_info.fee_recipient,
1391
+ price: toChainFormat(args.price).toFixed(),
1392
+ quantity: toChainFormat(args.quantity).toFixed(),
1393
+ cid: order.order_info.cid
1394
+ },
1395
+ order_type: order.order_type,
1396
+ trigger_price: toChainFormat(args.triggerPrice || "0").toFixed()
1397
+ });
1398
+ const derivativeOrderToEip712 = (order, args) => ({
1399
+ market_id: order.market_id,
1400
+ order_info: {
1401
+ subaccount_id: order.order_info.subaccount_id,
1402
+ fee_recipient: order.order_info.fee_recipient,
1403
+ price: toChainFormat(args.price).toFixed(),
1404
+ quantity: toChainFormat(args.quantity).toFixed(),
1405
+ cid: order.order_info.cid
1406
+ },
1407
+ order_type: order.order_type,
1408
+ margin: toChainFormat(args.margin).toFixed(),
1409
+ trigger_price: toChainFormat(args.triggerPrice || "0").toFixed()
1410
+ });
1411
+ const msgValue = value;
1412
+ const hasCancelAll = params.spotMarketIdsToCancelAll && params.spotMarketIdsToCancelAll.length > 0 || params.derivativeMarketIdsToCancelAll && params.derivativeMarketIdsToCancelAll.length > 0 || params.binaryOptionsMarketIdsToCancelAll && params.binaryOptionsMarketIdsToCancelAll.length > 0;
1413
+ const result = { sender: msgValue.sender };
1414
+ if (hasCancelAll) result.subaccount_id = msgValue.subaccount_id;
1415
+ if (((_msgValue$spot_market = msgValue.spot_market_ids_to_cancel_all) === null || _msgValue$spot_market === void 0 ? void 0 : _msgValue$spot_market.length) > 0) result.spot_market_ids_to_cancel_all = msgValue.spot_market_ids_to_cancel_all;
1416
+ if (((_msgValue$derivative_ = msgValue.derivative_market_ids_to_cancel_all) === null || _msgValue$derivative_ === void 0 ? void 0 : _msgValue$derivative_.length) > 0) result.derivative_market_ids_to_cancel_all = msgValue.derivative_market_ids_to_cancel_all;
1417
+ if (((_msgValue$spot_orders = msgValue.spot_orders_to_cancel) === null || _msgValue$spot_orders === void 0 ? void 0 : _msgValue$spot_orders.length) > 0) result.spot_orders_to_cancel = msgValue.spot_orders_to_cancel;
1418
+ if (((_msgValue$derivative_2 = msgValue.derivative_orders_to_cancel) === null || _msgValue$derivative_2 === void 0 ? void 0 : _msgValue$derivative_2.length) > 0) result.derivative_orders_to_cancel = msgValue.derivative_orders_to_cancel;
1419
+ if (params.spotOrdersToCreate && params.spotOrdersToCreate.length > 0) result.spot_orders_to_create = params.spotOrdersToCreate.map((args, i) => spotOrderToEip712(msgValue.spot_orders_to_create[i], args));
1420
+ if (params.derivativeOrdersToCreate && params.derivativeOrdersToCreate.length > 0) result.derivative_orders_to_create = params.derivativeOrdersToCreate.map((args, i) => derivativeOrderToEip712(msgValue.derivative_orders_to_create[i], args));
1421
+ if (((_msgValue$binary_opti = msgValue.binary_options_orders_to_cancel) === null || _msgValue$binary_opti === void 0 ? void 0 : _msgValue$binary_opti.length) > 0) result.binary_options_orders_to_cancel = msgValue.binary_options_orders_to_cancel;
1422
+ if (((_msgValue$binary_opti2 = msgValue.binary_options_market_ids_to_cancel_all) === null || _msgValue$binary_opti2 === void 0 ? void 0 : _msgValue$binary_opti2.length) > 0) result.binary_options_market_ids_to_cancel_all = msgValue.binary_options_market_ids_to_cancel_all;
1423
+ if (params.binaryOptionsOrdersToCreate && params.binaryOptionsOrdersToCreate.length > 0) result.binary_options_orders_to_create = params.binaryOptionsOrdersToCreate.map((args, i) => derivativeOrderToEip712(msgValue.binary_options_orders_to_create[i], args));
1424
+ if (params.spotMarketOrdersToCreate && params.spotMarketOrdersToCreate.length > 0) result.spot_market_orders_to_create = params.spotMarketOrdersToCreate.map((args, i) => spotOrderToEip712(msgValue.spot_market_orders_to_create[i], args));
1425
+ if (params.derivativeMarketOrdersToCreate && params.derivativeMarketOrdersToCreate.length > 0) result.derivative_market_orders_to_create = params.derivativeMarketOrdersToCreate.map((args, i) => derivativeOrderToEip712(msgValue.derivative_market_orders_to_create[i], args));
1426
+ if (params.binaryOptionsMarketOrdersToCreate && params.binaryOptionsMarketOrdersToCreate.length > 0) result.binary_options_market_orders_to_create = params.binaryOptionsMarketOrdersToCreate.map((args, i) => derivativeOrderToEip712(msgValue.binary_options_market_orders_to_create[i], args));
1427
+ return {
1428
+ type,
1429
+ value: result
1430
+ };
1431
+ }
1432
+ toEip712Types() {
1433
+ const eip712 = this.toEip712();
1434
+ return patchOrderTypesWithExpirationBlock(objectKeysToEip712Types({
1435
+ object: eip712.value,
1436
+ messageType: eip712.type
1437
+ }), [
1438
+ "TypeSpotOrdersToCreate",
1439
+ "TypeDerivativeOrdersToCreate",
1440
+ "TypeBinaryOptionsOrdersToCreate",
1441
+ "TypeSpotMarketOrdersToCreate",
1442
+ "TypeDerivativeMarketOrdersToCreate",
1443
+ "TypeBinaryOptionsMarketOrdersToCreate"
1444
+ ]);
1445
+ }
1446
+ toEip712V2() {
1447
+ var _web3gw$spot_market_i, _web3gw$derivative_ma, _web3gw$spot_orders_t, _web3gw$derivative_or, _web3gw$binary_option, _web3gw$binary_option2;
1448
+ const { params } = this;
1449
+ const web3gw = this.toWeb3Gw();
1450
+ const formatSpotOrderEip712 = (order, args) => ({
1451
+ market_id: order.market_id,
1452
+ order_info: {
1453
+ subaccount_id: order.order_info.subaccount_id,
1454
+ fee_recipient: order.order_info.fee_recipient,
1455
+ price: numberToCosmosSdkDecString(args.price),
1456
+ quantity: numberToCosmosSdkDecString(args.quantity),
1457
+ cid: order.order_info.cid
1458
+ },
1459
+ order_type: InjectiveExchangeV2OrderPb.OrderType[args.orderType],
1460
+ trigger_price: numberToCosmosSdkDecString(args.triggerPrice || "0"),
1461
+ expiration_block: args.expirationBlock || "0"
1462
+ });
1463
+ const formatDerivativeOrderEip712 = (order, args) => ({
1464
+ market_id: order.market_id,
1465
+ order_info: {
1466
+ subaccount_id: order.order_info.subaccount_id,
1467
+ fee_recipient: order.order_info.fee_recipient,
1468
+ price: numberToCosmosSdkDecString(args.price),
1469
+ quantity: numberToCosmosSdkDecString(args.quantity),
1470
+ cid: order.order_info.cid
1471
+ },
1472
+ order_type: InjectiveExchangeV2OrderPb.OrderType[args.orderType],
1473
+ margin: numberToCosmosSdkDecString(args.margin),
1474
+ trigger_price: numberToCosmosSdkDecString(args.triggerPrice || "0"),
1475
+ expiration_block: args.expirationBlock || "0"
1476
+ });
1477
+ return {
1478
+ "@type": "/injective.exchange.v2.MsgBatchUpdateOrders",
1479
+ sender: web3gw.sender,
1480
+ subaccount_id: web3gw.subaccount_id,
1481
+ spot_market_ids_to_cancel_all: (_web3gw$spot_market_i = web3gw.spot_market_ids_to_cancel_all) !== null && _web3gw$spot_market_i !== void 0 ? _web3gw$spot_market_i : [],
1482
+ derivative_market_ids_to_cancel_all: (_web3gw$derivative_ma = web3gw.derivative_market_ids_to_cancel_all) !== null && _web3gw$derivative_ma !== void 0 ? _web3gw$derivative_ma : [],
1483
+ spot_orders_to_cancel: (_web3gw$spot_orders_t = web3gw.spot_orders_to_cancel) !== null && _web3gw$spot_orders_t !== void 0 ? _web3gw$spot_orders_t : [],
1484
+ derivative_orders_to_cancel: (_web3gw$derivative_or = web3gw.derivative_orders_to_cancel) !== null && _web3gw$derivative_or !== void 0 ? _web3gw$derivative_or : [],
1485
+ spot_orders_to_create: params.spotOrdersToCreate && params.spotOrdersToCreate.length > 0 ? params.spotOrdersToCreate.map((args, i) => formatSpotOrderEip712(web3gw.spot_orders_to_create[i], args)) : [],
1486
+ derivative_orders_to_create: params.derivativeOrdersToCreate && params.derivativeOrdersToCreate.length > 0 ? params.derivativeOrdersToCreate.map((args, i) => formatDerivativeOrderEip712(web3gw.derivative_orders_to_create[i], args)) : [],
1487
+ binary_options_orders_to_cancel: (_web3gw$binary_option = web3gw.binary_options_orders_to_cancel) !== null && _web3gw$binary_option !== void 0 ? _web3gw$binary_option : [],
1488
+ binary_options_market_ids_to_cancel_all: (_web3gw$binary_option2 = web3gw.binary_options_market_ids_to_cancel_all) !== null && _web3gw$binary_option2 !== void 0 ? _web3gw$binary_option2 : [],
1489
+ binary_options_orders_to_create: params.binaryOptionsOrdersToCreate && params.binaryOptionsOrdersToCreate.length > 0 ? params.binaryOptionsOrdersToCreate.map((args, i) => formatDerivativeOrderEip712(web3gw.binary_options_orders_to_create[i], args)) : [],
1490
+ spot_market_orders_to_create: params.spotMarketOrdersToCreate && params.spotMarketOrdersToCreate.length > 0 ? params.spotMarketOrdersToCreate.map((args, i) => formatSpotOrderEip712(web3gw.spot_market_orders_to_create[i], args)) : [],
1491
+ derivative_market_orders_to_create: params.derivativeMarketOrdersToCreate && params.derivativeMarketOrdersToCreate.length > 0 ? params.derivativeMarketOrdersToCreate.map((args, i) => formatDerivativeOrderEip712(web3gw.derivative_market_orders_to_create[i], args)) : [],
1492
+ binary_options_market_orders_to_create: params.binaryOptionsMarketOrdersToCreate && params.binaryOptionsMarketOrdersToCreate.length > 0 ? params.binaryOptionsMarketOrdersToCreate.map((args, i) => formatDerivativeOrderEip712(web3gw.binary_options_market_orders_to_create[i], args)) : []
1493
+ };
1494
+ }
1495
+ toDirectSign() {
1496
+ return {
1497
+ type: "/injective.exchange.v2.MsgBatchUpdateOrders",
1498
+ message: this.toProto()
1499
+ };
1500
+ }
1501
+ toBinary() {
1502
+ return InjectiveExchangeV2TxPb.MsgBatchUpdateOrders.toBinary(this.toProto());
1503
+ }
1504
+ };
1505
+
1506
+ //#endregion
1507
+ //#region src/core/modules/exchange/msgs/MsgLiquidatePositionV2.ts
1508
+ const createMessage$10 = (params) => {
1509
+ const message = InjectiveExchangeV2TxPb.MsgLiquidatePosition.create({
1510
+ sender: params.injectiveAddress,
1511
+ subaccountId: params.subaccountId,
1512
+ marketId: params.marketId
1513
+ });
1514
+ if (params.order) {
1515
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1516
+ subaccountId: params.order.subaccountId,
1517
+ feeRecipient: params.order.feeRecipient,
1518
+ price: params.order.price,
1519
+ quantity: params.order.quantity,
1520
+ cid: params.order.cid || ""
1521
+ });
1522
+ message.order = InjectiveExchangeV2OrderPb.DerivativeOrder.create({
1523
+ marketId: params.order.marketId,
1524
+ margin: params.order.margin,
1525
+ orderInfo,
1526
+ orderType: params.order.orderType,
1527
+ triggerPrice: params.order.triggerPrice || "0",
1528
+ expirationBlock: params.order.expirationBlock ? BigInt(params.order.expirationBlock) : BigInt(0)
1529
+ });
1530
+ }
1531
+ return message;
1532
+ };
1533
+ /**
1534
+ * @category Messages
1535
+ */
1536
+ var MsgLiquidatePositionV2 = class MsgLiquidatePositionV2 extends MsgBase {
1537
+ static fromJSON(params) {
1538
+ return new MsgLiquidatePositionV2(params);
1539
+ }
1540
+ toProto() {
1541
+ const { params: initialParams } = this;
1542
+ return createMessage$10({
1543
+ ...initialParams,
1544
+ order: initialParams.order ? {
1545
+ ...initialParams.order,
1546
+ price: toChainFormat(initialParams.order.price).toFixed(),
1547
+ margin: toChainFormat(initialParams.order.margin).toFixed(),
1548
+ triggerPrice: toChainFormat(initialParams.order.triggerPrice || 0).toFixed(),
1549
+ quantity: toChainFormat(initialParams.order.quantity).toFixed()
1550
+ } : void 0
1551
+ });
1552
+ }
1553
+ toData() {
1554
+ const proto = this.toProto();
1555
+ return {
1556
+ "@type": "/injective.exchange.v2.MsgLiquidatePosition",
1557
+ ...proto
1558
+ };
1559
+ }
1560
+ toAmino() {
1561
+ const { params } = this;
1562
+ return {
1563
+ type: "exchange/MsgLiquidatePosition",
1564
+ value: {
1565
+ sender: params.injectiveAddress,
1566
+ subaccount_id: params.subaccountId,
1567
+ market_id: params.marketId,
1568
+ order: params.order ? {
1569
+ market_id: params.order.marketId,
1570
+ order_info: {
1571
+ subaccount_id: params.order.subaccountId,
1572
+ fee_recipient: params.order.feeRecipient,
1573
+ price: params.order.price,
1574
+ quantity: params.order.quantity,
1575
+ cid: params.order.cid || ""
1576
+ },
1577
+ order_type: params.order.orderType,
1578
+ margin: params.order.margin,
1579
+ trigger_price: params.order.triggerPrice || "0",
1580
+ expiration_block: params.order.expirationBlock || "0"
1581
+ } : void 0
1582
+ }
1583
+ };
1584
+ }
1585
+ toWeb3Gw() {
1586
+ const { value } = this.toAmino();
1587
+ return {
1588
+ "@type": "/injective.exchange.v2.MsgLiquidatePosition",
1589
+ ...value
1590
+ };
1591
+ }
1592
+ toEip712V2() {
1593
+ const { params } = this;
1594
+ const web3gw = this.toWeb3Gw();
1595
+ const order = web3gw.order;
1596
+ return {
1597
+ ...web3gw,
1598
+ order: params.order ? {
1599
+ ...order,
1600
+ order_info: {
1601
+ ...order === null || order === void 0 ? void 0 : order.order_info,
1602
+ price: numberToCosmosSdkDecString(params.order.price),
1603
+ quantity: numberToCosmosSdkDecString(params.order.quantity)
1604
+ },
1605
+ margin: numberToCosmosSdkDecString(params.order.margin),
1606
+ trigger_price: numberToCosmosSdkDecString(params.order.triggerPrice || "0"),
1607
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.order.orderType]
1608
+ } : null
1609
+ };
1610
+ }
1611
+ toEip712() {
1612
+ const { params } = this;
1613
+ const { value, type } = this.toAmino();
1614
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
1615
+ return {
1616
+ type,
1617
+ value: {
1618
+ ...value,
1619
+ order: params.order ? {
1620
+ ...orderWithoutExpiration,
1621
+ order_info: {
1622
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
1623
+ price: toChainFormat(params.order.price).toFixed(),
1624
+ quantity: toChainFormat(params.order.quantity).toFixed()
1625
+ },
1626
+ margin: toChainFormat(params.order.margin).toFixed(),
1627
+ trigger_price: toChainFormat(params.order.triggerPrice || "0").toFixed()
1628
+ } : void 0
1629
+ }
1630
+ };
1631
+ }
1632
+ toEip712Types() {
1633
+ const eip712 = this.toEip712();
1634
+ return patchOrderTypesWithExpirationBlock(objectKeysToEip712Types({
1635
+ object: eip712.value,
1636
+ messageType: eip712.type
1637
+ }), ["TypeOrder"]);
1638
+ }
1639
+ toDirectSign() {
1640
+ return {
1641
+ type: "/injective.exchange.v2.MsgLiquidatePosition",
1642
+ message: this.toProto()
1643
+ };
1644
+ }
1645
+ toBinary() {
1646
+ return InjectiveExchangeV2TxPb.MsgLiquidatePosition.toBinary(this.toProto());
1647
+ }
1648
+ };
1649
+
1650
+ //#endregion
1651
+ //#region src/core/modules/exchange/msgs/MsgCancelPostOnlyModeV2.ts
1652
+ const createMessage$9 = (params) => {
1653
+ return InjectiveExchangeV2TxPb.MsgCancelPostOnlyMode.create({ sender: params.sender });
1654
+ };
1655
+ /**
1656
+ * @category Messages
1657
+ */
1658
+ var MsgCancelPostOnlyModeV2 = class MsgCancelPostOnlyModeV2 extends MsgBase {
1659
+ static fromJSON(params) {
1660
+ return new MsgCancelPostOnlyModeV2(params);
1661
+ }
1662
+ toProto() {
1663
+ const { params: initialParams } = this;
1664
+ return createMessage$9({ ...initialParams });
1665
+ }
1666
+ toData() {
1667
+ const proto = this.toProto();
1668
+ return {
1669
+ "@type": "/injective.exchange.v2.MsgCancelPostOnlyMode",
1670
+ ...proto
1671
+ };
1672
+ }
1673
+ toAmino() {
1674
+ const { params } = this;
1675
+ return {
1676
+ type: "exchange/MsgCancelPostOnlyMode",
1677
+ value: { sender: createMessage$9(params).sender }
1678
+ };
1679
+ }
1680
+ toWeb3Gw() {
1681
+ const { value } = this.toAmino();
1682
+ return {
1683
+ "@type": "/injective.exchange.v2.MsgCancelPostOnlyMode",
1684
+ ...value
1685
+ };
1686
+ }
1687
+ toEip712() {
1688
+ const { type, value } = this.toAmino();
1689
+ return {
1690
+ type,
1691
+ value: { ...value }
1692
+ };
1693
+ }
1694
+ toEip712V2() {
1695
+ return { ...this.toWeb3Gw() };
1696
+ }
1697
+ toDirectSign() {
1698
+ return {
1699
+ type: "/injective.exchange.v2.MsgCancelPostOnlyMode",
1700
+ message: this.toProto()
1701
+ };
1702
+ }
1703
+ toBinary() {
1704
+ return InjectiveExchangeV2TxPb.MsgCancelPostOnlyMode.toBinary(this.toProto());
1705
+ }
1706
+ };
1707
+
1708
+ //#endregion
1709
+ //#region src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts
1710
+ const createLimitOrder$5 = (params) => {
1711
+ const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
1712
+ subaccountId: params.subaccountId,
1713
+ feeRecipient: params.feeRecipient,
1714
+ price: params.price,
1715
+ quantity: params.quantity,
1716
+ cid: params.cid || ""
1717
+ });
1718
+ const spotOrder = InjectiveExchangeV1Beta1ExchangePb.SpotOrder.create({
1719
+ marketId: params.marketId,
1720
+ orderInfo,
1721
+ orderType: params.orderType,
1722
+ triggerPrice: params.triggerPrice || "0"
1723
+ });
1724
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotLimitOrder.create({
1725
+ sender: params.injectiveAddress,
1726
+ order: spotOrder
1727
+ });
1728
+ };
1729
+ /**
1730
+ * @category Messages
1731
+ */
1732
+ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
1733
+ static fromJSON(params) {
1734
+ return new MsgCreateSpotLimitOrder(params);
1735
+ }
1736
+ toProto() {
1737
+ const { params: initialParams } = this;
1738
+ return createLimitOrder$5({
1739
+ ...initialParams,
1740
+ price: toChainFormat(initialParams.price).toFixed(),
1741
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
1742
+ quantity: toChainFormat(initialParams.quantity).toFixed()
1743
+ });
1744
+ }
1745
+ toData() {
1746
+ const proto = this.toProto();
1747
+ return {
1748
+ "@type": "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
1749
+ ...proto
1750
+ };
1751
+ }
1752
+ toAmino() {
1753
+ const { params } = this;
1754
+ return {
1755
+ type: "exchange/MsgCreateSpotLimitOrder",
1756
+ value: {
1757
+ sender: params.injectiveAddress,
1758
+ order: {
1759
+ market_id: params.marketId,
1760
+ order_info: {
1761
+ subaccount_id: params.subaccountId,
1762
+ fee_recipient: params.feeRecipient,
1763
+ price: params.price,
1764
+ quantity: params.quantity,
1765
+ cid: params.cid || ""
1766
+ },
1767
+ order_type: params.orderType,
1768
+ trigger_price: params.triggerPrice || "0"
1769
+ }
1770
+ }
1771
+ };
1772
+ }
1773
+ toWeb3Gw() {
1774
+ const { value } = this.toAmino();
1775
+ return {
1776
+ "@type": "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
1777
+ ...value
1778
+ };
1779
+ }
1780
+ toEip712V2() {
1781
+ const { params } = this;
1782
+ const web3gw = this.toWeb3Gw();
1783
+ const order = web3gw.order;
1784
+ return {
1785
+ ...web3gw,
1786
+ order: {
1787
+ ...order,
1788
+ order_info: {
1789
+ ...order.order_info,
1790
+ price: numberToCosmosSdkDecString(params.price),
1791
+ quantity: numberToCosmosSdkDecString(params.quantity)
1792
+ },
1793
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
1794
+ order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
1795
+ }
1796
+ };
1797
+ }
1798
+ toEip712() {
1799
+ var _value$order;
1800
+ const { params } = this;
1801
+ const { value, type } = this.toAmino();
1802
+ return {
1803
+ type,
1804
+ value: {
1805
+ ...value,
1806
+ order: {
1807
+ ...value.order,
1808
+ order_info: {
1809
+ ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
1810
+ price: toChainFormat(params.price).toFixed(),
1811
+ quantity: toChainFormat(params.quantity).toFixed()
1812
+ },
1813
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
1814
+ }
1815
+ }
1816
+ };
1817
+ }
1818
+ toDirectSign() {
1819
+ return {
1820
+ type: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
1821
+ message: this.toProto()
1822
+ };
1823
+ }
1824
+ toBinary() {
1825
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotLimitOrder.toBinary(this.toProto());
1826
+ }
1827
+ };
1828
+
1829
+ //#endregion
1830
+ //#region src/core/modules/exchange/msgs/MsgAuthorizeStakeGrants.ts
1831
+ /**
1832
+ * @category Messages
1833
+ */
1834
+ var MsgAuthorizeStakeGrants = class MsgAuthorizeStakeGrants extends MsgBase {
1835
+ static fromJSON(params) {
1836
+ return new MsgAuthorizeStakeGrants(params);
1837
+ }
1838
+ toProto() {
1839
+ const { params } = this;
1840
+ return InjectiveExchangeV1Beta1TxPb.MsgAuthorizeStakeGrants.create({
1841
+ sender: params.injectiveAddress,
1842
+ grants: [{
1843
+ grantee: params.grantee,
1844
+ amount: params.amount
1845
+ }]
1846
+ });
1847
+ }
1848
+ toData() {
1849
+ const proto = this.toProto();
1850
+ return {
1851
+ "@type": "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
1852
+ ...proto
1853
+ };
1854
+ }
1855
+ toAmino() {
1856
+ const proto = this.toProto();
1857
+ return {
1858
+ type: "exchange/MsgAuthorizeStakeGrants",
1859
+ value: {
1860
+ sender: proto.sender,
1861
+ grants: proto.grants
1862
+ }
1863
+ };
1864
+ }
1865
+ toWeb3Gw() {
1866
+ const { value } = this.toAmino();
1867
+ return {
1868
+ "@type": "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
1869
+ ...value
1870
+ };
1871
+ }
1872
+ toDirectSign() {
1873
+ return {
1874
+ type: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
1875
+ message: this.toProto()
1876
+ };
1877
+ }
1878
+ toBinary() {
1879
+ return InjectiveExchangeV1Beta1TxPb.MsgAuthorizeStakeGrants.toBinary(this.toProto());
1880
+ }
1881
+ };
1882
+
1883
+ //#endregion
1884
+ //#region src/core/modules/exchange/msgs/MsgReclaimLockedFundsV2.ts
1885
+ /**
1886
+ * @category Messages
1887
+ */
1888
+ var MsgReclaimLockedFundsV2 = class MsgReclaimLockedFundsV2 extends MsgBase {
1889
+ static fromJSON(params) {
1890
+ return new MsgReclaimLockedFundsV2(params);
1891
+ }
1892
+ toProto() {
1893
+ const { params } = this;
1894
+ return InjectiveExchangeV2TxPb.MsgReclaimLockedFunds.create({
1895
+ sender: params.sender,
1896
+ lockedAccountPubKey: base64ToUint8Array(params.lockedAccountPubKey),
1897
+ signature: params.signature
1898
+ });
1899
+ }
1900
+ toData() {
1901
+ const proto = this.toProto();
1902
+ return {
1903
+ "@type": "/injective.exchange.v2.MsgReclaimLockedFunds",
1904
+ ...proto
1905
+ };
1906
+ }
1907
+ toAmino() {
1908
+ const proto = this.toProto();
1909
+ return {
1910
+ type: "exchange/MsgReclaimLockedFunds",
1911
+ value: {
1912
+ sender: proto.sender,
1913
+ lockedAccountPubKey: uint8ArrayToBase64(proto.lockedAccountPubKey),
1914
+ signature: uint8ArrayToBase64(proto.signature)
1915
+ }
1916
+ };
1917
+ }
1918
+ toWeb3Gw() {
1919
+ throw new GeneralException(/* @__PURE__ */ new Error("EIP712 is not supported for MsgReclaimLockedFunds."));
1920
+ }
1921
+ toEip712() {
1922
+ throw new GeneralException(/* @__PURE__ */ new Error("EIP712 is not supported for MsgReclaimLockedFunds."));
1923
+ }
1924
+ toEip712V2() {
1925
+ throw new GeneralException(/* @__PURE__ */ new Error("EIP712 is not supported for MsgReclaimLockedFunds."));
1926
+ }
1927
+ toDirectSign() {
1928
+ return {
1929
+ type: "/injective.exchange.v2.MsgReclaimLockedFunds",
1930
+ message: this.toProto()
1931
+ };
1932
+ }
1933
+ toBinary() {
1934
+ return InjectiveExchangeV2TxPb.MsgReclaimLockedFunds.toBinary(this.toProto());
1935
+ }
1936
+ };
1937
+
1938
+ //#endregion
1939
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts
1940
+ /**
1941
+ * @category Messages
1942
+ */
1943
+ var MsgBatchCancelSpotOrders = class MsgBatchCancelSpotOrders extends MsgBase {
1944
+ static fromJSON(params) {
1945
+ return new MsgBatchCancelSpotOrders(params);
1946
+ }
1947
+ toProto() {
1948
+ const { params } = this;
1949
+ const orderDataList = params.orders.map((order) => {
1950
+ return InjectiveExchangeV1Beta1TxPb.OrderData.create({
1951
+ marketId: order.marketId,
1952
+ subaccountId: order.subaccountId,
1953
+ orderHash: order.orderHash || "",
1954
+ orderMask: order.orderMask || InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
1955
+ cid: order.cid || ""
1956
+ });
1957
+ });
1958
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelSpotOrders.create({
1959
+ sender: params.injectiveAddress,
1960
+ data: orderDataList
1961
+ });
1962
+ }
1963
+ toData() {
1964
+ const proto = this.toProto();
1965
+ return {
1966
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
1967
+ ...proto
1968
+ };
1969
+ }
1970
+ toAmino() {
1971
+ const proto = this.toProto();
1972
+ return {
1973
+ type: "exchange/MsgBatchCancelSpotOrders",
1974
+ value: {
1975
+ sender: proto.sender,
1976
+ data: proto.data.map((orderData) => ({
1977
+ market_id: orderData.marketId,
1978
+ subaccount_id: orderData.subaccountId,
1979
+ order_hash: orderData.orderHash,
1980
+ order_mask: orderData.orderMask,
1981
+ cid: orderData.cid
1982
+ }))
1983
+ }
1984
+ };
1985
+ }
1986
+ toWeb3Gw() {
1987
+ const { value } = this.toAmino();
1988
+ return {
1989
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
1990
+ ...value
1991
+ };
1992
+ }
1993
+ toDirectSign() {
1994
+ return {
1995
+ type: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
1996
+ message: this.toProto()
1997
+ };
1998
+ }
1999
+ toBinary() {
2000
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelSpotOrders.toBinary(this.toProto());
2001
+ }
2002
+ };
2003
+
2004
+ //#endregion
2005
+ //#region src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts
2006
+ var MsgCancelDerivativeOrder = class MsgCancelDerivativeOrder extends MsgBase {
2007
+ static fromJSON(params) {
2008
+ return new MsgCancelDerivativeOrder(params);
2009
+ }
2010
+ toProto() {
2011
+ const { params } = this;
2012
+ return InjectiveExchangeV1Beta1TxPb.MsgCancelDerivativeOrder.create({
2013
+ sender: params.injectiveAddress,
2014
+ marketId: params.marketId,
2015
+ subaccountId: params.subaccountId,
2016
+ orderHash: params.orderHash || "",
2017
+ orderMask: params.orderMask || InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
2018
+ cid: params.cid || ""
2019
+ });
2020
+ }
2021
+ toData() {
2022
+ const proto = this.toProto();
2023
+ return {
2024
+ "@type": "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
2025
+ ...proto
2026
+ };
2027
+ }
2028
+ toAmino() {
2029
+ const proto = this.toProto();
2030
+ return {
2031
+ type: "exchange/MsgCancelDerivativeOrder",
2032
+ value: {
2033
+ sender: proto.sender,
2034
+ market_id: proto.marketId,
2035
+ subaccount_id: proto.subaccountId,
2036
+ order_hash: proto.orderHash,
2037
+ order_mask: proto.orderMask,
2038
+ cid: proto.cid
2039
+ }
2040
+ };
2041
+ }
2042
+ toWeb3Gw() {
2043
+ const { value } = this.toAmino();
2044
+ return {
2045
+ "@type": "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
2046
+ ...value
2047
+ };
2048
+ }
2049
+ toDirectSign() {
2050
+ return {
2051
+ type: "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
2052
+ message: this.toProto()
2053
+ };
2054
+ }
2055
+ toBinary() {
2056
+ return InjectiveExchangeV1Beta1TxPb.MsgCancelDerivativeOrder.toBinary(this.toProto());
2057
+ }
2058
+ };
2059
+
2060
+ //#endregion
2061
+ //#region src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts
2062
+ const createMarketOrder$5 = (params) => {
2063
+ const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
2064
+ subaccountId: params.subaccountId,
2065
+ feeRecipient: params.feeRecipient,
2066
+ price: params.price,
2067
+ quantity: params.quantity,
2068
+ cid: params.cid || ""
2069
+ });
2070
+ const spotOrder = InjectiveExchangeV1Beta1ExchangePb.SpotOrder.create({
2071
+ marketId: params.marketId,
2072
+ orderInfo,
2073
+ orderType: params.orderType,
2074
+ triggerPrice: params.triggerPrice || "0"
2075
+ });
2076
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotMarketOrder.create({
2077
+ sender: params.injectiveAddress,
2078
+ order: spotOrder
2079
+ });
2080
+ };
2081
+ /**
2082
+ * @category Messages
2083
+ */
2084
+ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
2085
+ static fromJSON(params) {
2086
+ return new MsgCreateSpotMarketOrder(params);
2087
+ }
2088
+ toProto() {
2089
+ const { params: initialParams } = this;
2090
+ return createMarketOrder$5({
2091
+ ...initialParams,
2092
+ price: toChainFormat(initialParams.price).toFixed(),
2093
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
2094
+ quantity: toChainFormat(initialParams.quantity).toFixed()
2095
+ });
2096
+ }
2097
+ toData() {
2098
+ const proto = this.toProto();
2099
+ return {
2100
+ "@type": "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
2101
+ ...proto
2102
+ };
2103
+ }
2104
+ toAmino() {
2105
+ const { params } = this;
2106
+ return {
2107
+ type: "exchange/MsgCreateSpotMarketOrder",
2108
+ value: {
2109
+ sender: params.injectiveAddress,
2110
+ order: {
2111
+ market_id: params.marketId,
2112
+ order_info: {
2113
+ subaccount_id: params.subaccountId,
2114
+ fee_recipient: params.feeRecipient,
2115
+ price: params.price,
2116
+ quantity: params.quantity,
2117
+ cid: params.cid || ""
2118
+ },
2119
+ order_type: params.orderType,
2120
+ trigger_price: params.triggerPrice || "0"
2121
+ }
2122
+ }
2123
+ };
2124
+ }
2125
+ toWeb3Gw() {
2126
+ const { value } = this.toAmino();
2127
+ return {
2128
+ "@type": "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
2129
+ ...value
2130
+ };
2131
+ }
2132
+ toEip712V2() {
2133
+ const { params } = this;
2134
+ const web3gw = this.toWeb3Gw();
2135
+ const order = web3gw.order;
2136
+ return {
2137
+ ...web3gw,
2138
+ order: {
2139
+ ...order,
2140
+ order_info: {
2141
+ ...order.order_info,
2142
+ price: numberToCosmosSdkDecString(params.price),
2143
+ quantity: numberToCosmosSdkDecString(params.quantity)
2144
+ },
2145
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
2146
+ order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
2147
+ }
2148
+ };
2149
+ }
2150
+ toEip712() {
2151
+ var _value$order;
2152
+ const { params } = this;
2153
+ const { value, type } = this.toAmino();
2154
+ return {
2155
+ type,
2156
+ value: {
2157
+ ...value,
2158
+ order: {
2159
+ ...value.order,
2160
+ order_info: {
2161
+ ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
2162
+ price: toChainFormat(params.price).toFixed(),
2163
+ quantity: toChainFormat(params.quantity).toFixed()
2164
+ },
2165
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
2166
+ }
2167
+ }
2168
+ };
2169
+ }
2170
+ toDirectSign() {
2171
+ return {
2172
+ type: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
2173
+ message: this.toProto()
2174
+ };
2175
+ }
2176
+ toBinary() {
2177
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotMarketOrder.toBinary(this.toProto());
2178
+ }
2179
+ };
2180
+
2181
+ //#endregion
2182
+ //#region src/core/modules/exchange/msgs/MsgAuthorizeStakeGrantsV2.ts
2183
+ /**
2184
+ * @category Messages
2185
+ */
2186
+ var MsgAuthorizeStakeGrantsV2 = class MsgAuthorizeStakeGrantsV2 extends MsgBase {
2187
+ static fromJSON(params) {
2188
+ return new MsgAuthorizeStakeGrantsV2(params);
2189
+ }
2190
+ toProto() {
2191
+ const { params } = this;
2192
+ return InjectiveExchangeV2TxPb.MsgAuthorizeStakeGrants.create({
2193
+ sender: params.injectiveAddress,
2194
+ grants: params.grants.map(({ grantee, amount }) => ({
2195
+ grantee,
2196
+ amount
2197
+ }))
2198
+ });
2199
+ }
2200
+ toData() {
2201
+ const proto = this.toProto();
2202
+ return {
2203
+ "@type": "/injective.exchange.v2.MsgAuthorizeStakeGrants",
2204
+ ...proto
2205
+ };
2206
+ }
2207
+ toAmino() {
2208
+ const proto = this.toProto();
2209
+ return {
2210
+ type: "exchange/MsgAuthorizeStakeGrants",
2211
+ value: {
2212
+ sender: proto.sender,
2213
+ grants: proto.grants
2214
+ }
2215
+ };
2216
+ }
2217
+ toWeb3Gw() {
2218
+ const { value } = this.toAmino();
2219
+ return {
2220
+ "@type": "/injective.exchange.v2.MsgAuthorizeStakeGrants",
2221
+ ...value
2222
+ };
2223
+ }
2224
+ toDirectSign() {
2225
+ return {
2226
+ type: "/injective.exchange.v2.MsgAuthorizeStakeGrants",
2227
+ message: this.toProto()
2228
+ };
2229
+ }
2230
+ toBinary() {
2231
+ return InjectiveExchangeV2TxPb.MsgAuthorizeStakeGrants.toBinary(this.toProto());
2232
+ }
2233
+ };
2234
+
2235
+ //#endregion
2236
+ //#region src/core/modules/exchange/msgs/MsgCreateSpotLimitOrderV2.ts
2237
+ const createLimitOrder$4 = (params) => {
2238
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
2239
+ subaccountId: params.subaccountId,
2240
+ feeRecipient: params.feeRecipient,
2241
+ price: params.price,
2242
+ quantity: params.quantity,
2243
+ cid: params.cid || ""
2244
+ });
2245
+ const spotOrder = InjectiveExchangeV2OrderPb.SpotOrder.create({
2246
+ marketId: params.marketId,
2247
+ orderInfo,
2248
+ orderType: params.orderType,
2249
+ triggerPrice: params.triggerPrice || "0",
2250
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
2251
+ });
2252
+ return InjectiveExchangeV2TxPb.MsgCreateSpotLimitOrder.create({
2253
+ sender: params.injectiveAddress,
2254
+ order: spotOrder
2255
+ });
2256
+ };
2257
+ /**
2258
+ * @category Messages
2259
+ */
2260
+ var MsgCreateSpotLimitOrderV2 = class MsgCreateSpotLimitOrderV2 extends MsgBase {
2261
+ static fromJSON(params) {
2262
+ return new MsgCreateSpotLimitOrderV2(params);
2263
+ }
2264
+ toProto() {
2265
+ const { params: initialParams } = this;
2266
+ return createLimitOrder$4({
2267
+ ...initialParams,
2268
+ price: toChainFormat(initialParams.price).toFixed(),
2269
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
2270
+ quantity: toChainFormat(initialParams.quantity).toFixed()
2271
+ });
2272
+ }
2273
+ toData() {
2274
+ const proto = this.toProto();
2275
+ return {
2276
+ "@type": "/injective.exchange.v2.MsgCreateSpotLimitOrder",
2277
+ ...proto
2278
+ };
2279
+ }
2280
+ toAmino() {
2281
+ const { params } = this;
2282
+ return {
2283
+ type: "exchange/MsgCreateSpotLimitOrder",
2284
+ value: {
2285
+ sender: params.injectiveAddress,
2286
+ order: {
2287
+ market_id: params.marketId,
2288
+ order_info: {
2289
+ subaccount_id: params.subaccountId,
2290
+ fee_recipient: params.feeRecipient,
2291
+ price: params.price,
2292
+ quantity: params.quantity,
2293
+ cid: params.cid || ""
2294
+ },
2295
+ order_type: params.orderType,
2296
+ trigger_price: params.triggerPrice || "0",
2297
+ expiration_block: params.expirationBlock || "0"
2298
+ }
2299
+ }
2300
+ };
2301
+ }
2302
+ toWeb3Gw() {
2303
+ const { value } = this.toAmino();
2304
+ return {
2305
+ "@type": "/injective.exchange.v2.MsgCreateSpotLimitOrder",
2306
+ ...value
2307
+ };
2308
+ }
2309
+ toEip712V2() {
2310
+ const { params } = this;
2311
+ const web3gw = this.toWeb3Gw();
2312
+ const order = web3gw.order;
2313
+ return {
2314
+ ...web3gw,
2315
+ order: {
2316
+ ...order,
2317
+ order_info: {
2318
+ ...order.order_info,
2319
+ price: numberToCosmosSdkDecString(params.price),
2320
+ quantity: numberToCosmosSdkDecString(params.quantity)
2321
+ },
2322
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
2323
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
2324
+ }
2325
+ };
2326
+ }
2327
+ toEip712() {
2328
+ const { params } = this;
2329
+ const { value, type } = this.toAmino();
2330
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
2331
+ return {
2332
+ type,
2333
+ value: {
2334
+ ...value,
2335
+ order: {
2336
+ ...orderWithoutExpiration,
2337
+ order_info: {
2338
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
2339
+ price: toChainFormat(params.price).toFixed(),
2340
+ quantity: toChainFormat(params.quantity).toFixed()
2341
+ },
2342
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
2343
+ }
2344
+ }
2345
+ };
2346
+ }
2347
+ toDirectSign() {
2348
+ return {
2349
+ type: "/injective.exchange.v2.MsgCreateSpotLimitOrder",
2350
+ message: this.toProto()
2351
+ };
2352
+ }
2353
+ toBinary() {
2354
+ return InjectiveExchangeV2TxPb.MsgCreateSpotLimitOrder.toBinary(this.toProto());
2355
+ }
2356
+ };
2357
+
2358
+ //#endregion
2359
+ //#region src/core/modules/exchange/msgs/MsgInstantSpotMarketLaunch.ts
2360
+ const createMessage$8 = (params) => {
2361
+ return InjectiveExchangeV1Beta1TxPb.MsgInstantSpotMarketLaunch.create({
2362
+ sender: params.proposer,
2363
+ ticker: params.market.ticker,
2364
+ baseDenom: params.market.baseDenom,
2365
+ quoteDenom: params.market.quoteDenom,
2366
+ minPriceTickSize: params.market.minPriceTickSize,
2367
+ minQuantityTickSize: params.market.minQuantityTickSize,
2368
+ minNotional: params.market.minNotional,
2369
+ baseDecimals: Number(params.market.baseDecimals),
2370
+ quoteDecimals: Number(params.market.quoteDecimals)
2371
+ });
2372
+ };
2373
+ /**
2374
+ * @category Messages
2375
+ */
2376
+ var MsgInstantSpotMarketLaunch = class MsgInstantSpotMarketLaunch extends MsgBase {
2377
+ static fromJSON(params) {
2378
+ return new MsgInstantSpotMarketLaunch(params);
2379
+ }
2380
+ toProto() {
2381
+ const { params: initialParams } = this;
2382
+ return createMessage$8({
2383
+ ...initialParams,
2384
+ market: {
2385
+ ...initialParams.market,
2386
+ minPriceTickSize: toChainFormat(initialParams.market.minPriceTickSize).toFixed(),
2387
+ minQuantityTickSize: toChainFormat(initialParams.market.minQuantityTickSize).toFixed(),
2388
+ minNotional: toChainFormat(initialParams.market.minNotional).toFixed()
2389
+ }
2390
+ });
2391
+ }
2392
+ toData() {
2393
+ const proto = this.toProto();
2394
+ return {
2395
+ "@type": "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
2396
+ ...proto
2397
+ };
2398
+ }
2399
+ toAmino() {
2400
+ const { params } = this;
2401
+ return {
2402
+ type: "exchange/MsgInstantSpotMarketLaunch",
2403
+ value: {
2404
+ sender: params.proposer,
2405
+ ticker: params.market.ticker,
2406
+ base_denom: params.market.baseDenom,
2407
+ quote_denom: params.market.quoteDenom,
2408
+ min_price_tick_size: params.market.minPriceTickSize,
2409
+ min_quantity_tick_size: params.market.minQuantityTickSize,
2410
+ min_notional: params.market.minNotional,
2411
+ base_decimals: params.market.baseDecimals,
2412
+ quote_decimals: params.market.quoteDecimals
2413
+ }
2414
+ };
2415
+ }
2416
+ toWeb3Gw() {
2417
+ const { value } = this.toAmino();
2418
+ return {
2419
+ "@type": "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
2420
+ ...value
2421
+ };
2422
+ }
2423
+ toEip712() {
2424
+ const { type, value } = this.toAmino();
2425
+ return {
2426
+ type,
2427
+ value: {
2428
+ ...value,
2429
+ min_price_tick_size: toChainFormat(value.min_price_tick_size).toFixed(),
2430
+ min_quantity_tick_size: toChainFormat(value.min_quantity_tick_size).toFixed(),
2431
+ min_notional: toChainFormat(value.min_notional).toFixed()
2432
+ }
2433
+ };
2434
+ }
2435
+ toEip712V2() {
2436
+ const { params } = this;
2437
+ return {
2438
+ ...this.toWeb3Gw(),
2439
+ min_price_tick_size: numberToCosmosSdkDecString(params.market.minPriceTickSize),
2440
+ min_quantity_tick_size: numberToCosmosSdkDecString(params.market.minQuantityTickSize),
2441
+ min_notional: numberToCosmosSdkDecString(params.market.minNotional)
2442
+ };
2443
+ }
2444
+ toDirectSign() {
2445
+ return {
2446
+ type: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
2447
+ message: this.toProto()
2448
+ };
2449
+ }
2450
+ toBinary() {
2451
+ return InjectiveExchangeV1Beta1TxPb.MsgInstantSpotMarketLaunch.toBinary(this.toProto());
2452
+ }
2453
+ };
2454
+
2455
+ //#endregion
2456
+ //#region src/core/modules/exchange/msgs/MsgCancelDerivativeOrderV2.ts
2457
+ /**
2458
+ * @category Messages
2459
+ */
2460
+ var MsgCancelDerivativeOrderV2 = class MsgCancelDerivativeOrderV2 extends MsgBase {
2461
+ static fromJSON(params) {
2462
+ return new MsgCancelDerivativeOrderV2(params);
2463
+ }
2464
+ toProto() {
2465
+ const { params } = this;
2466
+ return InjectiveExchangeV2TxPb.MsgCancelDerivativeOrder.create({
2467
+ sender: params.injectiveAddress,
2468
+ marketId: params.marketId,
2469
+ subaccountId: params.subaccountId,
2470
+ orderHash: params.orderHash || "",
2471
+ orderMask: params.orderMask || InjectiveExchangeV2OrderPb.OrderMask.ANY,
2472
+ cid: params.cid || ""
2473
+ });
2474
+ }
2475
+ toData() {
2476
+ const proto = this.toProto();
2477
+ return {
2478
+ "@type": "/injective.exchange.v2.MsgCancelDerivativeOrder",
2479
+ ...proto
2480
+ };
2481
+ }
2482
+ toAmino() {
2483
+ const proto = this.toProto();
2484
+ return {
2485
+ type: "exchange/MsgCancelDerivativeOrder",
2486
+ value: {
2487
+ sender: proto.sender,
2488
+ market_id: proto.marketId,
2489
+ subaccount_id: proto.subaccountId,
2490
+ order_hash: proto.orderHash,
2491
+ order_mask: proto.orderMask,
2492
+ cid: proto.cid
2493
+ }
2494
+ };
2495
+ }
2496
+ toWeb3Gw() {
2497
+ const { value } = this.toAmino();
2498
+ return {
2499
+ "@type": "/injective.exchange.v2.MsgCancelDerivativeOrder",
2500
+ ...value
2501
+ };
2502
+ }
2503
+ toDirectSign() {
2504
+ return {
2505
+ type: "/injective.exchange.v2.MsgCancelDerivativeOrder",
2506
+ message: this.toProto()
2507
+ };
2508
+ }
2509
+ toBinary() {
2510
+ return InjectiveExchangeV2TxPb.MsgCancelDerivativeOrder.toBinary(this.toProto());
2511
+ }
2512
+ };
2513
+
2514
+ //#endregion
2515
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelSpotOrdersV2.ts
2516
+ /**
2517
+ * @category Messages
2518
+ */
2519
+ var MsgBatchCancelSpotOrdersV2 = class MsgBatchCancelSpotOrdersV2 extends MsgBase {
2520
+ static fromJSON(params) {
2521
+ return new MsgBatchCancelSpotOrdersV2(params);
2522
+ }
2523
+ toProto() {
2524
+ const { params } = this;
2525
+ const orderDataList = params.orders.map((order) => {
2526
+ return InjectiveExchangeV2TxPb.OrderData.create({
2527
+ marketId: order.marketId,
2528
+ subaccountId: order.subaccountId,
2529
+ orderHash: order.orderHash || "",
2530
+ orderMask: order.orderMask || InjectiveExchangeV2OrderPb.OrderMask.ANY,
2531
+ cid: order.cid || ""
2532
+ });
2533
+ });
2534
+ return InjectiveExchangeV2TxPb.MsgBatchCancelSpotOrders.create({
2535
+ sender: params.injectiveAddress,
2536
+ data: orderDataList
2537
+ });
2538
+ }
2539
+ toData() {
2540
+ const proto = this.toProto();
2541
+ return {
2542
+ "@type": "/injective.exchange.v2.MsgBatchCancelSpotOrders",
2543
+ ...proto
2544
+ };
2545
+ }
2546
+ toAmino() {
2547
+ const proto = this.toProto();
2548
+ return {
2549
+ type: "exchange/MsgBatchCancelSpotOrders",
2550
+ value: {
2551
+ sender: proto.sender,
2552
+ data: proto.data.map((orderData) => ({
2553
+ market_id: orderData.marketId,
2554
+ subaccount_id: orderData.subaccountId,
2555
+ order_hash: orderData.orderHash,
2556
+ order_mask: orderData.orderMask,
2557
+ cid: orderData.cid
2558
+ }))
2559
+ }
2560
+ };
2561
+ }
2562
+ toWeb3Gw() {
2563
+ const { value } = this.toAmino();
2564
+ return {
2565
+ "@type": "/injective.exchange.v2.MsgBatchCancelSpotOrders",
2566
+ ...value
2567
+ };
2568
+ }
2569
+ toDirectSign() {
2570
+ return {
2571
+ type: "/injective.exchange.v2.MsgBatchCancelSpotOrders",
2572
+ message: this.toProto()
2573
+ };
2574
+ }
2575
+ toBinary() {
2576
+ return InjectiveExchangeV2TxPb.MsgBatchCancelSpotOrders.toBinary(this.toProto());
2577
+ }
2578
+ };
2579
+
2580
+ //#endregion
2581
+ //#region src/core/modules/exchange/msgs/MsgCreateSpotMarketOrderV2.ts
2582
+ const createMarketOrder$4 = (params) => {
2583
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
2584
+ subaccountId: params.subaccountId,
2585
+ feeRecipient: params.feeRecipient,
2586
+ price: params.price,
2587
+ quantity: params.quantity,
2588
+ cid: params.cid || ""
2589
+ });
2590
+ const spotOrder = InjectiveExchangeV2OrderPb.SpotOrder.create({
2591
+ marketId: params.marketId,
2592
+ orderInfo,
2593
+ orderType: params.orderType,
2594
+ triggerPrice: params.triggerPrice || "0",
2595
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
2596
+ });
2597
+ return InjectiveExchangeV2TxPb.MsgCreateSpotMarketOrder.create({
2598
+ sender: params.injectiveAddress,
2599
+ order: spotOrder
2600
+ });
2601
+ };
2602
+ /**
2603
+ * @category Messages
2604
+ */
2605
+ var MsgCreateSpotMarketOrderV2 = class MsgCreateSpotMarketOrderV2 extends MsgBase {
2606
+ static fromJSON(params) {
2607
+ return new MsgCreateSpotMarketOrderV2(params);
2608
+ }
2609
+ toProto() {
2610
+ const { params: initialParams } = this;
2611
+ return createMarketOrder$4({
2612
+ ...initialParams,
2613
+ price: toChainFormat(initialParams.price).toFixed(),
2614
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
2615
+ quantity: toChainFormat(initialParams.quantity).toFixed()
2616
+ });
2617
+ }
2618
+ toData() {
2619
+ const proto = this.toProto();
2620
+ return {
2621
+ "@type": "/injective.exchange.v2.MsgCreateSpotMarketOrder",
2622
+ ...proto
2623
+ };
2624
+ }
2625
+ toAmino() {
2626
+ const { params } = this;
2627
+ return {
2628
+ type: "exchange/MsgCreateSpotMarketOrder",
2629
+ value: {
2630
+ sender: params.injectiveAddress,
2631
+ order: {
2632
+ market_id: params.marketId,
2633
+ order_info: {
2634
+ subaccount_id: params.subaccountId,
2635
+ fee_recipient: params.feeRecipient,
2636
+ price: params.price,
2637
+ quantity: params.quantity,
2638
+ cid: params.cid || ""
2639
+ },
2640
+ order_type: params.orderType,
2641
+ trigger_price: params.triggerPrice || "0",
2642
+ expiration_block: params.expirationBlock || "0"
2643
+ }
2644
+ }
2645
+ };
2646
+ }
2647
+ toWeb3Gw() {
2648
+ const { value } = this.toAmino();
2649
+ return {
2650
+ "@type": "/injective.exchange.v2.MsgCreateSpotMarketOrder",
2651
+ ...value
2652
+ };
2653
+ }
2654
+ toEip712V2() {
2655
+ const { params } = this;
2656
+ const web3gw = this.toWeb3Gw();
2657
+ const order = web3gw.order;
2658
+ return {
2659
+ ...web3gw,
2660
+ order: {
2661
+ ...order,
2662
+ order_info: {
2663
+ ...order.order_info,
2664
+ price: numberToCosmosSdkDecString(params.price),
2665
+ quantity: numberToCosmosSdkDecString(params.quantity)
2666
+ },
2667
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
2668
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
2669
+ }
2670
+ };
2671
+ }
2672
+ toEip712() {
2673
+ const { params } = this;
2674
+ const { value, type } = this.toAmino();
2675
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
2676
+ return {
2677
+ type,
2678
+ value: {
2679
+ ...value,
2680
+ order: {
2681
+ ...orderWithoutExpiration,
2682
+ order_info: {
2683
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
2684
+ price: toChainFormat(params.price).toFixed(),
2685
+ quantity: toChainFormat(params.quantity).toFixed()
2686
+ },
2687
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
2688
+ }
2689
+ }
2690
+ };
2691
+ }
2692
+ toDirectSign() {
2693
+ return {
2694
+ type: "/injective.exchange.v2.MsgCreateSpotMarketOrder",
2695
+ message: this.toProto()
2696
+ };
2697
+ }
2698
+ toBinary() {
2699
+ return InjectiveExchangeV2TxPb.MsgCreateSpotMarketOrder.toBinary(this.toProto());
2700
+ }
2701
+ };
2702
+
2703
+ //#endregion
2704
+ //#region src/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.ts
2705
+ const createMessage$7 = (params) => {
2706
+ return InjectiveExchangeV2TxPb.MsgUpdateDerivativeMarket.create({
2707
+ admin: params.admin,
2708
+ marketId: params.marketId,
2709
+ newTicker: params.newTicker || "",
2710
+ newMinNotional: params.newMinNotional || "0",
2711
+ newMinPriceTickSize: params.newMinPriceTickSize || "0",
2712
+ newMinQuantityTickSize: params.newMinQuantityTickSize || "0",
2713
+ newInitialMarginRatio: params.newInitialMarginRatio || "0",
2714
+ newMaintenanceMarginRatio: params.newMaintenanceMarginRatio || "0",
2715
+ newReduceMarginRatio: params.newReduceMarginRatio || "0"
2716
+ });
2717
+ };
2718
+ /**
2719
+ * @category Messages
2720
+ */
2721
+ var MsgUpdateDerivativeMarketV2 = class MsgUpdateDerivativeMarketV2 extends MsgBase {
2722
+ static fromJSON(params) {
2723
+ return new MsgUpdateDerivativeMarketV2(params);
2724
+ }
2725
+ toProto() {
2726
+ const { params: initialParams } = this;
2727
+ return createMessage$7({
2728
+ ...initialParams,
2729
+ newMinNotional: toChainFormat(initialParams.newMinNotional || "0").toFixed(),
2730
+ newMinQuantityTickSize: toChainFormat(initialParams.newMinQuantityTickSize || "0").toFixed(),
2731
+ newMinPriceTickSize: toChainFormat(initialParams.newMinPriceTickSize || "0").toFixed(),
2732
+ newInitialMarginRatio: toChainFormat(initialParams.newInitialMarginRatio || "0").toFixed(),
2733
+ newMaintenanceMarginRatio: toChainFormat(initialParams.newMaintenanceMarginRatio || "0").toFixed(),
2734
+ newReduceMarginRatio: toChainFormat(initialParams.newReduceMarginRatio || "0").toFixed()
2735
+ });
2736
+ }
2737
+ toData() {
2738
+ const proto = this.toProto();
2739
+ return {
2740
+ "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
2741
+ ...proto
2742
+ };
2743
+ }
2744
+ toAmino() {
2745
+ const { params } = this;
2746
+ return {
2747
+ type: "exchange/MsgUpdateDerivativeMarket",
2748
+ value: {
2749
+ admin: params.admin,
2750
+ market_id: params.marketId,
2751
+ new_ticker: params.newTicker || "",
2752
+ new_min_notional: params.newMinNotional,
2753
+ new_min_price_tick_size: params.newMinPriceTickSize,
2754
+ new_min_quantity_tick_size: params.newMinQuantityTickSize,
2755
+ new_initial_margin_ratio: params.newInitialMarginRatio,
2756
+ new_maintenance_margin_ratio: params.newMaintenanceMarginRatio,
2757
+ new_reduce_margin_ratio: params.newReduceMarginRatio
2758
+ }
2759
+ };
2760
+ }
2761
+ toWeb3Gw() {
2762
+ const { value } = this.toAmino();
2763
+ return {
2764
+ "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
2765
+ ...value
2766
+ };
2767
+ }
2768
+ toEip712() {
2769
+ const { type, value } = this.toAmino();
2770
+ return {
2771
+ type,
2772
+ value: { ...value }
2773
+ };
2774
+ }
2775
+ toEip712V2() {
2776
+ const { params } = this;
2777
+ return {
2778
+ "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
2779
+ admin: params.admin,
2780
+ market_id: params.marketId,
2781
+ new_ticker: params.newTicker || "",
2782
+ new_min_price_tick_size: numberToCosmosSdkDecString(params.newMinPriceTickSize || "0"),
2783
+ new_min_quantity_tick_size: numberToCosmosSdkDecString(params.newMinQuantityTickSize || "0"),
2784
+ new_min_notional: numberToCosmosSdkDecString(params.newMinNotional || "0"),
2785
+ new_initial_margin_ratio: numberToCosmosSdkDecString(params.newInitialMarginRatio || "0"),
2786
+ new_maintenance_margin_ratio: numberToCosmosSdkDecString(params.newMaintenanceMarginRatio || "0"),
2787
+ new_reduce_margin_ratio: numberToCosmosSdkDecString(params.newReduceMarginRatio || "0"),
2788
+ new_open_notional_cap: {}
2789
+ };
2790
+ }
2791
+ toDirectSign() {
2792
+ return {
2793
+ type: "/injective.exchange.v2.MsgUpdateDerivativeMarket",
2794
+ message: this.toProto()
2795
+ };
2796
+ }
2797
+ toBinary() {
2798
+ return InjectiveExchangeV2TxPb.MsgUpdateDerivativeMarket.toBinary(this.toProto());
2799
+ }
2800
+ };
2801
+
2802
+ //#endregion
2803
+ //#region src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts
2804
+ /**
2805
+ * @category Messages
2806
+ */
2807
+ var MsgCancelBinaryOptionsOrder = class MsgCancelBinaryOptionsOrder extends MsgBase {
2808
+ static fromJSON(params) {
2809
+ return new MsgCancelBinaryOptionsOrder(params);
2810
+ }
2811
+ toProto() {
2812
+ const { params } = this;
2813
+ return InjectiveExchangeV1Beta1TxPb.MsgCancelBinaryOptionsOrder.create({
2814
+ sender: params.injectiveAddress,
2815
+ marketId: params.marketId,
2816
+ subaccountId: params.subaccountId,
2817
+ orderHash: params.orderHash || "",
2818
+ orderMask: InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
2819
+ cid: params.cid || ""
2820
+ });
2821
+ }
2822
+ toData() {
2823
+ const proto = this.toProto();
2824
+ return {
2825
+ "@type": "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
2826
+ ...proto
2827
+ };
2828
+ }
2829
+ toAmino() {
2830
+ const proto = this.toProto();
2831
+ return {
2832
+ type: "exchange/MsgCancelBinaryOptionsOrder",
2833
+ value: {
2834
+ sender: proto.sender,
2835
+ market_id: proto.marketId,
2836
+ subaccount_id: proto.subaccountId,
2837
+ order_hash: proto.orderHash,
2838
+ order_mask: proto.orderMask,
2839
+ cid: proto.cid
2840
+ }
2841
+ };
2842
+ }
2843
+ toWeb3Gw() {
2844
+ const { value } = this.toAmino();
2845
+ return {
2846
+ "@type": "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
2847
+ ...value
2848
+ };
2849
+ }
2850
+ toDirectSign() {
2851
+ return {
2852
+ type: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
2853
+ message: this.toProto()
2854
+ };
2855
+ }
2856
+ toBinary() {
2857
+ return InjectiveExchangeV1Beta1TxPb.MsgCancelBinaryOptionsOrder.toBinary(this.toProto());
2858
+ }
2859
+ };
2860
+
2861
+ //#endregion
2862
+ //#region src/core/modules/exchange/msgs/MsgIncreasePositionMarginV2.ts
2863
+ const createMessage$6 = (params) => {
2864
+ return InjectiveExchangeV2TxPb.MsgIncreasePositionMargin.create({
2865
+ sender: params.injectiveAddress,
2866
+ sourceSubaccountId: params.srcSubaccountId,
2867
+ destinationSubaccountId: params.dstSubaccountId,
2868
+ marketId: params.marketId,
2869
+ amount: params.amount
2870
+ });
2871
+ };
2872
+ /**
2873
+ * @category Messages
2874
+ */
2875
+ var MsgIncreasePositionMarginV2 = class MsgIncreasePositionMarginV2 extends MsgBase {
2876
+ static fromJSON(params) {
2877
+ return new MsgIncreasePositionMarginV2(params);
2878
+ }
2879
+ toProto() {
2880
+ const { params: initialParams } = this;
2881
+ return createMessage$6({
2882
+ ...initialParams,
2883
+ amount: toChainFormat(initialParams.amount).toFixed()
2884
+ });
2885
+ }
2886
+ toData() {
2887
+ const proto = this.toProto();
2888
+ return {
2889
+ "@type": "/injective.exchange.v2.MsgIncreasePositionMargin",
2890
+ ...proto
2891
+ };
2892
+ }
2893
+ toAmino() {
2894
+ const { params } = this;
2895
+ return {
2896
+ type: "exchange/MsgIncreasePositionMargin",
2897
+ value: {
2898
+ sender: params.injectiveAddress,
2899
+ source_subaccount_id: params.srcSubaccountId,
2900
+ destination_subaccount_id: params.dstSubaccountId,
2901
+ market_id: params.marketId,
2902
+ amount: params.amount
2903
+ }
2904
+ };
2905
+ }
2906
+ toWeb3Gw() {
2907
+ const { value } = this.toAmino();
2908
+ return {
2909
+ "@type": "/injective.exchange.v2.MsgIncreasePositionMargin",
2910
+ ...value
2911
+ };
2912
+ }
2913
+ toEip712() {
2914
+ const { type, value } = this.toAmino();
2915
+ return {
2916
+ type,
2917
+ value: {
2918
+ ...value,
2919
+ amount: toChainFormat(value.amount).toFixed()
2920
+ }
2921
+ };
2922
+ }
2923
+ toEip712V2() {
2924
+ const { params } = this;
2925
+ return {
2926
+ ...this.toWeb3Gw(),
2927
+ amount: numberToCosmosSdkDecString(params.amount)
2928
+ };
2929
+ }
2930
+ toDirectSign() {
2931
+ return {
2932
+ type: "/injective.exchange.v2.MsgIncreasePositionMargin",
2933
+ message: this.toProto()
2934
+ };
2935
+ }
2936
+ toBinary() {
2937
+ return InjectiveExchangeV2TxPb.MsgIncreasePositionMargin.toBinary(this.toProto());
2938
+ }
2939
+ };
2940
+
2941
+ //#endregion
2942
+ //#region src/core/modules/exchange/msgs/MsgDecreasePositionMarginV2.ts
2943
+ const createMessage$5 = (params) => {
2944
+ return InjectiveExchangeV2TxPb.MsgDecreasePositionMargin.create({
2945
+ sender: params.injectiveAddress,
2946
+ sourceSubaccountId: params.srcSubaccountId,
2947
+ destinationSubaccountId: params.dstSubaccountId,
2948
+ marketId: params.marketId,
2949
+ amount: params.amount
2950
+ });
2951
+ };
2952
+ /**
2953
+ * @category Messages
2954
+ */
2955
+ var MsgDecreasePositionMarginV2 = class MsgDecreasePositionMarginV2 extends MsgBase {
2956
+ static fromJSON(params) {
2957
+ return new MsgDecreasePositionMarginV2(params);
2958
+ }
2959
+ toProto() {
2960
+ const { params: initialParams } = this;
2961
+ return createMessage$5({
2962
+ ...initialParams,
2963
+ amount: toChainFormat(initialParams.amount).toFixed()
2964
+ });
2965
+ }
2966
+ toData() {
2967
+ const proto = this.toProto();
2968
+ return {
2969
+ "@type": "/injective.exchange.v2.MsgDecreasePositionMargin",
2970
+ ...proto
2971
+ };
2972
+ }
2973
+ toAmino() {
2974
+ const { params } = this;
2975
+ return {
2976
+ type: "exchange/MsgDecreasePositionMargin",
2977
+ value: {
2978
+ sender: params.injectiveAddress,
2979
+ source_subaccount_id: params.srcSubaccountId,
2980
+ destination_subaccount_id: params.dstSubaccountId,
2981
+ market_id: params.marketId,
2982
+ amount: params.amount
2983
+ }
2984
+ };
2985
+ }
880
2986
  toWeb3Gw() {
881
2987
  const { value } = this.toAmino();
882
2988
  return {
883
- "@type": "/injective.exchange.v2.MsgCancelPostOnlyMode",
2989
+ "@type": "/injective.exchange.v2.MsgDecreasePositionMargin",
884
2990
  ...value
885
2991
  };
886
2992
  }
@@ -888,26 +2994,130 @@ var MsgCancelPostOnlyModeV2 = class MsgCancelPostOnlyModeV2 extends MsgBase {
888
2994
  const { type, value } = this.toAmino();
889
2995
  return {
890
2996
  type,
891
- value: { ...value }
2997
+ value: {
2998
+ ...value,
2999
+ amount: toChainFormat(value.amount).toFixed()
3000
+ }
892
3001
  };
893
3002
  }
894
3003
  toEip712V2() {
895
- return { ...this.toWeb3Gw() };
3004
+ const { params } = this;
3005
+ return {
3006
+ ...this.toWeb3Gw(),
3007
+ amount: numberToCosmosSdkDecString(params.amount)
3008
+ };
896
3009
  }
897
3010
  toDirectSign() {
898
3011
  return {
899
- type: "/injective.exchange.v2.MsgCancelPostOnlyMode",
3012
+ type: "/injective.exchange.v2.MsgDecreasePositionMargin",
900
3013
  message: this.toProto()
901
3014
  };
902
3015
  }
903
3016
  toBinary() {
904
- return InjectiveExchangeV2TxPb.MsgCancelPostOnlyMode.toBinary(this.toProto());
3017
+ return InjectiveExchangeV2TxPb.MsgDecreasePositionMargin.toBinary(this.toProto());
905
3018
  }
906
3019
  };
907
3020
 
908
3021
  //#endregion
909
- //#region src/core/modules/exchange/msgs/MsgCreateSpotLimitOrder.ts
910
- const createLimitOrder$2 = (params) => {
3022
+ //#region src/core/modules/exchange/msgs/MsgInstantSpotMarketLaunchV2.ts
3023
+ const createMessage$4 = (params) => {
3024
+ return InjectiveExchangeV2TxPb.MsgInstantSpotMarketLaunch.create({
3025
+ sender: params.proposer,
3026
+ ticker: params.market.ticker,
3027
+ baseDenom: params.market.baseDenom,
3028
+ quoteDenom: params.market.quoteDenom,
3029
+ minPriceTickSize: params.market.minPriceTickSize,
3030
+ minQuantityTickSize: params.market.minQuantityTickSize,
3031
+ minNotional: params.market.minNotional,
3032
+ baseDecimals: Number(params.market.baseDecimals),
3033
+ quoteDecimals: Number(params.market.quoteDecimals)
3034
+ });
3035
+ };
3036
+ /**
3037
+ * @category Messages
3038
+ */
3039
+ var MsgInstantSpotMarketLaunchV2 = class MsgInstantSpotMarketLaunchV2 extends MsgBase {
3040
+ static fromJSON(params) {
3041
+ return new MsgInstantSpotMarketLaunchV2(params);
3042
+ }
3043
+ toProto() {
3044
+ const { params: initialParams } = this;
3045
+ return createMessage$4({
3046
+ ...initialParams,
3047
+ market: {
3048
+ ...initialParams.market,
3049
+ minPriceTickSize: toChainFormat(initialParams.market.minPriceTickSize).toFixed(),
3050
+ minQuantityTickSize: toChainFormat(initialParams.market.minQuantityTickSize).toFixed(),
3051
+ minNotional: toChainFormat(initialParams.market.minNotional).toFixed()
3052
+ }
3053
+ });
3054
+ }
3055
+ toData() {
3056
+ const proto = this.toProto();
3057
+ return {
3058
+ "@type": "/injective.exchange.v2.MsgInstantSpotMarketLaunch",
3059
+ ...proto
3060
+ };
3061
+ }
3062
+ toAmino() {
3063
+ const { params } = this;
3064
+ return {
3065
+ type: "exchange/MsgInstantSpotMarketLaunch",
3066
+ value: {
3067
+ sender: params.proposer,
3068
+ ticker: params.market.ticker,
3069
+ base_denom: params.market.baseDenom,
3070
+ quote_denom: params.market.quoteDenom,
3071
+ min_price_tick_size: params.market.minPriceTickSize,
3072
+ min_quantity_tick_size: params.market.minQuantityTickSize,
3073
+ min_notional: params.market.minNotional,
3074
+ base_decimals: params.market.baseDecimals,
3075
+ quote_decimals: params.market.quoteDecimals
3076
+ }
3077
+ };
3078
+ }
3079
+ toWeb3Gw() {
3080
+ const { value } = this.toAmino();
3081
+ return {
3082
+ "@type": "/injective.exchange.v2.MsgInstantSpotMarketLaunch",
3083
+ ...value
3084
+ };
3085
+ }
3086
+ toEip712() {
3087
+ const { type, value } = this.toAmino();
3088
+ return {
3089
+ type,
3090
+ value: {
3091
+ ...value,
3092
+ min_price_tick_size: toChainFormat(value.min_price_tick_size).toFixed(),
3093
+ min_quantity_tick_size: toChainFormat(value.min_quantity_tick_size).toFixed(),
3094
+ min_notional: toChainFormat(value.min_notional).toFixed()
3095
+ }
3096
+ };
3097
+ }
3098
+ toEip712V2() {
3099
+ const { params } = this;
3100
+ return {
3101
+ ...this.toWeb3Gw(),
3102
+ min_price_tick_size: numberToCosmosSdkDecString(params.market.minPriceTickSize),
3103
+ min_quantity_tick_size: numberToCosmosSdkDecString(params.market.minQuantityTickSize),
3104
+ min_notional: numberToCosmosSdkDecString(params.market.minNotional)
3105
+ };
3106
+ }
3107
+ toDirectSign() {
3108
+ return {
3109
+ type: "/injective.exchange.v2.MsgInstantSpotMarketLaunch",
3110
+ message: this.toProto()
3111
+ };
3112
+ }
3113
+ toBinary() {
3114
+ return InjectiveExchangeV2TxPb.MsgInstantSpotMarketLaunch.toBinary(this.toProto());
3115
+ }
3116
+ };
3117
+
3118
+ //#endregion
3119
+ //#region src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts
3120
+ const createLimitOrder$3 = (params) => {
911
3121
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
912
3122
  subaccountId: params.subaccountId,
913
3123
  feeRecipient: params.feeRecipient,
@@ -915,29 +3125,31 @@ const createLimitOrder$2 = (params) => {
915
3125
  quantity: params.quantity,
916
3126
  cid: params.cid || ""
917
3127
  });
918
- const spotOrder = InjectiveExchangeV1Beta1ExchangePb.SpotOrder.create({
3128
+ const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
919
3129
  marketId: params.marketId,
920
3130
  orderInfo,
921
3131
  orderType: params.orderType,
3132
+ margin: params.margin,
922
3133
  triggerPrice: params.triggerPrice || "0"
923
3134
  });
924
- return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotLimitOrder.create({
3135
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeLimitOrder.create({
925
3136
  sender: params.injectiveAddress,
926
- order: spotOrder
3137
+ order: derivativeOrder
927
3138
  });
928
3139
  };
929
3140
  /**
930
3141
  * @category Messages
931
3142
  */
932
- var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
3143
+ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends MsgBase {
933
3144
  static fromJSON(params) {
934
- return new MsgCreateSpotLimitOrder(params);
3145
+ return new MsgCreateDerivativeLimitOrder(params);
935
3146
  }
936
3147
  toProto() {
937
3148
  const { params: initialParams } = this;
938
- return createLimitOrder$2({
3149
+ return createLimitOrder$3({
939
3150
  ...initialParams,
940
3151
  price: toChainFormat(initialParams.price).toFixed(),
3152
+ margin: toChainFormat(initialParams.margin).toFixed(),
941
3153
  triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
942
3154
  quantity: toChainFormat(initialParams.quantity).toFixed()
943
3155
  });
@@ -945,14 +3157,14 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
945
3157
  toData() {
946
3158
  const proto = this.toProto();
947
3159
  return {
948
- "@type": "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
3160
+ "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
949
3161
  ...proto
950
3162
  };
951
3163
  }
952
3164
  toAmino() {
953
3165
  const { params } = this;
954
3166
  return {
955
- type: "exchange/MsgCreateSpotLimitOrder",
3167
+ type: "exchange/MsgCreateDerivativeLimitOrder",
956
3168
  value: {
957
3169
  sender: params.injectiveAddress,
958
3170
  order: {
@@ -965,6 +3177,7 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
965
3177
  cid: params.cid || ""
966
3178
  },
967
3179
  order_type: params.orderType,
3180
+ margin: params.margin,
968
3181
  trigger_price: params.triggerPrice || "0"
969
3182
  }
970
3183
  }
@@ -973,7 +3186,7 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
973
3186
  toWeb3Gw() {
974
3187
  const { value } = this.toAmino();
975
3188
  return {
976
- "@type": "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
3189
+ "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
977
3190
  ...value
978
3191
  };
979
3192
  }
@@ -990,6 +3203,7 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
990
3203
  price: numberToCosmosSdkDecString(params.price),
991
3204
  quantity: numberToCosmosSdkDecString(params.quantity)
992
3205
  },
3206
+ margin: numberToCosmosSdkDecString(params.margin),
993
3207
  trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
994
3208
  order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
995
3209
  }
@@ -1010,6 +3224,7 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
1010
3224
  price: toChainFormat(params.price).toFixed(),
1011
3225
  quantity: toChainFormat(params.quantity).toFixed()
1012
3226
  },
3227
+ margin: toChainFormat(params.margin).toFixed(),
1013
3228
  trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
1014
3229
  }
1015
3230
  }
@@ -1017,77 +3232,82 @@ var MsgCreateSpotLimitOrder = class MsgCreateSpotLimitOrder extends MsgBase {
1017
3232
  }
1018
3233
  toDirectSign() {
1019
3234
  return {
1020
- type: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
3235
+ type: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
1021
3236
  message: this.toProto()
1022
3237
  };
1023
3238
  }
1024
3239
  toBinary() {
1025
- return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotLimitOrder.toBinary(this.toProto());
3240
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeLimitOrder.toBinary(this.toProto());
1026
3241
  }
1027
3242
  };
1028
3243
 
1029
3244
  //#endregion
1030
- //#region src/core/modules/exchange/msgs/MsgAuthorizeStakeGrants.ts
3245
+ //#region src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrderV2.ts
1031
3246
  /**
1032
3247
  * @category Messages
1033
3248
  */
1034
- var MsgAuthorizeStakeGrants = class MsgAuthorizeStakeGrants extends MsgBase {
3249
+ var MsgCancelBinaryOptionsOrderV2 = class MsgCancelBinaryOptionsOrderV2 extends MsgBase {
1035
3250
  static fromJSON(params) {
1036
- return new MsgAuthorizeStakeGrants(params);
3251
+ return new MsgCancelBinaryOptionsOrderV2(params);
1037
3252
  }
1038
3253
  toProto() {
1039
3254
  const { params } = this;
1040
- return InjectiveExchangeV1Beta1TxPb.MsgAuthorizeStakeGrants.create({
3255
+ return InjectiveExchangeV2TxPb.MsgCancelBinaryOptionsOrder.create({
1041
3256
  sender: params.injectiveAddress,
1042
- grants: [{
1043
- grantee: params.grantee,
1044
- amount: params.amount
1045
- }]
3257
+ marketId: params.marketId,
3258
+ subaccountId: params.subaccountId,
3259
+ orderHash: params.orderHash || "",
3260
+ orderMask: params.orderMask || InjectiveExchangeV2OrderPb.OrderMask.ANY,
3261
+ cid: params.cid || ""
1046
3262
  });
1047
3263
  }
1048
3264
  toData() {
1049
3265
  const proto = this.toProto();
1050
3266
  return {
1051
- "@type": "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
3267
+ "@type": "/injective.exchange.v2.MsgCancelBinaryOptionsOrder",
1052
3268
  ...proto
1053
3269
  };
1054
3270
  }
1055
3271
  toAmino() {
1056
3272
  const proto = this.toProto();
1057
3273
  return {
1058
- type: "exchange/MsgAuthorizeStakeGrants",
3274
+ type: "exchange/MsgCancelBinaryOptionsOrder",
1059
3275
  value: {
1060
3276
  sender: proto.sender,
1061
- grants: proto.grants
3277
+ market_id: proto.marketId,
3278
+ subaccount_id: proto.subaccountId,
3279
+ order_hash: proto.orderHash,
3280
+ order_mask: proto.orderMask,
3281
+ cid: proto.cid
1062
3282
  }
1063
3283
  };
1064
3284
  }
1065
3285
  toWeb3Gw() {
1066
3286
  const { value } = this.toAmino();
1067
3287
  return {
1068
- "@type": "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
3288
+ "@type": "/injective.exchange.v2.MsgCancelBinaryOptionsOrder",
1069
3289
  ...value
1070
3290
  };
1071
3291
  }
1072
3292
  toDirectSign() {
1073
3293
  return {
1074
- type: "/injective.exchange.v1beta1.MsgAuthorizeStakeGrants",
3294
+ type: "/injective.exchange.v2.MsgCancelBinaryOptionsOrder",
1075
3295
  message: this.toProto()
1076
3296
  };
1077
3297
  }
1078
3298
  toBinary() {
1079
- return InjectiveExchangeV1Beta1TxPb.MsgAuthorizeStakeGrants.toBinary(this.toProto());
3299
+ return InjectiveExchangeV2TxPb.MsgCancelBinaryOptionsOrder.toBinary(this.toProto());
1080
3300
  }
1081
3301
  };
1082
3302
 
1083
3303
  //#endregion
1084
- //#region src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.ts
3304
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts
1085
3305
  /**
1086
3306
  * @category Messages
1087
3307
  */
1088
- var MsgBatchCancelSpotOrders = class MsgBatchCancelSpotOrders extends MsgBase {
3308
+ var MsgBatchCancelDerivativeOrders = class MsgBatchCancelDerivativeOrders extends MsgBase {
1089
3309
  static fromJSON(params) {
1090
- return new MsgBatchCancelSpotOrders(params);
3310
+ return new MsgBatchCancelDerivativeOrders(params);
1091
3311
  }
1092
3312
  toProto() {
1093
3313
  const { params } = this;
@@ -1100,7 +3320,7 @@ var MsgBatchCancelSpotOrders = class MsgBatchCancelSpotOrders extends MsgBase {
1100
3320
  cid: order.cid || ""
1101
3321
  });
1102
3322
  });
1103
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelSpotOrders.create({
3323
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelDerivativeOrders.create({
1104
3324
  sender: params.injectiveAddress,
1105
3325
  data: orderDataList
1106
3326
  });
@@ -1108,14 +3328,14 @@ var MsgBatchCancelSpotOrders = class MsgBatchCancelSpotOrders extends MsgBase {
1108
3328
  toData() {
1109
3329
  const proto = this.toProto();
1110
3330
  return {
1111
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
3331
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
1112
3332
  ...proto
1113
3333
  };
1114
3334
  }
1115
3335
  toAmino() {
1116
3336
  const proto = this.toProto();
1117
3337
  return {
1118
- type: "exchange/MsgBatchCancelSpotOrders",
3338
+ type: "exchange/MsgBatchCancelDerivativeOrders",
1119
3339
  value: {
1120
3340
  sender: proto.sender,
1121
3341
  data: proto.data.map((orderData) => ({
@@ -1131,80 +3351,24 @@ var MsgBatchCancelSpotOrders = class MsgBatchCancelSpotOrders extends MsgBase {
1131
3351
  toWeb3Gw() {
1132
3352
  const { value } = this.toAmino();
1133
3353
  return {
1134
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
1135
- ...value
1136
- };
1137
- }
1138
- toDirectSign() {
1139
- return {
1140
- type: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
1141
- message: this.toProto()
1142
- };
1143
- }
1144
- toBinary() {
1145
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelSpotOrders.toBinary(this.toProto());
1146
- }
1147
- };
1148
-
1149
- //#endregion
1150
- //#region src/core/modules/exchange/msgs/MsgCancelDerivativeOrder.ts
1151
- var MsgCancelDerivativeOrder = class MsgCancelDerivativeOrder extends MsgBase {
1152
- static fromJSON(params) {
1153
- return new MsgCancelDerivativeOrder(params);
1154
- }
1155
- toProto() {
1156
- const { params } = this;
1157
- return InjectiveExchangeV1Beta1TxPb.MsgCancelDerivativeOrder.create({
1158
- sender: params.injectiveAddress,
1159
- marketId: params.marketId,
1160
- subaccountId: params.subaccountId,
1161
- orderHash: params.orderHash || "",
1162
- orderMask: params.orderMask || InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
1163
- cid: params.cid || ""
1164
- });
1165
- }
1166
- toData() {
1167
- const proto = this.toProto();
1168
- return {
1169
- "@type": "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
1170
- ...proto
1171
- };
1172
- }
1173
- toAmino() {
1174
- const proto = this.toProto();
1175
- return {
1176
- type: "exchange/MsgCancelDerivativeOrder",
1177
- value: {
1178
- sender: proto.sender,
1179
- market_id: proto.marketId,
1180
- subaccount_id: proto.subaccountId,
1181
- order_hash: proto.orderHash,
1182
- order_mask: proto.orderMask,
1183
- cid: proto.cid
1184
- }
1185
- };
1186
- }
1187
- toWeb3Gw() {
1188
- const { value } = this.toAmino();
1189
- return {
1190
- "@type": "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
3354
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
1191
3355
  ...value
1192
3356
  };
1193
3357
  }
1194
3358
  toDirectSign() {
1195
3359
  return {
1196
- type: "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
3360
+ type: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
1197
3361
  message: this.toProto()
1198
3362
  };
1199
3363
  }
1200
3364
  toBinary() {
1201
- return InjectiveExchangeV1Beta1TxPb.MsgCancelDerivativeOrder.toBinary(this.toProto());
3365
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelDerivativeOrders.toBinary(this.toProto());
1202
3366
  }
1203
3367
  };
1204
3368
 
1205
3369
  //#endregion
1206
- //#region src/core/modules/exchange/msgs/MsgCreateSpotMarketOrder.ts
1207
- const createMarketOrder$2 = (params) => {
3370
+ //#region src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts
3371
+ const createMarketOrder$3 = (params) => {
1208
3372
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
1209
3373
  subaccountId: params.subaccountId,
1210
3374
  feeRecipient: params.feeRecipient,
@@ -1212,29 +3376,31 @@ const createMarketOrder$2 = (params) => {
1212
3376
  quantity: params.quantity,
1213
3377
  cid: params.cid || ""
1214
3378
  });
1215
- const spotOrder = InjectiveExchangeV1Beta1ExchangePb.SpotOrder.create({
3379
+ const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
1216
3380
  marketId: params.marketId,
1217
3381
  orderInfo,
1218
3382
  orderType: params.orderType,
3383
+ margin: params.margin,
1219
3384
  triggerPrice: params.triggerPrice || "0"
1220
3385
  });
1221
- return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotMarketOrder.create({
3386
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeMarketOrder.create({
1222
3387
  sender: params.injectiveAddress,
1223
- order: spotOrder
3388
+ order: derivativeOrder
1224
3389
  });
1225
3390
  };
1226
3391
  /**
1227
3392
  * @category Messages
1228
3393
  */
1229
- var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
3394
+ var MsgCreateDerivativeMarketOrder = class MsgCreateDerivativeMarketOrder extends MsgBase {
1230
3395
  static fromJSON(params) {
1231
- return new MsgCreateSpotMarketOrder(params);
3396
+ return new MsgCreateDerivativeMarketOrder(params);
1232
3397
  }
1233
3398
  toProto() {
1234
3399
  const { params: initialParams } = this;
1235
- return createMarketOrder$2({
3400
+ return createMarketOrder$3({
1236
3401
  ...initialParams,
1237
3402
  price: toChainFormat(initialParams.price).toFixed(),
3403
+ margin: toChainFormat(initialParams.margin).toFixed(),
1238
3404
  triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
1239
3405
  quantity: toChainFormat(initialParams.quantity).toFixed()
1240
3406
  });
@@ -1242,14 +3408,14 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1242
3408
  toData() {
1243
3409
  const proto = this.toProto();
1244
3410
  return {
1245
- "@type": "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
3411
+ "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
1246
3412
  ...proto
1247
3413
  };
1248
3414
  }
1249
3415
  toAmino() {
1250
3416
  const { params } = this;
1251
3417
  return {
1252
- type: "exchange/MsgCreateSpotMarketOrder",
3418
+ type: "exchange/MsgCreateDerivativeMarketOrder",
1253
3419
  value: {
1254
3420
  sender: params.injectiveAddress,
1255
3421
  order: {
@@ -1262,6 +3428,7 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1262
3428
  cid: params.cid || ""
1263
3429
  },
1264
3430
  order_type: params.orderType,
3431
+ margin: params.margin,
1265
3432
  trigger_price: params.triggerPrice || "0"
1266
3433
  }
1267
3434
  }
@@ -1270,7 +3437,7 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1270
3437
  toWeb3Gw() {
1271
3438
  const { value } = this.toAmino();
1272
3439
  return {
1273
- "@type": "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
3440
+ "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
1274
3441
  ...value
1275
3442
  };
1276
3443
  }
@@ -1287,6 +3454,7 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1287
3454
  price: numberToCosmosSdkDecString(params.price),
1288
3455
  quantity: numberToCosmosSdkDecString(params.quantity)
1289
3456
  },
3457
+ margin: numberToCosmosSdkDecString(params.margin),
1290
3458
  trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
1291
3459
  order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
1292
3460
  }
@@ -1307,6 +3475,7 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1307
3475
  price: toChainFormat(params.price).toFixed(),
1308
3476
  quantity: toChainFormat(params.quantity).toFixed()
1309
3477
  },
3478
+ margin: toChainFormat(params.margin).toFixed(),
1310
3479
  trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
1311
3480
  }
1312
3481
  }
@@ -1314,288 +3483,354 @@ var MsgCreateSpotMarketOrder = class MsgCreateSpotMarketOrder extends MsgBase {
1314
3483
  }
1315
3484
  toDirectSign() {
1316
3485
  return {
1317
- type: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
3486
+ type: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
1318
3487
  message: this.toProto()
1319
3488
  };
1320
3489
  }
1321
3490
  toBinary() {
1322
- return InjectiveExchangeV1Beta1TxPb.MsgCreateSpotMarketOrder.toBinary(this.toProto());
3491
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeMarketOrder.toBinary(this.toProto());
1323
3492
  }
1324
3493
  };
1325
3494
 
1326
3495
  //#endregion
1327
- //#region src/core/modules/exchange/msgs/MsgInstantSpotMarketLaunch.ts
1328
- const createMessage$3 = (params) => {
1329
- return InjectiveExchangeV1Beta1TxPb.MsgInstantSpotMarketLaunch.create({
1330
- sender: params.proposer,
1331
- ticker: params.market.ticker,
1332
- baseDenom: params.market.baseDenom,
1333
- quoteDenom: params.market.quoteDenom,
1334
- minPriceTickSize: params.market.minPriceTickSize,
1335
- minQuantityTickSize: params.market.minQuantityTickSize,
1336
- minNotional: params.market.minNotional,
1337
- baseDecimals: Number(params.market.baseDecimals),
1338
- quoteDecimals: Number(params.market.quoteDecimals)
3496
+ //#region src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrderV2.ts
3497
+ const createLimitOrder$2 = (params) => {
3498
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
3499
+ subaccountId: params.subaccountId,
3500
+ feeRecipient: params.feeRecipient,
3501
+ price: params.price,
3502
+ quantity: params.quantity,
3503
+ cid: params.cid || ""
3504
+ });
3505
+ const derivativeOrder = InjectiveExchangeV2OrderPb.DerivativeOrder.create({
3506
+ marketId: params.marketId,
3507
+ orderInfo,
3508
+ orderType: params.orderType,
3509
+ margin: params.margin,
3510
+ triggerPrice: params.triggerPrice || "0",
3511
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
3512
+ });
3513
+ return InjectiveExchangeV2TxPb.MsgCreateDerivativeLimitOrder.create({
3514
+ sender: params.injectiveAddress,
3515
+ order: derivativeOrder
1339
3516
  });
1340
3517
  };
1341
3518
  /**
1342
3519
  * @category Messages
1343
3520
  */
1344
- var MsgInstantSpotMarketLaunch = class MsgInstantSpotMarketLaunch extends MsgBase {
3521
+ var MsgCreateDerivativeLimitOrderV2 = class MsgCreateDerivativeLimitOrderV2 extends MsgBase {
1345
3522
  static fromJSON(params) {
1346
- return new MsgInstantSpotMarketLaunch(params);
3523
+ return new MsgCreateDerivativeLimitOrderV2(params);
1347
3524
  }
1348
3525
  toProto() {
1349
3526
  const { params: initialParams } = this;
1350
- return createMessage$3({
3527
+ return createLimitOrder$2({
1351
3528
  ...initialParams,
1352
- market: {
1353
- ...initialParams.market,
1354
- minPriceTickSize: toChainFormat(initialParams.market.minPriceTickSize).toFixed(),
1355
- minQuantityTickSize: toChainFormat(initialParams.market.minQuantityTickSize).toFixed(),
1356
- minNotional: toChainFormat(initialParams.market.minNotional).toFixed()
1357
- }
3529
+ price: toChainFormat(initialParams.price).toFixed(),
3530
+ margin: toChainFormat(initialParams.margin).toFixed(),
3531
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
3532
+ quantity: toChainFormat(initialParams.quantity).toFixed()
1358
3533
  });
1359
3534
  }
1360
3535
  toData() {
1361
3536
  const proto = this.toProto();
1362
3537
  return {
1363
- "@type": "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
3538
+ "@type": "/injective.exchange.v2.MsgCreateDerivativeLimitOrder",
1364
3539
  ...proto
1365
3540
  };
1366
3541
  }
1367
3542
  toAmino() {
1368
3543
  const { params } = this;
1369
3544
  return {
1370
- type: "exchange/MsgInstantSpotMarketLaunch",
3545
+ type: "exchange/MsgCreateDerivativeLimitOrder",
1371
3546
  value: {
1372
- sender: params.proposer,
1373
- ticker: params.market.ticker,
1374
- base_denom: params.market.baseDenom,
1375
- quote_denom: params.market.quoteDenom,
1376
- min_price_tick_size: params.market.minPriceTickSize,
1377
- min_quantity_tick_size: params.market.minQuantityTickSize,
1378
- min_notional: params.market.minNotional,
1379
- base_decimals: params.market.baseDecimals,
1380
- quote_decimals: params.market.quoteDecimals
3547
+ sender: params.injectiveAddress,
3548
+ order: {
3549
+ market_id: params.marketId,
3550
+ order_info: {
3551
+ subaccount_id: params.subaccountId,
3552
+ fee_recipient: params.feeRecipient,
3553
+ price: params.price,
3554
+ quantity: params.quantity,
3555
+ cid: params.cid || ""
3556
+ },
3557
+ order_type: params.orderType,
3558
+ margin: params.margin,
3559
+ trigger_price: params.triggerPrice || "0",
3560
+ expiration_block: params.expirationBlock || "0"
3561
+ }
1381
3562
  }
1382
3563
  };
1383
3564
  }
1384
3565
  toWeb3Gw() {
1385
3566
  const { value } = this.toAmino();
1386
3567
  return {
1387
- "@type": "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
3568
+ "@type": "/injective.exchange.v2.MsgCreateDerivativeLimitOrder",
1388
3569
  ...value
1389
3570
  };
1390
3571
  }
1391
- toEip712() {
1392
- const { type, value } = this.toAmino();
3572
+ toEip712V2() {
3573
+ const { params } = this;
3574
+ const web3gw = this.toWeb3Gw();
3575
+ const order = web3gw.order;
1393
3576
  return {
1394
- type,
1395
- value: {
1396
- ...value,
1397
- min_price_tick_size: toChainFormat(value.min_price_tick_size).toFixed(),
1398
- min_quantity_tick_size: toChainFormat(value.min_quantity_tick_size).toFixed(),
1399
- min_notional: toChainFormat(value.min_notional).toFixed()
3577
+ ...web3gw,
3578
+ order: {
3579
+ ...order,
3580
+ order_info: {
3581
+ ...order.order_info,
3582
+ price: numberToCosmosSdkDecString(params.price),
3583
+ quantity: numberToCosmosSdkDecString(params.quantity)
3584
+ },
3585
+ margin: numberToCosmosSdkDecString(params.margin),
3586
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
3587
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
1400
3588
  }
1401
3589
  };
1402
3590
  }
1403
- toEip712V2() {
3591
+ toEip712() {
1404
3592
  const { params } = this;
3593
+ const { value, type } = this.toAmino();
3594
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
1405
3595
  return {
1406
- ...this.toWeb3Gw(),
1407
- min_price_tick_size: numberToCosmosSdkDecString(params.market.minPriceTickSize),
1408
- min_quantity_tick_size: numberToCosmosSdkDecString(params.market.minQuantityTickSize),
1409
- min_notional: numberToCosmosSdkDecString(params.market.minNotional)
3596
+ type,
3597
+ value: {
3598
+ ...value,
3599
+ order: {
3600
+ ...orderWithoutExpiration,
3601
+ order_info: {
3602
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
3603
+ price: toChainFormat(params.price).toFixed(),
3604
+ quantity: toChainFormat(params.quantity).toFixed()
3605
+ },
3606
+ margin: toChainFormat(params.margin).toFixed(),
3607
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
3608
+ }
3609
+ }
1410
3610
  };
1411
3611
  }
1412
3612
  toDirectSign() {
1413
3613
  return {
1414
- type: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
3614
+ type: "/injective.exchange.v2.MsgCreateDerivativeLimitOrder",
1415
3615
  message: this.toProto()
1416
3616
  };
1417
3617
  }
1418
3618
  toBinary() {
1419
- return InjectiveExchangeV1Beta1TxPb.MsgInstantSpotMarketLaunch.toBinary(this.toProto());
3619
+ return InjectiveExchangeV2TxPb.MsgCreateDerivativeLimitOrder.toBinary(this.toProto());
1420
3620
  }
1421
3621
  };
1422
3622
 
1423
3623
  //#endregion
1424
- //#region src/core/modules/exchange/msgs/MsgUpdateDerivativeMarketV2.ts
1425
- const createMessage$2 = (params) => {
1426
- return InjectiveExchangeV2TxPb.MsgUpdateDerivativeMarket.create({
1427
- admin: params.admin,
3624
+ //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts
3625
+ const createLimitOrder$1 = (params) => {
3626
+ const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
3627
+ subaccountId: params.subaccountId,
3628
+ feeRecipient: params.feeRecipient,
3629
+ price: params.price,
3630
+ quantity: params.quantity,
3631
+ cid: params.cid || ""
3632
+ });
3633
+ const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
1428
3634
  marketId: params.marketId,
1429
- newTicker: params.newTicker || "",
1430
- newMinNotional: params.newMinNotional || "0",
1431
- newMinPriceTickSize: params.newMinPriceTickSize || "0",
1432
- newMinQuantityTickSize: params.newMinQuantityTickSize || "0",
1433
- newInitialMarginRatio: params.newInitialMarginRatio || "0",
1434
- newMaintenanceMarginRatio: params.newMaintenanceMarginRatio || "0",
1435
- newReduceMarginRatio: params.newReduceMarginRatio || "0"
3635
+ orderInfo,
3636
+ orderType: params.orderType,
3637
+ margin: params.margin,
3638
+ triggerPrice: params.triggerPrice || "0"
3639
+ });
3640
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsLimitOrder.create({
3641
+ sender: params.injectiveAddress,
3642
+ order: derivativeOrder
1436
3643
  });
1437
3644
  };
1438
3645
  /**
1439
3646
  * @category Messages
1440
3647
  */
1441
- var MsgUpdateDerivativeMarketV2 = class MsgUpdateDerivativeMarketV2 extends MsgBase {
3648
+ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder extends MsgBase {
1442
3649
  static fromJSON(params) {
1443
- return new MsgUpdateDerivativeMarketV2(params);
3650
+ return new MsgCreateBinaryOptionsLimitOrder(params);
1444
3651
  }
1445
3652
  toProto() {
1446
3653
  const { params: initialParams } = this;
1447
- return createMessage$2({
3654
+ return createLimitOrder$1({
1448
3655
  ...initialParams,
1449
- newMinNotional: toChainFormat(initialParams.newMinNotional || "0").toFixed(),
1450
- newMinQuantityTickSize: toChainFormat(initialParams.newMinQuantityTickSize || "0").toFixed(),
1451
- newMinPriceTickSize: toChainFormat(initialParams.newMinPriceTickSize || "0").toFixed(),
1452
- newInitialMarginRatio: toChainFormat(initialParams.newInitialMarginRatio || "0").toFixed(),
1453
- newMaintenanceMarginRatio: toChainFormat(initialParams.newMaintenanceMarginRatio || "0").toFixed(),
1454
- newReduceMarginRatio: toChainFormat(initialParams.newReduceMarginRatio || "0").toFixed()
3656
+ price: toChainFormat(initialParams.price).toFixed(),
3657
+ margin: toChainFormat(initialParams.margin).toFixed(),
3658
+ triggerPrice: toChainFormat(initialParams.triggerPrice || 0).toFixed(),
3659
+ quantity: toChainFormat(initialParams.quantity).toFixed()
1455
3660
  });
1456
3661
  }
1457
3662
  toData() {
1458
3663
  const proto = this.toProto();
1459
3664
  return {
1460
- "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
3665
+ "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
1461
3666
  ...proto
1462
3667
  };
1463
3668
  }
1464
3669
  toAmino() {
1465
3670
  const { params } = this;
1466
3671
  return {
1467
- type: "exchange/MsgUpdateDerivativeMarket",
3672
+ type: "exchange/MsgCreateBinaryOptionsLimitOrder",
1468
3673
  value: {
1469
- admin: params.admin,
1470
- market_id: params.marketId,
1471
- new_ticker: params.newTicker || "",
1472
- new_min_notional: params.newMinNotional,
1473
- new_min_price_tick_size: params.newMinPriceTickSize,
1474
- new_min_quantity_tick_size: params.newMinQuantityTickSize,
1475
- new_initial_margin_ratio: params.newInitialMarginRatio,
1476
- new_maintenance_margin_ratio: params.newMaintenanceMarginRatio,
1477
- new_reduce_margin_ratio: params.newReduceMarginRatio
3674
+ sender: params.injectiveAddress,
3675
+ order: {
3676
+ market_id: params.marketId,
3677
+ order_info: {
3678
+ subaccount_id: params.subaccountId,
3679
+ fee_recipient: params.feeRecipient,
3680
+ price: params.price,
3681
+ quantity: params.quantity,
3682
+ cid: params.cid || ""
3683
+ },
3684
+ order_type: params.orderType,
3685
+ margin: params.margin,
3686
+ trigger_price: params.triggerPrice || "0"
3687
+ }
1478
3688
  }
1479
3689
  };
1480
3690
  }
1481
3691
  toWeb3Gw() {
1482
3692
  const { value } = this.toAmino();
1483
3693
  return {
1484
- "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
3694
+ "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
1485
3695
  ...value
1486
3696
  };
1487
3697
  }
1488
- toEip712() {
1489
- const { type, value } = this.toAmino();
3698
+ toEip712V2() {
3699
+ const { params } = this;
3700
+ const web3gw = this.toWeb3Gw();
3701
+ const order = web3gw.order;
1490
3702
  return {
1491
- type,
1492
- value: { ...value }
3703
+ ...web3gw,
3704
+ order: {
3705
+ ...order,
3706
+ order_info: {
3707
+ ...order.order_info,
3708
+ price: numberToCosmosSdkDecString(params.price),
3709
+ quantity: numberToCosmosSdkDecString(params.quantity)
3710
+ },
3711
+ margin: numberToCosmosSdkDecString(params.margin),
3712
+ trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
3713
+ order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
3714
+ }
1493
3715
  };
1494
3716
  }
1495
- toEip712V2() {
3717
+ toEip712() {
3718
+ var _value$order;
1496
3719
  const { params } = this;
3720
+ const { value, type } = this.toAmino();
1497
3721
  return {
1498
- "@type": "/injective.exchange.v2.MsgUpdateDerivativeMarket",
1499
- admin: params.admin,
1500
- market_id: params.marketId,
1501
- new_ticker: params.newTicker || "",
1502
- new_min_price_tick_size: numberToCosmosSdkDecString(params.newMinPriceTickSize || "0"),
1503
- new_min_quantity_tick_size: numberToCosmosSdkDecString(params.newMinQuantityTickSize || "0"),
1504
- new_min_notional: numberToCosmosSdkDecString(params.newMinNotional || "0"),
1505
- new_initial_margin_ratio: numberToCosmosSdkDecString(params.newInitialMarginRatio || "0"),
1506
- new_maintenance_margin_ratio: numberToCosmosSdkDecString(params.newMaintenanceMarginRatio || "0"),
1507
- new_reduce_margin_ratio: numberToCosmosSdkDecString(params.newReduceMarginRatio || "0"),
1508
- new_open_notional_cap: {}
3722
+ type,
3723
+ value: {
3724
+ ...value,
3725
+ order: {
3726
+ ...value.order,
3727
+ order_info: {
3728
+ ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
3729
+ price: toChainFormat(params.price).toFixed(),
3730
+ quantity: toChainFormat(params.quantity).toFixed()
3731
+ },
3732
+ margin: toChainFormat(params.margin).toFixed(),
3733
+ trigger_price: toChainFormat(params.triggerPrice || "0").toFixed()
3734
+ }
3735
+ }
1509
3736
  };
1510
3737
  }
1511
3738
  toDirectSign() {
1512
3739
  return {
1513
- type: "/injective.exchange.v2.MsgUpdateDerivativeMarket",
3740
+ type: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
1514
3741
  message: this.toProto()
1515
3742
  };
1516
3743
  }
1517
3744
  toBinary() {
1518
- return InjectiveExchangeV2TxPb.MsgUpdateDerivativeMarket.toBinary(this.toProto());
3745
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsLimitOrder.toBinary(this.toProto());
1519
3746
  }
1520
3747
  };
1521
3748
 
1522
3749
  //#endregion
1523
- //#region src/core/modules/exchange/msgs/MsgCancelBinaryOptionsOrder.ts
3750
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrdersV2.ts
1524
3751
  /**
1525
3752
  * @category Messages
1526
3753
  */
1527
- var MsgCancelBinaryOptionsOrder = class MsgCancelBinaryOptionsOrder extends MsgBase {
3754
+ var MsgBatchCancelDerivativeOrdersV2 = class MsgBatchCancelDerivativeOrdersV2 extends MsgBase {
1528
3755
  static fromJSON(params) {
1529
- return new MsgCancelBinaryOptionsOrder(params);
3756
+ return new MsgBatchCancelDerivativeOrdersV2(params);
1530
3757
  }
1531
3758
  toProto() {
1532
3759
  const { params } = this;
1533
- return InjectiveExchangeV1Beta1TxPb.MsgCancelBinaryOptionsOrder.create({
3760
+ const orderDataList = params.orders.map((order) => {
3761
+ return InjectiveExchangeV2TxPb.OrderData.create({
3762
+ marketId: order.marketId,
3763
+ subaccountId: order.subaccountId,
3764
+ orderHash: order.orderHash || "",
3765
+ orderMask: order.orderMask || InjectiveExchangeV2OrderPb.OrderMask.ANY,
3766
+ cid: order.cid || ""
3767
+ });
3768
+ });
3769
+ return InjectiveExchangeV2TxPb.MsgBatchCancelDerivativeOrders.create({
1534
3770
  sender: params.injectiveAddress,
1535
- marketId: params.marketId,
1536
- subaccountId: params.subaccountId,
1537
- orderHash: params.orderHash || "",
1538
- orderMask: InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
1539
- cid: params.cid || ""
3771
+ data: orderDataList
1540
3772
  });
1541
3773
  }
1542
3774
  toData() {
1543
3775
  const proto = this.toProto();
1544
3776
  return {
1545
- "@type": "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
3777
+ "@type": "/injective.exchange.v2.MsgBatchCancelDerivativeOrders",
1546
3778
  ...proto
1547
3779
  };
1548
3780
  }
1549
3781
  toAmino() {
1550
3782
  const proto = this.toProto();
1551
3783
  return {
1552
- type: "exchange/MsgCancelBinaryOptionsOrder",
3784
+ type: "exchange/MsgBatchCancelDerivativeOrders",
1553
3785
  value: {
1554
3786
  sender: proto.sender,
1555
- market_id: proto.marketId,
1556
- subaccount_id: proto.subaccountId,
1557
- order_hash: proto.orderHash,
1558
- order_mask: proto.orderMask,
1559
- cid: proto.cid
3787
+ data: proto.data.map((orderData) => ({
3788
+ market_id: orderData.marketId,
3789
+ subaccount_id: orderData.subaccountId,
3790
+ order_hash: orderData.orderHash,
3791
+ order_mask: orderData.orderMask,
3792
+ cid: orderData.cid
3793
+ }))
1560
3794
  }
1561
3795
  };
1562
3796
  }
1563
3797
  toWeb3Gw() {
1564
3798
  const { value } = this.toAmino();
1565
3799
  return {
1566
- "@type": "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
3800
+ "@type": "/injective.exchange.v2.MsgBatchCancelDerivativeOrders",
1567
3801
  ...value
1568
3802
  };
1569
3803
  }
1570
3804
  toDirectSign() {
1571
3805
  return {
1572
- type: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
3806
+ type: "/injective.exchange.v2.MsgBatchCancelDerivativeOrders",
1573
3807
  message: this.toProto()
1574
3808
  };
1575
3809
  }
1576
3810
  toBinary() {
1577
- return InjectiveExchangeV1Beta1TxPb.MsgCancelBinaryOptionsOrder.toBinary(this.toProto());
3811
+ return InjectiveExchangeV2TxPb.MsgBatchCancelDerivativeOrders.toBinary(this.toProto());
1578
3812
  }
1579
3813
  };
1580
3814
 
1581
3815
  //#endregion
1582
- //#region src/core/modules/exchange/msgs/MsgCreateDerivativeLimitOrder.ts
1583
- const createLimitOrder$1 = (params) => {
1584
- const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
3816
+ //#region src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrderV2.ts
3817
+ const createMarketOrder$2 = (params) => {
3818
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1585
3819
  subaccountId: params.subaccountId,
1586
3820
  feeRecipient: params.feeRecipient,
1587
3821
  price: params.price,
1588
3822
  quantity: params.quantity,
1589
3823
  cid: params.cid || ""
1590
3824
  });
1591
- const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
3825
+ const derivativeOrder = InjectiveExchangeV2OrderPb.DerivativeOrder.create({
1592
3826
  marketId: params.marketId,
1593
3827
  orderInfo,
1594
3828
  orderType: params.orderType,
1595
3829
  margin: params.margin,
1596
- triggerPrice: params.triggerPrice || "0"
3830
+ triggerPrice: params.triggerPrice || "0",
3831
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
1597
3832
  });
1598
- return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeLimitOrder.create({
3833
+ return InjectiveExchangeV2TxPb.MsgCreateDerivativeMarketOrder.create({
1599
3834
  sender: params.injectiveAddress,
1600
3835
  order: derivativeOrder
1601
3836
  });
@@ -1603,13 +3838,13 @@ const createLimitOrder$1 = (params) => {
1603
3838
  /**
1604
3839
  * @category Messages
1605
3840
  */
1606
- var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends MsgBase {
3841
+ var MsgCreateDerivativeMarketOrderV2 = class MsgCreateDerivativeMarketOrderV2 extends MsgBase {
1607
3842
  static fromJSON(params) {
1608
- return new MsgCreateDerivativeLimitOrder(params);
3843
+ return new MsgCreateDerivativeMarketOrderV2(params);
1609
3844
  }
1610
3845
  toProto() {
1611
3846
  const { params: initialParams } = this;
1612
- return createLimitOrder$1({
3847
+ return createMarketOrder$2({
1613
3848
  ...initialParams,
1614
3849
  price: toChainFormat(initialParams.price).toFixed(),
1615
3850
  margin: toChainFormat(initialParams.margin).toFixed(),
@@ -1620,14 +3855,14 @@ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends
1620
3855
  toData() {
1621
3856
  const proto = this.toProto();
1622
3857
  return {
1623
- "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
3858
+ "@type": "/injective.exchange.v2.MsgCreateDerivativeMarketOrder",
1624
3859
  ...proto
1625
3860
  };
1626
3861
  }
1627
3862
  toAmino() {
1628
3863
  const { params } = this;
1629
3864
  return {
1630
- type: "exchange/MsgCreateDerivativeLimitOrder",
3865
+ type: "exchange/MsgCreateDerivativeMarketOrder",
1631
3866
  value: {
1632
3867
  sender: params.injectiveAddress,
1633
3868
  order: {
@@ -1641,7 +3876,8 @@ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends
1641
3876
  },
1642
3877
  order_type: params.orderType,
1643
3878
  margin: params.margin,
1644
- trigger_price: params.triggerPrice || "0"
3879
+ trigger_price: params.triggerPrice || "0",
3880
+ expiration_block: params.expirationBlock || "0"
1645
3881
  }
1646
3882
  }
1647
3883
  };
@@ -1649,7 +3885,7 @@ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends
1649
3885
  toWeb3Gw() {
1650
3886
  const { value } = this.toAmino();
1651
3887
  return {
1652
- "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
3888
+ "@type": "/injective.exchange.v2.MsgCreateDerivativeMarketOrder",
1653
3889
  ...value
1654
3890
  };
1655
3891
  }
@@ -1668,22 +3904,22 @@ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends
1668
3904
  },
1669
3905
  margin: numberToCosmosSdkDecString(params.margin),
1670
3906
  trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
1671
- order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
3907
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
1672
3908
  }
1673
3909
  };
1674
3910
  }
1675
3911
  toEip712() {
1676
- var _value$order;
1677
3912
  const { params } = this;
1678
3913
  const { value, type } = this.toAmino();
3914
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
1679
3915
  return {
1680
3916
  type,
1681
3917
  value: {
1682
3918
  ...value,
1683
3919
  order: {
1684
- ...value.order,
3920
+ ...orderWithoutExpiration,
1685
3921
  order_info: {
1686
- ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
3922
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
1687
3923
  price: toChainFormat(params.price).toFixed(),
1688
3924
  quantity: toChainFormat(params.quantity).toFixed()
1689
3925
  },
@@ -1695,23 +3931,106 @@ var MsgCreateDerivativeLimitOrder = class MsgCreateDerivativeLimitOrder extends
1695
3931
  }
1696
3932
  toDirectSign() {
1697
3933
  return {
1698
- type: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
3934
+ type: "/injective.exchange.v2.MsgCreateDerivativeMarketOrder",
1699
3935
  message: this.toProto()
1700
3936
  };
1701
3937
  }
1702
3938
  toBinary() {
1703
- return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeLimitOrder.toBinary(this.toProto());
3939
+ return InjectiveExchangeV2TxPb.MsgCreateDerivativeMarketOrder.toBinary(this.toProto());
1704
3940
  }
1705
3941
  };
1706
3942
 
1707
3943
  //#endregion
1708
- //#region src/core/modules/exchange/msgs/MsgBatchCancelDerivativeOrders.ts
3944
+ //#region src/core/modules/exchange/msgs/MsgAdminUpdateBinaryOptionsMarket.ts
3945
+ const createMessage$3 = (params) => {
3946
+ return InjectiveExchangeV1Beta1TxPb.MsgAdminUpdateBinaryOptionsMarket.create({
3947
+ sender: params.sender,
3948
+ marketId: params.marketId,
3949
+ settlementPrice: params.settlementPrice,
3950
+ expirationTimestamp: BigInt(params.expirationTimestamp),
3951
+ settlementTimestamp: BigInt(params.settlementTimestamp),
3952
+ status: params.status
3953
+ });
3954
+ };
1709
3955
  /**
1710
3956
  * @category Messages
1711
3957
  */
1712
- var MsgBatchCancelDerivativeOrders = class MsgBatchCancelDerivativeOrders extends MsgBase {
3958
+ var MsgAdminUpdateBinaryOptionsMarket = class MsgAdminUpdateBinaryOptionsMarket extends MsgBase {
1713
3959
  static fromJSON(params) {
1714
- return new MsgBatchCancelDerivativeOrders(params);
3960
+ return new MsgAdminUpdateBinaryOptionsMarket(params);
3961
+ }
3962
+ toProto() {
3963
+ const { params: initialParams } = this;
3964
+ return createMessage$3({
3965
+ ...initialParams,
3966
+ settlementPrice: toChainFormat(initialParams.settlementPrice).toFixed()
3967
+ });
3968
+ }
3969
+ toData() {
3970
+ const proto = this.toProto();
3971
+ return {
3972
+ "@type": "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
3973
+ ...proto
3974
+ };
3975
+ }
3976
+ toAmino() {
3977
+ const { params } = this;
3978
+ return {
3979
+ type: "exchange/MsgAdminUpdateBinaryOptionsMarket",
3980
+ value: {
3981
+ sender: params.sender,
3982
+ market_id: params.marketId,
3983
+ settlement_price: params.settlementPrice,
3984
+ expiration_timestamp: params.expirationTimestamp,
3985
+ settlement_timestamp: params.settlementTimestamp,
3986
+ status: params.status
3987
+ }
3988
+ };
3989
+ }
3990
+ toWeb3Gw() {
3991
+ const { value } = this.toAmino();
3992
+ return {
3993
+ "@type": "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
3994
+ ...value
3995
+ };
3996
+ }
3997
+ toEip712() {
3998
+ const { type, value } = this.toAmino();
3999
+ return {
4000
+ type,
4001
+ value: {
4002
+ ...value,
4003
+ settlement_price: toChainFormat(value.settlement_price).toFixed()
4004
+ }
4005
+ };
4006
+ }
4007
+ toEip712V2() {
4008
+ const { params } = this;
4009
+ return {
4010
+ ...this.toWeb3Gw(),
4011
+ settlement_price: numberToCosmosSdkDecString(params.settlementPrice),
4012
+ status: InjectiveExchangeV1Beta1ExchangePb.MarketStatus[params.status]
4013
+ };
4014
+ }
4015
+ toDirectSign() {
4016
+ return {
4017
+ type: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
4018
+ message: this.toProto()
4019
+ };
4020
+ }
4021
+ toBinary() {
4022
+ return InjectiveExchangeV1Beta1TxPb.MsgAdminUpdateBinaryOptionsMarket.toBinary(this.toProto());
4023
+ }
4024
+ };
4025
+
4026
+ //#endregion
4027
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts
4028
+ /**
4029
+ * @category Messages
4030
+ */
4031
+ var MsgBatchCancelBinaryOptionsOrders = class MsgBatchCancelBinaryOptionsOrders extends MsgBase {
4032
+ static fromJSON(params) {
4033
+ return new MsgBatchCancelBinaryOptionsOrders(params);
1715
4034
  }
1716
4035
  toProto() {
1717
4036
  const { params } = this;
@@ -1720,11 +4039,11 @@ var MsgBatchCancelDerivativeOrders = class MsgBatchCancelDerivativeOrders extend
1720
4039
  marketId: order.marketId,
1721
4040
  subaccountId: order.subaccountId,
1722
4041
  orderHash: order.orderHash || "",
1723
- orderMask: order.orderMask || InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
4042
+ orderMask: InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
1724
4043
  cid: order.cid || ""
1725
4044
  });
1726
4045
  });
1727
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelDerivativeOrders.create({
4046
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelBinaryOptionsOrders.create({
1728
4047
  sender: params.injectiveAddress,
1729
4048
  data: orderDataList
1730
4049
  });
@@ -1732,22 +4051,22 @@ var MsgBatchCancelDerivativeOrders = class MsgBatchCancelDerivativeOrders extend
1732
4051
  toData() {
1733
4052
  const proto = this.toProto();
1734
4053
  return {
1735
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
4054
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
1736
4055
  ...proto
1737
4056
  };
1738
4057
  }
1739
4058
  toAmino() {
1740
- const proto = this.toProto();
4059
+ const { params } = this;
1741
4060
  return {
1742
- type: "exchange/MsgBatchCancelDerivativeOrders",
4061
+ type: "exchange/MsgBatchCancelBinaryOptionsOrders",
1743
4062
  value: {
1744
- sender: proto.sender,
1745
- data: proto.data.map((orderData) => ({
1746
- market_id: orderData.marketId,
1747
- subaccount_id: orderData.subaccountId,
1748
- order_hash: orderData.orderHash,
1749
- order_mask: orderData.orderMask,
1750
- cid: orderData.cid
4063
+ sender: params.injectiveAddress,
4064
+ data: params.orders.map((order) => ({
4065
+ market_id: order.marketId,
4066
+ subaccount_id: order.subaccountId,
4067
+ order_hash: order.orderHash,
4068
+ order_mask: order.orderMask,
4069
+ cid: order.cid
1751
4070
  }))
1752
4071
  }
1753
4072
  };
@@ -1755,23 +4074,23 @@ var MsgBatchCancelDerivativeOrders = class MsgBatchCancelDerivativeOrders extend
1755
4074
  toWeb3Gw() {
1756
4075
  const { value } = this.toAmino();
1757
4076
  return {
1758
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
4077
+ "@type": "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
1759
4078
  ...value
1760
4079
  };
1761
4080
  }
1762
4081
  toDirectSign() {
1763
4082
  return {
1764
- type: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
4083
+ type: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
1765
4084
  message: this.toProto()
1766
4085
  };
1767
4086
  }
1768
4087
  toBinary() {
1769
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelDerivativeOrders.toBinary(this.toProto());
4088
+ return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelBinaryOptionsOrders.toBinary(this.toProto());
1770
4089
  }
1771
4090
  };
1772
4091
 
1773
4092
  //#endregion
1774
- //#region src/core/modules/exchange/msgs/MsgCreateDerivativeMarketOrder.ts
4093
+ //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts
1775
4094
  const createMarketOrder$1 = (params) => {
1776
4095
  const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
1777
4096
  subaccountId: params.subaccountId,
@@ -1787,7 +4106,7 @@ const createMarketOrder$1 = (params) => {
1787
4106
  margin: params.margin,
1788
4107
  triggerPrice: params.triggerPrice || "0"
1789
4108
  });
1790
- return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeMarketOrder.create({
4109
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsMarketOrder.create({
1791
4110
  sender: params.injectiveAddress,
1792
4111
  order: derivativeOrder
1793
4112
  });
@@ -1795,9 +4114,9 @@ const createMarketOrder$1 = (params) => {
1795
4114
  /**
1796
4115
  * @category Messages
1797
4116
  */
1798
- var MsgCreateDerivativeMarketOrder = class MsgCreateDerivativeMarketOrder extends MsgBase {
4117
+ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder extends MsgBase {
1799
4118
  static fromJSON(params) {
1800
- return new MsgCreateDerivativeMarketOrder(params);
4119
+ return new MsgCreateBinaryOptionsMarketOrder(params);
1801
4120
  }
1802
4121
  toProto() {
1803
4122
  const { params: initialParams } = this;
@@ -1812,14 +4131,14 @@ var MsgCreateDerivativeMarketOrder = class MsgCreateDerivativeMarketOrder extend
1812
4131
  toData() {
1813
4132
  const proto = this.toProto();
1814
4133
  return {
1815
- "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
4134
+ "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
1816
4135
  ...proto
1817
4136
  };
1818
4137
  }
1819
4138
  toAmino() {
1820
4139
  const { params } = this;
1821
4140
  return {
1822
- type: "exchange/MsgCreateDerivativeMarketOrder",
4141
+ type: "exchange/MsgCreateBinaryOptionsMarketOrder",
1823
4142
  value: {
1824
4143
  sender: params.injectiveAddress,
1825
4144
  order: {
@@ -1841,7 +4160,7 @@ var MsgCreateDerivativeMarketOrder = class MsgCreateDerivativeMarketOrder extend
1841
4160
  toWeb3Gw() {
1842
4161
  const { value } = this.toAmino();
1843
4162
  return {
1844
- "@type": "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
4163
+ "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
1845
4164
  ...value
1846
4165
  };
1847
4166
  }
@@ -1887,33 +4206,86 @@ var MsgCreateDerivativeMarketOrder = class MsgCreateDerivativeMarketOrder extend
1887
4206
  }
1888
4207
  toDirectSign() {
1889
4208
  return {
1890
- type: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
4209
+ type: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
1891
4210
  message: this.toProto()
1892
4211
  };
1893
4212
  }
1894
4213
  toBinary() {
1895
- return InjectiveExchangeV1Beta1TxPb.MsgCreateDerivativeMarketOrder.toBinary(this.toProto());
4214
+ return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsMarketOrder.toBinary(this.toProto());
1896
4215
  }
1897
4216
  };
1898
4217
 
1899
4218
  //#endregion
1900
- //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrder.ts
4219
+ //#region src/core/modules/exchange/msgs/MsgSetDelegationTransferReceivers.ts
4220
+ /**
4221
+ * @deprecated no longer supported on chain
4222
+ * @category Messages
4223
+ */
4224
+ var MsgSetDelegationTransferReceivers = class MsgSetDelegationTransferReceivers extends MsgBase {
4225
+ static fromJSON(params) {
4226
+ return new MsgSetDelegationTransferReceivers(params);
4227
+ }
4228
+ toProto() {
4229
+ const { params } = this;
4230
+ return {
4231
+ sender: params.sender,
4232
+ receivers: params.receivers
4233
+ };
4234
+ }
4235
+ toData() {
4236
+ const proto = this.toProto();
4237
+ return {
4238
+ "@type": "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
4239
+ ...proto
4240
+ };
4241
+ }
4242
+ toAmino() {
4243
+ const proto = this.toProto();
4244
+ return {
4245
+ type: "exchange/MsgSetDelegationTransferReceivers",
4246
+ value: {
4247
+ sender: proto.sender,
4248
+ receivers: proto.receivers
4249
+ }
4250
+ };
4251
+ }
4252
+ toWeb3Gw() {
4253
+ const { value } = this.toAmino();
4254
+ return {
4255
+ "@type": "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
4256
+ ...value
4257
+ };
4258
+ }
4259
+ toDirectSign() {
4260
+ return {
4261
+ type: "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
4262
+ message: this.toProto()
4263
+ };
4264
+ }
4265
+ toBinary() {
4266
+ return new Uint8Array(0);
4267
+ }
4268
+ };
4269
+
4270
+ //#endregion
4271
+ //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsLimitOrderV2.ts
1901
4272
  const createLimitOrder = (params) => {
1902
- const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
4273
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
1903
4274
  subaccountId: params.subaccountId,
1904
4275
  feeRecipient: params.feeRecipient,
1905
4276
  price: params.price,
1906
4277
  quantity: params.quantity,
1907
4278
  cid: params.cid || ""
1908
4279
  });
1909
- const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
4280
+ const derivativeOrder = InjectiveExchangeV2OrderPb.DerivativeOrder.create({
1910
4281
  marketId: params.marketId,
1911
4282
  orderInfo,
1912
4283
  orderType: params.orderType,
1913
4284
  margin: params.margin,
1914
- triggerPrice: params.triggerPrice || "0"
4285
+ triggerPrice: params.triggerPrice || "0",
4286
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
1915
4287
  });
1916
- return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsLimitOrder.create({
4288
+ return InjectiveExchangeV2TxPb.MsgCreateBinaryOptionsLimitOrder.create({
1917
4289
  sender: params.injectiveAddress,
1918
4290
  order: derivativeOrder
1919
4291
  });
@@ -1921,9 +4293,9 @@ const createLimitOrder = (params) => {
1921
4293
  /**
1922
4294
  * @category Messages
1923
4295
  */
1924
- var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder extends MsgBase {
4296
+ var MsgCreateBinaryOptionsLimitOrderV2 = class MsgCreateBinaryOptionsLimitOrderV2 extends MsgBase {
1925
4297
  static fromJSON(params) {
1926
- return new MsgCreateBinaryOptionsLimitOrder(params);
4298
+ return new MsgCreateBinaryOptionsLimitOrderV2(params);
1927
4299
  }
1928
4300
  toProto() {
1929
4301
  const { params: initialParams } = this;
@@ -1938,7 +4310,7 @@ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder ex
1938
4310
  toData() {
1939
4311
  const proto = this.toProto();
1940
4312
  return {
1941
- "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
4313
+ "@type": "/injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder",
1942
4314
  ...proto
1943
4315
  };
1944
4316
  }
@@ -1959,7 +4331,8 @@ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder ex
1959
4331
  },
1960
4332
  order_type: params.orderType,
1961
4333
  margin: params.margin,
1962
- trigger_price: params.triggerPrice || "0"
4334
+ trigger_price: params.triggerPrice || "0",
4335
+ expiration_block: params.expirationBlock || "0"
1963
4336
  }
1964
4337
  }
1965
4338
  };
@@ -1967,7 +4340,7 @@ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder ex
1967
4340
  toWeb3Gw() {
1968
4341
  const { value } = this.toAmino();
1969
4342
  return {
1970
- "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
4343
+ "@type": "/injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder",
1971
4344
  ...value
1972
4345
  };
1973
4346
  }
@@ -1986,22 +4359,22 @@ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder ex
1986
4359
  },
1987
4360
  margin: numberToCosmosSdkDecString(params.margin),
1988
4361
  trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
1989
- order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
4362
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
1990
4363
  }
1991
4364
  };
1992
4365
  }
1993
4366
  toEip712() {
1994
- var _value$order;
1995
4367
  const { params } = this;
1996
4368
  const { value, type } = this.toAmino();
4369
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
1997
4370
  return {
1998
4371
  type,
1999
4372
  value: {
2000
4373
  ...value,
2001
4374
  order: {
2002
- ...value.order,
4375
+ ...orderWithoutExpiration,
2003
4376
  order_info: {
2004
- ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
4377
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
2005
4378
  price: toChainFormat(params.price).toFixed(),
2006
4379
  quantity: toChainFormat(params.quantity).toFixed()
2007
4380
  },
@@ -2013,19 +4386,135 @@ var MsgCreateBinaryOptionsLimitOrder = class MsgCreateBinaryOptionsLimitOrder ex
2013
4386
  }
2014
4387
  toDirectSign() {
2015
4388
  return {
2016
- type: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
4389
+ type: "/injective.exchange.v2.MsgCreateBinaryOptionsLimitOrder",
2017
4390
  message: this.toProto()
2018
4391
  };
2019
4392
  }
2020
4393
  toBinary() {
2021
- return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsLimitOrder.toBinary(this.toProto());
4394
+ return InjectiveExchangeV2TxPb.MsgCreateBinaryOptionsLimitOrder.toBinary(this.toProto());
2022
4395
  }
2023
4396
  };
2024
4397
 
2025
4398
  //#endregion
2026
- //#region src/core/modules/exchange/msgs/MsgAdminUpdateBinaryOptionsMarket.ts
4399
+ //#region src/core/modules/exchange/msgs/MsgInstantBinaryOptionsMarketLaunch.ts
4400
+ const createMessage$2 = (params) => {
4401
+ return InjectiveExchangeV1Beta1TxPb.MsgInstantBinaryOptionsMarketLaunch.create({
4402
+ sender: params.proposer,
4403
+ ticker: params.market.ticker,
4404
+ oracleSymbol: params.market.oracleSymbol,
4405
+ oracleProvider: params.market.oracleProvider,
4406
+ oracleType: params.market.oracleType,
4407
+ oracleScaleFactor: params.market.oracleScaleFactor,
4408
+ makerFeeRate: params.market.makerFeeRate,
4409
+ takerFeeRate: params.market.takerFeeRate,
4410
+ expirationTimestamp: BigInt(params.market.expirationTimestamp),
4411
+ settlementTimestamp: BigInt(params.market.settlementTimestamp),
4412
+ admin: params.market.admin,
4413
+ quoteDenom: params.market.quoteDenom,
4414
+ minPriceTickSize: params.market.minPriceTickSize,
4415
+ minQuantityTickSize: params.market.minQuantityTickSize,
4416
+ minNotional: params.market.minNotional
4417
+ });
4418
+ };
4419
+ /**
4420
+ * @category Messages
4421
+ */
4422
+ var MsgInstantBinaryOptionsMarketLaunch = class MsgInstantBinaryOptionsMarketLaunch extends MsgBase {
4423
+ static fromJSON(params) {
4424
+ return new MsgInstantBinaryOptionsMarketLaunch(params);
4425
+ }
4426
+ toProto() {
4427
+ const { params: initialParams } = this;
4428
+ return createMessage$2({
4429
+ ...initialParams,
4430
+ market: {
4431
+ ...initialParams.market,
4432
+ minPriceTickSize: toChainFormat(initialParams.market.minPriceTickSize).toFixed(),
4433
+ makerFeeRate: toChainFormat(initialParams.market.makerFeeRate).toFixed(),
4434
+ takerFeeRate: toChainFormat(initialParams.market.takerFeeRate).toFixed(),
4435
+ minQuantityTickSize: toChainFormat(initialParams.market.minQuantityTickSize).toFixed(),
4436
+ minNotional: toChainFormat(initialParams.market.minNotional).toFixed()
4437
+ }
4438
+ });
4439
+ }
4440
+ toData() {
4441
+ const proto = this.toProto();
4442
+ return {
4443
+ "@type": "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4444
+ ...proto
4445
+ };
4446
+ }
4447
+ toAmino() {
4448
+ const { params } = this;
4449
+ return {
4450
+ type: "exchange/MsgInstantBinaryOptionsMarketLaunch",
4451
+ value: {
4452
+ sender: params.proposer,
4453
+ ticker: params.market.ticker,
4454
+ oracle_symbol: params.market.oracleSymbol,
4455
+ oracle_provider: params.market.oracleProvider,
4456
+ oracle_type: params.market.oracleType,
4457
+ oracle_scale_factor: params.market.oracleScaleFactor,
4458
+ maker_fee_rate: params.market.makerFeeRate,
4459
+ taker_fee_rate: params.market.takerFeeRate,
4460
+ expiration_timestamp: params.market.expirationTimestamp.toString(),
4461
+ settlement_timestamp: params.market.settlementTimestamp.toString(),
4462
+ admin: params.market.admin,
4463
+ quote_denom: params.market.quoteDenom,
4464
+ min_price_tick_size: params.market.minPriceTickSize,
4465
+ min_quantity_tick_size: params.market.minQuantityTickSize,
4466
+ min_notional: params.market.minNotional
4467
+ }
4468
+ };
4469
+ }
4470
+ toWeb3Gw() {
4471
+ const { value } = this.toAmino();
4472
+ return {
4473
+ "@type": "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4474
+ ...value
4475
+ };
4476
+ }
4477
+ toEip712() {
4478
+ const { type, value } = this.toAmino();
4479
+ return {
4480
+ type,
4481
+ value: {
4482
+ ...value,
4483
+ min_price_tick_size: toChainFormat(value.min_price_tick_size).toFixed(),
4484
+ min_quantity_tick_size: toChainFormat(value.min_quantity_tick_size).toFixed(),
4485
+ min_notional: toChainFormat(value.min_notional).toFixed(),
4486
+ taker_fee_rate: toChainFormat(value.taker_fee_rate).toFixed(),
4487
+ maker_fee_rate: toChainFormat(value.maker_fee_rate).toFixed()
4488
+ }
4489
+ };
4490
+ }
4491
+ toEip712V2() {
4492
+ const { params } = this;
4493
+ return {
4494
+ ...this.toWeb3Gw(),
4495
+ min_price_tick_size: numberToCosmosSdkDecString(params.market.minPriceTickSize),
4496
+ min_quantity_tick_size: numberToCosmosSdkDecString(params.market.minQuantityTickSize),
4497
+ min_notional: numberToCosmosSdkDecString(params.market.minNotional),
4498
+ taker_fee_rate: numberToCosmosSdkDecString(params.market.takerFeeRate),
4499
+ maker_fee_rate: numberToCosmosSdkDecString(params.market.makerFeeRate),
4500
+ oracle_type: InjectiveOracleV1Beta1OraclePb.OracleType[params.market.oracleType]
4501
+ };
4502
+ }
4503
+ toDirectSign() {
4504
+ return {
4505
+ type: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4506
+ message: this.toProto()
4507
+ };
4508
+ }
4509
+ toBinary() {
4510
+ return InjectiveExchangeV1Beta1TxPb.MsgInstantBinaryOptionsMarketLaunch.toBinary(this.toProto());
4511
+ }
4512
+ };
4513
+
4514
+ //#endregion
4515
+ //#region src/core/modules/exchange/msgs/MsgAdminUpdateBinaryOptionsMarketV2.ts
2027
4516
  const createMessage$1 = (params) => {
2028
- return InjectiveExchangeV1Beta1TxPb.MsgAdminUpdateBinaryOptionsMarket.create({
4517
+ return InjectiveExchangeV2TxPb.MsgAdminUpdateBinaryOptionsMarket.create({
2029
4518
  sender: params.sender,
2030
4519
  marketId: params.marketId,
2031
4520
  settlementPrice: params.settlementPrice,
@@ -2037,9 +4526,9 @@ const createMessage$1 = (params) => {
2037
4526
  /**
2038
4527
  * @category Messages
2039
4528
  */
2040
- var MsgAdminUpdateBinaryOptionsMarket = class MsgAdminUpdateBinaryOptionsMarket extends MsgBase {
4529
+ var MsgAdminUpdateBinaryOptionsMarketV2 = class MsgAdminUpdateBinaryOptionsMarketV2 extends MsgBase {
2041
4530
  static fromJSON(params) {
2042
- return new MsgAdminUpdateBinaryOptionsMarket(params);
4531
+ return new MsgAdminUpdateBinaryOptionsMarketV2(params);
2043
4532
  }
2044
4533
  toProto() {
2045
4534
  const { params: initialParams } = this;
@@ -2051,7 +4540,7 @@ var MsgAdminUpdateBinaryOptionsMarket = class MsgAdminUpdateBinaryOptionsMarket
2051
4540
  toData() {
2052
4541
  const proto = this.toProto();
2053
4542
  return {
2054
- "@type": "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
4543
+ "@type": "/injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket",
2055
4544
  ...proto
2056
4545
  };
2057
4546
  }
@@ -2072,60 +4561,53 @@ var MsgAdminUpdateBinaryOptionsMarket = class MsgAdminUpdateBinaryOptionsMarket
2072
4561
  toWeb3Gw() {
2073
4562
  const { value } = this.toAmino();
2074
4563
  return {
2075
- "@type": "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
4564
+ "@type": "/injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket",
2076
4565
  ...value
2077
4566
  };
2078
4567
  }
2079
4568
  toEip712() {
2080
- const { type, value } = this.toAmino();
2081
- return {
2082
- type,
2083
- value: {
2084
- ...value,
2085
- settlement_price: toChainFormat(value.settlement_price).toFixed()
2086
- }
2087
- };
4569
+ throw new GeneralException(/* @__PURE__ */ new Error("EIP712 v1 is not supported for MsgAdminUpdateBinaryOptionsMarket, use toEip712V2 instead."));
2088
4570
  }
2089
4571
  toEip712V2() {
2090
4572
  const { params } = this;
2091
4573
  return {
2092
4574
  ...this.toWeb3Gw(),
2093
4575
  settlement_price: numberToCosmosSdkDecString(params.settlementPrice),
2094
- status: InjectiveExchangeV1Beta1ExchangePb.MarketStatus[params.status]
4576
+ status: InjectiveExchangeV2MarketPb.MarketStatus[params.status]
2095
4577
  };
2096
4578
  }
2097
4579
  toDirectSign() {
2098
4580
  return {
2099
- type: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
4581
+ type: "/injective.exchange.v2.MsgAdminUpdateBinaryOptionsMarket",
2100
4582
  message: this.toProto()
2101
4583
  };
2102
4584
  }
2103
4585
  toBinary() {
2104
- return InjectiveExchangeV1Beta1TxPb.MsgAdminUpdateBinaryOptionsMarket.toBinary(this.toProto());
4586
+ return InjectiveExchangeV2TxPb.MsgAdminUpdateBinaryOptionsMarket.toBinary(this.toProto());
2105
4587
  }
2106
4588
  };
2107
4589
 
2108
4590
  //#endregion
2109
- //#region src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrders.ts
4591
+ //#region src/core/modules/exchange/msgs/MsgBatchCancelBinaryOptionsOrdersV2.ts
2110
4592
  /**
2111
4593
  * @category Messages
2112
4594
  */
2113
- var MsgBatchCancelBinaryOptionsOrders = class MsgBatchCancelBinaryOptionsOrders extends MsgBase {
4595
+ var MsgBatchCancelBinaryOptionsOrdersV2 = class MsgBatchCancelBinaryOptionsOrdersV2 extends MsgBase {
2114
4596
  static fromJSON(params) {
2115
- return new MsgBatchCancelBinaryOptionsOrders(params);
4597
+ return new MsgBatchCancelBinaryOptionsOrdersV2(params);
2116
4598
  }
2117
4599
  toProto() {
2118
4600
  const { params } = this;
2119
4601
  const orderDataList = params.orders.map((order) => {
2120
- return InjectiveExchangeV1Beta1TxPb.OrderData.create({
4602
+ return InjectiveExchangeV2TxPb.OrderData.create({
2121
4603
  marketId: order.marketId,
2122
4604
  subaccountId: order.subaccountId,
2123
4605
  orderHash: order.orderHash || "",
2124
- orderMask: InjectiveExchangeV1Beta1ExchangePb.OrderMask.ANY,
4606
+ orderMask: order.orderMask || InjectiveExchangeV2OrderPb.OrderMask.ANY,
2125
4607
  cid: order.cid || ""
2126
4608
  });
2127
4609
  });
2128
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelBinaryOptionsOrders.create({
4610
+ return InjectiveExchangeV2TxPb.MsgBatchCancelBinaryOptionsOrders.create({
2129
4611
  sender: params.injectiveAddress,
2130
4612
  data: orderDataList
2131
4613
  });
@@ -2133,22 +4615,22 @@ var MsgBatchCancelBinaryOptionsOrders = class MsgBatchCancelBinaryOptionsOrders
2133
4615
  toData() {
2134
4616
  const proto = this.toProto();
2135
4617
  return {
2136
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
4618
+ "@type": "/injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders",
2137
4619
  ...proto
2138
4620
  };
2139
4621
  }
2140
4622
  toAmino() {
2141
- const { params } = this;
4623
+ const proto = this.toProto();
2142
4624
  return {
2143
4625
  type: "exchange/MsgBatchCancelBinaryOptionsOrders",
2144
4626
  value: {
2145
- sender: params.injectiveAddress,
2146
- data: params.orders.map((order) => ({
2147
- market_id: order.marketId,
2148
- subaccount_id: order.subaccountId,
2149
- order_hash: order.orderHash,
2150
- order_mask: order.orderMask,
2151
- cid: order.cid
4627
+ sender: proto.sender,
4628
+ data: proto.data.map((orderData) => ({
4629
+ market_id: orderData.marketId,
4630
+ subaccount_id: orderData.subaccountId,
4631
+ order_hash: orderData.orderHash,
4632
+ order_mask: orderData.orderMask,
4633
+ cid: orderData.cid
2152
4634
  }))
2153
4635
  }
2154
4636
  };
@@ -2156,39 +4638,40 @@ var MsgBatchCancelBinaryOptionsOrders = class MsgBatchCancelBinaryOptionsOrders
2156
4638
  toWeb3Gw() {
2157
4639
  const { value } = this.toAmino();
2158
4640
  return {
2159
- "@type": "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
4641
+ "@type": "/injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders",
2160
4642
  ...value
2161
4643
  };
2162
4644
  }
2163
4645
  toDirectSign() {
2164
4646
  return {
2165
- type: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
4647
+ type: "/injective.exchange.v2.MsgBatchCancelBinaryOptionsOrders",
2166
4648
  message: this.toProto()
2167
4649
  };
2168
4650
  }
2169
4651
  toBinary() {
2170
- return InjectiveExchangeV1Beta1TxPb.MsgBatchCancelBinaryOptionsOrders.toBinary(this.toProto());
4652
+ return InjectiveExchangeV2TxPb.MsgBatchCancelBinaryOptionsOrders.toBinary(this.toProto());
2171
4653
  }
2172
4654
  };
2173
4655
 
2174
4656
  //#endregion
2175
- //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrder.ts
4657
+ //#region src/core/modules/exchange/msgs/MsgCreateBinaryOptionsMarketOrderV2.ts
2176
4658
  const createMarketOrder = (params) => {
2177
- const orderInfo = InjectiveExchangeV1Beta1ExchangePb.OrderInfo.create({
4659
+ const orderInfo = InjectiveExchangeV2OrderPb.OrderInfo.create({
2178
4660
  subaccountId: params.subaccountId,
2179
4661
  feeRecipient: params.feeRecipient,
2180
4662
  price: params.price,
2181
4663
  quantity: params.quantity,
2182
4664
  cid: params.cid || ""
2183
4665
  });
2184
- const derivativeOrder = InjectiveExchangeV1Beta1ExchangePb.DerivativeOrder.create({
4666
+ const derivativeOrder = InjectiveExchangeV2OrderPb.DerivativeOrder.create({
2185
4667
  marketId: params.marketId,
2186
4668
  orderInfo,
2187
4669
  orderType: params.orderType,
2188
4670
  margin: params.margin,
2189
- triggerPrice: params.triggerPrice || "0"
4671
+ triggerPrice: params.triggerPrice || "0",
4672
+ expirationBlock: params.expirationBlock ? BigInt(params.expirationBlock) : BigInt(0)
2190
4673
  });
2191
- return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsMarketOrder.create({
4674
+ return InjectiveExchangeV2TxPb.MsgCreateBinaryOptionsMarketOrder.create({
2192
4675
  sender: params.injectiveAddress,
2193
4676
  order: derivativeOrder
2194
4677
  });
@@ -2196,9 +4679,9 @@ const createMarketOrder = (params) => {
2196
4679
  /**
2197
4680
  * @category Messages
2198
4681
  */
2199
- var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder extends MsgBase {
4682
+ var MsgCreateBinaryOptionsMarketOrderV2 = class MsgCreateBinaryOptionsMarketOrderV2 extends MsgBase {
2200
4683
  static fromJSON(params) {
2201
- return new MsgCreateBinaryOptionsMarketOrder(params);
4684
+ return new MsgCreateBinaryOptionsMarketOrderV2(params);
2202
4685
  }
2203
4686
  toProto() {
2204
4687
  const { params: initialParams } = this;
@@ -2213,7 +4696,7 @@ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder
2213
4696
  toData() {
2214
4697
  const proto = this.toProto();
2215
4698
  return {
2216
- "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
4699
+ "@type": "/injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder",
2217
4700
  ...proto
2218
4701
  };
2219
4702
  }
@@ -2234,7 +4717,8 @@ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder
2234
4717
  },
2235
4718
  order_type: params.orderType,
2236
4719
  margin: params.margin,
2237
- trigger_price: params.triggerPrice || "0"
4720
+ trigger_price: params.triggerPrice || "0",
4721
+ expiration_block: params.expirationBlock || "0"
2238
4722
  }
2239
4723
  }
2240
4724
  };
@@ -2242,7 +4726,7 @@ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder
2242
4726
  toWeb3Gw() {
2243
4727
  const { value } = this.toAmino();
2244
4728
  return {
2245
- "@type": "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
4729
+ "@type": "/injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder",
2246
4730
  ...value
2247
4731
  };
2248
4732
  }
@@ -2261,22 +4745,22 @@ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder
2261
4745
  },
2262
4746
  margin: numberToCosmosSdkDecString(params.margin),
2263
4747
  trigger_price: numberToCosmosSdkDecString(params.triggerPrice || "0"),
2264
- order_type: InjectiveExchangeV1Beta1ExchangePb.OrderType[params.orderType]
4748
+ order_type: InjectiveExchangeV2OrderPb.OrderType[params.orderType]
2265
4749
  }
2266
4750
  };
2267
4751
  }
2268
4752
  toEip712() {
2269
- var _value$order;
2270
4753
  const { params } = this;
2271
4754
  const { value, type } = this.toAmino();
4755
+ const { expiration_block: _eb, ...orderWithoutExpiration } = value.order || {};
2272
4756
  return {
2273
4757
  type,
2274
4758
  value: {
2275
4759
  ...value,
2276
4760
  order: {
2277
- ...value.order,
4761
+ ...orderWithoutExpiration,
2278
4762
  order_info: {
2279
- ...(_value$order = value.order) === null || _value$order === void 0 ? void 0 : _value$order.order_info,
4763
+ ...orderWithoutExpiration === null || orderWithoutExpiration === void 0 ? void 0 : orderWithoutExpiration.order_info,
2280
4764
  price: toChainFormat(params.price).toFixed(),
2281
4765
  quantity: toChainFormat(params.quantity).toFixed()
2282
4766
  },
@@ -2288,71 +4772,19 @@ var MsgCreateBinaryOptionsMarketOrder = class MsgCreateBinaryOptionsMarketOrder
2288
4772
  }
2289
4773
  toDirectSign() {
2290
4774
  return {
2291
- type: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
2292
- message: this.toProto()
2293
- };
2294
- }
2295
- toBinary() {
2296
- return InjectiveExchangeV1Beta1TxPb.MsgCreateBinaryOptionsMarketOrder.toBinary(this.toProto());
2297
- }
2298
- };
2299
-
2300
- //#endregion
2301
- //#region src/core/modules/exchange/msgs/MsgSetDelegationTransferReceivers.ts
2302
- /**
2303
- * @deprecated no longer supported on chain
2304
- * @category Messages
2305
- */
2306
- var MsgSetDelegationTransferReceivers = class MsgSetDelegationTransferReceivers extends MsgBase {
2307
- static fromJSON(params) {
2308
- return new MsgSetDelegationTransferReceivers(params);
2309
- }
2310
- toProto() {
2311
- const { params } = this;
2312
- return {
2313
- sender: params.sender,
2314
- receivers: params.receivers
2315
- };
2316
- }
2317
- toData() {
2318
- const proto = this.toProto();
2319
- return {
2320
- "@type": "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
2321
- ...proto
2322
- };
2323
- }
2324
- toAmino() {
2325
- const proto = this.toProto();
2326
- return {
2327
- type: "exchange/MsgSetDelegationTransferReceivers",
2328
- value: {
2329
- sender: proto.sender,
2330
- receivers: proto.receivers
2331
- }
2332
- };
2333
- }
2334
- toWeb3Gw() {
2335
- const { value } = this.toAmino();
2336
- return {
2337
- "@type": "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
2338
- ...value
2339
- };
2340
- }
2341
- toDirectSign() {
2342
- return {
2343
- type: "/injective.exchange.v2.MsgSetDelegationTransferReceivers",
4775
+ type: "/injective.exchange.v2.MsgCreateBinaryOptionsMarketOrder",
2344
4776
  message: this.toProto()
2345
4777
  };
2346
4778
  }
2347
4779
  toBinary() {
2348
- return new Uint8Array(0);
4780
+ return InjectiveExchangeV2TxPb.MsgCreateBinaryOptionsMarketOrder.toBinary(this.toProto());
2349
4781
  }
2350
4782
  };
2351
4783
 
2352
4784
  //#endregion
2353
- //#region src/core/modules/exchange/msgs/MsgInstantBinaryOptionsMarketLaunch.ts
4785
+ //#region src/core/modules/exchange/msgs/MsgInstantBinaryOptionsMarketLaunchV2.ts
2354
4786
  const createMessage = (params) => {
2355
- return InjectiveExchangeV1Beta1TxPb.MsgInstantBinaryOptionsMarketLaunch.create({
4787
+ return InjectiveExchangeV2TxPb.MsgInstantBinaryOptionsMarketLaunch.create({
2356
4788
  sender: params.proposer,
2357
4789
  ticker: params.market.ticker,
2358
4790
  oracleSymbol: params.market.oracleSymbol,
@@ -2373,9 +4805,9 @@ const createMessage = (params) => {
2373
4805
  /**
2374
4806
  * @category Messages
2375
4807
  */
2376
- var MsgInstantBinaryOptionsMarketLaunch = class MsgInstantBinaryOptionsMarketLaunch extends MsgBase {
4808
+ var MsgInstantBinaryOptionsMarketLaunchV2 = class MsgInstantBinaryOptionsMarketLaunchV2 extends MsgBase {
2377
4809
  static fromJSON(params) {
2378
- return new MsgInstantBinaryOptionsMarketLaunch(params);
4810
+ return new MsgInstantBinaryOptionsMarketLaunchV2(params);
2379
4811
  }
2380
4812
  toProto() {
2381
4813
  const { params: initialParams } = this;
@@ -2394,7 +4826,7 @@ var MsgInstantBinaryOptionsMarketLaunch = class MsgInstantBinaryOptionsMarketLau
2394
4826
  toData() {
2395
4827
  const proto = this.toProto();
2396
4828
  return {
2397
- "@type": "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4829
+ "@type": "/injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch",
2398
4830
  ...proto
2399
4831
  };
2400
4832
  }
@@ -2424,23 +4856,12 @@ var MsgInstantBinaryOptionsMarketLaunch = class MsgInstantBinaryOptionsMarketLau
2424
4856
  toWeb3Gw() {
2425
4857
  const { value } = this.toAmino();
2426
4858
  return {
2427
- "@type": "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4859
+ "@type": "/injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch",
2428
4860
  ...value
2429
4861
  };
2430
4862
  }
2431
4863
  toEip712() {
2432
- const { type, value } = this.toAmino();
2433
- return {
2434
- type,
2435
- value: {
2436
- ...value,
2437
- min_price_tick_size: toChainFormat(value.min_price_tick_size).toFixed(),
2438
- min_quantity_tick_size: toChainFormat(value.min_quantity_tick_size).toFixed(),
2439
- min_notional: toChainFormat(value.min_notional).toFixed(),
2440
- taker_fee_rate: toChainFormat(value.taker_fee_rate).toFixed(),
2441
- maker_fee_rate: toChainFormat(value.maker_fee_rate).toFixed()
2442
- }
2443
- };
4864
+ throw new GeneralException(/* @__PURE__ */ new Error("EIP712 v1 is not supported for MsgInstantBinaryOptionsMarketLaunch, use toEip712V2 instead."));
2444
4865
  }
2445
4866
  toEip712V2() {
2446
4867
  const { params } = this;
@@ -2451,17 +4872,18 @@ var MsgInstantBinaryOptionsMarketLaunch = class MsgInstantBinaryOptionsMarketLau
2451
4872
  min_notional: numberToCosmosSdkDecString(params.market.minNotional),
2452
4873
  taker_fee_rate: numberToCosmosSdkDecString(params.market.takerFeeRate),
2453
4874
  maker_fee_rate: numberToCosmosSdkDecString(params.market.makerFeeRate),
2454
- oracle_type: InjectiveOracleV1Beta1OraclePb.OracleType[params.market.oracleType]
4875
+ oracle_type: InjectiveOracleV1Beta1OraclePb.OracleType[params.market.oracleType],
4876
+ open_notional_cap: {}
2455
4877
  };
2456
4878
  }
2457
4879
  toDirectSign() {
2458
4880
  return {
2459
- type: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
4881
+ type: "/injective.exchange.v2.MsgInstantBinaryOptionsMarketLaunch",
2460
4882
  message: this.toProto()
2461
4883
  };
2462
4884
  }
2463
4885
  toBinary() {
2464
- return InjectiveExchangeV1Beta1TxPb.MsgInstantBinaryOptionsMarketLaunch.toBinary(this.toProto());
4886
+ return InjectiveExchangeV2TxPb.MsgInstantBinaryOptionsMarketLaunch.toBinary(this.toProto());
2465
4887
  }
2466
4888
  };
2467
4889
 
@@ -4526,7 +6948,7 @@ var MsgMigrateContract = class MsgMigrateContract extends MsgBase {
4526
6948
  sender: proto.sender,
4527
6949
  contract: proto.contract,
4528
6950
  code_id: proto.codeId.toString(),
4529
- msg: params.msg
6951
+ msg: safeBigIntStringify(params.msg)
4530
6952
  }
4531
6953
  };
4532
6954
  }
@@ -4663,6 +7085,7 @@ var MsgInstantiateContract = class MsgInstantiateContract extends MsgBase {
4663
7085
  }
4664
7086
  toAmino() {
4665
7087
  const proto = this.toProto();
7088
+ const { params } = this;
4666
7089
  return {
4667
7090
  type: "wasm/MsgInstantiateContract",
4668
7091
  value: {
@@ -4670,7 +7093,7 @@ var MsgInstantiateContract = class MsgInstantiateContract extends MsgBase {
4670
7093
  admin: proto.admin,
4671
7094
  code_id: proto.codeId.toString(),
4672
7095
  label: proto.label,
4673
- msg: proto.msg,
7096
+ msg: safeBigIntStringify(params.msg),
4674
7097
  funds: proto.funds
4675
7098
  }
4676
7099
  };
@@ -8000,4 +10423,4 @@ var MsgSetDenomMetadata = class MsgSetDenomMetadata extends MsgBase {
8000
10423
  };
8001
10424
 
8002
10425
  //#endregion
8003
- export { ExecArgIncreaseAllowance as $, MsgExternalTransfer as $t, MsgCreateRateLimit as A, OrderHashManager as At, MsgExec as B, MsgCancelBinaryOptionsOrder as Bt, MsgEditValidator as C, MsgSubmitProposalPerpetualMarketLaunch as Ct, MsgRelayProviderPrices as D, MsgSubmitTextProposal as Dt, MsgBid as E, MsgSubmitGenericProposal as Et, MsgGrantWithAuthorization as F, MsgAdminUpdateBinaryOptionsMarket as Ft, ExecPrivilegedArgVaultSubscribe as G, MsgBatchCancelSpotOrders as Gt, ExecPrivilegedArgOffChainVaultSubscribe as H, MsgInstantSpotMarketLaunch as Ht, MsgRevoke as I, MsgCreateBinaryOptionsLimitOrder as It, ExecArgCreatePerpGridStrategy as J, MsgCancelPostOnlyModeV2 as Jt, ExecPrivilegedArgVaultRedeem as K, MsgAuthorizeStakeGrants as Kt, MsgGrant as L, MsgCreateDerivativeMarketOrder as Lt, ContractExecutionCompatAuthorization as M, MsgSetDelegationTransferReceivers as Mt, ContractExecutionAuthorization as N, MsgCreateBinaryOptionsMarketOrder as Nt, MsgRemoveRateLimit as O, MsgDeposit as Ot, GenericAuthorization as P, MsgBatchCancelBinaryOptionsOrders as Pt, ExecArgRemoveGridStrategy as Q, MsgBatchUpdateOrders as Qt, getGenericAuthorizationFromMessageType as R, MsgBatchCancelDerivativeOrders as Rt, MsgBeginRedelegate as S, MsgSubmitProposalSpotMarketParamUpdate as St, MsgDelegate as T, MsgSubmitProposalSpotMarketLaunch as Tt, ExecPrivilegedArgOffChainVaultRedeem as U, MsgCreateSpotMarketOrder as Ut, GrantAuthorizationType as V, MsgUpdateDerivativeMarketV2 as Vt, ExecArgCW20AdapterRedeemAndTransfer as W, MsgCancelDerivativeOrder as Wt, StrategyType as X, MsgReclaimLockedFunds as Xt, ExitType as Y, MsgUpdateSpotMarketV2 as Yt, MsgPrivilegedExecuteContract as Z, MsgLiquidatePosition as Zt, MsgRevokeAllowance as _, MsgSend as _t, MsgBurn as a, ExecArgDepositTokens as at, MsgTransferDelegation as b, MsgSubmitProposalExpiryFuturesMarketLaunch as bt, MsgFundCommunityPool as c, ExecArgCW20Transfer as ct, MsgCreateNamespace as d, MsgMigrateContract as dt, MsgCancelSpotOrder as en, ExecArgUpdateGridConfig as et, MsgUpdateParams as f, MsgExecuteContract as ft, MsgUnderwrite as g, MsgMultiSend as gt, MsgRequestRedemption as h, MsgStoreCode as ht, MsgMint as i, ExecArgSwapMinOutput as it, MsgSendToEth as j, MsgInstantBinaryOptionsMarketLaunch as jt, MsgUpdateRateLimit as k, MsgVote as kt, MsgUpdateActorRoles as l, ExecArgCreateRound as lt, MsgCreateInsuranceFund as m, MsgUpdateAdmin as mt, MsgCreateDenom as n, MsgWithdraw as nn, ExecArgSwapExactOutput as nt, MsgWithdrawValidatorCommission as o, MsgInstantiateContract as ot, MsgClaimVoucher as p, ExecArgCW20Send as pt, ExecArgCreateSpotGridStrategy as q, MsgCreateSpotLimitOrder as qt, MsgChangeAdmin as r, MsgDeposit$1 as rn, ExecArgCreateCampaign as rt, MsgWithdrawDelegatorReward as s, ExecArgFundCampaign as st, MsgSetDenomMetadata as t, MsgRewardsOptOut as tn, ExecArgInitiateTransfer as tt, MsgUpdateNamespace as u, ExecArgSubmitVaa as ut, MsgGrantAllowance as v, MsgTransfer as vt, MsgUndelegate as w, MsgGrantProviderPrivilegeProposal as wt, MsgCreateValidator as x, MsgSubmitProposalPerpetualMarketLaunchV2 as xt, MsgCancelUnbondingDelegation as y, ProposalDecomposer as yt, msgsOrMsgExecMsgs as z, MsgCreateDerivativeLimitOrder as zt };
10426
+ export { ExecArgIncreaseAllowance as $, MsgUpdateDerivativeMarketV2 as $t, MsgCreateRateLimit as A, OrderHashManager as At, MsgExec as B, MsgAdminUpdateBinaryOptionsMarket as Bt, MsgEditValidator as C, MsgCancelSpotOrder as Cn, MsgSubmitProposalPerpetualMarketLaunch as Ct, MsgRelayProviderPrices as D, MsgDepositV2 as Dn, MsgSubmitTextProposal as Dt, MsgBid as E, MsgSignDataV2 as En, MsgSubmitGenericProposal as Et, MsgGrantWithAuthorization as F, MsgInstantBinaryOptionsMarketLaunch as Ft, ExecPrivilegedArgVaultSubscribe as G, MsgCreateDerivativeMarketOrder as Gt, ExecPrivilegedArgOffChainVaultSubscribe as H, MsgBatchCancelDerivativeOrdersV2 as Ht, MsgRevoke as I, MsgCreateBinaryOptionsLimitOrderV2 as It, ExecArgCreatePerpGridStrategy as J, MsgCreateDerivativeLimitOrder as Jt, ExecPrivilegedArgVaultRedeem as K, MsgBatchCancelDerivativeOrders as Kt, MsgGrant as L, MsgSetDelegationTransferReceivers as Lt, ContractExecutionCompatAuthorization as M, MsgCreateBinaryOptionsMarketOrderV2 as Mt, ContractExecutionAuthorization as N, MsgBatchCancelBinaryOptionsOrdersV2 as Nt, MsgRemoveRateLimit as O, MsgWithdraw as On, MsgDeposit as Ot, GenericAuthorization as P, MsgAdminUpdateBinaryOptionsMarketV2 as Pt, ExecArgRemoveGridStrategy as Q, MsgCancelBinaryOptionsOrder as Qt, getGenericAuthorizationFromMessageType as R, MsgCreateBinaryOptionsMarketOrder as Rt, MsgBeginRedelegate as S, MsgRewardsOptOutV2 as Sn, MsgSubmitProposalSpotMarketParamUpdate as St, MsgDelegate as T, MsgWithdrawV2 as Tn, MsgSubmitProposalSpotMarketLaunch as Tt, ExecPrivilegedArgOffChainVaultRedeem as U, MsgCreateBinaryOptionsLimitOrder as Ut, GrantAuthorizationType as V, MsgCreateDerivativeMarketOrderV2 as Vt, ExecArgCW20AdapterRedeemAndTransfer as W, MsgCreateDerivativeLimitOrderV2 as Wt, StrategyType as X, MsgDecreasePositionMarginV2 as Xt, ExitType as Y, MsgInstantSpotMarketLaunchV2 as Yt, MsgPrivilegedExecuteContract as Z, MsgIncreasePositionMarginV2 as Zt, MsgRevokeAllowance as _, MsgReclaimLockedFunds as _n, MsgSend as _t, MsgBurn as a, MsgAuthorizeStakeGrantsV2 as an, ExecArgDepositTokens as at, MsgTransferDelegation as b, MsgBatchUpdateOrders as bn, MsgSubmitProposalExpiryFuturesMarketLaunch as bt, MsgFundCommunityPool as c, MsgBatchCancelSpotOrders as cn, ExecArgCW20Transfer as ct, MsgCreateNamespace as d, MsgCreateSpotLimitOrder as dn, MsgMigrateContract as dt, MsgCreateSpotMarketOrderV2 as en, ExecArgUpdateGridConfig as et, MsgUpdateParams as f, MsgCancelPostOnlyModeV2 as fn, MsgExecuteContract as ft, MsgUnderwrite as g, MsgUpdateSpotMarketV2 as gn, MsgMultiSend as gt, MsgRequestRedemption as h, MsgExternalTransferV2 as hn, MsgStoreCode as ht, MsgMint as i, MsgCreateSpotLimitOrderV2 as in, ExecArgSwapMinOutput as it, MsgSendToEth as j, MsgInstantBinaryOptionsMarketLaunchV2 as jt, MsgUpdateRateLimit as k, MsgDeposit$1 as kn, MsgVote as kt, MsgUpdateActorRoles as l, MsgReclaimLockedFundsV2 as ln, ExecArgCreateRound as lt, MsgCreateInsuranceFund as m, MsgBatchUpdateOrdersV2 as mn, MsgUpdateAdmin as mt, MsgCreateDenom as n, MsgCancelDerivativeOrderV2 as nn, ExecArgSwapExactOutput as nt, MsgWithdrawValidatorCommission as o, MsgCreateSpotMarketOrder as on, MsgInstantiateContract as ot, MsgClaimVoucher as p, MsgLiquidatePositionV2 as pn, ExecArgCW20Send as pt, ExecArgCreateSpotGridStrategy as q, MsgCancelBinaryOptionsOrderV2 as qt, MsgChangeAdmin as r, MsgInstantSpotMarketLaunch as rn, ExecArgCreateCampaign as rt, MsgWithdrawDelegatorReward as s, MsgCancelDerivativeOrder as sn, ExecArgFundCampaign as st, MsgSetDenomMetadata as t, MsgBatchCancelSpotOrdersV2 as tn, ExecArgInitiateTransfer as tt, MsgUpdateNamespace as u, MsgAuthorizeStakeGrants as un, ExecArgSubmitVaa as ut, MsgGrantAllowance as v, MsgCancelSpotOrderV2 as vn, MsgTransfer as vt, MsgUndelegate as w, MsgRewardsOptOut as wn, MsgGrantProviderPrivilegeProposal as wt, MsgCreateValidator as x, MsgExternalTransfer as xn, MsgSubmitProposalPerpetualMarketLaunchV2 as xt, MsgCancelUnbondingDelegation as y, MsgLiquidatePosition as yn, ProposalDecomposer as yt, msgsOrMsgExecMsgs as z, MsgBatchCancelBinaryOptionsOrders as zt };