eip-1193 0.1.2 → 0.1.4
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 +7 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -358,6 +358,11 @@ export type ERIP1193AddChainRequest = {
|
|
|
358
358
|
readonly params: [EIP1193AddChainParam];
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
+
export type EIP1193SubscribeRequest = {
|
|
362
|
+
readonly method: "eth_subscribe";
|
|
363
|
+
readonly params: ["newHeads"];
|
|
364
|
+
};
|
|
365
|
+
|
|
361
366
|
// ------------------------------------------------------------------------------------------------
|
|
362
367
|
|
|
363
368
|
export type EIP1193Request =
|
|
@@ -522,6 +527,7 @@ export type EIP1193ProviderWithoutEvents<T = EIP1193Request> = {
|
|
|
522
527
|
args: ERIP1193SwitchChainRequest
|
|
523
528
|
): Promise<EIP1193SwitchChainError | null>;
|
|
524
529
|
request(args: ERIP1193AddChainRequest): Promise<EIP1193AddChainError | null>;
|
|
530
|
+
request(args: EIP1193SubscribeRequest): Promise<string>;
|
|
525
531
|
request(args: T): Promise<unknown>;
|
|
526
532
|
// request(args: EIP1193GenericRequest): Promise<unknown>;
|
|
527
533
|
};
|
|
@@ -560,7 +566,7 @@ export type EIP1193BlockTag =
|
|
|
560
566
|
| "latest"
|
|
561
567
|
| "earliest"
|
|
562
568
|
| "pending";
|
|
563
|
-
export type
|
|
569
|
+
export type EIP1193QUANTITY = `0x${string}`;
|
|
564
570
|
export type EIP1193ChainId = `0x${string}`;
|
|
565
571
|
export type EIP1193Account = `0x${string}`;
|
|
566
572
|
export type EIP1193Accounts = EIP1193Account[];
|