@blazium/ton-connect-mobile 1.1.5 → 1.2.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
@@ -1,18 +1,25 @@
1
- # TON Connect Mobile SDK
1
+ # @blazium/ton-connect-mobile
2
2
 
3
- Production-ready TON Connect Mobile SDK for React Native and Expo. This SDK implements the real TonConnect protocol for mobile applications using deep links and callbacks.
3
+ Production-ready TON Connect Mobile SDK for React Native and Expo. Implements the real TonConnect protocol for mobile applications using deep links and callbacks.
4
+
5
+ **Full compatibility with `@tonconnect/ui-react` API** - Use the same hooks, components, and functions you're familiar with!
4
6
 
5
7
  ## Features
6
8
 
7
- - ✅ **Real TonConnect Protocol** - Implements the actual protocol, not a mock
8
- - ✅ **Deep Link Wallet Connection** - Connect to wallets via deep links
9
+ - ✅ **Full `@tonconnect/ui-react` Compatibility** - Drop-in replacement
10
+ - ✅ **React Native & Expo Support** - Works with both Expo and React Native CLI
11
+ - ✅ **Android & iOS Support** - Full deep linking support
12
+ - ✅ **Multiple Wallet Support** - Tonkeeper, Tonhub, MyTonWallet, Telegram Wallet
13
+ - ✅ **Beautiful Wallet Selection Modal** - Built-in wallet picker UI
14
+ - ✅ **Transaction Signing** - Send transactions with wallet approval
15
+ - ✅ **Data Signing** - Sign arbitrary data for authentication
16
+ - ✅ **Transaction Builder Utilities** - Helper functions for building transactions
17
+ - ✅ **Connection Retry Logic** - Automatic retry with exponential backoff
18
+ - ✅ **Enhanced Error Messages** - Clear error messages with recovery suggestions
19
+ - ✅ **Wallet Availability Checking** - Check if wallets are available
9
20
  - ✅ **Session Persistence** - Maintains connection across app restarts
10
- - ✅ **Transaction Signing** - Send and sign transactions
11
- - ✅ **Signature Verification** - Verifies wallet signatures
12
- - ✅ **Cross-Platform** - Works with Expo Managed, Expo Bare, and React Native CLI
13
- - ⚠️ **Web Limitation** - Deep links (`tonconnect://`) only work on mobile devices (Android/iOS), not in web browsers
14
- - ✅ **TypeScript** - Fully typed with TypeScript
15
- - ✅ **Production Ready** - No placeholders, no mocks, ready for production use
21
+ - ✅ **TypeScript** - Full type safety
22
+ - ✅ **Production Ready** - Battle-tested implementation
16
23
 
17
24
  ## Installation
18
25
 
@@ -20,113 +27,266 @@ Production-ready TON Connect Mobile SDK for React Native and Expo. This SDK impl
20
27
  npm install @blazium/ton-connect-mobile
21
28
  ```
22
29
 
23
- ### Required Dependencies
24
-
25
- **IMPORTANT**: You must install `react-native-get-random-values` for secure random number generation:
30
+ ### Peer Dependencies
26
31
 
27
32
  ```bash
28
- npm install react-native-get-random-values
33
+ # For Expo projects
34
+ npm install expo-linking expo-crypto @react-native-async-storage/async-storage
35
+
36
+ # For React Native CLI projects
37
+ npm install @react-native-async-storage/async-storage react-native-get-random-values
29
38
  ```
30
39
 
31
- Then import it at the very top of your entry file (before any other imports):
40
+ ## Quick Start
41
+
42
+ ### React Integration (Recommended - @tonconnect/ui-react Compatible)
32
43
 
33
44
  ```typescript
34
- import 'react-native-get-random-values';
35
- // ... other imports
45
+ import { TonConnectUIProvider, useTonConnectUI, useTonWallet, TonConnectButton } from '@blazium/ton-connect-mobile/react';
46
+
47
+ function App() {
48
+ return (
49
+ <TonConnectUIProvider
50
+ config={{
51
+ manifestUrl: 'https://yourdomain.com/tonconnect-manifest.json',
52
+ scheme: 'myapp',
53
+ }}
54
+ >
55
+ <YourApp />
56
+ </TonConnectUIProvider>
57
+ );
58
+ }
59
+
60
+ function YourApp() {
61
+ const tonConnectUI = useTonConnectUI();
62
+ const wallet = useTonWallet();
63
+
64
+ return (
65
+ <View>
66
+ <TonConnectButton />
67
+ {wallet?.connected && (
68
+ <Text>Connected: {wallet.account?.address}</Text>
69
+ )}
70
+ </View>
71
+ );
72
+ }
36
73
  ```
37
74
 
38
- ### Peer Dependencies
75
+ ### Direct SDK Usage
76
+
77
+ ```typescript
78
+ import { TonConnectMobile } from '@blazium/ton-connect-mobile';
39
79
 
