eip-1193 0.4.6 → 0.5.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/index.d.ts +12 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -18,16 +18,19 @@ type BaseEIP1193Transaction = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type EIP1193TransactionType0 = BaseEIP1193Transaction & {
|
|
21
|
+
type?: '0x0';
|
|
21
22
|
gasPrice: EIP1193QUANTITY;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export type EIP1193TransactionType1 = BaseEIP1193Transaction & {
|
|
26
|
+
type: '0x1';
|
|
25
27
|
gasPrice: EIP1193QUANTITY;
|
|
26
28
|
chainId: EIP1193ChainId;
|
|
27
29
|
accessList?: EIP1193AccessList;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export type EIP1193TransactionType2 = BaseEIP1193Transaction & {
|
|
33
|
+
type: '0x2';
|
|
31
34
|
chainId: EIP1193ChainId;
|
|
32
35
|
accessList?: EIP1193AccessList;
|
|
33
36
|
maxFeePerGas: EIP1193QUANTITY;
|
|
@@ -291,7 +294,7 @@ export type EIP1193GetUncleCountByBlockNumberRequest = {
|
|
|
291
294
|
|
|
292
295
|
export type EIP1193GetCodeRequest = {
|
|
293
296
|
readonly method: 'eth_getCode';
|
|
294
|
-
readonly params: [EIP1193Account] | [EIP1193Account, EIP1898BlockTag];
|
|
297
|
+
readonly params: [EIP1193Account] | [EIP1193Account, EIP1898BlockTag]; // TODO EIP1898BlockTag mandatory (base network gateway seems to think so)?
|
|
295
298
|
};
|
|
296
299
|
|
|
297
300
|
export type EIP1193LegacySignRequest = {
|
|
@@ -735,12 +738,12 @@ export type EIP1193SubscribtionProvider = {
|
|
|
735
738
|
request(args: EIP1193UnsubscribeRequest): Promise<boolean>;
|
|
736
739
|
};
|
|
737
740
|
|
|
738
|
-
export type EIP1193RequestProvider = {
|
|
739
|
-
|
|
740
|
-
};
|
|
741
|
+
// export type EIP1193RequestProvider<V extends EIP1193GenericRequest = EIP1193GenericRequest> = {
|
|
742
|
+
// request<T = unknown>(args: V): Promise<T>;
|
|
743
|
+
// };
|
|
741
744
|
|
|
742
745
|
export type EIP1193GenericRequestProvider = {
|
|
743
|
-
request(args:
|
|
746
|
+
request<T = unknown, V extends EIP1193GenericRequest = EIP1193GenericRequest>(args: V): Promise<T>;
|
|
744
747
|
};
|
|
745
748
|
|
|
746
749
|
export type EIP1193ProviderWithoutEvents = EIP1193Web3ClientVersionProvider &
|
|
@@ -785,8 +788,7 @@ export type EIP1193ProviderWithoutEvents = EIP1193Web3ClientVersionProvider &
|
|
|
785
788
|
ERIP1193SwitchChainProvider &
|
|
786
789
|
ERIP1193AddChainProvider &
|
|
787
790
|
EIP1193SubscribtionProvider &
|
|
788
|
-
|
|
789
|
-
// EIP1193GenericRequestProvider;
|
|
791
|
+
EIP1193GenericRequestProvider;
|
|
790
792
|
|
|
791
793
|
export type EIP1193DebugTraceTransactionRequest = {
|
|
792
794
|
readonly method: 'debug_traceTransaction';
|
|
@@ -841,7 +843,7 @@ export type EIP1193WalletProvider = EIP1193GasPriceProvider &
|
|
|
841
843
|
ERIP1193SwitchChainProvider &
|
|
842
844
|
ERIP1193AddChainProvider &
|
|
843
845
|
EIP1193SubscribtionProvider &
|
|
844
|
-
|
|
846
|
+
EIP1193GenericRequestProvider;
|
|
845
847
|
|
|
846
848
|
export type EIP1193WindowWalletProvider = EIP1193WalletProvider & EIP1193EventsProvider;
|
|
847
849
|
|
|
@@ -850,7 +852,8 @@ export type EIP1193SignerProvider = EIP1193AccountsProvider &
|
|
|
850
852
|
EIP1193SignTransactionProvider &
|
|
851
853
|
EIP1193PersonalSignProvider &
|
|
852
854
|
EIP1193PTypedSignv4Provider &
|
|
853
|
-
EIP1193PTypedSignProvider
|
|
855
|
+
EIP1193PTypedSignProvider &
|
|
856
|
+
EIP1193GenericRequestProvider;
|
|
854
857
|
|
|
855
858
|
export type EIP1193DebugProvider = EIP1193ProviderWithoutEvents &
|
|
856
859
|
EIP1193GenericRequestProvider &
|