You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/services/interop.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,29 @@ which makes clock synchronisation a deployment requirement and sets a lower boun
56
56
deadlines. See
57
57
[HTLC Deadlines and Clock Synchronisation](../security/htlc_deadline_clock_assumptions.md).
58
58
59
+
### HTLC Validation Rules
60
+
Spending an HTLC-locked token is validated by each token driver's transfer validator
61
+
(`TransferHTLCValidate` in `token/core/fabtoken/v1/validator` and
62
+
`token/core/zkatdlog/nogh/v1/validator`). Both drivers enforce the same rules, so an action
63
+
that is valid under one driver is valid under the other:
64
+
65
+
***1-to-1 transfer only**: if *any* input of a transfer action is owned by an HTLC script,
66
+
the action must have **exactly one input and exactly one output**. An HTLC-owned input may
67
+
not be bundled with other inputs, and it may not fan out to several outputs. This matches
68
+
the `Claim` and `Reclaim` helpers in `token/services/interop/htlc`, which each spend a
69
+
single unspent token.
70
+
***Per-input checks**: the type, quantity, and owner script of the input being spent are
71
+
checked against the single output; every input is validated on its own terms, never against
72
+
a fixed index.
73
+
***No redeem**: the output corresponding to an HTLC spending must not be a redeem
74
+
(nil owner).
75
+
***Deadline**: on a claim the script's deadline must not yet have passed; after the deadline
76
+
only the sender's reclaim branch is accepted. A newly created HTLC-locked output must carry
77
+
a deadline that is still in the future.
78
+
***Metadata**: a claim must publish the preimage under the script's claim key; a lock must
79
+
publish the corresponding lock key. Both are counted so that a single action cannot reuse
80
+
one metadata entry for several HTLC operations.
81
+
59
82
### Cross-Network Finality
60
83
The Interop Service coordinates with the **Network Service** across multiple DLT instances. It monitors the finality of "Lock" transactions on one network before initiating corresponding "Lock" transactions on another, ensuring that the atomic swap protocol can proceed safely.
0 commit comments