fare-privy-core 1.3.0 โ†’ 1.5.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.
package/README.md CHANGED
@@ -2,14 +2,15 @@
2
2
 
3
3
  A lightweight React library for Privy authentication and wallet management, designed for casino and gaming applications on **Ethereum and Solana**.
4
4
 
5
- ## ๐Ÿš€ Current Features (v1.3.0)
5
+ ## ๐Ÿš€ Current Features (v1.5.0)
6
6
 
7
- - **๐Ÿ” Real Privy Auth**: Full Privy authentication integration
7
+ - **๐Ÿ” Real Privy Auth**: Full Privy authentication integration with login/logout
8
8
  - **๐ŸŽฐ Casino-Ready**: Pre-configured for casino/gaming use cases
9
9
  - **โ›“๏ธ Multi-Chain**: Support for both Ethereum and Solana networks
10
10
  - **๐Ÿ’ผ Wallet State**: Valtio-based wallet switching state management
11
11
  - **๐ŸŽจ Themeable**: Customize colors and branding per casino
12
- - **๐Ÿช Simple Hooks**: 3 dependency-free hooks for wallet operations
12
+ - **๐Ÿช Complete Hooks**: 4 dependency-free hooks including auth actions
13
+ - **๐Ÿšช Login/Logout**: Easy authentication control for casino entry/exit
13
14
  - **โšก TypeScript**: Full TypeScript support with type declarations
14
15
  - **๐Ÿงช Tested**: Complete test suite
15
16
  - **๐Ÿ“ฆ Lightweight**: Minimal dependencies, focused API
