eip-1193 0.6.1 → 0.6.3
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 +18 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -19,6 +19,13 @@ export type EIP1193ChainId = `0x${string}`;
|
|
|
19
19
|
export type EIP1193Account = `0x${string}`;
|
|
20
20
|
export type EIP1193Accounts = EIP1193Account[];
|
|
21
21
|
|
|
22
|
+
export type EIP1193FeeHistory = {
|
|
23
|
+
oldestBlock: string;
|
|
24
|
+
reward: EIP1193QUANTITY[][];
|
|
25
|
+
baseFeePerGas: string[];
|
|
26
|
+
gasUsedRatio: string[];
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
type BaseEIP1193Transaction = {
|
|
23
30
|
blockHash: EIP1193DATA;
|
|
24
31
|
blockNumber: EIP1193QUANTITY | null;
|
|
@@ -252,7 +259,12 @@ type Listener<Message> = (message: Message) => unknown | Promise<unknown>;
|
|
|
252
259
|
// REQUEST TYPES
|
|
253
260
|
// ------------------------------------------------------------------------------------------------
|
|
254
261
|
|
|
255
|
-
export type Methods = ReadMethods &
|
|
262
|
+
export type Methods = ReadMethods &
|
|
263
|
+
NodeOnlyReadMethods &
|
|
264
|
+
WriteMethods &
|
|
265
|
+
SignerMethods &
|
|
266
|
+
ConnectedAccountMethods &
|
|
267
|
+
WalletOnlyMethods;
|
|
256
268
|
|
|
257
269
|
export type NodeOnlyReadMethods = {
|
|
258
270
|
web3_clientVersion: {result: string};
|
|
@@ -280,7 +292,7 @@ export type ReadMethods = {
|
|
|
280
292
|
eth_getBlockTransactionCountByHash: {params: [EIP1193DATA]; result: EIP1193QUANTITY};
|
|
281
293
|
eth_getBlockTransactionCountByNumber: {params: [EIP1193BlockTag]; result: EIP1193QUANTITY};
|
|
282
294
|
eth_getUncleCountByBlockHash: {params: [EIP1193DATA]; result: EIP1193QUANTITY};
|
|
283
|
-
eth_getUncleCountByBlockNumber: {params: [EIP1193BlockTag];
|
|
295
|
+
eth_getUncleCountByBlockNumber: {params: [EIP1193BlockTag]; result: EIP1193QUANTITY};
|
|
284
296
|
eth_getCode: {params: [EIP1193Account] | [EIP1193Account, EIP1898BlockTag]; result: EIP1193DATA};
|
|
285
297
|
|
|
286
298
|
eth_call: {params: [EIP1193CallParam] | [EIP1193CallParam, EIP1898BlockTag]; result: EIP1193DATA};
|
|
@@ -318,6 +330,8 @@ export type ReadMethods = {
|
|
|
318
330
|
};
|
|
319
331
|
eth_unsubscribe: {params: [EIP1193DATA]; result: boolean};
|
|
320
332
|
eth_getProof: {params: [EIP1193DATA, EIP1193DATA[]] | [EIP1193DATA, EIP1193DATA[], EIP1898BlockTag]; result: unknown}; // TODO
|
|
333
|
+
|
|
334
|
+
eth_feeHistory: {params: [EIP1193DATA, EIP1193BlockTag, number[]]; result: EIP1193FeeHistory};
|
|
321
335
|
};
|
|
322
336
|
|
|
323
337
|
export type WriteMethods = {
|
|
@@ -355,13 +369,13 @@ export type DebugOnlyMethods = {
|
|
|
355
369
|
debug_traceTransaction: {params: [EIP1193DATA]; result: EIP1193TracedTransaction};
|
|
356
370
|
};
|
|
357
371
|
|
|
358
|
-
export type WalletMethods = ReadMethods & SignerMethods & ConnectedAccountMethods & WalletOnlyMethods;
|
|
372
|
+
export type WalletMethods = ReadMethods & WriteMethods & SignerMethods & ConnectedAccountMethods & WalletOnlyMethods;
|
|
359
373
|
|
|
360
374
|
export type EIP1193TypedSignatureParam = {[field: string]: any}; // TODO
|
|
361
375
|
|
|
362
376
|
export type EIP1193GenericRequest = {
|
|
363
377
|
method: string;
|
|
364
|
-
params?:
|
|
378
|
+
params?: Readonly<unknown[]>;
|
|
365
379
|
};
|
|
366
380
|
|
|
367
381
|
export interface EIP1193ProviderRpcError extends Error {
|