@tonconnect/ui 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.
- package/README.md +22 -0
- package/dist/tonconnect-ui.min.js +239 -239
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +324 -81
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +11 -11
- package/lib/index.mjs +325 -82
- package/lib/index.mjs.map +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -317,6 +317,18 @@ try {
|
|
|
317
317
|
}
|
|
318
318
|
```
|
|
319
319
|
|
|
320
|
+
### Trace ID for analytics
|
|
321
|
+
|
|
322
|
+
You can pass a custom trace ID to track the transaction through your analytics:
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
const result = await tonConnectUI.sendTransaction(transaction, {
|
|
326
|
+
traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
console.log(result.traceId); // use this ID to correlate with analytics events
|
|
330
|
+
```
|
|
331
|
+
|
|
320
332
|
`sendTransaction` will automatically render informational modals and notifications. You can change its behaviour:
|
|
321
333
|
|
|
322
334
|
```ts
|
|
@@ -382,6 +394,16 @@ try {
|
|
|
382
394
|
}
|
|
383
395
|
```
|
|
384
396
|
|
|
397
|
+
You can also pass a trace ID to correlate with analytics:
|
|
398
|
+
|
|
399
|
+
```ts
|
|
400
|
+
const result = await tonConnectUI.signData(textData, {
|
|
401
|
+
traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
console.log(result.traceId); // use this ID to correlate with analytics events
|
|
405
|
+
```
|
|
406
|
+
|
|
385
407
|
#### Binary Format
|
|
386
408
|
|
|
387
409
|
Use for arbitrary binary data. The wallet shows a warning about unknown content.
|