shogun-button-react 1.0.0

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.
@@ -0,0 +1,41 @@
1
+ import { ShogunCore, IGunInstance } from "shogun-core";
2
+ export interface ShogunConnectorOptions {
3
+ appName: string;
4
+ appDescription?: string;
5
+ appUrl?: string;
6
+ appIcon?: string;
7
+ showMetamask?: boolean;
8
+ showWebauthn?: boolean;
9
+ showNostr?: boolean;
10
+ showOauth?: boolean;
11
+ darkMode?: boolean;
12
+ websocketSecure?: boolean;
13
+ providerUrl?: string | null;
14
+ peers?: string[];
15
+ authToken?: string;
16
+ gunInstance?: IGunInstance<any>;
17
+ logging?: {
18
+ enabled: boolean;
19
+ level: "error" | "warning" | "info" | "debug";
20
+ };
21
+ timeouts?: {
22
+ login?: number;
23
+ signup?: number;
24
+ operation?: number;
25
+ };
26
+ oauth?: {
27
+ providers: Record<string, {
28
+ clientId: string;
29
+ clientSecret?: string;
30
+ redirectUri?: string;
31
+ }>;
32
+ };
33
+ }
34
+ export interface ShogunConnectorResult {
35
+ sdk: ShogunCore;
36
+ options: ShogunConnectorOptions;
37
+ setProvider: (provider: any) => boolean;
38
+ getCurrentProviderUrl: () => string | null;
39
+ registerPlugin: (plugin: any) => boolean;
40
+ hasPlugin: (name: string) => boolean;
41
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './connector-options';
2
+ import { AuthResult, SignUpResult } from 'shogun-core';
3
+ export { AuthResult, SignUpResult };
4
+ export * from './shogun-core.d';
@@ -0,0 +1,4 @@
1
+ // Export the connector options
2
+ export * from './connector-options';
3
+ // Export any type extensions/declarations
4
+ export * from './shogun-core.d';
@@ -0,0 +1 @@
1
+ export * from './types/connector-options.js';
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ // Re-export connector options from the connector-options.ts file
2
+ export * from './types/connector-options.js';
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "shogun-button-react",
3
+ "description": "Shogun connector button",
4
+ "version": "1.0.0",
5
+ "files": [
6
+ "dist",
7
+ "src/styles/index.css"
8
+ ],
9
+ "keywords": [
10
+ "shogun",
11
+ "wallet",
12
+ "ethereum",
13
+ "react",
14
+ "react-hook",
15
+ "hooks",
16
+ "authentication"
17
+ ],
18
+ "author": "Scobru",
19
+ "license": "MIT",
20
+ "type": "module",
21
+ "exports": {
22
+ ".": "./dist/index.js",
23
+ "./styles.css": "./dist/index.css"
24
+ },
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "scripts": {
28
+ "build": "tsc && copyfiles -u 1 \"src/styles/index.css\" dist",
29
+ "dev": "tsc --watch",
30
+ "test": "echo \"Error: no test specified\" && exit 1",
31
+ "prepare": "npm run build"
32
+ },
33
+ "dependencies": {
34
+ "ethers": "^6.13.5",
35
+ "prettier": "^3.5.3",
36
+ "rxjs": "^7.8.1",
37
+ "shogun-core": "file:../shogun-core"
38
+ },
39
+ "devDependencies": {
40
+ "copyfiles": "^2.4.1",
41
+ "react": "^19.1.0",
42
+ "react-dom": "^19.1.0",
43
+ "typescript": "^5.8.2"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=18.2.0",
47
+ "react-dom": ">=18.2.0"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/shogun/shogun-button.git",
52
+ "directory": "packages/shogun-button"
53
+ },
54
+ "typeRoots": [
55
+ "./node_modules/@types",
56
+ "./src/types"
57
+ ]
58
+ }