eip-1193 0.4.3 → 0.4.5

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 +59 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  // ------------------------------------------------------------------------------------------------
2
2
  // TYPES
3
3
  // ------------------------------------------------------------------------------------------------
4
- export type EIP1193Transaction = {
4
+ type BaseEIP1193Transaction = {
5
5
  blockHash: EIP1193DATA;
6
6
  blockNumber: EIP1193QUANTITY | null;
7
7
  from: EIP1193Account;
8
8
  gas: EIP1193QUANTITY;
9
- gasPrice: EIP1193QUANTITY;
10
9
  hash: EIP1193DATA;
11
10
  input: EIP1193DATA;
12
11
  nonce: EIP1193QUANTITY;
@@ -18,6 +17,25 @@ export type EIP1193Transaction = {
18
17
  s: EIP1193QUANTITY;
19
18
  };
20
19
 
20
+ export type EIP1193TransactionType0 = {
21
+ gasPrice: EIP1193QUANTITY;
22
+ };
23
+
24
+ export type EIP1193TransactionType1 = {
25
+ gasPrice: EIP1193QUANTITY;
26
+ chainId: EIP1193ChainId;
27
+ accessList?: EIP1193AccessList;
28
+ };
29
+
30
+ export type EIP1193TransactionType2 = {
31
+ chainId: EIP1193ChainId;
32
+ accessList?: EIP1193AccessList;
33
+ maxFeePerGas: EIP1193QUANTITY;
34
+ maxPriorityFeePerGas: EIP1193QUANTITY;
35
+ };
36
+
37
+ export type EIP1193Transaction = EIP1193TransactionType0 | EIP1193TransactionType1 | EIP1193TransactionType2;
38
+
21
39
  type BaseEIP1193TransactionData = {
22
40
  from: EIP1193Account;
23
41
  to?: EIP1193Account;
@@ -787,7 +805,45 @@ export type EIP1193DebugTraceTransactionProvider = {
787
805
  request(args: EIP1193DebugTraceTransactionRequest): Promise<EIP1193TracedTransaction>;
788
806
  };
789
807
 
790
- export type EIP1193WalletProvider = EIP1193Provider;
808
+ // export type EIP1193WindowWalletProvider = EIP1193Provider;
809
+
810
+ export type EIP1193WalletProvider = EIP1193GasPriceProvider &
811
+ EIP1193AccountsProvider &
812
+ EIP1193BlockNumberProvider &
813
+ EIP1193GetBalanceProvider &
814
+ EIP1193GetStorageAtProvider &
815
+ EIP1193GetTransactionCountProvider &
816
+ EIP1193GetTransactionCountByHashProvider &
817
+ EIP1193GetTransactionCountByNumberProvider &
818
+ EIP1193GetUncleCountByBlockHashProvider &
819
+ EIP1193GetUncleCountByBlockNumberProvider &
820
+ EIP1193GetCodeProvider &
821
+ EIP1193LegacySignProvider &
822
+ // EIP1193SignTransactionProvider &
823
+ EIP1193SendTransactionProvider &
824
+ EIP1193SendRawTransactionProvider &
825
+ EIP1193CallProvider &
826
+ EIP1193EstimateGasProvider &
827
+ EIP1193GetBlockByHashProvider &
828
+ EIP1193GetBlockByNumberProvider &
829
+ EIP1193GetTransactionByHashProvider &
830
+ EIP1193GetTransactionByBlockHashAndIndexProvider &
831
+ EIP1193GetTransactionByBlockNumberAndIndexProvider &
832
+ EIP1193GetTransactionReceiptProvider &
833
+ EIP1193GetUncleByBlockHashAndIndexProvider &
834
+ EIP1193GetUncleByBlockNumberAndIndexProvider &
835
+ EIP1193GetLogsProvider &
836
+ EIP1193PersonalSignProvider &
837
+ EIP1193PTypedSignv4Provider &
838
+ EIP1193PTypedSignProvider &
839
+ EIP1193ChainIdProvider &
840
+ EIP1193RequestAccountsProvider &
841
+ ERIP1193SwitchChainProvider &
842
+ ERIP1193AddChainProvider &
843
+ EIP1193SubscribtionProvider &
844
+ EIP1193RequestProvider;
845
+
846
+ export type EIP1193WindowWalletProvider = EIP1193WalletProvider & EIP1193EventsProvider;
791
847
 
792
848
  export type EIP1193SignerProvider = EIP1193AccountsProvider &
793
849
  EIP1193LegacySignProvider &
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eip-1193",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Types for EIP-1193 ethereum provider",
5
5
  "keywords": ["ethereum", "eip-1193"],
6
6
  "author": "Ronan Sandford",