40
- The SDK requires one of the following storage solutions:
80
+ const ton = new TonConnectMobile({
81
+ manifestUrl: 'https://yourdomain.com/tonconnect-manifest.json',
82
+ scheme: 'myapp',
83
+ });
41
84
 
42
- - `@react-native-async-storage/async-storage` (for React Native CLI)
43
- - Expo's built-in AsyncStorage (for Expo)
85
+ // Connect to wallet
86
+ const wallet = await ton.connect();
87
+
88
+ // Send transaction
89
+ const response = await ton.sendTransaction({
90
+ validUntil: Date.now() + 5 * 60 * 1000,
91
+ messages: [
92
+ {
93
+ address: 'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIo',
94
+ amount: '10000000', // 0.01 TON
95
+ },
96
+ ],
97
+ });
44
98
 
45
- For Expo projects, also install:
99
+ // Sign data
100
+ const signed = await ton.signData('Hello, TON!', '1.0');
46
101
 
47
- ```bash
48
- npx expo install expo-linking expo-crypto @react-native-async-storage/async-storage
102
+ // Disconnect
103
+ await ton.disconnect();
49
104
  ```
50
105
 
51
- ## Usage
106
+ ## React Integration API
52
107
 
53
- ### Basic Setup
108
+ ### Components
109
+
110
+ #### `TonConnectUIProvider`
111
+
112
+ React context provider that wraps your app and provides TON Connect functionality.
54
113
 
55
114
  ```typescript
56
- import { TonConnectMobile } from '@blazium/ton-connect-mobile';
115
+ <TonConnectUIProvider config={config}>
116
+ <YourApp />
117
+ </TonConnectUIProvider>
118
+ ```
57
119
 
58
- const ton = new TonConnectMobile({
59
- manifestUrl: 'https://example.com/tonconnect-manifest.json',
60
- scheme: 'myapp', // Your app's deep link scheme
61
- });
120
+ #### `TonConnectButton`
121
+
122
+ Pre-built button component for connecting/disconnecting wallets.
123
+
124
+ ```typescript
125
+ <TonConnectButton
126
+ text="Connect Wallet"
127
+ connectedText="Disconnect"
128
+ onPress={() => {
129
+ // Custom handler (optional)
130
+ }}
131
+ />
62
132
  ```
63
133
 
64
- ### Connect to Wallet
134
+ ### Hooks
135
+
136
+ #### `useTonConnectUI()`
137
+
138
+ Access the TonConnectUI instance with all methods.
65
139
 
66
140
  ```typescript
67
- try {
68
- const wallet = await ton.connect();
69
- console.log('Connected to:', wallet.name);
70
- console.log('Address:', wallet.address);
71
- console.log('Public Key:', wallet.publicKey);
72
- } catch (error) {
73
- if (error instanceof UserRejectedError) {
74
- console.log('User rejected the connection');
75
- } else if (error instanceof ConnectionTimeoutError) {
76
- console.log('Connection timed out');
77
- } else {
78
- console.error('Connection failed:', error.message);
79
- }
80
- }
141
+ const tonConnectUI = useTonConnectUI();
142
+
143
+ // Methods:
144
+ await tonConnectUI.connectWallet();
145
+ await tonConnectUI.disconnect();
146
+ await tonConnectUI.sendTransaction({ ... });
147
+ await tonConnectUI.signData({ data: '...', version: '1.0' });
148
+ await tonConnectUI.openModal();
149
+ tonConnectUI.closeModal();
81
150
  ```
82
151
 
83
- ### Listen to Status Changes
152
+ #### `useTonWallet()`
153
+
154
+ Get current wallet state.
84
155
 
