@injectivelabs/sdk-ts 1.15.42 → 1.16.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/client/chain/grpc/ChainGrpcPeggyApi.d.ts +2 -2
  2. package/dist/cjs/client/chain/grpc/ChainGrpcPeggyApi.js +3 -3
  3. package/dist/cjs/client/chain/grpc/ChainGrpcTendermintApi.d.ts +2 -2
  4. package/dist/cjs/client/chain/grpc/ChainGrpcWasmXApi.d.ts +3 -3
  5. package/dist/cjs/client/chain/grpc/ChainGrpcWasmXApi.js +5 -5
  6. package/dist/cjs/client/chain/transformers/ChainGrpcPeggyTransformer.d.ts +2 -2
  7. package/dist/cjs/client/indexer/transformers/IndexerGrpcExplorerTransformer.d.ts +1 -1
  8. package/dist/cjs/client/indexer/transformers/IndexerGrpcExplorerTransformer.js +29 -32
  9. package/dist/cjs/core/modules/authz/msgs/authorizations/ContractExecutionCompatAuthorization.d.ts +2 -2
  10. package/dist/cjs/core/modules/authz/msgs/authorizations/ContractExecutionCompatAuthorization.js +3 -3
  11. package/dist/cjs/core/modules/gov/index.d.ts +3 -2
  12. package/dist/cjs/core/modules/gov/index.js +3 -1
  13. package/dist/cjs/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunchV2.d.ts +88 -0
  14. package/dist/cjs/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunchV2.js +174 -0
  15. package/dist/cjs/core/modules/peggy/msgs/MsgSendToEth.d.ts +4 -4
  16. package/dist/cjs/core/modules/peggy/msgs/MsgSendToEth.js +3 -3
  17. package/dist/cjs/core/modules/wasm/msgs/MsgExecuteContractCompat.d.ts +5 -5
  18. package/dist/cjs/core/modules/wasm/msgs/MsgExecuteContractCompat.js +3 -3
  19. package/dist/cjs/core/tx/api/TxGrpcApi.d.ts +2 -2
  20. package/dist/cjs/core/tx/broadcaster/MsgBroadcasterWithPk.d.ts +2 -2
  21. package/dist/esm/client/chain/grpc/ChainGrpcPeggyApi.d.ts +2 -2
  22. package/dist/esm/client/chain/grpc/ChainGrpcPeggyApi.js +4 -4
  23. package/dist/esm/client/chain/grpc/ChainGrpcTendermintApi.d.ts +2 -2
  24. package/dist/esm/client/chain/grpc/ChainGrpcWasmXApi.d.ts +3 -3
  25. package/dist/esm/client/chain/grpc/ChainGrpcWasmXApi.js +6 -6
  26. package/dist/esm/client/chain/transformers/ChainGrpcPeggyTransformer.d.ts +2 -2
  27. package/dist/esm/client/indexer/transformers/IndexerGrpcExplorerTransformer.d.ts +1 -1
  28. package/dist/esm/client/indexer/transformers/IndexerGrpcExplorerTransformer.js +29 -32
  29. package/dist/esm/core/modules/authz/msgs/authorizations/ContractExecutionCompatAuthorization.d.ts +2 -2
  30. package/dist/esm/core/modules/authz/msgs/authorizations/ContractExecutionCompatAuthorization.js +4 -4
  31. package/dist/esm/core/modules/gov/index.d.ts +3 -2
  32. package/dist/esm/core/modules/gov/index.js +2 -1
  33. package/dist/esm/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunchV2.d.ts +88 -0
  34. package/dist/esm/core/modules/gov/msgs/MsgSubmitProposalPerpetualMarketLaunchV2.js +168 -0
  35. package/dist/esm/core/modules/peggy/msgs/MsgSendToEth.d.ts +4 -4
  36. package/dist/esm/core/modules/peggy/msgs/MsgSendToEth.js +4 -4
  37. package/dist/esm/core/modules/wasm/msgs/MsgExecuteContractCompat.d.ts +5 -5
  38. package/dist/esm/core/modules/wasm/msgs/MsgExecuteContractCompat.js +4 -4
  39. package/dist/esm/core/tx/api/TxGrpcApi.d.ts +2 -2
  40. package/dist/esm/core/tx/broadcaster/MsgBroadcasterWithPk.d.ts +2 -2
  41. package/package.json +7 -7
@@ -1,6 +1,6 @@
1
1
  import { ExecArgs } from '../exec-args.js';
2
2
  import { MsgBase } from '../../MsgBase.js';