@@ -192,7 +193,28 @@ function MultiChainCasino() {
192
193
 
193
194
  ## ๐Ÿช Using Wallet Hooks
194
195
 
195
- Three simple, **dependency-free** hooks to access wallet data in your casino:
196
+ Four simple, **dependency-free** hooks to access wallet data and control authentication in your casino:
197
+
198
+ ### `useAuthActions()` - Login & Logout Control
199
+
200
+ ```tsx
201
+ import { useAuthActions } from 'fare-privy-core';
202
+
203
+ function CasinoEntry() {
204
+ const { login, logout, isAuthenticated, isReady } = useAuthActions();
205
+
206
+ if (!isAuthenticated) {
207
+ return <button onClick={login}>๐ŸŽฐ Enter Casino</button>;
208
+ }
209
+
210
+ return (
211
+ <div>
212
+ <span>Welcome to the Casino!</span>
213
+ <button onClick={logout}>Exit</button>
214
+ </div>
215
+ );
216
+ }
217
+ ```
196
218
 
197
219
  ### `useConnectedWallets()` - Get all wallet info
198
220
 
@@ -47,4 +47,17 @@ export declare const useIsAuthenticated: () => {
47
47
  /** Privy ready state */
48
48
  isReady: boolean;
49
49
  };
50
+ /**
51
+ * Handle user login - perfect for casino entry buttons
52
+ */
53
+ export declare const useAuthActions: () => {
54
+ /** Login function - opens Privy modal */
55
+ login: (options?: import("@privy-io/react-auth").LoginModalOptions | import("react").MouseEvent<any, any>) => void;
56
+ /** Logout function - disconnects user */
57
+ logout: () => Promise<void>;
58
+ /** Whether actions are ready to use */
59
+ isReady: boolean;
60
+ /** Whether user is currently authenticated */
61
+ isAuthenticated: boolean;
62
+ };
50
63
  //# sourceMappingURL=useWallets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWallets.d.ts","sourceRoot":"","sources":["../../hooks/useWallets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IA6B5B,mCAAmC;;IAEnC,uCAAuC;;IAEvC,sCAAsC;;IAEtC,0DAA0D;;IAE1D,oCAAoC;;IAEpC,6BAA6B;;CAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAoB3B,oCAAoC;;IAEpC,kCAAkC;;IAElC,+BAA+B;;IAE/B,6BAA6B;;CAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAQ3B,qDAAqD;;IAErD,6BAA6B;;IAE7B,kCAAkC;;IAElC,wBAAwB;;CAG3B,CAAC"}
1
+ {"version":3,"file":"useWallets.d.ts","sourceRoot":"","sources":["../../hooks/useWallets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IA6B5B,mCAAmC;;IAEnC,uCAAuC;;IAEvC,sCAAsC;;IAEtC,0DAA0D;;IAE1D,oCAAoC;;IAEpC,6BAA6B;;CAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAoB3B,oCAAoC;;IAEpC,kCAAkC;;IAElC,+BAA+B;;IAE/B,6BAA6B;;CAGhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAQ3B,qDAAqD;;IAErD,6BAA6B;;IAE7B,kCAAkC;;IAElC,wBAAwB;;CAG3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;IAMvB,yCAAyC;;IAEzC,yCAAyC;;IAEzC,uCAAuC;;IAEvC,8CAA8C;;CAGjD,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * No external dependencies - ready to use!
4
4
  */
5
5
  import { useMemo } from "react";
6
- import { usePrivy, useWallets as usePrivyWallets, } from "@privy-io/react-auth";
6
+ import { usePrivy, useWallets as usePrivyWallets, useLogin, useLogout, } from "@privy-io/react-auth";
7
7
  /**
8
8
  * Get active/connected wallets
9
9
  * Works with both Ethereum and Solana wallets
@@ -81,4 +81,22 @@ export const useIsAuthenticated = () => {
81
81
  isReady: ready,
82
82
  };
83
83
  };
84
+ /**
85
+ * Handle user login - perfect for casino entry buttons
86
+ */
87
+ export const useAuthActions = () => {
88
+ const { login } = useLogin();
89
+ const { logout } = useLogout();
90
+ const { ready, authenticated } = usePrivy();
91
+ return {
92
+ /** Login function - opens Privy modal */
93
+ login,
94
+ /** Logout function - disconnects user */
95
+ logout,
96
+ /** Whether actions are ready to use */
97
+ isReady: ready,
98
+ /** Whether user is currently authenticated */
99
+ isAuthenticated: authenticated,
100
+ };
101
+ };
84
102
  //# sourceMappingURL=useWallets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWallets.js","sourceRoot":"","sources":["../../hooks/useWallets.ts"],"names":[],"mappings":"AAA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ACzC,MAAM;QACN,uCAAuC;QACvC,OAAO,EAAE,KAAK;QACd,8CAA8C;QAC9C,eAAe,EAAE,aAAa;KAC/B,CAAC;AACJ,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * fare-privy-core - v1.3.0 - Streamlined Package
2
+ * fare-privy-core - v1.5.0 - Streamlined Package
3
3
  * This package exports core functionality without external app dependencies.
4
4
  */
5
5
  export { PrivyProvider, type PrivyProviderProps } from "./PrivyProviderTest.js";
6
6
  export * from "./farePrivy/store/switchWallet.js";
7
- export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./hooks/useWallets.js";
7
+ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, useAuthActions, } from "./hooks/useWallets.js";
8
8
  /**
9
- * โœ… PRODUCTION READY - v1.3.0:
9
+ * โœ… PRODUCTION READY - v1.4.0:
10
10
  *
11
11
  * โœ… Dependencies: Tightened version constraints for stability
12
12
  * โœ… Build System: TypeScript compilation working flawlessly
@@ -22,6 +22,7 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
22
22
  * - useConnectedWallets: Get connected wallets (embedded/external)
23
23
  * - useWalletAddresses: Get Ethereum & Solana addresses
24
24
  * - useIsAuthenticated: Check authentication status
25
+ * - useAuthActions: Login/logout functions for casino entry
25
26
  *
26
27
  * ๐Ÿ’ก Configuration:
27
28
  * Users should provide their own Privy configuration.
@@ -34,7 +35,8 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
34
35
  * PrivyProvider,
35
36
  * useConnectedWallets,
36
37
  * useWalletAddresses,
37
- * useIsAuthenticated
38
+ * useIsAuthenticated,
39
+ * useAuthActions
38
40
  * } from 'fare-privy-core';
39
41
  *
40
42
  * // 1. Wrap your app
@@ -51,13 +53,21 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
51
53
  *
52
54
  * // 2. Use hooks in your casino components
53
55
  * function YourCasino() {
54
- * const { primaryWallet, embeddedWallet, externalWallet } = useConnectedWallets();
55
- * const { primarySolanaAddress, primaryEthereumAddress } = useWalletAddresses();
56
- * const { isAuthenticated, user } = useIsAuthenticated();
56
+ * const { primaryWallet } = useConnectedWallets();
57
+ * const { primarySolanaAddress } = useWalletAddresses();
58
+ * const { isAuthenticated } = useIsAuthenticated();
59
+ * const { login, logout } = useAuthActions();
57
60
  *
58
- * if (!isAuthenticated) return <LoginButton />;
61
+ * if (!isAuthenticated) {
62
+ * return <button onClick={login}>๐ŸŽฐ Enter Casino</button>;
63
+ * }
59
64
  *
60
- * return <div>Welcome {primaryWallet?.address}</div>;
65
+ * return (
66
+ * <div>
67
+ * <span>Welcome {primaryWallet?.address}</span>
68
+ * <button onClick={logout}>Exit</button>
69
+ * </div>
70
+ * );
61
71
  * }
62
72
  * ```
63
73
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * fare-privy-core - v1.3.0 - Streamlined Package
2
+ * fare-privy-core - v1.5.0 - Streamlined Package
3
3
  * This package exports core functionality without external app dependencies.
4
4
  */
5
5
  // โœ… CURRENT EXPORTS - Available Now
@@ -7,11 +7,11 @@ export { PrivyProvider } from "./PrivyProviderTest.js";
7
7
  // โœ… CORE FUNCTIONALITY - Working exports
8
8
  export * from "./farePrivy/store/switchWallet.js";
9
9
  // โœ… SIMPLIFIED WALLET HOOKS - No external dependencies!
10
- export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./hooks/useWallets.js";
10
+ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, useAuthActions, } from "./hooks/useWallets.js";
11
11
  // โŒ REMOVED - Had too many external dependencies
12
12
  // export * from "./farePrivy/modals/index.js";
13
13
  /**
14
- * โœ… PRODUCTION READY - v1.3.0:
14
+ * โœ… PRODUCTION READY - v1.4.0:
15
15
  *
16
16
  * โœ… Dependencies: Tightened version constraints for stability
17
17
  * โœ… Build System: TypeScript compilation working flawlessly
@@ -27,6 +27,7 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
27
27
  * - useConnectedWallets: Get connected wallets (embedded/external)
28
28
  * - useWalletAddresses: Get Ethereum & Solana addresses
29
29
  * - useIsAuthenticated: Check authentication status
30
+ * - useAuthActions: Login/logout functions for casino entry
30
31
  *
31
32
  * ๐Ÿ’ก Configuration:
32
33
  * Users should provide their own Privy configuration.
@@ -39,7 +40,8 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
39
40
  * PrivyProvider,
40
41
  * useConnectedWallets,
41
42
  * useWalletAddresses,
42
- * useIsAuthenticated
43
+ * useIsAuthenticated,
44
+ * useAuthActions
43
45
  * } from 'fare-privy-core';
44
46
  *
45
47
  * // 1. Wrap your app
@@ -56,13 +58,21 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, } from "./
56
58
  *
57
59
  * // 2. Use hooks in your casino components
58
60
  * function YourCasino() {
59
- * const { primaryWallet, embeddedWallet, externalWallet } = useConnectedWallets();
60
- * const { primarySolanaAddress, primaryEthereumAddress } = useWalletAddresses();
61
- * const { isAuthenticated, user } = useIsAuthenticated();
61
+ * const { primaryWallet } = useConnectedWallets();
62
+ * const { primarySolanaAddress } = useWalletAddresses();
63
+ * const { isAuthenticated } = useIsAuthenticated();
64
+ * const { login, logout } = useAuthActions();
62
65
  *
63
- * if (!isAuthenticated) return <LoginButton />;
66
+ * if (!isAuthenticated) {
67
+ * return <button onClick={login}>๐ŸŽฐ Enter Casino</button>;
68
+ * }
64
69
  *
65
- * return <div>Welcome {primaryWallet?.address}</div>;
70
+ * return (
71
+ * <div>
72
+ * <span>Welcome {primaryWallet?.address}</span>
73
+ * <button onClick={logout}>Exit</button>
74
+ * </div>
75
+ * );
66
76
  * }
67
77
  * ```
68
78
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oCAAoC;AACpC,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;AAEhF,yCAAyC;AACzC,cAAc,mCAAmC,CAAC;AAElD,wDAAwD;AACxD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,iDAAiD;AACjD,+CAA+C;AAE/C;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oCAAoC;AACpC,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;AAEhF,yCAAyC;AACzC,cAAc,mCAAmC,CAAC;AAElD,wDAAwD;AACxD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,iDAAiD;AACjD,+CAA+C;AAE/C;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fare-privy-core",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "A comprehensive React library for Privy authentication and wallet management with casino gaming features",
5
5
  "keywords": [
6
6
  "privy",
@@ -63,6 +63,7 @@
63
63
  "@privy-io/wagmi": "^0.2.12",
64
64
  "@sentry/react": "^7.99.0",
65
65
  "axios": "^1.6.2",
66
+ "fare-privy-core": "^1.4.0",
66
67
  "framer-motion": "^10.16.16",
67
68
  "numeral": "^2.0.6",
68
69
  "react-countup": "^6.5.0",