85
156
  ```typescript
86
- ton.onStatusChange((status) => {
87
- if (status.connected) {
88
- console.log('Wallet:', status.wallet?.name);
89
- console.log('Address:', status.wallet?.address);
90
- } else {
91
- console.log('Disconnected');
92
- }
157
+ const wallet = useTonWallet();
158
+
159
+ // wallet?.connected - boolean
160
+ // wallet?.account?.address - string
161
+ // wallet?.account?.publicKey - string
162
+ // wallet?.account?.chain - number
163
+ // wallet?.wallet?.name - string
164
+ ```
165
+
166
+ #### `useTonConnectModal()`
167
+
168
+ Access modal state and controls.
169
+
170
+ ```typescript
171
+ const modal = useTonConnectModal();
172
+
173
+ // modal.open - boolean
174
+ // modal.openModal() - Promise<void>
175
+ // modal.close() - void
176
+ ```
177
+
178
+ #### `useTonConnectSDK()`
179
+
180
+ Access the underlying SDK instance for advanced usage.
181
+
182
+ ```typescript
183
+ const sdk = useTonConnectSDK();
184
+
185
+ // Advanced methods:
186
+ sdk.setPreferredWallet('Tonhub');
187
+ sdk.getSupportedWallets();
188
+ ```
189
+
190
+ ## Direct SDK API
191
+
192
+ ### `TonConnectMobile`
193
+
194
+ Main SDK class.
195
+
196
+ #### Constructor
197
+
198
+ ```typescript
199
+ new TonConnectMobile(config: TonConnectMobileConfig)
200
+ ```
201
+
202
+ **Config Options:**
203
+
204
+ - `manifestUrl` (required): URL to your TonConnect manifest file
205
+ - `scheme` (required): Your app's deep link scheme
206
+ - `storageKeyPrefix` (optional): Prefix for storage keys (default: `'tonconnect_'`)
207
+ - `connectionTimeout` (optional): Connection timeout in ms (default: `30000`)
208
+ - `transactionTimeout` (optional): Transaction timeout in ms (default: `300000`)
209
+ - `skipCanOpenURLCheck` (optional): Skip canOpenURL check (default: `true` for Android compatibility)
210
+ - `preferredWallet` (optional): Default wallet name
211
+
212
+ #### Methods
213
+
214
+ ##### `connect(): Promise<WalletInfo>`
215
+
216
+ Connect to a wallet.
217
+
218
+ ```typescript
219
+ const wallet = await ton.connect();
220
+ ```
221
+
222
+ ##### `sendTransaction(request: SendTransactionRequest): Promise<{ boc: string; signature: string }>`
223
+
224
+ Send a transaction.
225
+
226
+ ```typescript
227
+ const response = await ton.sendTransaction({
228
+ validUntil: Date.now() + 5 * 60 * 1000, // 5 minutes
229
+ messages: [
230
+ {
231
+ address: 'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIo',
232
+ amount: '10000000', // 0.01 TON in nanotons
233
+ },
234
+ ],
93
235
  });
94
236
  ```
95
237
 
96
- ### Send Transaction
238
+ ##### `signData(data: string | Uint8Array, version?: string): Promise<{ signature: string; timestamp: number }>`
239
+
240
+ Sign arbitrary data.
97
241
 
98
242
  ```typescript
99
- try {
100
- const response = await ton.sendTransaction({
101
- validUntil: Date.now() + 5 * 60 * 1000, // 5 minutes
102
- messages: [
103
- {
104
- address: 'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIo',
105
- amount: '10000000', // 0.01 TON in nanotons
106
- },
107
- ],
108
- });
109
-
110
- console.log('Transaction BOC:', response.boc);
111
- console.log('Signature:', response.signature);
112
-
113
- // IMPORTANT: Transaction signatures must be verified server-side
114
- // The SDK does not perform cryptographic signature verification
115
- // Use @ton/core or @ton/crypto on your backend to verify signatures
116
- } catch (error) {
117
- if (error instanceof UserRejectedError) {
118
- console.log('User rejected the transaction');
119
- } else if (error instanceof TransactionTimeoutError) {
120
- console.log('Transaction timed out');
121
- } else if (error instanceof TransactionInProgressError) {
122
- console.log('Transaction already in progress');
123
- } else {
124
- console.error('Transaction failed:', error.message);
125
- }
126
- }
243
+ const signed = await ton.signData('Hello, TON!', '1.0');
127
244
  ```
128
245
 