3
- import { InjectiveWasmxV1Beta1Tx } from '@injectivelabs/core-proto-ts';
3
+ import { InjectiveWasmxV1Tx } from '@injectivelabs/core-proto-ts';
4
4
  export declare namespace MsgExecuteContractCompat {
5
5
  interface Params {
6
6
  funds?: {
@@ -30,8 +30,8 @@ export declare namespace MsgExecuteContractCompat {
30
30
  */
31
31
  msg?: Record<string, any>;
32
32
  }
33
- type Proto = InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat;
34
- type Object = Omit<InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat, 'msg'> & {
33
+ type Proto = InjectiveWasmxV1Tx.MsgExecuteContractCompat;
34
+ type Object = Omit<InjectiveWasmxV1Tx.MsgExecuteContractCompat, 'msg'> & {
35
35
  msg: string;
36
36
  };
37
37
  }
@@ -40,7 +40,7 @@ export declare namespace MsgExecuteContractCompat {
40
40
  */
41
41
  export default class MsgExecuteContractCompat extends MsgBase<MsgExecuteContractCompat.Params, MsgExecuteContractCompat.Proto, MsgExecuteContractCompat.Object> {
42
42
  static fromJSON(params: MsgExecuteContractCompat.Params): MsgExecuteContractCompat;
43
- toProto(): InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat;
43
+ toProto(): InjectiveWasmxV1Tx.MsgExecuteContractCompat;
44
44
  toData(): {
45
45
  sender: string;
46
46
  contract: string;
@@ -66,7 +66,7 @@ export default class MsgExecuteContractCompat extends MsgBase<MsgExecuteContract
66
66
  };
67
67
  toDirectSign(): {
68
68
  type: string;
69
- message: InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat;
69
+ message: InjectiveWasmxV1Tx.MsgExecuteContractCompat;
70
70
  };
71
71
  toBinary(): Uint8Array;
72
72
  private getMsgObject;
@@ -16,7 +16,7 @@ class MsgExecuteContractCompat extends MsgBase_js_1.MsgBase {
16
16
  }
17
17
  toProto() {
18
18
  const { params } = this;
19
- const message = core_proto_ts_1.InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat.create();
19
+ const message = core_proto_ts_1.InjectiveWasmxV1Tx.MsgExecuteContractCompat.create();
20
20
  const msg = this.getMsgObject();
21
21
  message.sender = params.sender;
22
22
  message.contract = params.contractAddress;
@@ -33,7 +33,7 @@ class MsgExecuteContractCompat extends MsgBase_js_1.MsgBase {
33
33
  else {
34
34
  message.funds = '0';
35
35
  }
36
- return core_proto_ts_1.InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat.fromPartial(message);
36
+ return core_proto_ts_1.InjectiveWasmxV1Tx.MsgExecuteContractCompat.fromPartial(message);
37
37
  }
38
38
  toData() {
39
39
  const proto = this.toProto();
@@ -71,7 +71,7 @@ class MsgExecuteContractCompat extends MsgBase_js_1.MsgBase {
71
71
  };
72
72
  }
73
73
  toBinary() {
74
- return core_proto_ts_1.InjectiveWasmxV1Beta1Tx.MsgExecuteContractCompat.encode(this.toProto()).finish();
74
+ return core_proto_ts_1.InjectiveWasmxV1Tx.MsgExecuteContractCompat.encode(this.toProto()).finish();
75
75
  }
76
76
  getMsgObject() {
77
77
  const { params } = this;
@@ -15,8 +15,8 @@ export declare class TxGrpcApi implements TxConcreteApi {
15
15
  result: {
16
16
  data: string | Uint8Array<ArrayBufferLike>;
17
17
  log: string;
18
- eventsList: import("@injectivelabs/core-proto-ts/cjs/tendermint/abci/types.js").Event[];
19
- events?: import("@injectivelabs/core-proto-ts/cjs/tendermint/abci/types.js").Event[] | undefined;
18
+ eventsList: import("@injectivelabs/core-proto-ts/cjs/cometbft/abci/v1/types.js").Event[];
19
+ events?: import("@injectivelabs/core-proto-ts/cjs/cometbft/abci/v1/types.js").Event[] | undefined;
20
20
  msgResponses?: import("@injectivelabs/core-proto-ts/cjs/google/protobuf/any.js").Any[] | undefined;
21
21
  };
22
22
  gasInfo: {
@@ -77,8 +77,8 @@ export declare class MsgBroadcasterWithPk {
77
77
  result: {
78
78
  data: string | Uint8Array<ArrayBufferLike>;
79
79
  log: string;
80
- eventsList: import("@injectivelabs/core-proto-ts/cjs/tendermint/abci/types.js").Event[];
81
- events?: import("@injectivelabs/core-proto-ts/cjs/tendermint/abci/types.js").Event[] | undefined;
80
+ eventsList: import("@injectivelabs/core-proto-ts/cjs/cometbft/abci/v1/types.js").Event[];
81
+ events?: import("@injectivelabs/core-proto-ts/cjs/cometbft/abci/v1/types.js").Event[] | undefined;
82
82
  msgResponses?: import("@injectivelabs/core-proto-ts/cjs/google/protobuf/any.js").Any[] | undefined;
83
83
  };
84
84
  gasInfo: {
@@ -1,11 +1,11 @@
1
- import { InjectivePeggyV1Beta1Query } from '@injectivelabs/core-proto-ts';
1
+ import { InjectivePeggyV1Query } from '@injectivelabs/core-proto-ts';
2
2
  import BaseGrpcConsumer from '../../base/BaseGrpcConsumer.js';
3
3
  /**
4
4
  * @category Chain Grpc API
5
5
  */
6
6
  export declare class ChainGrpcPeggyApi extends BaseGrpcConsumer {
7
7
  protected module: string;
8
- protected client: InjectivePeggyV1Beta1Query.QueryClientImpl;
8
+ protected client: InjectivePeggyV1Query.QueryClientImpl;
9
9
  constructor(endpoint: string);
10
10
  fetchModuleParams(): Promise<import("../types/peggy.js").PeggyModuleParams>;
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import { UnspecifiedErrorCode, grpcErrorCodeToErrorCode, GrpcUnaryRequestException, } from '@injectivelabs/exceptions';
2
- import { InjectivePeggyV1Beta1Query } from '@injectivelabs/core-proto-ts';
2
+ import { InjectivePeggyV1Query } from '@injectivelabs/core-proto-ts';
3
3
  import BaseGrpcConsumer from '../../base/BaseGrpcConsumer.js';
4
4
  import { ChainModule } from '../types/index.js';
5
5
  import { ChainGrpcPeggyTransformer } from '../transformers/index.js';
@@ -11,16 +11,16 @@ export class ChainGrpcPeggyApi extends BaseGrpcConsumer {
11
11
  client;
12
12
  constructor(endpoint) {
13
13
  super(endpoint);
14
- this.client = new InjectivePeggyV1Beta1Query.QueryClientImpl(this.getGrpcWebImpl(endpoint));
14
+ this.client = new InjectivePeggyV1Query.QueryClientImpl(this.getGrpcWebImpl(endpoint));
15
15
  }
16
16
  async fetchModuleParams() {
17
- const request = InjectivePeggyV1Beta1Query.QueryParamsRequest.create();
17
+ const request = InjectivePeggyV1Query.QueryParamsRequest.create();
18
18
  try {
19
19
  const response = await this.retry(() => this.client.Params(request, this.metadata));
20
20
  return ChainGrpcPeggyTransformer.moduleParamsResponseToModuleParams(response);
21
21
  }
22
22
  catch (e) {
23
- if (e instanceof InjectivePeggyV1Beta1Query.GrpcWebError) {
23
+ if (e instanceof InjectivePeggyV1Query.GrpcWebError) {
24
24
  throw new GrpcUnaryRequestException(new Error(e.toString()), {
25
25
  code: grpcErrorCodeToErrorCode(e.code),
26
26
  context: 'Params',
@@ -7,6 +7,6 @@ export declare class ChainGrpcTendermintApi extends BaseGrpcConsumer {
7
7
  protected module: string;
8
8
  protected client: CosmosBaseTendermintV1Beta1Query.ServiceClientImpl;
9
9
  constructor(endpoint: string);
10
- fetchLatestBlock(): Promise<import("@injectivelabs/core-proto-ts/cjs/cosmos/base/tendermint/v1beta1/types.js").Block | import("@injectivelabs/core-proto-ts/cjs/tendermint/types/block.js").Block | undefined>;
11
- fetchBlock(height: number | string): Promise<import("@injectivelabs/core-proto-ts/cjs/cosmos/base/tendermint/v1beta1/types.js").Block | import("@injectivelabs/core-proto-ts/cjs/tendermint/types/block.js").Block | undefined>;
10
+ fetchLatestBlock(): Promise<import("@injectivelabs/core-proto-ts/cjs/cosmos/base/tendermint/v1beta1/types.js").Block | import("@injectivelabs/core-proto-ts/cjs/cometbft/types/v1/block.js").Block | undefined>;
11
+ fetchBlock(height: number | string): Promise<import("@injectivelabs/core-proto-ts/cjs/cosmos/base/tendermint/v1beta1/types.js").Block | import("@injectivelabs/core-proto-ts/cjs/cometbft/types/v1/block.js").Block | undefined>;
12
12
  }
@@ -1,12 +1,12 @@
1
- import { InjectiveWasmxV1Beta1Query } from '@injectivelabs/core-proto-ts';
1
+ import { InjectiveWasmxV1Query } from '@injectivelabs/core-proto-ts';
2
2
  import BaseGrpcConsumer from '../../base/BaseGrpcConsumer.js';
3
3
  /**
4
4
  * @category Chain Grpc API
5
5
  */
6
6
  export declare class ChainGrpcWasmXApi extends BaseGrpcConsumer {
7
7
  protected module: string;
8
- protected client: InjectiveWasmxV1Beta1Query.QueryClientImpl;
8
+ protected client: InjectiveWasmxV1Query.QueryClientImpl;
9
9
  constructor(endpoint: string);
10
- fetchModuleParams(): Promise<InjectiveWasmxV1Beta1Query.QueryWasmxParamsResponse>;
10
+ fetchModuleParams(): Promise<InjectiveWasmxV1Query.QueryWasmxParamsResponse>;
11
11
  fetchModuleState(): Promise<import("@injectivelabs/core-proto-ts/cjs/injective/wasmx/v1/genesis.js").GenesisState | undefined>;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import { UnspecifiedErrorCode, grpcErrorCodeToErrorCode, GrpcUnaryRequestException, } from '@injectivelabs/exceptions';
2
- import { InjectiveWasmxV1Beta1Query } from '@injectivelabs/core-proto-ts';
2
+ import { InjectiveWasmxV1Query } from '@injectivelabs/core-proto-ts';
3
3
  import BaseGrpcConsumer from '../../base/BaseGrpcConsumer.js';
4
4
  import { ChainModule } from '../types/index.js';
5
5
  /**
@@ -10,16 +10,16 @@ export class ChainGrpcWasmXApi extends BaseGrpcConsumer {
10
10
  client;
11
11
  constructor(endpoint) {
12
12
  super(endpoint);
13
- this.client = new InjectiveWasmxV1Beta1Query.QueryClientImpl(this.getGrpcWebImpl(endpoint));
13
+ this.client = new InjectiveWasmxV1Query.QueryClientImpl(this.getGrpcWebImpl(endpoint));
14
14
  }
15
15
  async fetchModuleParams() {
16
- const request = InjectiveWasmxV1Beta1Query.QueryWasmxParamsRequest.create();
16
+ const request = InjectiveWasmxV1Query.QueryWasmxParamsRequest.create();
17
17
  try {
18
18
  const response = await this.retry(() => this.client.WasmxParams(request, this.metadata));
19
19
  return response;
20
20
  }
21
21
  catch (e) {
22
- if (e instanceof InjectiveWasmxV1Beta1Query.GrpcWebError) {
22
+ if (e instanceof InjectiveWasmxV1Query.GrpcWebError) {
23
23
  throw new GrpcUnaryRequestException(new Error(e.toString()), {
24
24
  code: grpcErrorCodeToErrorCode(e.code),
25
25
  context: 'WasmxParams',
@@ -34,13 +34,13 @@ export class ChainGrpcWasmXApi extends BaseGrpcConsumer {
34
34
  }
35
35
  }
36
36
  async fetchModuleState() {
37
- const request = InjectiveWasmxV1Beta1Query.QueryModuleStateRequest.create();
37
+ const request = InjectiveWasmxV1Query.QueryModuleStateRequest.create();
38
38
  try {
39
39
  const response = await this.retry(() => this.client.WasmxModuleState(request, this.metadata));
40
40
  return response.state; /* TODO */
41
41
  }
42
42
  catch (e) {
43
- if (e instanceof InjectiveWasmxV1Beta1Query.GrpcWebError) {
43
+ if (e instanceof InjectiveWasmxV1Query.GrpcWebError) {
44
44
  throw new GrpcUnaryRequestException(new Error(e.toString()), {
45
45
  code: grpcErrorCodeToErrorCode(e.code),
46
46
  context: 'WasmxModuleState',
@@ -1,8 +1,8 @@
1
1
  import { PeggyModuleParams } from '../types/peggy.js';
2
- import { InjectivePeggyV1Beta1Query } from '@injectivelabs/core-proto-ts';
2
+ import { InjectivePeggyV1Query } from '@injectivelabs/core-proto-ts';
3
3
  /**
4
4
  * @category Chain Grpc Transformer
5
5
  */
6
6
  export declare class ChainGrpcPeggyTransformer {
7
- static moduleParamsResponseToModuleParams(response: InjectivePeggyV1Beta1Query.QueryParamsResponse): PeggyModuleParams;
7
+ static moduleParamsResponseToModuleParams(response: InjectivePeggyV1Query.QueryParamsResponse): PeggyModuleParams;
8
8
  }
@@ -1,4 +1,4 @@
1
- import { Block, GasFee, GrpcGasFee, Transaction, BlockWithTxs, IBCTransferTx, ExplorerStats, PeggyDepositTx, ValidatorUptime, ExplorerValidator, PeggyWithdrawalTx, GrpcIBCTransferTx, GrpcPeggyDepositTx, GrpcValidatorUptime, GrpcPeggyWithdrawalTx, BankMsgSendTransaction, ValidatorSlashingEvent, IndexerStreamTransaction, GrpcValidatorSlashingEvent, ExplorerValidatorDescription, GrpcIndexerValidatorDescription, ExplorerTransaction, ContractTransaction } from '../types/explorer.js';
1
+ import { Block, GasFee, GrpcGasFee, Transaction, BlockWithTxs, IBCTransferTx, ExplorerStats, PeggyDepositTx, ValidatorUptime, ExplorerValidator, PeggyWithdrawalTx, GrpcIBCTransferTx, GrpcPeggyDepositTx, GrpcValidatorUptime, GrpcPeggyWithdrawalTx, BankMsgSendTransaction, ValidatorSlashingEvent, ExplorerTransaction, ContractTransaction, IndexerStreamTransaction, GrpcValidatorSlashingEvent, ExplorerValidatorDescription, GrpcIndexerValidatorDescription } from '../types/explorer.js';
2
2
  import { InjectiveExplorerRpc } from '@injectivelabs/indexer-proto-ts';
3
3
  /**
4
4
  * @category Indexer Grpc Transformer
@@ -18,18 +18,32 @@ const getContractTransactionV2Amount = (ApiTransaction) => {
18
18
  }
19
19
  return new BigNumberInWei(msgObj.transfer.amount).toBase();
20
20
  };
21
- const transactionV2MessagesToMessages = (messages) => {
21
+ const parseStringToObjectLikeNoThrow = (object, defaultValue = []) => {
22
+ if (!object) {
23
+ return defaultValue;
24
+ }
25
+ if (typeof object === 'string') {
26
+ try {
27
+ return JSON.parse(object);
28
+ }
29
+ catch (e) {
30
+ return defaultValue;
31
+ }
32
+ }
22
33
  try {
23
- return JSON.parse(Buffer.from(messages).toString('utf8')).map((msg) => ({
24
- type: msg.type,
25
- message: msg.value,
26
- }));
34
+ return JSON.parse(Buffer.from(object).toString('utf8'));
27
35
  }
28
- catch (error) {
29
- console.error('Error parsing transaction messages:', error);
30
- return []; // Return an empty array in case of error
36
+ catch (e) {
37
+ return defaultValue;
31
38
  }
32
39
  };
40
+ const transactionV2MessagesToMessagesNoThrow = (messages) => {
41
+ const messagesArray = parseStringToObjectLikeNoThrow(messages);
42
+ return messagesArray.map((msg) => ({
43
+ type: msg.type,
44
+ message: msg.value,
45
+ }));
46
+ };
33
47
  /**
34
48
  * @category Indexer Grpc Transformer
35
49
  */
@@ -318,16 +332,9 @@ export class IndexerGrpcExplorerTransformer {
318
332
  };
319
333
  }
320
334
  static grpcTxV2ToTransaction(tx) {
321
- let logs = [];
322
- try {
323
- const rawLogs = Buffer.from(tx.logs).toString('utf8');
324
- logs = JSON.parse(rawLogs || '[]');
325
- }
326
- catch (e) {
327
- console.error('Failed to parse logs');
328
- logs = [];
329
- }
330
- const txType = JSON.parse(Buffer.from(tx.txMsgTypes).toString('utf8'));
335
+ const logs = parseStringToObjectLikeNoThrow(tx.logs);
336
+ const txType = parseStringToObjectLikeNoThrow(tx.txMsgTypes);
337
+ const messages = transactionV2MessagesToMessagesNoThrow(tx.messages);
331
338
  const signatures = tx.signatures.map((signature) => ({
332
339
  address: signature.address,
333
340
  pubkey: signature.pubkey,
@@ -337,7 +344,6 @@ export class IndexerGrpcExplorerTransformer {
337
344
  return parseInt(signature.sequence, 10);
338
345
  }
339
346
  catch (e) {
340
- console.error('Failed to parse signature sequence:', e);
341
347
  return 0;
342
348
  }
343
349
  })(),
@@ -347,24 +353,14 @@ export class IndexerGrpcExplorerTransformer {
347
353
  return parseInt(claimId, 10);
348
354
  }
349
355
  catch (e) {
350
- console.error('Failed to parse claimId:', e);
351
356
  return 0;
352
357
  }
353
358
  });
354
- let messages = [];
355
- try {
356
- messages = transactionV2MessagesToMessages(tx.messages);
357
- }
358
- catch (e) {
359
- console.error('Failed to parse messages:', e);
360
- messages = [];
361
- }
362
359
  const blockNumber = parseInt(tx.blockNumber);
363
360
  return {
364
361
  logs,
365
362
  info: '',
366
363
  memo: '',
367
- txType,
368
364
  claimIds,
369
365
  messages,
370
366
  id: tx.id,
@@ -377,6 +373,7 @@ export class IndexerGrpcExplorerTransformer {
377
373
  errorLog: tx.errorLog,
378
374
  codespace: tx.codespace,
379
375
  blockTimestamp: tx.blockTimestamp,
376
+ txType: Array.isArray(txType) ? txType.join(',') : txType,
380
377
  gasFee: { amounts: [], gasLimit: 0, granter: '', payer: '' },
381
378
  };
382
379
  }
@@ -416,8 +413,8 @@ export class IndexerGrpcExplorerTransformer {
416
413
  signature: signature.signature,
417
414
  sequence: parseInt(signature.sequence, 10),
418
415
  })),
419
- messages: transactionV2MessagesToMessages(tx.messages),
420
- logs: JSON.parse(Buffer.from(tx.logs).toString('utf8')),
416
+ messages: transactionV2MessagesToMessagesNoThrow(tx.messages),
417
+ logs: parseStringToObjectLikeNoThrow(tx.logs),
421
418
  data: '/' + Buffer.from(tx.data).toString('utf8').split('/').pop(),
422
419
  claimIds: tx.claimIds.map((claimId) => parseInt(claimId, 10)),
423
420
  };
@@ -447,7 +444,7 @@ export class IndexerGrpcExplorerTransformer {
447
444
  };
448
445
  }
449
446
  static grpcContractTxV2ToTransaction(tx) {
450
- const messages = transactionV2MessagesToMessages(tx.messages);
447
+ const messages = transactionV2MessagesToMessagesNoThrow(tx.messages);
451
448
  return {
452
449
  messages,
453
450
  code: tx.code,
@@ -1,5 +1,5 @@
1
1
  import { Coin } from '@injectivelabs/ts-types';
2
- import { GoogleProtobufAny, InjectiveWasmxV1Beta1Authz } from '@injectivelabs/core-proto-ts';
2
+ import { GoogleProtobufAny, InjectiveWasmxV1Authz } from '@injectivelabs/core-proto-ts';
3
3
  import { BaseAuthorization } from './Base.js';
4
4
  export declare namespace ContractExecutionCompatAuthorization {
5
5
  interface Params {
@@ -13,7 +13,7 @@ export declare namespace ContractExecutionCompatAuthorization {
13
13
  };
14
14
  }
15
15
  type Any = GoogleProtobufAny.Any;
16
- type Proto = InjectiveWasmxV1Beta1Authz.ContractExecutionCompatAuthorization;
16
+ type Proto = InjectiveWasmxV1Authz.ContractExecutionCompatAuthorization;
17
17
  type Amino = Object;
18
18
  }
19
19
  /**
@@ -1,4 +1,4 @@
1
- import { GoogleProtobufAny, CosmwasmWasmV1Authz, InjectiveWasmxV1Beta1Authz, } from '@injectivelabs/core-proto-ts';
1
+ import { GoogleProtobufAny, CosmwasmWasmV1Authz, InjectiveWasmxV1Authz, } from '@injectivelabs/core-proto-ts';
2
2
  import { BaseAuthorization } from './Base.js';
3
3
  /**
4
4
  * @category Contract Exec Arguments
@@ -9,7 +9,7 @@ export default class ContractExecutionCompatAuthorization extends BaseAuthorizat
9
9
  }
10
10
  toAny() {
11
11
  const { params } = this;
12
- const authorization = InjectiveWasmxV1Beta1Authz.ContractExecutionCompatAuthorization.create();
12
+ const authorization = InjectiveWasmxV1Authz.ContractExecutionCompatAuthorization.create();
13
13
  const grant = CosmwasmWasmV1Authz.ContractGrant.create();
14
14
  grant.contract = params.contract;
15
15
  if (params.limit) {
@@ -60,11 +60,11 @@ export default class ContractExecutionCompatAuthorization extends BaseAuthorizat
60
60
  const any = GoogleProtobufAny.Any.create();
61
61
  any.typeUrl = '/injective.wasmx.v1.ContractExecutionCompatAuthorization';
62
62
  any.value =
63
- InjectiveWasmxV1Beta1Authz.ContractExecutionCompatAuthorization.encode(authorization).finish();
63
+ InjectiveWasmxV1Authz.ContractExecutionCompatAuthorization.encode(authorization).finish();
64
64
  return any;
65
65
  }
66
66
  toProto() {
67
- const authorization = InjectiveWasmxV1Beta1Authz.ContractExecutionCompatAuthorization.decode(this.toAny().value);
67
+ const authorization = InjectiveWasmxV1Authz.ContractExecutionCompatAuthorization.decode(this.toAny().value);
68
68
  return authorization;
69
69
  }
70
70
  toAmino() {
@@ -6,7 +6,8 @@ import MsgSubmitProposalSpotMarketLaunch from './msgs/MsgSubmitProposalSpotMarke
6
6
  import MsgSubmitProposalPerpetualMarketLaunch from './msgs/MsgSubmitProposalPerpetualMarketLaunch.js';
7
7
  import MsgSubmitProposalSpotMarketParamUpdate from './msgs/MsgSubmitProposalSpotMarketParamUpdate.js';
8
8
  import MsgSubmitProposalExpiryFuturesMarketLaunch from './msgs/MsgSubmitProposalExpiryFuturesMarketLaunch.js';
9
- export type MsgSubmitProposal = MsgSubmitTextProposal | MsgSubmitGenericProposal | MsgSubmitProposalSpotMarketLaunch | MsgSubmitProposalPerpetualMarketLaunch | MsgSubmitProposalSpotMarketParamUpdate | MsgSubmitProposalExpiryFuturesMarketLaunch;
10
- export { MsgSubmitTextProposal, MsgSubmitGenericProposal, MsgSubmitProposalSpotMarketLaunch, MsgSubmitProposalPerpetualMarketLaunch, MsgSubmitProposalSpotMarketParamUpdate, MsgSubmitProposalExpiryFuturesMarketLaunch, };
9
+ import MsgSubmitProposalPerpetualMarketLaunchV2 from './msgs/MsgSubmitProposalPerpetualMarketLaunchV2.js';
10
+ export type MsgSubmitProposal = MsgSubmitTextProposal | MsgSubmitGenericProposal | MsgSubmitProposalSpotMarketLaunch | MsgSubmitProposalPerpetualMarketLaunch | MsgSubmitProposalSpotMarketParamUpdate | MsgSubmitProposalPerpetualMarketLaunchV2 | MsgSubmitProposalExpiryFuturesMarketLaunch;
11
+ export { MsgSubmitTextProposal, MsgSubmitGenericProposal, MsgSubmitProposalSpotMarketLaunch, MsgSubmitProposalPerpetualMarketLaunch, MsgSubmitProposalSpotMarketParamUpdate, MsgSubmitProposalPerpetualMarketLaunchV2, MsgSubmitProposalExpiryFuturesMarketLaunch, };
11
12
  export * from './ProposalContentDecomposer.js';
12
13
  export { MsgVote, MsgGovDeposit };
@@ -6,6 +6,7 @@ import MsgSubmitProposalSpotMarketLaunch from './msgs/MsgSubmitProposalSpotMarke
6
6
  import MsgSubmitProposalPerpetualMarketLaunch from './msgs/MsgSubmitProposalPerpetualMarketLaunch.js';
7
7
  import MsgSubmitProposalSpotMarketParamUpdate from './msgs/MsgSubmitProposalSpotMarketParamUpdate.js';
8
8
  import MsgSubmitProposalExpiryFuturesMarketLaunch from './msgs/MsgSubmitProposalExpiryFuturesMarketLaunch.js';
9
- export { MsgSubmitTextProposal, MsgSubmitGenericProposal, MsgSubmitProposalSpotMarketLaunch, MsgSubmitProposalPerpetualMarketLaunch, MsgSubmitProposalSpotMarketParamUpdate, MsgSubmitProposalExpiryFuturesMarketLaunch, };
9
+ import MsgSubmitProposalPerpetualMarketLaunchV2 from './msgs/MsgSubmitProposalPerpetualMarketLaunchV2.js';
10
+ export { MsgSubmitTextProposal, MsgSubmitGenericProposal, MsgSubmitProposalSpotMarketLaunch, MsgSubmitProposalPerpetualMarketLaunch, MsgSubmitProposalSpotMarketParamUpdate, MsgSubmitProposalPerpetualMarketLaunchV2, MsgSubmitProposalExpiryFuturesMarketLaunch, };
10
11
  export * from './ProposalContentDecomposer.js';
11
12
  export { MsgVote, MsgGovDeposit };
@@ -0,0 +1,88 @@
1
+ import { GoogleProtobufAny, CosmosGovV1Beta1Tx, CosmosBaseV1Beta1Coin, InjectiveOracleV1Beta1Oracle } from '@injectivelabs/core-proto-ts';
2
+ import { SnakeCaseKeys } from 'snakecase-keys';
3
+ import { MsgBase } from '../../MsgBase.js';
4
+ export declare namespace MsgSubmitProposalPerpetualMarketLaunchV2 {
5
+ interface Params {
6
+ market: {
7
+ title: string;
8
+ description: string;
9
+ ticker: string;
10
+ quoteDenom: string;
11
+ oracleBase: string;
12
+ oracleQuote: string;
13
+ oracleScaleFactor: number;
14
+ oracleType: InjectiveOracleV1Beta1Oracle.OracleType;
15
+ initialMarginRatio: string;
16
+ maintenanceMarginRatio: string;
17
+ makerFeeRate: string;
18
+ takerFeeRate: string;
19
+ minPriceTickSize: string;
20
+ minQuantityTickSize: string;
21
+ minNotional: string;
22
+ reduceMarginRatio: string;
23
+ adminInfo?: {
24
+ admin: string;
25
+ adminPermissions: number;
26
+ };
27
+ };
28
+ proposer: string;
29
+ deposit: {
30
+ amount: string;
31
+ denom: string;
32
+ };
33
+ }
34
+ type Proto = CosmosGovV1Beta1Tx.MsgSubmitProposal;
35
+ type Object = Omit<CosmosGovV1Beta1Tx.MsgSubmitProposal, 'content'> & {
36
+ content: {
37
+ type_url: string;
38
+ value: any;
39
+ };
40
+ };
41
+ }
42
+ /**
43
+ * @category Messages
44
+ */
45
+ export default class MsgSubmitProposalPerpetualMarketLaunchV2 extends MsgBase<MsgSubmitProposalPerpetualMarketLaunchV2.Params, MsgSubmitProposalPerpetualMarketLaunchV2.Proto, MsgSubmitProposalPerpetualMarketLaunchV2.Object> {
46
+ static fromJSON(params: MsgSubmitProposalPerpetualMarketLaunchV2.Params): MsgSubmitProposalPerpetualMarketLaunchV2;
47
+ toProto(): CosmosGovV1Beta1Tx.MsgSubmitProposal;
48
+ toData(): {
49
+ content: GoogleProtobufAny.Any | undefined;
50
+ initialDeposit: CosmosBaseV1Beta1Coin.Coin[];
51
+ proposer: string;
52
+ '@type': string;
53
+ };
54
+ toAmino(): {
55
+ type: string;
56
+ value: SnakeCaseKeys<MsgSubmitProposalPerpetualMarketLaunchV2.Object>;
57
+ };
58
+ toWeb3Gw(): {
59
+ initial_deposit: {
60
+ denom: string;
61
+ amount: string;
62
+ }[];
63
+ proposer: string;
64
+ content: {
65
+ type_url: string;
66
+ value: any;
67
+ };
68
+ '@type': string;
69
+ };
70
+ toEip712(): {
71
+ type: string;
72
+ value: SnakeCaseKeys<MsgSubmitProposalPerpetualMarketLaunchV2.Object>;
73
+ };
74
+ toEip712V2(): {
75
+ content: any;
76
+ initial_deposit: {
77
+ denom: string;
78
+ amount: string;
79
+ }[];
80
+ proposer: string;
81
+ '@type': string;
82
+ };
83
+ toDirectSign(): {
84
+ type: string;
85
+ message: CosmosGovV1Beta1Tx.MsgSubmitProposal;
86
+ };
87
+ toBinary(): Uint8Array;
88
+ }