fare-privy-core 1.4.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 +26 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -1
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.
|
|
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
|
-
- **๐ช
|
|
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
|
-
|
|
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
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* fare-privy-core - v1.
|
|
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
7
|
export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, useAuthActions, } from "./hooks/useWallets.js";
|
|
8
8
|
/**
|
|
9
|
-
* โ
PRODUCTION READY - v1.
|
|
9
|
+
* โ
PRODUCTION READY - v1.4.0:
|
|
10
10
|
*
|
|
11
11
|
* โ
Dependencies: Tightened version constraints for stability
|
|
12
12
|
* โ
Build System: TypeScript compilation working flawlessly
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* fare-privy-core - v1.
|
|
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
|
|
@@ -11,7 +11,7 @@ export { useConnectedWallets, useWalletAddresses, useIsAuthenticated, useAuthAct
|
|
|
11
11
|
// โ REMOVED - Had too many external dependencies
|
|
12
12
|
// export * from "./farePrivy/modals/index.js";
|
|
13
13
|
/**
|
|
14
|
-
* โ
PRODUCTION READY - v1.
|
|
14
|
+
* โ
PRODUCTION READY - v1.4.0:
|
|
15
15
|
*
|
|
16
16
|
* โ
Dependencies: Tightened version constraints for stability
|
|
17
17
|
* โ
Build System: TypeScript compilation working flawlessly
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fare-privy-core",
|
|
3
|
-
"version": "1.
|
|
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",
|