@talken/talkenkit 2.7.5-beta.3 → 2.7.5-beta.4

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.
Files changed (43) hide show
  1. package/README.md +287 -0
  2. package/dist/abcWallet-LKCI4CKL.js +184 -0
  3. package/dist/chunk-AUHDS56C.js +7852 -0
  4. package/dist/hooks/useMultiChainBalances.d.ts +1 -1
  5. package/dist/hooks/useXrplWallet.d.ts +2 -0
  6. package/dist/index.css +1338 -1338
  7. package/dist/index.js +717 -701
  8. package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +1 -1
  9. package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +2 -2
  10. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +3 -3
  11. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -3
  12. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +14 -14
  13. package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +7 -7
  14. package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +11 -11
  15. package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
  16. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +15 -15
  17. package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.d.ts +4 -0
  18. package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.js +3 -3
  19. package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +7 -7
  20. package/dist/wallets/walletConnectors/abcWallet/api/index.js +10 -10
  21. package/dist/wallets/walletConnectors/abcWallet/api/modules/auth.js +1 -1
  22. package/dist/wallets/walletConnectors/abcWallet/api/modules/wallet.d.ts +1 -1
  23. package/dist/wallets/walletConnectors/abcWallet/api/modules/xrp.d.ts +5 -0
  24. package/dist/wallets/walletConnectors/abcWallet/api/modules/xrp.js +1 -1
  25. package/dist/wallets/walletConnectors/abcWallet/index.js +55 -55
  26. package/dist/wallets/walletConnectors/abcWallet/networkConfig.js +1 -1
  27. package/dist/wallets/walletConnectors/abcWallet/types/api.types.d.ts +13 -0
  28. package/dist/wallets/walletConnectors/abcWallet/types.js +1 -1
  29. package/dist/wallets/walletConnectors/abcWallet/utils.js +1 -1
  30. package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +5 -5
  31. package/dist/wallets/walletConnectors/chunk-3F5K7F23.js +370 -0
  32. package/dist/wallets/walletConnectors/chunk-6NCKGQS2.js +58 -0
  33. package/dist/wallets/walletConnectors/chunk-C3HMOBQJ.js +370 -0
  34. package/dist/wallets/walletConnectors/chunk-DPQKYZHU.js +341 -0
  35. package/dist/wallets/walletConnectors/chunk-EVRAPZ3L.js +3030 -0
  36. package/dist/wallets/walletConnectors/chunk-FNGIOKCY.js +341 -0
  37. package/dist/wallets/walletConnectors/chunk-KXPCOVNY.js +215 -0
  38. package/dist/wallets/walletConnectors/chunk-ND2EIWHQ.js +345 -0
  39. package/dist/wallets/walletConnectors/chunk-SFDW4JEL.js +218 -0
  40. package/dist/wallets/walletConnectors/chunk-Y27URHIQ.js +58 -0
  41. package/dist/wallets/walletConnectors/chunk-ZOBSRU6L.js +137 -0
  42. package/dist/wallets/walletConnectors/index.js +77 -77
  43. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,287 @@
