eip-1193 0.3.0 → 0.3.1

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 (2) hide show
  1. package/index.d.ts +24 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -18,16 +18,38 @@ export type EIP1193Transaction = {
18
18
  s: EIP1193QUANTITY;
19
19
  };
20
20
 
21
- export type EIP1193TransactionData = {
21
+ type BaseEIP1193TransactionData = {
22
22
  from: EIP1193Account;
23
23
  to?: EIP1193Account;
24
24
  gas?: EIP1193QUANTITY;
25
- gasPrice?: EIP1193QUANTITY;
26
25
  value?: EIP1193QUANTITY;
27
26
  data?: EIP1193DATA;
28
27
  nonce?: EIP1193QUANTITY;
29
28
  };
30
29
 
30
+ export type EIP1193LegacyTransactionData = BaseEIP1193TransactionData & {
31
+ type?: '0x0';
32
+ gasPrice?: EIP1193QUANTITY;
33
+ };
34
+
35
+
36
+ export type EIP1193TransactionDataOfType1 = BaseEIP1193TransactionData & {
37
+ type: "0x1",
38
+ chainId?: EIP1193ChainId;
39
+ accessList?: EIP1193Account[];
40
+ gasPrice?: EIP1193QUANTITY;
41
+ }
42
+
43
+ export type EIP1193TransactionDataOfType2 = BaseEIP1193TransactionData & {
44
+ type: "0x2",
45
+ chainId?: EIP1193ChainId;
46
+ accessList?: EIP1193Account[];
47
+ maxFeePerGas?: EIP1193QUANTITY;
48
+ maxPriorityFeePerGas?: EIP1193QUANTITY
49
+ }
50
+
51
+ export type EIP1193TransactionData = EIP1193LegacyTransactionData | EIP1193TransactionDataOfType2;
52
+
31
53
  export type EIP1193SyncingStatus = {
32
54
  startingBlock: EIP1193QUANTITY;
33
55
  currentBlock: EIP1193QUANTITY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eip-1193",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Types for EIP-1193",
5
5
  "keywords": [],
6
6
  "author": "",