@tonconnect/sdk 3.3.1-beta.0 → 3.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 +20 -0
- package/dist/tonconnect-sdk.min.js +1 -1
- package/dist/tonconnect-sdk.min.js.map +1 -1
- package/lib/cjs/index.cjs +1039 -196
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.mjs +1035 -197
- package/lib/esm/index.mjs.map +1 -1
- package/lib/types/index.d.ts +301 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -247,6 +247,16 @@ try {
|
|
|
247
247
|
}
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
+
You can pass a custom trace ID to track the transaction through your analytics:
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
const result = await connector.sendTransaction(transaction, {
|
|
254
|
+
traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
console.log(result.traceId); // use this ID to correlate with analytics events
|
|
258
|
+
```
|
|
259
|
+
|
|
250
260
|
## Sign data
|
|
251
261
|
|
|
252
262
|
Sign arbitrary data with the user's wallet. The wallet will display the data to the user for confirmation before signing.
|
|
@@ -289,6 +299,16 @@ try {
|
|
|
289
299
|
}
|
|
290
300
|
```
|
|
291
301
|
|
|
302
|
+
You can also pass a trace ID to correlate with analytics:
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
const result = await connector.signData(textData, {
|
|
306
|
+
traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
console.log(result.traceId); // use this ID to correlate with analytics events
|
|
310
|
+
```
|
|
311
|
+
|
|
292
312
|
#### Binary Format
|
|
293
313
|
|
|
294
314
|
Use for arbitrary binary data. The wallet shows a warning about unknown content.
|