1
+ # TalkenKit
2
+
3
+ ## Enhanced wallet connection library with embedded wallet support
4
+
5
+ TalkenKit is a React library for wallet connection, forked from [RainbowKit](https://rainbowkit.com), with integrated ABC WaaS (Wallet-as-a-Service) support for embedded wallets.
6
+
7
+ ## Features
8
+
9
+ - 🔐 **Embedded Wallets** - Email and social login (Google, Apple, Telegram, X)
10
+ - 🌈 **Traditional Wallets** - 60+ wallet connectors (MetaMask, WalletConnect, etc.)
11
+ - ⛓️ **Multi-Chain** - EVM and Solana chains with auto-reconnect support
12
+ - 🔑 **MPC Security** - No seed phrases, MPC-based key management
13
+ - 🎨 **Customizable** - Built on wagmi and viem with full theming support
14
+ - 🔄 **Auto-Reconnect** - External wallets automatically reconnect after page refresh
15
+
16
+ ## Quick Start
17
+
18
+ ### Create New App
19
+
20
+ Scaffold a new TalkenKit + wagmi + Next.js app:
21
+
22
+ ```bash
23
+ npm create @talken/talkenkit@latest
24
+ # or
25
+ pnpm create @talken/talkenkit@latest
26
+ # or
27
+ yarn create @talken/talkenkit
28
+ ```
29
+
30
+ ### Add to Existing App
31
+
32
+ ```bash
33
+ npm install @talken/talkenkit wagmi viem @tanstack/react-query
34
+ # or
35
+ pnpm add @talken/talkenkit wagmi viem @tanstack/react-query
36
+ ```
37
+
38
+ ## Basic Usage
39
+
40
+ ```typescript
41
+ import '@talken/talkenkit/styles.css';
42
+ import { getDefaultConfig, TalkenKitProvider, ConnectButton } from '@talken/talkenkit';
43
+ import { WagmiProvider } from 'wagmi';
44
+ import { mainnet, polygon } from 'wagmi/chains';
45
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
46
+
47
+ const config = getDefaultConfig({
48
+ appName: 'My App',
49
+ projectId: 'YOUR_WALLETCONNECT_PROJECT_ID',
50
+ chains: [mainnet, polygon],
51
+ });
52
+
53
+ const queryClient = new QueryClient();
54
+
55
+ function App() {
56
+ return (
57
+ <WagmiProvider config={config}>
58
+ <QueryClientProvider client={queryClient}>
59
+ <TalkenKitProvider>
60
+ <ConnectButton />
61
+ </TalkenKitProvider>
62
+ </QueryClientProvider>
63
+ </WagmiProvider>
64
+ );
65
+ }
66
+ ```
67
+
68
+ ## ABC WaaS Integration
69
+
70
+ Enable embedded wallets with email and social login:
71
+
72
+ ```typescript
73
+ import { abcWallet } from '@talken/talkenkit/wallets';
74
+
75
+ const config = getDefaultConfig({
76
+ appName: 'My App',
77
+ projectId: 'YOUR_WALLETCONNECT_PROJECT_ID',
78
+ chains: [mainnet, polygon],
79
+ wallets: [{
80
+ groupName: 'Embedded',
81
+ wallets: [abcWallet()],
82
+ }],
83
+ });
84
+ ```
85
+
86
+ **Environment Variables:**
87
+
88
+ ```bash
89
+ # Required — Talken API (proxies all WaaS calls)
90
+ NEXT_PUBLIC_TALKEN_API_URL=https://api.talken.io/api/v1
91
+
92
+ # Required — Environment (production | development)
93
+ NEXT_PUBLIC_ENVIRONMENT=production
94
+
95
+ # Optional — Firebase (for Google social login)
96
+ NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
97
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
98
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project
99
+ NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
100
+ NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
101
+ NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
102
+
103
+ # Optional — Social OAuth (enable via NEXT_PUBLIC_*_OAUTH_ENABLED=true)
104
+ NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED=true
105
+ NEXT_PUBLIC_APPLE_OAUTH_ENABLED=true
106
+ NEXT_PUBLIC_APPLE_OAUTH_CLIENT_ID=your_apple_client_id
107
+ NEXT_PUBLIC_KAKAO_OAUTH_ENABLED=true
108
+ NEXT_PUBLIC_KAKAO_JS_KEY=your_kakao_js_key
109
+ NEXT_PUBLIC_KAKAO_REST_API_KEY=your_kakao_rest_api_key
110
+ ```
111
+
112
+ > **Note**: `NEXT_PUBLIC_ABC_WAAS_URL` is no longer needed. All WaaS calls are proxied through `NEXT_PUBLIC_TALKEN_API_URL` (talken-api).
113
+
114
+ For detailed configuration options, see [Configuration Guide](./docs/configuration.md).
115
+
116
+ ## Documentation
117
+
118
+ **Quick Start:**
119
+
120
+ - [Package API Reference](./packages/talkenkit/README.md)
121
+ - [Configuration Guide](./docs/configuration.md)
122
+
123
+ **Technical:**
124
+
125
+ - [Architecture Documentation](./docs/architecture.md)
126
+ - [Development Guide](./CLAUDE.md)
127
+
128
+ **RainbowKit Compatibility:**
129
+
130
+ - [RainbowKit Documentation](https://rainbowkit.com) - API compatible
131
+
132
+ ## Examples
133
+
134
+ Interactive examples in the [examples](./examples/) directory:
135
+
136
+ **ABC WaaS:**
137
+
138
+ - `with-demo` - Full-featured demo with ABC WaaS and multi-chain support
139
+ - `with-abc-wallet` - ABC Wallet integration example
140
+
141
+ **Framework Examples:**
142
+
143
+ - `with-next` - Next.js Pages Router
144
+ - `with-next-app` - Next.js App Router
145
+ - `with-vite` - Vite + React
146
+ - `with-create-react-app` - Create React App
147
+ - `with-remix` - Remix
148
+
149
+ **Advanced:**
150
+
151
+ - `with-next-custom-button` - Custom connect button
152
+ - `with-next-mint-nft` - NFT minting example
153
+ - `with-next-siwe-next-auth` - Sign-In with Ethereum (NextAuth)
154
+ - `with-next-siwe-iron-session` - Sign-In with Ethereum (Iron Session)
155
+
156
+ ### Running Examples
157
+
158
+ ```bash
159
+ # Install dependencies
160
+ pnpm install
161
+
162
+ # Run an example
163
+ cd examples/with-demo
164
+ pnpm run dev
165
+ ```
166
+
167
+ Demo will be available at <http://localhost:3000>
168
+
169
+ ## Development
170
+
171
+ ### Setup
172
+
173
+ ```bash
174
+ # Install dependencies
175
+ pnpm install
176
+
177
+ # Build all packages
178
+ pnpm run build
179
+
180
+ # Build TalkenKit only
181
+ pnpm --filter @talken/talkenkit build
182
+
183
+ # Development mode
184
+ pnpm run dev
185
+ ```
186
+
187
+ ### Project Structure
188
+
189
+ ```text
190
+ talken-kit/
191
+ ├── packages/
192
+ │ ├── talkenkit/ # Main library
193
+ │ ├── talken-button/ # Standalone button
194
+ │ └── create-talkenkit/ # CLI scaffolding
195
+ │
196
+ ├── examples/ # Example applications
197
+ │ ├── with-demo/ # ABC WaaS demo
198
+ │ ├── with-next/ # Next.js example
199
+ │ └── ...
200
+ │
201
+ └── docs/ # Documentation
202
+ ├── architecture.md
203
+ ├── configuration.md
204
+ └── solana.md
205
+ ```
206
+
207
+ ## Key Features
208
+
209
+ ### Embedded Wallets (ABC WaaS)
210
+
211
+ - Email/Social login integration
212
+ - Multi-chain support (EVM + Solana)
213
+ - MPC-based key management
214
+ - PIN-based security
215
+ - No seed phrases required
216
+
217
+ ### Traditional Wallet Support
218
+
219
+ - 60+ wallet connectors
220
+ - WalletConnect v2
221
+ - EIP-6963 multi-injected provider support
222
+ - Automatic wallet detection
223
+
224
+ ### Multi-Chain Support
225
+
226
+ - **EVM**: Ethereum, Polygon, Optimism, Arbitrum, and more
227
+ - **Solana**: Mainnet and Devnet support
228
+ - Dual wallet generation
229
+ - Unified signing interface
230
+
231
+ ### Developer Experience
232
+
233
+ - RainbowKit API compatible
234
+ - TypeScript support
235
+ - React 19 ready
236
+ - Built on Wagmi v2 and Viem v2
237
+ - Vanilla Extract for type-safe styling
238
+
239
+ ## Migration from RainbowKit
240
+
241
+ TalkenKit is a drop-in replacement for RainbowKit:
242
+
243
+ ```diff
244
+ - import '@rainbow-me/rainbowkit/styles.css';
245
+ - import { getDefaultConfig, RainbowKitProvider, ConnectButton } from '@rainbow-me/rainbowkit';
246
+ + import '@talken/talkenkit/styles.css';
247
+ + import { getDefaultConfig, TalkenKitProvider, ConnectButton } from '@talken/talkenkit';
248
+ ```
249
+
250
+ **Note**: Both `TalkenKitProvider` and `RainbowKitProvider` work (they're the same component). Use `TalkenKitProvider` for TalkenKit branding, or keep `RainbowKitProvider` for RainbowKit compatibility.
251
+
252
+ See [CLAUDE.md](./CLAUDE.md) for detailed migration guide.
253
+
254
+ ## Technology Stack
255
+
256
+ - **React** 19
257
+ - **TypeScript** 5.5
258
+ - **Wagmi** 2.14
259
+ - **Viem** 2.21
260
+ - **TanStack Query** 5
261
+ - **Vanilla Extract** - Type-safe CSS-in-JS
262
+
263
+ ## Contributing
264
+
265
+ Please follow our [contributing guidelines](/.github/CONTRIBUTING.md).
266
+
267
+ ## Security
268
+
269
+ For security best practices and implementation details, see:
270
+
271
+ - [Security in Package README](./packages/talkenkit/README.md#security)
272
+ - [Architecture Security](./docs/architecture.md)
273
+
274
+ ## License
275
+
276
+ Licensed under the MIT License, Copyright © 2022-present [Rainbow](https://rainbow.me).
277
+
278
+ Forked and enhanced by [Talken](https://talken.io).
279
+
280
+ See [LICENSE](/LICENSE) for more information.
281
+
282
+ ## Links
283
+
284
+ - **Documentation**: [docs/](./docs/)
285
+ - **Package**: [@talken/talkenkit](./packages/talkenkit/)
286
+ - **Examples**: [examples/](./examples/)
287
+ - **RainbowKit**: [rainbowkit.com](https://rainbowkit.com)
@@ -0,0 +1,184 @@
1
+ "use client";
2
+ import {
3
+ AbcBitcoinConnector,
4
+ AbcBitcoinProvider,
5
+ AbcError,
6
+ AbcErrorCode,
7
+ AbcEvmProvider,
8
+ AbcSolanaProvider,
9
+ AbcStorageKey,
10
+ AbcTronProvider,
11
+ AbcXrplProvider,
12
+ BITCOIN_NETWORKS,
13
+ BitcoinNetwork,
14
+ BitcoinProviderError,
15
+ ConfigApi,
16
+ GasApi,
17
+ SESSION_EXPIRED_EVENT,
18
+ SessionExpiredError,
19
+ SolanaApi,
20
+ SolanaNetwork,
21
+ SolanaProviderError,
22
+ TRON_NETWORKS,
23
+ TalkenApiClient,
24
+ TokenApi,
25
+ TronNetwork,
26
+ TronProviderError,
27
+ WalletscanApi,
28
+ XRPL_NETWORKS,
29
+ XrplNetwork,
30
+ XrplProviderError,
31
+ abcConnector,
32
+ abcWallet,
33
+ calculateExpiryTimestamp,
34
+ cancelProactiveRefresh,
35
+ clearAuthState,
36
+ clearSession,
37
+ clearStorage,
38
+ createAbcBitcoinConnector,
39
+ createAbcError,
40
+ createAbcEvmProvider,
41
+ createAbcProvider,
42
+ createTalkenApiClient,
43
+ dispatchSessionExpired,
44
+ fetchWithSessionCheck,
45
+ generateMpcWallets,
46
+ getBitcoinNetwork,
47
+ getEvmNetwork,
48
+ getSolanaNetwork,
49
+ getStorageKey,
50
+ getTronNetwork,
51
+ getXrplNetwork,
52
+ handleUnauthorizedResponse,
53
+ hashPin,
54
+ hexToNumber,
55
+ isTokenExpired,
56
+ isXrplNetwork,
57
+ loadAuthState,
58
+ loadFromStorage,
59
+ numberToHex,
60
+ recoverMpcWallets,
61
+ refreshAccessToken,
62
+ removeFromStorage,
63
+ saveAuthState,
64
+ saveToStorage,
65
+ scheduleProactiveRefresh,
66
+ setupVisibilityRefresh,
67
+ validateEmail,
68
+ validateMpcWallets,
69
+ validatePin
70
+ } from "./chunk-AUHDS56C.js";
71
+ import "./chunk-R6ZE7JAZ.js";
72
+ import {
73
+ ABC_EVENTS,
74
+ ABC_FEATURES,
75
+ ABC_WALLET_METADATA,
76
+ AUTH_PROVIDERS,
77
+ BITCOIN_CHAIN_ID,
78
+ CHAIN_TYPES,
79
+ DEBUG_MODE,
80
+ DEFAULT_ABC_CONFIG,
81
+ ERROR_MESSAGES,
82
+ EVM_CHAINS,
83
+ MODAL_CONFIG,
84
+ PIN_CONFIG,
85
+ REQUEST_TIMEOUT,
86
+ RETRY_CONFIG,
87
+ SOCIAL_BUTTONS,
88
+ SOLANA_CHAIN_ID,
89
+ STORAGE_PREFIX,
90
+ STORAGE_VERSION,
91
+ SUCCESS_MESSAGES,
92
+ TOKEN_EXPIRY,
93
+ getCredentialManager
94
+ } from "./chunk-SUYKWM5G.js";
95
+ export {
96
+ ABC_EVENTS,
97
+ ABC_FEATURES,
98
+ ABC_WALLET_METADATA,
99
+ AUTH_PROVIDERS,
100
+ AbcBitcoinConnector,
101
+ BitcoinNetwork as AbcBitcoinNetwork,
102
+ AbcBitcoinProvider,
103
+ AbcError,
104
+ AbcErrorCode,
105
+ AbcEvmProvider,
106
+ SolanaNetwork as AbcSolanaNetwork,
107
+ AbcSolanaProvider,
108
+ AbcStorageKey,
109
+ TronNetwork as AbcTronNetwork,
110
+ AbcTronProvider,
111
+ XrplNetwork as AbcXrplNetwork,
112
+ AbcXrplProvider,
113
+ BITCOIN_CHAIN_ID,
114
+ BITCOIN_NETWORKS,
115
+ BitcoinProviderError,
116
+ CHAIN_TYPES,
117
+ ConfigApi,
118
+ DEBUG_MODE,
119
+ DEFAULT_ABC_CONFIG,
120
+ ERROR_MESSAGES,
121
+ EVM_CHAINS,
122
+ GasApi,
123
+ MODAL_CONFIG,
124
+ PIN_CONFIG,
125
+ REQUEST_TIMEOUT,
126
+ RETRY_CONFIG,
127
+ SESSION_EXPIRED_EVENT,
128
+ SOCIAL_BUTTONS,
129
+ SOLANA_CHAIN_ID,
130
+ STORAGE_PREFIX,
131
+ STORAGE_VERSION,
132
+ SUCCESS_MESSAGES,
133
+ SessionExpiredError,
134
+ SolanaApi,
135
+ SolanaProviderError,
136
+ TOKEN_EXPIRY,
137
+ TRON_NETWORKS,
138
+ TalkenApiClient,
139
+ TokenApi,
140
+ TronProviderError,
141
+ WalletscanApi,
142
+ XRPL_NETWORKS,
143
+ XrplProviderError,
144
+ abcConnector,
145
+ abcWallet,
146
+ calculateExpiryTimestamp,
147
+ cancelProactiveRefresh,
148
+ clearAuthState,
149
+ clearSession,
150
+ clearStorage,
151
+ createAbcBitcoinConnector,
152
+ createAbcError,
153
+ createAbcEvmProvider,
154
+ createAbcProvider,
155
+ createTalkenApiClient,
156
+ dispatchSessionExpired,
157
+ fetchWithSessionCheck,
158
+ generateMpcWallets,
159
+ getBitcoinNetwork,
160
+ getCredentialManager,
161
+ getEvmNetwork,
162
+ getSolanaNetwork,
163
+ getStorageKey,
164
+ getTronNetwork,
165
+ getXrplNetwork,
166
+ handleUnauthorizedResponse,
167
+ hashPin,
168
+ hexToNumber,
169
+ isTokenExpired,
170
+ isXrplNetwork,
171
+ loadAuthState,
172
+ loadFromStorage,
173
+ numberToHex,
174
+ recoverMpcWallets,
175
+ refreshAccessToken,
176
+ removeFromStorage,
177
+ saveAuthState,
178
+ saveToStorage,
179
+ scheduleProactiveRefresh,
180
+ setupVisibilityRefresh,
181
+ validateEmail,
182
+ validateMpcWallets,
183
+ validatePin
184
+ };