@w3ux/react-connect-kit 3.0.0 → 3.0.1-alpha.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionComponent, SVGProps } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ExtensionAccount, ExtensionStatus, VoidFn } from "@w3ux/types";
|
|
3
3
|
export interface ExtensionsContextInterface {
|
|
4
4
|
checkingInjectedWeb3: boolean;
|
|
5
5
|
extensionsStatus: Record<string, ExtensionStatus>;
|
|
@@ -18,9 +18,9 @@ export interface ExtensionInterface {
|
|
|
18
18
|
subscribe: (a: (b: ExtensionAccount[]) => void) => VoidFn;
|
|
19
19
|
get: () => Promise<ExtensionAccount[]>;
|
|
20
20
|
};
|
|
21
|
-
provider:
|
|
22
|
-
metadata:
|
|
23
|
-
signer:
|
|
21
|
+
provider: unknown;
|
|
22
|
+
metadata: unknown;
|
|
23
|
+
signer: unknown;
|
|
24
24
|
}
|
|
25
25
|
export interface ExtensionConfig {
|
|
26
26
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ExtensionsProvider/types.ts"],"names":[],"mappings":"","file":"types.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nimport type { FunctionComponent, SVGProps } from \"react\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/ExtensionsProvider/types.ts"],"names":[],"mappings":"","file":"types.js","sourcesContent":["/* @license Copyright 2024 w3ux authors & contributors\nSPDX-License-Identifier: GPL-3.0-only */\n\nimport type { FunctionComponent, SVGProps } from \"react\";\nimport { ExtensionAccount, ExtensionStatus, VoidFn } from \"@w3ux/types\";\n\n// Extensions context interface.\nexport interface ExtensionsContextInterface {\n checkingInjectedWeb3: boolean;\n extensionsStatus: Record<string, ExtensionStatus>;\n setExtensionStatus: (id: string, status: ExtensionStatus) => void;\n removeExtensionStatus: (id: string) => void;\n extensionInstalled: (id: string) => boolean;\n extensionCanConnect: (id: string) => boolean;\n extensionHasFeature: (id: string, feature: string) => boolean;\n}\n\n// Top level required properties the extension must expose via their `injectedWeb3` entry.\nexport interface ExtensionInjected extends ExtensionConfig {\n id: string;\n enable: (n: string) => Promise<ExtensionInterface>;\n}\n\n// Required properties `enable` must provide after resolution.\nexport interface ExtensionInterface {\n accounts: {\n subscribe: (a: (b: ExtensionAccount[]) => void) => VoidFn;\n get: () => Promise<ExtensionAccount[]>;\n };\n provider: unknown;\n metadata: unknown;\n signer: unknown;\n}\n\n// Configuration item of an extension.\nexport interface ExtensionConfig {\n id: string;\n title: string;\n icon: FunctionComponent<\n SVGProps<SVGSVGElement> & { title?: string | undefined }\n >;\n url: string;\n}\n"]}
|