@use-glyph/sdk-react 0.0.1 → 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.
@@ -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 GlyphProviderOptions {
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,18 +1,18 @@
1
1
  {
2
2
  "name": "@use-glyph/sdk-react",
3
- "version": "0.0.1",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "license": "GLYPH-1.0",
6
6
  "sideEffects": false,
7
- "main": "dist/sdk-react.umd.js",
8
- "module": "dist/sdk-react.es.js",
7
+ "main": "dist/glyph-widget.umd.js",
8
+ "module": "dist/glyph-widget.es.js",
9
9
  "types": "dist/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": [
12
12
  {
13
13
  "types": "./dist/types/index.d.ts",
14
- "require": "./dist/sdk-react.umd.js",
15
- "import": "./dist/sdk-react.es.js"
14
+ "require": "./dist/glyph-widget.umd.js",
15
+ "import": "./dist/glyph-widget.es.js"
16
16
  }
17
17
  ],
18
18
  "./*": [
@@ -54,31 +54,31 @@
54
54
  "vite-plugin-dts": "^4.5.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@privy-io/cross-app-connect": "^0.2.0",
58
- "@privy-io/react-auth": "^2.8.3",
57
+ "@privy-io/cross-app-connect": "^0.2.1",
58
+ "@privy-io/react-auth": "^2.13.1",
59
59
  "@privy-io/wagmi": "^1.0.3",
60
60
  "@rainbow-me/rainbowkit": "^2.2.4",
61
- "@tanstack/react-query": "^5.71.10",
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.23.13",
67
- "wagmi": "^2.14.11"
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"
68
68
  },
69
69
  "dependencies": {
70
- "@radix-ui/react-accordion": "^1.2.3",
71
- "@radix-ui/react-dialog": "1.1.6",
72
- "@radix-ui/react-popover": "^1.1.6",
73
- "@radix-ui/react-select": "2.1.6",
74
- "@radix-ui/react-slot": "^1.1.2",
75
- "@radix-ui/react-tooltip": "1.1.8",
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",
76
76
  "@types/throttle-debounce": "5.0.2",
77
77
  "class-variance-authority": "^0.7.1",
78
78
  "clsx": "^2.1.1",
79
- "lucide-react": "^0.474.0",
79
+ "lucide-react": "^0.510.0",
80
80
  "qrcode.react": "^4.2.0",
81
- "sonner": "1.7.4",
81
+ "sonner": "2.0.3",
82
82
  "tailwind-merge": "^2.6.0",
83
83
  "tailwindcss-animate": "^1.0.7",
84
84
  "throttle-debounce": "5.0.2",
@@ -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
- };