129
- ### Platform Support
246
+ ##### `disconnect(): Promise<void>`
247
+
248
+ Disconnect from wallet.
249
+
250
+ ```typescript
251
+ await ton.disconnect();
252
+ ```
253
+
254
+ ##### `getStatus(): ConnectionStatus`
255
+
256
+ Get current connection status.
257
+
258
+ ```typescript
259
+ const status = ton.getStatus();
260
+ // { connected: boolean, wallet: WalletInfo | null }
261
+ ```
262
+
263
+ ##### `getSupportedWallets(): WalletDefinition[]`
264
+
265
+ Get list of supported wallets.
266
+
267
+ ```typescript
268
+ const wallets = ton.getSupportedWallets();
269
+ ```
270
+
271
+ ##### `setPreferredWallet(name: string): void`
272
+
273
+ Set preferred wallet.
274
+
275
+ ```typescript
276
+ ton.setPreferredWallet('Tonhub');
277
+ ```
278
+
279
+ ##### `onStatusChange(callback: (status: ConnectionStatus) => void): () => void`
280
+
281
+ Subscribe to connection status changes.
282
+
283
+ ```typescript
284
+ const unsubscribe = ton.onStatusChange((status) => {
285
+ console.log('Status changed:', status);
286
+ });
287
+ ```
288
+
289
+ ## Platform Support
130
290
 
131
291
  **⚠️ Important**: TON Connect deep links (`tonconnect://`) only work on **mobile devices** (Android/iOS). They do not work in web browsers.
132
292
 
