eip-1193 0.0.3 → 0.0.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.
Files changed (2) hide show
  1. package/index.d.ts +8 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -403,8 +403,12 @@ export type EIP1193Request =
403
403
  | EIP1193ChainIdRequest
404
404
  | EIP1193RequestAccountsRequest
405
405
  | ERIP1193SwitchChainRequest
406
- | ERIP1193AddChainRequest
407
- | EIP1193GenericRequest;
406
+ | ERIP1193AddChainRequest;
407
+
408
+ export type EIP1193GenericRequest = {
409
+ method: string;
410
+ params?: any[];
411
+ };
408
412
 
409
413
  export interface EIP1193ProviderRpcError extends Error {
410
414
  message: string;
@@ -448,7 +452,7 @@ export type EIP1193SwitchChainError = {
448
452
 
449
453
  type Listener<Message> = (message: Message) => unknown | Promise<unknown>;
450
454
 
451
- export type EIP1193Provider<T = {}, U = EIP1193Request> = T & {
455
+ export type EIP1193Provider<T = EIP1193Request> = {
452
456
  on(
453
457
  eventName: "message" | "disconnect",
454
458
  listener: Listener<EIP1193ProviderMessage | EIP1193EthSubscription>
@@ -534,7 +538,7 @@ export type EIP1193Provider<T = {}, U = EIP1193Request> = T & {
534
538
  args: ERIP1193SwitchChainRequest
535
539
  ): Promise<EIP1193SwitchChainError | null>;
536
540
  request?(args: ERIP1193AddChainRequest): Promise<EIP1193AddChainError | null>;
537
- request(args: U): Promise<unknown>;
541
+ request(args: T): Promise<unknown>;
538
542
  // request(args: EIP1193GenericRequest): Promise<unknown>;
539
543
  };
540
544
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eip-1193",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Types for EIP-1193",
5
5
  "keywords": [],
6
6
  "author": "",