@tonconnect/ui-react 2.3.1 → 2.4.0-beta.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.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -271,6 +271,18 @@ export const Settings = () => {
271
271
  };
272
272
  ```
273
273
 
274
+ ### Trace ID for analytics
275
+
276
+ You can pass a custom trace ID to track transactions through your analytics:
277
+
278
+ ```tsx
279
+ const result = await tonConnectUI.sendTransaction(myTransaction, {
280
+ traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
281
+ });
282
+
283
+ console.log(result.traceId); // use this ID to correlate with analytics events
284
+ ```
285
+
274
286
  ## Sign data
275
287
 
276
288
  Sign arbitrary data with the user's wallet. The wallet will display the data to the user for confirmation before signing. Wallet must be connected when you call `signData`, otherwise an error will be thrown.
@@ -319,6 +331,16 @@ export const SignTextData = () => {
319
331
  };
320
332
  ```
321
333
 
334
+ You can also pass a trace ID to correlate with analytics:
335
+
336
+ ```tsx
337
+ const result = await tonConnectUI.signData(textData, {
338
+ traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
339
+ });
340
+
341
+ console.log(result.traceId); // use this ID to correlate with analytics events
342
+ ```
343
+
322
344
  #### Binary Format
323
345
 
324
346
  Use for arbitrary binary data. The wallet shows a warning about unknown content.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonconnect/ui-react",
3
- "version": "2.3.1",
3
+ "version": "2.4.0-beta.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ton-connect/sdk.git"
@@ -48,7 +48,7 @@
48
48
  "vite-plugin-dts": "^4.5.4"
49
49
  },
50
50
  "dependencies": {
51
- "@tonconnect/ui": "2.3.1"
51
+ "@tonconnect/ui": "2.4.0-beta.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=17.0.0",