@@ -141,12 +301,6 @@ try {
141
301
  - iOS device or simulator
142
302
  - Not web browsers
143
303
 
144
- ### Disconnect
145
-
146
- ```typescript
147
- await ton.disconnect();
148
- ```
149
-
150
304
  ## Configuration
151
305
 
152
306
  ### Expo Setup
@@ -198,93 +352,218 @@ Create a `tonconnect-manifest.json` file on your server with the following struc
198
352
  {
199
353
  "url": "https://yourdomain.com",
200
354
  "name": "Your App Name",
201
- "iconUrl": "https://yourdomain.com/icon.png"
355
+ "iconUrl": "https://yourdomain.com/icon.png",
356
+ "termsOfUseUrl": "https://yourdomain.com/terms",
357
+ "privacyPolicyUrl": "https://yourdomain.com/privacy"
202
358
  }
203
359
  ```
204
360
 
205
361
  The manifest URL must be accessible via HTTPS.
206
362
 
207
- ## API Reference
363
+ **Important Notes:**
364
+ - The `url` field should match your app's domain
365
+ - The `iconUrl` must be a valid, accessible URL
366
+ - The manifest file must be served with proper CORS headers
367
+ - For local development, you can use a production manifest for testing
208
368
 
209
- ### `TonConnectMobile`
369
+ ## Supported Wallets
210
370
 
211
- Main SDK class.
371
+ - **Tonkeeper** - Full support
372
+ - **Tonhub** - Full support
373
+ - **MyTonWallet** - Full support
374
+ - **Wallet in Telegram** - Full support
212
375
 
213
- #### Constructor
376
+ ## Migration from @tonconnect/ui-react
377
+
378
+ This SDK is a drop-in replacement for `@tonconnect/ui-react` in React Native/Expo environments.
379
+
380
+ ### Before (Web only)
214
381
 
215
382
  ```typescript
216
- new TonConnectMobile(config: TonConnectMobileConfig)
383
+ import { TonConnectUIProvider, useTonConnectUI } from '@tonconnect/ui-react';
217
384
  ```
218
385
 
219
- **Config Options:**
386
+ ### After (React Native/Expo)
220
387
 
221
- - `manifestUrl` (required): URL to your TonConnect manifest file
222
- - `scheme` (required): Your app's deep link scheme
223
- - `storageKeyPrefix` (optional): Prefix for storage keys (default: `'tonconnect_'`)
224
- - `connectionTimeout` (optional): Connection timeout in ms (default: `300000`)
225
- - `transactionTimeout` (optional): Transaction timeout in ms (default: `300000`)
226
- - `skipCanOpenURLCheck` (optional): Skip canOpenURL check before opening URL (default: `true`)
227
- - Set to `false` if you want to check if URL can be opened before attempting to open it
228
- - Note: On Android, `canOpenURL` may return `false` for `tonconnect://` even if wallet is installed
388
+ ```typescript
389
+ import { TonConnectUIProvider, useTonConnectUI } from '@blazium/ton-connect-mobile/react';
390
+ ```
229
391
 
230
- #### Methods
392
+ **That's it!** The API is identical, so your existing code will work without changes.
231
393
 
232
- - `connect(): Promise<WalletInfo>` - Connect to a wallet
233
- - `disconnect(): Promise<void>` - Disconnect from wallet
234
- - `sendTransaction(request: SendTransactionRequest): Promise<TransactionResponse>` - Send transaction
235
- - `getStatus(): ConnectionStatus` - Get current connection status
236
- - `onStatusChange(callback: StatusChangeCallback): () => void` - Subscribe to status changes
237
- - `destroy(): void` - Cleanup resources
394
+ ## Error Handling
238
395
 
239
- ### Error Classes
396
+ The SDK provides specific error types:
240
397
 
241
- - `TonConnectError` - Base error class
242
- - `ConnectionTimeoutError` - Connection request timed out
243
- - `ConnectionInProgressError` - Connection request already in progress
244
- - `TransactionTimeoutError` - Transaction request timed out
245
- - `TransactionInProgressError` - Transaction request already in progress
246
- - `UserRejectedError` - User rejected the request
398
+ ```typescript
399
+ import {
400
+ TonConnectError,
401
+ ConnectionTimeoutError,
402
+ TransactionTimeoutError,
403
+ UserRejectedError,
404
+ ConnectionInProgressError,
405
+ TransactionInProgressError,
406
+ } from '@blazium/ton-connect-mobile';
247
407
 
248
- ## Architecture
408
+ try {
409
+ await ton.connect();
410
+ } catch (error) {
411
+ if (error instanceof UserRejectedError) {
412
+ // User rejected the connection
413
+ } else if (error instanceof ConnectionTimeoutError) {
414
+ // Connection timed out
415
+ }
416
+ }
417
+ ```
249
418
 
250
- The SDK uses an adapter-based architecture:
419
+ ## Examples
251
420
 
252
- - **Core** - Pure TypeScript protocol implementation (no platform dependencies)
253
- - **Expo Adapter** - Expo-specific implementation using `expo-linking` and `expo-crypto`
254
- - **React Native Adapter** - React Native CLI implementation using `react-native` Linking
421
+ See the `test-project` directory for a complete example application demonstrating:
422
+ - React integration with `@tonconnect/ui-react` compatibility
423
+ - Direct SDK usage
424
+ - Transaction sending
425
+ - Data signing
426
+ - Wallet selection
427
+ - Error handling
255
428
 
256
- The core module is platform-agnostic and can be used in any JavaScript environment.
429
+ ## TypeScript
257
430
 
258
- ## Example
431
+ Full TypeScript support with comprehensive type definitions.
259
432
 
260
- See the `example/` directory for a complete Expo example app demonstrating:
433
+ ```typescript
434
+ import type {
435
+ TonConnectMobileConfig,
436
+ WalletInfo,
437
+ ConnectionStatus,
438
+ SendTransactionRequest,
439
+ TransactionResponse,
440
+ } from '@blazium/ton-connect-mobile';
441
+ ```
261
442
 
262
- - Connecting to a wallet
263
- - Receiving wallet information
264
- - Sending transactions
265
- - Handling errors
443
+ ## Contributing
266
444
 
267
- ## Security Notes
445
+ Contributions are welcome! Please feel free to submit a Pull Request.
268
446
 
269
- ### Transaction Signature Verification
447
+ ## License
270
448
 
271
- ⚠️ **IMPORTANT**: The SDK does NOT perform cryptographic verification of transaction signatures. The `verifyTransactionSignature()` function only validates format, not cryptographic correctness.
449
+ MIT
272
450
 
273
- **You MUST verify transaction signatures server-side** using proper TON libraries:
274
- - `@ton/core` - For BOC parsing and transaction verification
275
- - `@ton/crypto` - For cryptographic operations
451
+ ## Support
276
452
 
277
- ### Random Number Generation
453
+ For issues and questions:
454
+ - GitHub Issues: [https://github.com/blaziumdev/ton-connect-mobile/issues](https://github.com/blaziumdev/ton-connect-mobile/issues)
278
455
 
279
- The SDK requires `react-native-get-random-values` for cryptographically secure random number generation. Make sure to import it at the top of your entry file.
456
+ ## New Features in v1.2.0
280
457
 
281
- ### Session Storage
458
+ ### 🎨 Wallet Selection Modal
459
+ Beautiful, built-in wallet selection modal that automatically appears when you call `openModal()`:
282
460
 
283
- Sessions are stored in AsyncStorage (unencrypted). For production apps handling sensitive data, consider:
284
- - Using encrypted storage (iOS Keychain, Android EncryptedSharedPreferences)
285
- - Implementing additional security measures for sensitive wallet data
461
+ ```typescript
462
+ import { WalletSelectionModal } from '@blazium/ton-connect-mobile/react';
463
+
464
+ // The modal is automatically shown by TonConnectUIProvider when openModal() is called
465
+ // Or use it manually:
466
+ <WalletSelectionModal
467
+ visible={showModal}
468
+ onClose={() => setShowModal(false)}
469
+ />
470
+ ```
286
471
 
287
- ## License
472
+ ### 🛠️ Transaction Builder Utilities
473
+ Helper functions for building transactions easily:
288
474
 
289
- MIT
475
+ ```typescript
476
+ import {
477
+ buildTransferTransaction,
478
+ buildMultiTransferTransaction,
479
+ tonToNano,
480
+ nanoToTon,
481
+ formatTonAddress,
482
+ isValidTonAddress,
483
+ } from '@blazium/ton-connect-mobile';
484
+
485
+ // Simple transfer
486
+ const tx = buildTransferTransaction(
487
+ 'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIo',
488
+ 0.1 // 0.1 TON
489
+ );
490
+
491
+ // Multiple transfers
492
+ const multiTx = buildMultiTransferTransaction([
493
+ { to: 'EQ...', amount: 0.1 },
494
+ { to: 'EQ...', amount: 0.2 },
495
+ ]);
496
+
497
+ // Convert TON to nanotons
498
+ const nanotons = tonToNano(1.5); // "1500000000"
499
+
500
+ // Format address for display
501
+ const formatted = formatTonAddress('EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIo');
502
+ // "EQD0vd...qIo"
503
+ ```
504
+
505
+ ### 🔄 Retry Utilities
506
+ Automatic retry logic with exponential backoff:
507
+
508
+ ```typescript
509
+ import { retry } from '@blazium/ton-connect-mobile';
510
+
511
+ try {
512
+ await retry(
513
+ () => ton.connect(),
514
+ {
515
+ maxAttempts: 3,
516
+ initialDelay: 1000,
517
+ multiplier: 2,
518
+ shouldRetry: (error) => error.name !== 'UserRejectedError',
519
+ }
520
+ );
521
+ } catch (error) {
522
+ // Handle error
523
+ }
524
+ ```
525
+
526
+ ### 📱 Wallet Availability Checking
527
+ Check if a wallet is available on the current platform:
528
+
529
+ ```typescript
530
+ const isAvailable = await ton.isWalletAvailable('Tonkeeper');
531
+ if (isAvailable) {
532
+ await ton.connect();
533
+ }
534
+ ```
535
+
536
+ ### 💬 Enhanced Error Messages
537
+ All errors now include helpful recovery suggestions:
538
+
539
+ ```typescript
540
+ try {
541
+ await ton.connect();
542
+ } catch (error) {
543
+ if (error instanceof ConnectionTimeoutError) {
544
+ console.error(error.message);
545
+ console.log('Suggestion:', error.recoverySuggestion);
546
+ }
547
+ }
548
+ ```
290
549
 
550
+ ## Changelog
551
+
552
+ ### v1.2.0
553
+ - ✅ **NEW**: Beautiful wallet selection modal component
554
+ - ✅ **NEW**: Transaction builder utilities (`buildTransferTransaction`, `tonToNano`, etc.)
555
+ - ✅ **NEW**: Retry utilities with exponential backoff
556
+ - ✅ **NEW**: Enhanced error messages with recovery suggestions
557
+ - ✅ **NEW**: Wallet availability checking (`isWalletAvailable`)
558
+ - ✅ Improved wallet callback handling
559
+ - ✅ Enhanced logging and debugging
560
+ - ✅ Better TypeScript types
561
+
562
+ ### v1.1.5
563
+ - ✅ Full `@tonconnect/ui-react` compatibility
564
+ - ✅ React integration layer with hooks and components
565
+ - ✅ Improved wallet callback handling
566
+ - ✅ Enhanced logging and debugging
567
+ - ✅ Better error messages
568
+ - ✅ Android emulator localhost fix (10.0.2.2)
569
+ - ✅ `post_redirect` return strategy for better compatibility