@zerohash-sdk/travel-rule-js 0.6.0 → 0.7.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/dist/index.d.ts +15 -7
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -433,6 +433,8 @@ declare type Theme = 'auto' | 'light' | 'dark';
433
433
  * const travelRule = new TravelRule({
434
434
  * jwt: 'your-jwt-token',
435
435
  * depositId: 'deposit-abc123',
436
+ * walletAddress: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
437
+ * intentionAction: 'deposit',
436
438
  * env: 'prod',
437
439
  * theme: 'light',
438
440
  * onCompleted: ({ deposit_id, submitted_at }) => console.log('Submitted', deposit_id, submitted_at),
@@ -496,17 +498,23 @@ declare type TravelRuleCompletedData = {
496
498
 
497
499
  export declare interface TravelRuleConfig extends BaseConfig<TravelRuleEvent>, TravelRuleCallbacks {
498
500
  /**
499
- * Deposit id the travel-rule submission is tied to. Required — every
500
- * travel-rule submission is scoped to a specific deposit (TRD §4.1 host
501
- * handoff contract). `BaseJsSdk.render` forwards it to the web component.
501
+ * Deposit id the travel-rule submission is tied to. Set it for a deposit;
502
+ * omit it for the withdrawal / account-link path. `BaseJsSdk.render`
503
+ * forwards it to the web component.
502
504
  */
503
- depositId: string;
505
+ depositId?: string;
504
506
  /**
505
- * Wallet address the travel-rule submission relates to. Optional —
506
- * carried alongside `depositId` when known. `BaseJsSdk.render` forwards it to
507
- * the web component.
507
+ * On-chain wallet address the status query is scoped to (deposit source
508
+ * wallet for deposits, destination wallet for withdrawals). The widget does
509
+ * not boot without it. `BaseJsSdk.render` forwards it to the web component.
508
510
  */
509
511
  walletAddress?: string;
512
+ /**
513
+ * `deposit` or `withdrawal`, sent as `intention_action` on the status query.
514
+ * Optional when `depositId` is set (inferred as `deposit`); required without
515
+ * it. `BaseJsSdk.render` forwards it to the web component.
516
+ */
517
+ intentionAction?: 'deposit' | 'withdrawal';
510
518
  }
511
519
 
512
520
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/travel-rule-js",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",