@use-glyph/sdk-react 0.4.1 → 1.0.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.
- package/LICENSE +1 -3
- package/dist/EIP1193Strategy.js +114 -83
- package/dist/PrivyStrategy.js +93 -71
- package/dist/assets/sdk-react.css +1 -1
- package/dist/glyph-widget.es.js +30 -0
- package/dist/glyph-widget.umd.js +150 -0
- package/dist/index.js +8360 -7219
- package/dist/types/components/NativeGlyphConnectButton.d.ts +2 -0
- package/dist/types/context/GlyphProvider.d.ts +7 -2
- package/dist/types/context/strategies/EIP1193Strategy.d.ts +2 -2
- package/dist/types/context/strategies/PrivyStrategy.d.ts +2 -2
- package/dist/types/hooks/useGlyph.d.ts +2 -2
- package/dist/types/hooks/useGlyphFunding.d.ts +6 -0
- package/dist/types/hooks/useNativeGlyphConnection.d.ts +4 -5
- package/dist/types/index.d.ts +5 -4
- package/dist/types/lib/constants.d.ts +2 -0
- package/dist/types/lib/eip1193/GlyphWalletProvider.d.ts +6 -6
- package/dist/types/lib/popup.d.ts +1 -1
- package/dist/types/lib/privy/GlyphPrivyProvider.d.ts +5 -2
- package/dist/types/lib/providers.d.ts +162 -162
- package/dist/types/lib/utils.d.ts +4 -3
- package/dist/types/types/GlyphWidgetTypes.d.ts +20 -2
- package/package.json +22 -26
- package/dist/sdk-react.es.js +0 -28
- package/dist/sdk-react.umd.js +0 -151
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import { EIP1193Provider } from 'viem';
|
|
3
|
+
export declare const TWITTER_IMAGE_URL_REGEX: RegExp;
|
|
3
4
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
4
5
|
export declare function copyToClipboard(text: string): boolean;
|
|
5
6
|
export declare const generateNonce: () => number;
|
|
@@ -109,17 +110,17 @@ export declare const wagmiCrossAppConnector: (provider: EIP1193Provider, useStag
|
|
|
109
110
|
isPermanentlyDisconnected?: boolean;
|
|
110
111
|
isUnlocked?: boolean;
|
|
111
112
|
} | undefined | undefined;
|
|
112
|
-
}[] | undefined;
|
|
113
|
+
}[] | undefined | undefined;
|
|
113
114
|
_events?: {
|
|
114
115
|
connect?: (() => void) | undefined;
|
|
115
|
-
} | undefined;
|
|
116
|
+
} | undefined | undefined;
|
|
116
117
|
_state?: {
|
|
117
118
|
accounts?: string[];
|
|
118
119
|
initialized?: boolean;
|
|
119
120
|
isConnected?: boolean;
|
|
120
121
|
isPermanentlyDisconnected?: boolean;
|
|
121
122
|
isUnlocked?: boolean;
|
|
122
|
-
} | undefined;
|
|
123
|
+
} | undefined | undefined;
|
|
123
124
|
} | undefined, {
|
|
124
125
|
onConnect(connectInfo: import('viem').ProviderConnectInfo): void;
|
|
125
126
|
}, {
|
|
@@ -5,6 +5,13 @@ export declare enum StrategyType {
|
|
|
5
5
|
EIP1193 = "eip1193"
|
|
6
6
|
}
|
|
7
7
|
export declare const DEFAULT_STRATEGY = StrategyType.PRIVY;
|
|
8
|
+
export declare enum WalletClientType {
|
|
9
|
+
RAINBOWKIT = "rainbowkit",
|
|
10
|
+
CONNECTKIT = "connectkit",
|
|
11
|
+
THIRDWEB = "thirdweb",
|
|
12
|
+
WAGMI = "wagmi",
|
|
13
|
+
DYNAMIC = "dynamic"
|
|
14
|
+
}
|
|
8
15
|
export declare const GlyphViewType: {
|
|
9
16
|
readonly HOME: WalletMainViewTab.HOME;
|
|
10
17
|
readonly ACTIVITY: WalletMainViewTab.ACTIVITY;
|
|
@@ -19,14 +26,25 @@ export declare const GlyphViewType: {
|
|
|
19
26
|
readonly OPEN: "open";
|
|
20
27
|
};
|
|
21
28
|
export type GlyphViewType = (typeof GlyphViewType)[keyof typeof GlyphViewType];
|
|
22
|
-
export interface
|
|
23
|
-
strategy?: StrategyType;
|
|
29
|
+
export interface BaseGlyphProviderOptions {
|
|
24
30
|
glyphUrl?: string;
|
|
25
31
|
useStagingTenant?: boolean;
|
|
26
32
|
onLogin?: () => void;
|
|
27
33
|
onLogout?: () => void;
|
|
28
34
|
children: React.ReactNode;
|
|
29
35
|
}
|
|
36
|
+
export interface EIP1193GlyphProviderOptionsWithSignature extends BaseGlyphProviderOptions {
|
|
37
|
+
strategy: StrategyType.EIP1193;
|
|
38
|
+
walletClientType: WalletClientType;
|
|
39
|
+
askForSignature?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface PrivyGlyphProviderOptions extends BaseGlyphProviderOptions {
|
|
42
|
+
strategy: StrategyType.PRIVY;
|
|
43
|
+
}
|
|
44
|
+
export type GlyphProviderOptions = EIP1193GlyphProviderOptionsWithSignature | PrivyGlyphProviderOptions;
|
|
45
|
+
export interface BaseGlyphProviderOptionsWithSignature extends BaseGlyphProviderOptions {
|
|
46
|
+
askForSignature?: boolean;
|
|
47
|
+
}
|
|
30
48
|
export type GlyphWidgetTokenBalancesItem = {
|
|
31
49
|
name: string;
|
|
32
50
|
symbol: string;
|
package/package.json
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@use-glyph/sdk-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "GLYPH-1.0",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/yuga-labs/glyph-sdk-react"
|
|
9
|
-
},
|
|
10
6
|
"sideEffects": false,
|
|
11
|
-
"main": "dist/
|
|
12
|
-
"module": "dist/
|
|
7
|
+
"main": "dist/glyph-widget.umd.js",
|
|
8
|
+
"module": "dist/glyph-widget.es.js",
|
|
13
9
|
"types": "dist/types/index.d.ts",
|
|
14
10
|
"exports": {
|
|
15
11
|
".": [
|
|
16
12
|
{
|
|
17
13
|
"types": "./dist/types/index.d.ts",
|
|
18
|
-
"require": "./dist/
|
|
19
|
-
"import": "./dist/
|
|
14
|
+
"require": "./dist/glyph-widget.umd.js",
|
|
15
|
+
"import": "./dist/glyph-widget.es.js"
|
|
20
16
|
}
|
|
21
17
|
],
|
|
22
18
|
"./*": [
|
|
@@ -58,31 +54,31 @@
|
|
|
58
54
|
"vite-plugin-dts": "^4.5.0"
|
|
59
55
|
},
|
|
60
56
|
"peerDependencies": {
|
|
61
|
-
"@privy-io/cross-app-connect": "^0.2.
|
|
62
|
-
"@privy-io/react-auth": "^2.
|
|
57
|
+
"@privy-io/cross-app-connect": "^0.2.1",
|
|
58
|
+
"@privy-io/react-auth": "^2.13.1",
|
|
63
59
|
"@privy-io/wagmi": "^1.0.3",
|
|
64
60
|
"@rainbow-me/rainbowkit": "^2.2.4",
|
|
65
|
-
"@tanstack/react-query": "^5.
|
|
66
|
-
"react": "
|
|
67
|
-
"react-dom": "
|
|
68
|
-
"@types/react": "
|
|
69
|
-
"@types/react-dom": "
|
|
70
|
-
"viem": "^2.
|
|
71
|
-
"wagmi": "^2.
|
|
61
|
+
"@tanstack/react-query": "^5.76.0",
|
|
62
|
+
"react": "^18.3.0",
|
|
63
|
+
"react-dom": "^18.3.0",
|
|
64
|
+
"@types/react": "^18.3.0",
|
|
65
|
+
"@types/react-dom": "^18.3.0",
|
|
66
|
+
"viem": "^2.29.2",
|
|
67
|
+
"wagmi": "^2.15.2"
|
|
72
68
|
},
|
|
73
69
|
"dependencies": {
|
|
74
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
75
|
-
"@radix-ui/react-dialog": "1.1.
|
|
76
|
-
"@radix-ui/react-popover": "^1.1.
|
|
77
|
-
"@radix-ui/react-select": "2.
|
|
78
|
-
"@radix-ui/react-slot": "^1.
|
|
79
|
-
"@radix-ui/react-tooltip": "1.
|
|
70
|
+
"@radix-ui/react-accordion": "^1.2.10",
|
|
71
|
+
"@radix-ui/react-dialog": "1.1.13",
|
|
72
|
+
"@radix-ui/react-popover": "^1.1.13",
|
|
73
|
+
"@radix-ui/react-select": "2.2.4",
|
|
74
|
+
"@radix-ui/react-slot": "^1.2.2",
|
|
75
|
+
"@radix-ui/react-tooltip": "1.2.6",
|
|
80
76
|
"@types/throttle-debounce": "5.0.2",
|
|
81
77
|
"class-variance-authority": "^0.7.1",
|
|
82
78
|
"clsx": "^2.1.1",
|
|
83
|
-
"lucide-react": "^0.
|
|
79
|
+
"lucide-react": "^0.510.0",
|
|
84
80
|
"qrcode.react": "^4.2.0",
|
|
85
|
-
"sonner": "
|
|
81
|
+
"sonner": "2.0.3",
|
|
86
82
|
"tailwind-merge": "^2.6.0",
|
|
87
83
|
"tailwindcss-animate": "^1.0.7",
|
|
88
84
|
"throttle-debounce": "5.0.2",
|
package/dist/sdk-react.es.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { x as e, w as l, G as t, y as o, e as G, o as P, q as n, f as p, I as r, L as y, g as i, z as _, S as g, h, p as u, n as I, r as L, s as v, t as A, u as H, k as Y, l as c, m as d, v as C, A as N } from "./index.js";
|
|
2
|
-
export {
|
|
3
|
-
e as GLYPH_APP_LOGIN_METHOD,
|
|
4
|
-
l as GLYPH_ICON_URL,
|
|
5
|
-
t as GLYPH_PRIVY_APP_ID,
|
|
6
|
-
o as GlyphPrivyProvider,
|
|
7
|
-
G as GlyphProvider,
|
|
8
|
-
P as GlyphView,
|
|
9
|
-
n as GlyphWalletProvider,
|
|
10
|
-
p as GlyphWidget,
|
|
11
|
-
r as InjectWagmiConnector,
|
|
12
|
-
y as LoginButton,
|
|
13
|
-
i as LogoutButton,
|
|
14
|
-
_ as STAGING_GLYPH_APP_LOGIN_METHOD,
|
|
15
|
-
g as STAGING_GLYPH_PRIVY_APP_ID,
|
|
16
|
-
h as SignUpButton,
|
|
17
|
-
u as StrategyType,
|
|
18
|
-
I as glyphConnectorDetails,
|
|
19
|
-
L as glyphWalletConnector,
|
|
20
|
-
v as glyphWalletRK,
|
|
21
|
-
A as glyphWalletRKStaging,
|
|
22
|
-
H as useBalances,
|
|
23
|
-
Y as useGlyph,
|
|
24
|
-
c as useGlyphFunding,
|
|
25
|
-
d as useGlyphView,
|
|
26
|
-
C as useNativeGlyphConnection,
|
|
27
|
-
N as usePrivyCrossAppProvider
|
|
28
|
-
};
|