eip-1193 0.0.5 → 0.1.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.
- package/index.d.ts +151 -138
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,77 +2,77 @@
|
|
|
2
2
|
// TYPES
|
|
3
3
|
// ------------------------------------------------------------------------------------------------
|
|
4
4
|
export type EIP1193Transaction = {
|
|
5
|
-
blockHash:
|
|
6
|
-
blockNumber:
|
|
5
|
+
blockHash: EIP1193DATA;
|
|
6
|
+
blockNumber: EIP1193QUANTITY | null;
|
|
7
7
|
from: EIP1193Account;
|
|
8
|
-
gas:
|
|
9
|
-
gasPrice:
|
|
10
|
-
hash:
|
|
11
|
-
input:
|
|
12
|
-
nonce:
|
|
8
|
+
gas: EIP1193QUANTITY;
|
|
9
|
+
gasPrice: EIP1193QUANTITY;
|
|
10
|
+
hash: EIP1193DATA;
|
|
11
|
+
input: EIP1193DATA;
|
|
12
|
+
nonce: EIP1193QUANTITY;
|
|
13
13
|
to: EIP1193Account;
|
|
14
|
-
transactionIndex:
|
|
15
|
-
value:
|
|
16
|
-
v:
|
|
17
|
-
r:
|
|
18
|
-
s:
|
|
14
|
+
transactionIndex: EIP1193QUANTITY | null;
|
|
15
|
+
value: EIP1193QUANTITY;
|
|
16
|
+
v: EIP1193QUANTITY;
|
|
17
|
+
r: EIP1193QUANTITY;
|
|
18
|
+
s: EIP1193QUANTITY;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export type EIP1193SyncingStatus = {
|
|
22
|
-
startingBlock:
|
|
23
|
-
currentBlock:
|
|
24
|
-
highestBlock:
|
|
22
|
+
startingBlock: EIP1193QUANTITY;
|
|
23
|
+
currentBlock: EIP1193QUANTITY;
|
|
24
|
+
highestBlock: EIP1193QUANTITY;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export type EIP1193Block = {
|
|
28
|
-
number:
|
|
29
|
-
hash:
|
|
30
|
-
parentHash:
|
|
31
|
-
nonce:
|
|
32
|
-
sha3Uncles:
|
|
33
|
-
logsBloom:
|
|
34
|
-
transactionsRoot:
|
|
35
|
-
stateRoot:
|
|
36
|
-
receiptsRoot:
|
|
28
|
+
number: EIP1193QUANTITY;
|
|
29
|
+
hash: EIP1193DATA;
|
|
30
|
+
parentHash: EIP1193DATA;
|
|
31
|
+
nonce: EIP1193DATA;
|
|
32
|
+
sha3Uncles: EIP1193DATA;
|
|
33
|
+
logsBloom: EIP1193DATA;
|
|
34
|
+
transactionsRoot: EIP1193DATA;
|
|
35
|
+
stateRoot: EIP1193DATA;
|
|
36
|
+
receiptsRoot: EIP1193DATA;
|
|
37
37
|
miner: EIP1193Account;
|
|
38
|
-
difficulty:
|
|
39
|
-
totalDifficulty:
|
|
40
|
-
|
|
41
|
-
size:
|
|
42
|
-
gasLimit:
|
|
43
|
-
gasUsed:
|
|
44
|
-
timestamp:
|
|
45
|
-
uncles:
|
|
38
|
+
difficulty: EIP1193QUANTITY;
|
|
39
|
+
totalDifficulty: EIP1193QUANTITY;
|
|
40
|
+
extraEIP1193DATA: EIP1193DATA;
|
|
41
|
+
size: EIP1193QUANTITY;
|
|
42
|
+
gasLimit: EIP1193QUANTITY;
|
|
43
|
+
gasUsed: EIP1193QUANTITY;
|
|
44
|
+
timestamp: EIP1193QUANTITY;
|
|
45
|
+
uncles: EIP1193DATA[];
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export type EIP1193Log = {
|
|
49
49
|
removed: boolean;
|
|
50
|
-
logIndex:
|
|
51
|
-
transactionIndex:
|
|
52
|
-
transactionHash:
|
|
53
|
-
blockHash:
|
|
54
|
-
blockNumber:
|
|
50
|
+
logIndex: EIP1193QUANTITY | null;
|
|
51
|
+
transactionIndex: EIP1193QUANTITY | null;
|
|
52
|
+
transactionHash: EIP1193DATA | null;
|
|
53
|
+
blockHash: EIP1193DATA | null;
|
|
54
|
+
blockNumber: EIP1193QUANTITY | null;
|
|
55
55
|
address: EIP1193Account;
|
|
56
|
-
data:
|
|
57
|
-
topics:
|
|
56
|
+
data: EIP1193DATA;
|
|
57
|
+
topics: EIP1193DATA[];
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export type EIP1193TransactionReceipt = {
|
|
61
|
-
transactionHash:
|
|
62
|
-
transactionIndex:
|
|
63
|
-
blockHash:
|
|
64
|
-
blockNumber:
|
|
61
|
+
transactionHash: EIP1193DATA;
|
|
62
|
+
transactionIndex: EIP1193QUANTITY;
|
|
63
|
+
blockHash: EIP1193DATA;
|
|
64
|
+
blockNumber: EIP1193QUANTITY;
|
|
65
65
|
from: EIP1193Account;
|
|
66
66
|
to: EIP1193Account;
|
|
67
|
-
cumulativeGasUsed:
|
|
68
|
-
effectiveGasPrice:
|
|
69
|
-
gasUsed:
|
|
67
|
+
cumulativeGasUsed: EIP1193QUANTITY;
|
|
68
|
+
effectiveGasPrice: EIP1193QUANTITY;
|
|
69
|
+
gasUsed: EIP1193QUANTITY;
|
|
70
70
|
contractAddress: EIP1193Account;
|
|
71
71
|
logs: EIP1193Log[];
|
|
72
|
-
logsBloom:
|
|
73
|
-
type:
|
|
74
|
-
root:
|
|
75
|
-
status:
|
|
72
|
+
logsBloom: EIP1193DATA;
|
|
73
|
+
type: EIP1193DATA;
|
|
74
|
+
root: EIP1193DATA;
|
|
75
|
+
status: EIP1193QUANTITY;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
export type EIP1193PendingBlock = EIP1193Block & {
|
|
@@ -90,39 +90,40 @@ export type EIP1193PendingBlockWithTransactions = EIP1193PendingBlock & {
|
|
|
90
90
|
transactions: EIP1193Transaction[];
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
type
|
|
94
|
-
gas?:
|
|
95
|
-
gasPrice?:
|
|
96
|
-
value?:
|
|
97
|
-
data?:
|
|
98
|
-
nonce?:
|
|
99
|
-
};
|
|
100
|
-
export type EIP1193NormalTransactionData = EIP1193BaseTransactionData & {
|
|
101
|
-
from: EIP1193Account;
|
|
102
|
-
to: EIP1193Account;
|
|
93
|
+
type EIP1193BaseTransactionEIP1193DATA = {
|
|
94
|
+
gas?: EIP1193QUANTITY;
|
|
95
|
+
gasPrice?: EIP1193QUANTITY;
|
|
96
|
+
value?: EIP1193QUANTITY;
|
|
97
|
+
data?: EIP1193DATA;
|
|
98
|
+
nonce?: EIP1193QUANTITY;
|
|
103
99
|
};
|
|
100
|
+
export type EIP1193NormalTransactionEIP1193DATA =
|
|
101
|
+
EIP1193BaseTransactionEIP1193DATA & {
|
|
102
|
+
from: EIP1193Account;
|
|
103
|
+
to: EIP1193Account;
|
|
104
|
+
};
|
|
104
105
|
|
|
105
|
-
export type
|
|
106
|
-
|
|
106
|
+
export type EIP1193TransactionContractCreationEIP1193DATA =
|
|
107
|
+
EIP1193BaseTransactionEIP1193DATA & {
|
|
107
108
|
from: EIP1193Account;
|
|
108
|
-
data:
|
|
109
|
+
data: EIP1193DATA;
|
|
109
110
|
};
|
|
110
111
|
|
|
111
|
-
export type
|
|
112
|
-
|
|
|
113
|
-
|
|
|
112
|
+
export type EIP1193TransactionEIP1193DATA =
|
|
113
|
+
| EIP1193NormalTransactionEIP1193DATA
|
|
114
|
+
| EIP1193TransactionContractCreationEIP1193DATA;
|
|
114
115
|
|
|
115
116
|
export type EIP1193CallParam = {
|
|
116
117
|
from?: EIP1193Account;
|
|
117
118
|
to: EIP1193Account;
|
|
118
|
-
gas?:
|
|
119
|
-
gasPrice?:
|
|
120
|
-
value?:
|
|
121
|
-
data?:
|
|
119
|
+
gas?: EIP1193QUANTITY;
|
|
120
|
+
gasPrice?: EIP1193QUANTITY;
|
|
121
|
+
value?: EIP1193QUANTITY;
|
|
122
|
+
data?: EIP1193DATA;
|
|
122
123
|
};
|
|
123
124
|
|
|
124
125
|
export type EIP1193AddChainParam = {
|
|
125
|
-
chainId:
|
|
126
|
+
chainId: EIP1193ChainId;
|
|
126
127
|
rpcUrls?: string[];
|
|
127
128
|
blockExplorerUrls?: string[];
|
|
128
129
|
chainName?: string;
|
|
@@ -135,11 +136,11 @@ export type EIP1193AddChainParam = {
|
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
export type EIP1193LogsParam = {
|
|
138
|
-
fromBlock?:
|
|
139
|
-
toBlock?:
|
|
139
|
+
fromBlock?: EIP1193BlockTag;
|
|
140
|
+
toBlock?: EIP1193BlockTag;
|
|
140
141
|
address?: EIP1193Account | EIP1193Accounts;
|
|
141
|
-
topics?:
|
|
142
|
-
blockhash?:
|
|
142
|
+
topics?: (EIP1193DATA | EIP1193DATA[])[];
|
|
143
|
+
blockhash?: EIP1193DATA;
|
|
143
144
|
};
|
|
144
145
|
|
|
145
146
|
export type EIP1193TypedSignatureParam = { [field: string]: any }; // TODO
|
|
@@ -153,7 +154,7 @@ export type EIP1193Web3ClientVersionRequest = {
|
|
|
153
154
|
|
|
154
155
|
export type EIP1193Web3SHARequest = {
|
|
155
156
|
readonly method: "web3_sha";
|
|
156
|
-
readonly params: [
|
|
157
|
+
readonly params: [EIP1193DATA];
|
|
157
158
|
};
|
|
158
159
|
|
|
159
160
|
export type EIP1193NetVersionRequest = {
|
|
@@ -202,114 +203,114 @@ export type EIP1193BlockNumberRequest = {
|
|
|
202
203
|
|
|
203
204
|
export type EIP1193GetBalanceRequest = {
|
|
204
205
|
readonly method: "eth_getBalance";
|
|
205
|
-
readonly params: [EIP1193Account] | [EIP1193Account,
|
|
206
|
+
readonly params: [EIP1193Account] | [EIP1193Account, EIP1193BlockTag];
|
|
206
207
|
};
|
|
207
208
|
|
|
208
209
|
export type EIP1193GetStorageAtRequest = {
|
|
209
210
|
readonly method: "eth_getStorageAt";
|
|
210
211
|
readonly params:
|
|
211
|
-
| [EIP1193Account,
|
|
212
|
-
| [EIP1193Account,
|
|
212
|
+
| [EIP1193Account, EIP1193QUANTITY]
|
|
213
|
+
| [EIP1193Account, EIP1193QUANTITY, EIP1193BlockTag];
|
|
213
214
|
};
|
|
214
215
|
|
|
215
216
|
export type EIP1193GetTransactionCountRequest = {
|
|
216
217
|
readonly method: "eth_getTransactionCount";
|
|
217
|
-
readonly params: [EIP1193Account] | [EIP1193Account,
|
|
218
|
+
readonly params: [EIP1193Account] | [EIP1193Account, EIP1193BlockTag];
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
export type EIP1193GetTransactionCountByHashRequest = {
|
|
221
222
|
readonly method: "eth_getBlockTransactionCountByHash";
|
|
222
|
-
readonly params: [
|
|
223
|
+
readonly params: [EIP1193DATA];
|
|
223
224
|
};
|
|
224
225
|
|
|
225
226
|
export type EIP1193GetTransactionCountByNumberRequest = {
|
|
226
227
|
readonly method: "eth_getBlockTransactionCountByNumber";
|
|
227
|
-
readonly params: [
|
|
228
|
+
readonly params: [EIP1193BlockTag];
|
|
228
229
|
};
|
|
229
230
|
|
|
230
231
|
export type EIP1193GetUncleCountByBlockHashRequest = {
|
|
231
232
|
readonly method: "eth_getUncleCountByBlockHash";
|
|
232
|
-
readonly params: [
|
|
233
|
+
readonly params: [EIP1193DATA];
|
|
233
234
|
};
|
|
234
235
|
|
|
235
236
|
export type EIP1193GetUncleCountByBlockNumberRequest = {
|
|
236
237
|
readonly method: "eth_getUncleCountByBlockNumber";
|
|
237
|
-
readonly params: [
|
|
238
|
+
readonly params: [EIP1193BlockTag];
|
|
238
239
|
};
|
|
239
240
|
|
|
240
241
|
export type EIP1193GetCodeRequest = {
|
|
241
242
|
readonly method: "eth_getCode";
|
|
242
|
-
readonly params: [EIP1193Account] | [EIP1193Account,
|
|
243
|
+
readonly params: [EIP1193Account] | [EIP1193Account, EIP1193BlockTag];
|
|
243
244
|
};
|
|
244
245
|
|
|
245
246
|
export type EIP1193LegacySignRequest = {
|
|
246
247
|
readonly method: "eth_sign";
|
|
247
|
-
readonly params: [EIP1193Account,
|
|
248
|
+
readonly params: [EIP1193Account, EIP1193DATA];
|
|
248
249
|
};
|
|
249
250
|
|
|
250
251
|
export type EIP1193SignTransactionRequest = {
|
|
251
252
|
readonly method: "eth_signTransaction";
|
|
252
|
-
readonly params: [
|
|
253
|
+
readonly params: [EIP1193Transaction];
|
|
253
254
|
};
|
|
254
255
|
|
|
255
256
|
export type EIP1193SendTransactionRequest = {
|
|
256
257
|
readonly method: "eth_sendTransaction";
|
|
257
|
-
readonly params: [
|
|
258
|
+
readonly params: [EIP1193Transaction];
|
|
258
259
|
};
|
|
259
260
|
|
|
260
261
|
export type EIP1193SendRawTransactionRequest = {
|
|
261
262
|
readonly method: "eth_sendRawTransaction";
|
|
262
|
-
readonly params: [
|
|
263
|
+
readonly params: [EIP1193DATA];
|
|
263
264
|
};
|
|
264
265
|
|
|
265
266
|
export type EIP119CallRequest = {
|
|
266
267
|
readonly method: "eth_call";
|
|
267
|
-
readonly params: [EIP1193CallParam] | [EIP1193CallParam,
|
|
268
|
+
readonly params: [EIP1193CallParam] | [EIP1193CallParam, EIP1193BlockTag];
|
|
268
269
|
};
|
|
269
270
|
|
|
270
271
|
export type EIP119EstimateGasRequest = {
|
|
271
272
|
readonly method: "eth_estimateGas";
|
|
272
|
-
readonly params: [EIP1193CallParam] | [EIP1193CallParam,
|
|
273
|
+
readonly params: [EIP1193CallParam] | [EIP1193CallParam, EIP1193BlockTag];
|
|
273
274
|
};
|
|
274
275
|
|
|
275
276
|
export type EIP119GetBlockByHashRequest<T extends boolean = false> = {
|
|
276
277
|
readonly method: "eth_getBlockByHash";
|
|
277
|
-
readonly params: [
|
|
278
|
+
readonly params: [EIP1193DATA, T];
|
|
278
279
|
};
|
|
279
280
|
|
|
280
281
|
export type EIP119GetBlockByNumberRequest<T = false> = {
|
|
281
282
|
readonly method: "eth_getBlockByNumber";
|
|
282
|
-
readonly params: [
|
|
283
|
+
readonly params: [EIP1193BlockTag, T];
|
|
283
284
|
};
|
|
284
285
|
|
|
285
286
|
export type EIP119GetTransactionByHashRequest = {
|
|
286
287
|
readonly method: "eth_getTransactionByHash";
|
|
287
|
-
readonly params: [
|
|
288
|
+
readonly params: [EIP1193DATA];
|
|
288
289
|
};
|
|
289
290
|
|
|
290
291
|
export type EIP119GetTransactionByBlockHashAndIndexRequest = {
|
|
291
292
|
readonly method: "eth_getTransactionByBlockHashAndIndex";
|
|
292
|
-
readonly params: [
|
|
293
|
+
readonly params: [EIP1193DATA, EIP1193QUANTITY];
|
|
293
294
|
};
|
|
294
295
|
|
|
295
296
|
export type EIP119GetTransactionByBlockNumberAndIndexRequest = {
|
|
296
297
|
readonly method: "eth_getTransactionByBlockNumberAndIndex";
|
|
297
|
-
readonly params: [
|
|
298
|
+
readonly params: [EIP1193BlockTag, EIP1193QUANTITY];
|
|
298
299
|
};
|
|
299
300
|
|
|
300
301
|
export type EIP119GetTransactionReceiptRequest = {
|
|
301
302
|
readonly method: "eth_getTransactionReceipt";
|
|
302
|
-
readonly params: [
|
|
303
|
+
readonly params: [EIP1193DATA];
|
|
303
304
|
};
|
|
304
305
|
|
|
305
306
|
export type EIP119GetUncleByBlockHashAndIndexRequest = {
|
|
306
307
|
readonly method: "eth_getUncleByBlockHashAndIndex";
|
|
307
|
-
readonly params: [
|
|
308
|
+
readonly params: [EIP1193DATA, EIP1193QUANTITY];
|
|
308
309
|
};
|
|
309
310
|
|
|
310
311
|
export type EIP119GetUncleByBlockNumberAndIndexRequest = {
|
|
311
312
|
readonly method: "eth_getUncleByBlockNumberAndIndex";
|
|
312
|
-
readonly params: [
|
|
313
|
+
readonly params: [EIP1193BlockTag, EIP1193QUANTITY];
|
|
313
314
|
};
|
|
314
315
|
|
|
315
316
|
export type EIP119GetLogsRequest = {
|
|
@@ -323,7 +324,7 @@ export type EIP119GetLogsRequest = {
|
|
|
323
324
|
|
|
324
325
|
export type EIP1193PersonalSignRequest = {
|
|
325
326
|
readonly method: "personal_sign";
|
|
326
|
-
readonly params: [
|
|
327
|
+
readonly params: [EIP1193DATA, EIP1193Account];
|
|
327
328
|
};
|
|
328
329
|
|
|
329
330
|
export type EIP1193PTypedSignv4Request = {
|
|
@@ -348,7 +349,7 @@ export type ERIP1193SwitchChainRequest = {
|
|
|
348
349
|
readonly method: "wallet_switchEthereumChain";
|
|
349
350
|
readonly params: [
|
|
350
351
|
{
|
|
351
|
-
chainId:
|
|
352
|
+
chainId: EIP1193ChainId;
|
|
352
353
|
}
|
|
353
354
|
];
|
|
354
355
|
};
|
|
@@ -430,7 +431,7 @@ export interface EIP1193EthSubscription extends EIP1193ProviderMessage {
|
|
|
430
431
|
}
|
|
431
432
|
|
|
432
433
|
export interface EIP1193ProviderConnectInfo {
|
|
433
|
-
readonly chainId:
|
|
434
|
+
readonly chainId: EIP1193ChainId;
|
|
434
435
|
}
|
|
435
436
|
|
|
436
437
|
export type EIP1193AddChainError = {
|
|
@@ -478,32 +479,40 @@ export type EIP1193Provider<T = EIP1193Request> = {
|
|
|
478
479
|
>
|
|
479
480
|
): EIP1193Provider;
|
|
480
481
|
|
|
481
|
-
request
|
|
482
|
-
request
|
|
483
|
-
request
|
|
484
|
-
request
|
|
485
|
-
request
|
|
486
|
-
request
|
|
482
|
+
request(args: EIP1193Web3ClientVersionRequest): Promise<string>;
|
|
483
|
+
request(args: EIP1193Web3SHARequest): Promise<EIP1193DATA>;
|
|
484
|
+
request(args: EIP1193NetVersionRequest): Promise<EIP1193ChainId>;
|
|
485
|
+
request(args: EIP1193NetListeningRequest): Promise<boolean>;
|
|
486
|
+
request(args: EIP1193NetPeerCountRequest): Promise<EIP1193QUANTITY>;
|
|
487
|
+
request(args: EIP1193ProtocolVersionRequest): Promise<string>;
|
|
487
488
|
request(args: EIP1193SyncingRequest): Promise<EIP1193SyncingStatus | false>;
|
|
488
|
-
request
|
|
489
|
-
request(args: EIP1193GasPriceRequest): Promise<
|
|
489
|
+
request(args: EIP1193CoinbaseRequest): Promise<EIP1193Account>;
|
|
490
|
+
request(args: EIP1193GasPriceRequest): Promise<EIP1193QUANTITY>;
|
|
490
491
|
request(args: EIP1193AccountsRequest): Promise<EIP1193Accounts>;
|
|
491
|
-
request(args: EIP1193BlockNumberRequest): Promise<
|
|
492
|
-
request(args: EIP1193GetBalanceRequest): Promise<
|
|
493
|
-
request(args: EIP1193GetStorageAtRequest): Promise<
|
|
494
|
-
request(args: EIP1193GetTransactionCountRequest): Promise<
|
|
495
|
-
request(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
request
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
request(
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
request(
|
|
506
|
-
|
|
492
|
+
request(args: EIP1193BlockNumberRequest): Promise<EIP1193QUANTITY>;
|
|
493
|
+
request(args: EIP1193GetBalanceRequest): Promise<EIP1193QUANTITY>;
|
|
494
|
+
request(args: EIP1193GetStorageAtRequest): Promise<EIP1193DATA>;
|
|
495
|
+
request(args: EIP1193GetTransactionCountRequest): Promise<EIP1193QUANTITY>;
|
|
496
|
+
request(
|
|
497
|
+
args: EIP1193GetTransactionCountByHashRequest
|
|
498
|
+
): Promise<EIP1193QUANTITY>;
|
|
499
|
+
request(
|
|
500
|
+
args: EIP1193GetTransactionCountByNumberRequest
|
|
501
|
+
): Promise<EIP1193QUANTITY>;
|
|
502
|
+
|
|
503
|
+
request(
|
|
504
|
+
args: EIP1193GetUncleCountByBlockHashRequest
|
|
505
|
+
): Promise<EIP1193QUANTITY>;
|
|
506
|
+
request(
|
|
507
|
+
args: EIP1193GetUncleCountByBlockNumberRequest
|
|
508
|
+
): Promise<EIP1193QUANTITY>;
|
|
509
|
+
request(args: EIP1193GetCodeRequest): Promise<EIP1193DATA>;
|
|
510
|
+
request(args: EIP1193LegacySignRequest): Promise<EIP1193DATA>;
|
|
511
|
+
request(args: EIP1193SignTransactionRequest): Promise<EIP1193DATA>;
|
|
512
|
+
request(args: EIP1193SendTransactionRequest): Promise<EIP1193DATA>;
|
|
513
|
+
request(args: EIP1193SendRawTransactionRequest): Promise<EIP1193DATA>;
|
|
514
|
+
request(args: EIP119CallRequest): Promise<EIP1193DATA>;
|
|
515
|
+
request(args: EIP119EstimateGasRequest): Promise<EIP1193QUANTITY>;
|
|
507
516
|
request(args: EIP119GetBlockByHashRequest): Promise<EIP1193Block>;
|
|
508
517
|
request(args: EIP119GetBlockByNumberRequest): Promise<EIP1193Block>;
|
|
509
518
|
request(
|
|
@@ -522,29 +531,33 @@ export type EIP1193Provider<T = EIP1193Request> = {
|
|
|
522
531
|
request(
|
|
523
532
|
args: EIP119GetTransactionReceiptRequest
|
|
524
533
|
): Promise<EIP1193TransactionReceipt>;
|
|
525
|
-
request
|
|
534
|
+
request(
|
|
526
535
|
args: EIP119GetUncleByBlockHashAndIndexRequest
|
|
527
536
|
): Promise<EIP1193Block>;
|
|
528
|
-
request
|
|
537
|
+
request(
|
|
529
538
|
args: EIP119GetUncleByBlockNumberAndIndexRequest
|
|
530
539
|
): Promise<EIP1193Block>;
|
|
531
540
|
request(args: EIP119GetLogsRequest): Promise<EIP1193Log[]>;
|
|
532
|
-
request
|
|
533
|
-
request
|
|
534
|
-
request
|
|
535
|
-
request(args: EIP1193ChainIdRequest): Promise<
|
|
541
|
+
request(args: EIP1193PersonalSignRequest): Promise<EIP1193DATA>;
|
|
542
|
+
request(args: EIP1193PTypedSignv4Request): Promise<EIP1193DATA>;
|
|
543
|
+
request(args: EIP1193PTypedSignRequest): Promise<EIP1193DATA>;
|
|
544
|
+
request(args: EIP1193ChainIdRequest): Promise<EIP1193ChainId>;
|
|
536
545
|
request(args: EIP1193RequestAccountsRequest): Promise<EIP1193Accounts>;
|
|
537
|
-
request
|
|
546
|
+
request(
|
|
538
547
|
args: ERIP1193SwitchChainRequest
|
|
539
548
|
): Promise<EIP1193SwitchChainError | null>;
|
|
540
|
-
request
|
|
549
|
+
request(args: ERIP1193AddChainRequest): Promise<EIP1193AddChainError | null>;
|
|
541
550
|
request(args: T): Promise<unknown>;
|
|
542
551
|
// request(args: EIP1193GenericRequest): Promise<unknown>;
|
|
543
552
|
};
|
|
544
553
|
|
|
545
|
-
type
|
|
546
|
-
type
|
|
547
|
-
|
|
548
|
-
|
|
554
|
+
export type EIP1193DATA = `0x${string}`;
|
|
555
|
+
export type EIP1193BlockTag =
|
|
556
|
+
| EIP1193QUANTITY
|
|
557
|
+
| "latest"
|
|
558
|
+
| "earliest"
|
|
559
|
+
| "pending";
|
|
560
|
+
export type EIP119QUANTITY = `0x${string}`;
|
|
561
|
+
export type EIP1193ChainId = `0x${string}`;
|
|
549
562
|
export type EIP1193Account = `0x${string}`;
|
|
550
563
|
export type EIP1193Accounts = EIP1193Account[];
|