@injectivelabs/utils 1.16.1-alpha.6 → 1.16.2-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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Simple and lightweight utilities (functions and classes) for developers to use.
7
7
  ## 📚 Installation
8
8
 
9
9
  ```bash
10
- yarn add @injectivelabs/utils
10
+ pnpm add @injectivelabs/utils
11
11
  ```
12
12
 
13
13
  ---
@@ -44,7 +44,6 @@ Apache License <br />
44
44
  Version 2.0, January 2004 <br />
45
45
  http://www.apache.org/licenses/
46
46
 
47
-
48
47
  <p>&nbsp;</p>
49
48
  <div align="center">
50
49
  <sub><em>Powering the future of decentralized finance.</em></sub>
@@ -1,4 +1,4 @@
1
- import { ChainId, EthereumChainId } from '@injectivelabs/ts-types';
1
+ import { ChainId, EvmChainId } from '@injectivelabs/ts-types';
2
2
  export declare const injUsdtSpotMarket: {
3
3
  marketId: string;
4
4
  marketStatus: string;
@@ -124,9 +124,9 @@ export declare const mockFactory: {
124
124
  orderHash: string;
125
125
  orderHash2: string;
126
126
  MAX_TIMEOUT_HEIGHT: number;
127
- eip712Tx: ({ chainId, ethereumChainId, accountNumber, sequence, timeoutHeight, memo, }: {
127
+ eip712Tx: ({ chainId, evmChainId, accountNumber, sequence, timeoutHeight, memo, }: {
128
128
  chainId?: ChainId;
129
- ethereumChainId?: EthereumChainId;
129
+ evmChainId?: EvmChainId;
130
130
  accountNumber?: number;
131
131
  sequence?: number;
132
132
  timeoutHeight?: number;
@@ -136,7 +136,7 @@ export declare const mockFactory: {
136
136
  memo: string;
137
137
  chainId: ChainId;
138
138
  sequence: number;
139
- ethereumChainId: EthereumChainId;
139
+ evmChainId: EvmChainId;
140
140
  accountNumber: number;
141
141
  timeoutHeight: number;
142
142
  };
@@ -145,7 +145,7 @@ export declare const mockFactory: {
145
145
  chainId: ChainId;
146
146
  sequence: number;
147
147
  accountNumber: number;
148
- ethereumChainId: EthereumChainId;
148
+ evmChainId: EvmChainId;
149
149
  timeoutHeight: number;
150
150
  };
151
151
  };
@@ -85,12 +85,12 @@ exports.mockFactory = {
85
85
  orderHash,
86
86
  orderHash2,
87
87
  MAX_TIMEOUT_HEIGHT,
88
- eip712Tx: ({ chainId = ts_types_1.ChainId.Devnet, ethereumChainId = ts_types_1.EthereumChainId.Sepolia, accountNumber = 1, sequence = 0, timeoutHeight = 999999999, memo = '', }) => ({
88
+ eip712Tx: ({ chainId = ts_types_1.ChainId.Devnet, evmChainId = ts_types_1.EvmChainId.Sepolia, accountNumber = 1, sequence = 0, timeoutHeight = 999999999, memo = '', }) => ({
89
89
  tx: {
90
90
  memo,
91
91
  chainId,
92
92
  sequence,
93
- ethereumChainId,
93
+ evmChainId,
94
94
  accountNumber,
95
95
  timeoutHeight,
96
96
  },
@@ -99,7 +99,7 @@ exports.mockFactory = {
99
99
  chainId,
100
100
  sequence,
101
101
  accountNumber,
102
- ethereumChainId,
102
+ evmChainId,
103
103
  timeoutHeight,
104
104
  },
105
105
  }),
@@ -1,5 +1,5 @@
1
1
  import { Network, NetworkEndpoints } from '@injectivelabs/networks';
2
- import { ChainId, Coin, EthereumChainId } from '@injectivelabs/ts-types';
2
+ import { ChainId, Coin, EvmChainId } from '@injectivelabs/ts-types';
3
3
  export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddress, ethereumAddress, endpoints, accountNumber, sequence, timeoutHeight, memo, }: {
4
4
  ethereumAddress?: string;
5
5
  messages: T;
@@ -19,11 +19,11 @@ export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddre
19
19
  memo: string;
20
20
  chainId: ChainId;
21
21
  sequence: string;
22
- ethereumChainId: EthereumChainId;
22
+ evmChainId: EvmChainId;
23
23
  accountNumber: string;
24
24
  timeoutHeight: string;
25
25
  };
26
- ethereumChainId: EthereumChainId;
26
+ evmChainId: EvmChainId;
27
27
  fee: {
28
28
  amount: Coin[];
29
29
  gas: string;
@@ -31,13 +31,13 @@ export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddre
31
31
  };
32
32
  };
33
33
  prepareEip712Request: {
34
- chainId: EthereumChainId;
34
+ chainId: EvmChainId;
35
35
  message: any[];
36
36
  address: string;
37
37
  memo: string;
38
38
  sequence: number;
39
39
  accountNumber: number;
40
- ethereumChainId: EthereumChainId;
40
+ evmChainId: EvmChainId;
41
41
  timeoutHeight: number;
42
42
  };
43
43
  };
@@ -37,11 +37,11 @@ const prepareEip712 = ({ messages, gas = constants_js_1.DEFAULT_GAS_LIMIT, netwo
37
37
  timeoutHeight: timeoutHeight.toString(),
38
38
  accountNumber: accountNumber.toString(),
39
39
  },
40
- ethereumChainId: eip712.ethereumChainId,
40
+ evmChainId: eip712.evmChainId,
41
41
  };
42
42
  const prepareEip712Request = {
43
43
  ...eip712,
44
- chainId: eip712.ethereumChainId,
44
+ chainId: eip712.evmChainId,
45
45
  message: web3Msgs,
46
46
  gasLimit: gas,
47
47
  address: ethereumAddress,
@@ -1,4 +1,4 @@
1
- import { ChainId, EthereumChainId } from '@injectivelabs/ts-types';
1
+ import { ChainId, EvmChainId } from '@injectivelabs/ts-types';
2
2
  export declare const injUsdtSpotMarket: {
3
3
  marketId: string;
4
4
  marketStatus: string;
@@ -124,9 +124,9 @@ export declare const mockFactory: {
124
124
  orderHash: string;
125
125
  orderHash2: string;
126
126
  MAX_TIMEOUT_HEIGHT: number;
127
- eip712Tx: ({ chainId, ethereumChainId, accountNumber, sequence, timeoutHeight, memo, }: {
127
+ eip712Tx: ({ chainId, evmChainId, accountNumber, sequence, timeoutHeight, memo, }: {
128
128
  chainId?: ChainId;
129
- ethereumChainId?: EthereumChainId;
129
+ evmChainId?: EvmChainId;
130
130
  accountNumber?: number;
131
131
  sequence?: number;
132
132
  timeoutHeight?: number;
@@ -136,7 +136,7 @@ export declare const mockFactory: {
136
136
  memo: string;
137
137
  chainId: ChainId;
138
138
  sequence: number;
139
- ethereumChainId: EthereumChainId;
139
+ evmChainId: EvmChainId;
140
140
  accountNumber: number;
141
141
  timeoutHeight: number;
142
142
  };
@@ -145,7 +145,7 @@ export declare const mockFactory: {
145
145
  chainId: ChainId;
146
146
  sequence: number;
147
147
  accountNumber: number;
148
- ethereumChainId: EthereumChainId;
148
+ evmChainId: EvmChainId;
149
149
  timeoutHeight: number;
150
150
  };
151
151
  };
@@ -1,4 +1,4 @@
1
- import { ChainId, EthereumChainId } from '@injectivelabs/ts-types';
1
+ import { ChainId, EvmChainId } from '@injectivelabs/ts-types';
2
2
  const ethereumAddress = '0xaf79152ac5df276d9a8e1e2e22822f9713474902';
3
3
  const injectiveAddress = 'inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku';
4
4
  const injectiveAddress2 = 'inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku';
@@ -82,12 +82,12 @@ export const mockFactory = {
82
82
  orderHash,
83
83
  orderHash2,
84
84
  MAX_TIMEOUT_HEIGHT,
85
- eip712Tx: ({ chainId = ChainId.Devnet, ethereumChainId = EthereumChainId.Sepolia, accountNumber = 1, sequence = 0, timeoutHeight = 999999999, memo = '', }) => ({
85
+ eip712Tx: ({ chainId = ChainId.Devnet, evmChainId = EvmChainId.Sepolia, accountNumber = 1, sequence = 0, timeoutHeight = 999999999, memo = '', }) => ({
86
86
  tx: {
87
87
  memo,
88
88
  chainId,
89
89
  sequence,
90
- ethereumChainId,
90
+ evmChainId,
91
91
  accountNumber,
92
92
  timeoutHeight,
93
93
  },
@@ -96,7 +96,7 @@ export const mockFactory = {
96
96
  chainId,
97
97
  sequence,
98
98
  accountNumber,
99
- ethereumChainId,
99
+ evmChainId,
100
100
  timeoutHeight,
101
101
  },
102
102
  }),
@@ -1,5 +1,5 @@
1
1
  import { Network, NetworkEndpoints } from '@injectivelabs/networks';
2
- import { ChainId, Coin, EthereumChainId } from '@injectivelabs/ts-types';
2
+ import { ChainId, Coin, EvmChainId } from '@injectivelabs/ts-types';
3
3
  export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddress, ethereumAddress, endpoints, accountNumber, sequence, timeoutHeight, memo, }: {
4
4
  ethereumAddress?: string;
5
5
  messages: T;
@@ -19,11 +19,11 @@ export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddre
19
19
  memo: string;
20
20
  chainId: ChainId;
21
21
  sequence: string;
22
- ethereumChainId: EthereumChainId;
22
+ evmChainId: EvmChainId;
23
23
  accountNumber: string;
24
24
  timeoutHeight: string;
25
25
  };
26
- ethereumChainId: EthereumChainId;
26
+ evmChainId: EvmChainId;
27
27
  fee: {
28
28
  amount: Coin[];
29
29
  gas: string;
@@ -31,13 +31,13 @@ export declare const prepareEip712: <T>({ messages, gas, network, injectiveAddre
31
31
  };
32
32
  };
33
33
  prepareEip712Request: {
34
- chainId: EthereumChainId;
34
+ chainId: EvmChainId;
35
35
  message: any[];
36
36
  address: string;
37
37
  memo: string;
38
38
  sequence: number;
39
39
  accountNumber: number;
40
- ethereumChainId: EthereumChainId;
40
+ evmChainId: EvmChainId;
41
41
  timeoutHeight: number;
42
42
  };
43
43
  };
@@ -34,11 +34,11 @@ export const prepareEip712 = ({ messages, gas = DEFAULT_GAS_LIMIT, network = Net
34
34
  timeoutHeight: timeoutHeight.toString(),
35
35
  accountNumber: accountNumber.toString(),
36
36
  },
37
- ethereumChainId: eip712.ethereumChainId,
37
+ evmChainId: eip712.evmChainId,
38
38
  };
39
39
  const prepareEip712Request = {
40
40
  ...eip712,
41
- chainId: eip712.ethereumChainId,
41
+ chainId: eip712.evmChainId,
42
42
  message: web3Msgs,
43
43
  gasLimit: gas,
44
44
  address: ethereumAddress,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/utils",
3
3
  "description": "List of utils and helper functions that can be reused throughout Injective's projects.",
4
- "version": "1.16.1-alpha.6",
4
+ "version": "1.16.2-alpha.0",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "author": {
@@ -61,10 +61,10 @@
61
61
  "~utils": "dist"
62
62
  },
63
63
  "scripts": {
64
- "build": "yarn build:cjs && yarn build:esm && yarn build:post",
64
+ "build": "pnpm build:cjs && pnpm build:esm && pnpm build:post",
65
65
  "build:cjs": "tsc --build --force tsconfig.build.json",
66
66
  "build:esm": "tsc --build --force tsconfig.build.esm.json",
67
- "build:watch": "tsc --build -w tsconfig.build.json && tsc -w --build tsconfig.build.esm.json && yarn build:post",
67
+ "build:watch": "tsc --build -w tsconfig.build.json && tsc -w --build tsconfig.build.esm.json && pnpm build:post",
68
68
  "build:post": "shx cp ../../etc/stub/package.json.stub dist/cjs/package.json && shx cp ../../etc/stub/package.esm.json.stub dist/esm/package.json",
69
69
  "clean": "tsc --build tsconfig.build.json --clean && tsc --build tsconfig.build.esm.json --clean && shx rm -rf coverage *.log junit.xml dist && jest --clearCache && shx mkdir -p dist",
70
70
  "test": "jest",
@@ -77,9 +77,9 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "@bangjelkoski/store2": "^2.14.3",
80
- "@injectivelabs/exceptions": "^1.16.1-alpha.6",
81
- "@injectivelabs/networks": "^1.16.1-alpha.6",
82
- "@injectivelabs/ts-types": "^1.16.1-alpha.6",
80
+ "@injectivelabs/exceptions": "1.16.2-alpha.0",
81
+ "@injectivelabs/networks": "1.16.2-alpha.0",
82
+ "@injectivelabs/ts-types": "1.16.2-alpha.0",
83
83
  "axios": "^1.8.1",
84
84
  "bignumber.js": "^9.1.2",
85
85
  "http-status-codes": "^2.3.0"
@@ -87,5 +87,5 @@
87
87
  "devDependencies": {
88
88
  "shx": "^0.3.4"
89
89
  },
90
- "gitHead": "2e0a988a094d8284191b29502dde14f9696e7932"
90
+ "gitHead": "0377b0c3b44d79b598d08ca01930057dc05d9c7a"
91
91
  }