Skip to content

Commit

Permalink
Add UMAD-07: Post-Transaction Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jklein24 committed Oct 16, 2023
1 parent 8dd7375 commit 14d1705
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions umad-07-post-tx-hooks.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# UMAD-07: Post-transaction compliance hooks

UMA offers a mechanism by which VASPs can notify each other of the UTXOs used to complete a transaction. This is useful
for compliance purposes, as it allows VASPs to submit those UTXOs to their compilance providers for transaction
monitoring.

**Note:** VASPs only need to receive post-transaction hooks from their counterparty VASP for the UTXO-based compliance
flow, i.e. for cases where their Compliance Provider does not support lookups and registration via node public key. If
the compliance provider supports using the node public key instead, VASPs can omit the `utxoCallback` field. However,
VASPs do still need to send post-transaction hooks for their counter-party if the other VASP has provided a
`utxoCallback` themselves.

As mentioned in [UMAD-05](/umad-05-payreq-request.md), in the payreq request, the sending VASP specifies a
`payerdata.compliance.utxoCallback` field which is a URL that the receiving VASP should call on transaction completion
to notify the sending VASP of the UTXOs used to complete the transaction. Similarly, in the payreq response, the
receiving VASP specifies a `compliance.utxoCallback` field which is a URL that the sending VASP should call on
transaction completion to notify the receiving VASP of the UTXOs used to complete the transaction. This request from
each VASP to the other is called a "post-transaction hook". It is a POST request with the following structure:

```http
POST <utxoCallback>
{
"utxos": { "utxo": string, "amountMsats": number }[]
}
```

The request body is JSON with a single field, `utxos`, which is an array of objects containing the UTXO and the
corresponding amount in millisats that went over each channel used to complete the transaction. Both VASPs can
register the incoming UTXOs with their Compliance Provider for transaction monitoring.

0 comments on commit 14d1705

Please sign in to comment.