@injectivelabs/sdk-ts 1.16.22 → 1.16.24

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.
@@ -7,7 +7,7 @@ export declare class IndexerGrpcExplorerApi extends BaseGrpcConsumer {
7
7
  protected module: string;
8
8
  protected client: InjectiveExplorerRpc.InjectiveExplorerRPCClientImpl;
9
9
  constructor(endpoint: string);
10
- fetchTxByHash(hash: string): Promise<import("../types/explorer.js").Transaction>;
10
+ fetchTxByHash(hash: string, isEvmHash?: boolean): Promise<import("../types/explorer.js").Transaction>;
11
11
  fetchAccountTx({ address, limit, type, before, after, startTime, endTime, }: {
12
12
  address: string;
13
13
  limit?: number;
@@ -19,9 +19,10 @@ class IndexerGrpcExplorerApi extends BaseIndexerGrpcConsumer_js_1.default {
19
19
  super(endpoint);
20
20
  this.client = new indexer_proto_ts_1.InjectiveExplorerRpc.InjectiveExplorerRPCClientImpl(this.getGrpcWebImpl(endpoint));
21
21
  }
22
- async fetchTxByHash(hash) {
22
+ async fetchTxByHash(hash, isEvmHash = false) {
23
23
  const request = indexer_proto_ts_1.InjectiveExplorerRpc.GetTxByTxHashRequest.create();
24
24
  request.hash = hash;
25
+ request.isEvmHash = isEvmHash;
25
26
  try {
26
27
  const response = await this.client.GetTxByTxHash(request, this.metadata);
27
28
  return index_js_2.IndexerGrpcExplorerTransformer.getTxByTxHashResponseToTx(response);
@@ -61,7 +61,7 @@ export declare class IndexerRestExplorerApi extends BaseRestConsumer {
61
61
  paging: Paging;
62
62
  transactions: ExplorerTransaction[];
63
63
  }>;
64
- fetchTransaction(hash: string): Promise<ExplorerTransaction>;
64
+ fetchTransaction(hash: string, isEvmTx?: boolean): Promise<ExplorerTransaction>;
65
65
  fetchValidators(): Promise<Partial<ExplorerValidator>[]>;
66
66
  fetchValidatorUptime(validatorConsensusAddress: string): Promise<ExplorerValidatorUptime[]>;
67
67
  fetchContract(contractAddress: string): Promise<Contract>;
@@ -166,10 +166,10 @@ class IndexerRestExplorerApi extends BaseRestConsumer_js_1.default {
166
166
  });
167
167
  }
168
168
  }
169
- async fetchTransaction(hash) {
169
+ async fetchTransaction(hash, isEvmTx = false) {
170
170
  const endpoint = `txs/${hash}`;
171
171
  try {
172
- const response = await this.retry(() => this.get(endpoint));
172
+ const response = await this.retry(() => this.get(endpoint, { is_evm_hash: isEvmTx }));
173
173
  return index_js_2.IndexerRestExplorerTransformer.transactionToTransaction(response.data.data);
174
174
  }
175
175
  catch (e) {
@@ -7,7 +7,7 @@ export declare class IndexerGrpcExplorerApi extends BaseGrpcConsumer {
7
7
  protected module: string;
8
8
  protected client: InjectiveExplorerRpc.InjectiveExplorerRPCClientImpl;
9
9
  constructor(endpoint: string);
10
- fetchTxByHash(hash: string): Promise<import("../types/explorer.js").Transaction>;
10
+ fetchTxByHash(hash: string, isEvmHash?: boolean): Promise<import("../types/explorer.js").Transaction>;
11
11
  fetchAccountTx({ address, limit, type, before, after, startTime, endTime, }: {
12
12
  address: string;
13
13
  limit?: number;
@@ -13,9 +13,10 @@ export class IndexerGrpcExplorerApi extends BaseGrpcConsumer {
13
13
  super(endpoint);
14
14
  this.client = new InjectiveExplorerRpc.InjectiveExplorerRPCClientImpl(this.getGrpcWebImpl(endpoint));
15
15
  }
16
- async fetchTxByHash(hash) {
16
+ async fetchTxByHash(hash, isEvmHash = false) {
17
17
  const request = InjectiveExplorerRpc.GetTxByTxHashRequest.create();
18
18
  request.hash = hash;
19
+ request.isEvmHash = isEvmHash;
19
20
  try {
20
21
  const response = await this.client.GetTxByTxHash(request, this.metadata);
21
22
  return IndexerGrpcExplorerTransformer.getTxByTxHashResponseToTx(response);
@@ -61,7 +61,7 @@ export declare class IndexerRestExplorerApi extends BaseRestConsumer {
61
61
  paging: Paging;
62
62
  transactions: ExplorerTransaction[];
63
63
  }>;
64
- fetchTransaction(hash: string): Promise<ExplorerTransaction>;
64
+ fetchTransaction(hash: string, isEvmTx?: boolean): Promise<ExplorerTransaction>;
65
65
  fetchValidators(): Promise<Partial<ExplorerValidator>[]>;
66
66
  fetchValidatorUptime(validatorConsensusAddress: string): Promise<ExplorerValidatorUptime[]>;
67
67
  fetchContract(contractAddress: string): Promise<Contract>;
@@ -160,10 +160,10 @@ export class IndexerRestExplorerApi extends BaseRestConsumer {
160
160
  });
161
161
  }
162
162
  }
163
- async fetchTransaction(hash) {
163
+ async fetchTransaction(hash, isEvmTx = false) {
164
164
  const endpoint = `txs/${hash}`;
165
165
  try {
166
- const response = await this.retry(() => this.get(endpoint));
166
+ const response = await this.retry(() => this.get(endpoint, { is_evm_hash: isEvmTx }));
167
167
  return IndexerRestExplorerTransformer.transactionToTransaction(response.data.data);
168
168
  }
169
169
  catch (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/sdk-ts",
3
3
  "description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
4
- "version": "1.16.22",
4
+ "version": "1.16.24",
5
5
  "sideEffects": false,
6
6
  "license": "Apache-2.0",
7
7
  "author": {
@@ -124,16 +124,16 @@
124
124
  "@cosmjs/stargate": "^0.33.0",
125
125
  "@injectivelabs/abacus-proto-ts": "1.14.1",
126
126
  "@injectivelabs/core-proto-ts": "1.16.6",
127
- "@injectivelabs/exceptions": "1.16.22",
127
+ "@injectivelabs/exceptions": "1.16.24",
128
128
  "@injectivelabs/grpc-web": "^0.0.1",
129
129
  "@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
130
130
  "@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
131
- "@injectivelabs/indexer-proto-ts": "1.13.23",
131
+ "@injectivelabs/indexer-proto-ts": "1.13.24",
132
132
  "@injectivelabs/mito-proto-ts": "1.13.2",
133
- "@injectivelabs/networks": "1.16.22",
133
+ "@injectivelabs/networks": "1.16.24",
134
134
  "@injectivelabs/olp-proto-ts": "1.13.4",
135
- "@injectivelabs/ts-types": "1.16.22",
136
- "@injectivelabs/utils": "1.16.22",
135
+ "@injectivelabs/ts-types": "1.16.24",
136
+ "@injectivelabs/utils": "1.16.24",
137
137
  "@noble/curves": "^1.8.1",
138
138
  "@noble/hashes": "^1.7.1",
139
139
  "@scure/base": "^1.2.6",
@@ -151,7 +151,7 @@
151
151
  "snakecase-keys": "^5.4.1",
152
152
  "viem": "^2.33.2"
153
153
  },
154
- "gitHead": "b1463097f7c8c8156267f3ad09b1d63be6c88a06",
154
+ "gitHead": "87521ee4ad84b3aa691ed2954611d37f548231a9",
155
155
  "typedoc": {
156
156
  "entryPoint": "./src/index.ts",
157
157
  "readmeFile": "./README.md",