eip-1193 0.1.4 → 0.1.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.
- package/index.d.ts +24 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -358,9 +358,29 @@ export type ERIP1193AddChainRequest = {
|
|
|
358
358
|
readonly params: [EIP1193AddChainParam];
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
export type
|
|
361
|
+
export type EIP1193OtherSubscribeRequest = {
|
|
362
362
|
readonly method: "eth_subscribe";
|
|
363
|
-
readonly params: ["newHeads"];
|
|
363
|
+
readonly params: ["newHeads" | "newPendingTransactions" | "syncing"];
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export type EIP1193LogsSubscribeRequest = {
|
|
367
|
+
readonly method: "eth_subscribe";
|
|
368
|
+
readonly params: [
|
|
369
|
+
"logs",
|
|
370
|
+
{
|
|
371
|
+
address: EIP1193Account | EIP1193Account[];
|
|
372
|
+
topics: (EIP1193DATA[] | EIP1193DATA)[];
|
|
373
|
+
}
|
|
374
|
+
];
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export type EIP1193SubscribeRequest =
|
|
378
|
+
| EIP1193LogsSubscribeRequest
|
|
379
|
+
| EIP1193OtherSubscribeRequest;
|
|
380
|
+
|
|
381
|
+
export type EIP1193UnSubscribeRequest = {
|
|
382
|
+
readonly method: "eth_unsubscribe";
|
|
383
|
+
readonly params: [DATA];
|
|
364
384
|
};
|
|
365
385
|
|
|
366
386
|
// ------------------------------------------------------------------------------------------------
|
|
@@ -528,6 +548,8 @@ export type EIP1193ProviderWithoutEvents<T = EIP1193Request> = {
|
|
|
528
548
|
): Promise<EIP1193SwitchChainError | null>;
|
|
529
549
|
request(args: ERIP1193AddChainRequest): Promise<EIP1193AddChainError | null>;
|
|
530
550
|
request(args: EIP1193SubscribeRequest): Promise<string>;
|
|
551
|
+
request(args: EIP1193UnSubscribeRequest): Promise<boolean>;
|
|
552
|
+
|
|
531
553
|
request(args: T): Promise<unknown>;
|
|
532
554
|
// request(args: EIP1193GenericRequest): Promise<unknown>;
|
|
533
555
|
};
|