Skip to content

Multi-party trade settlement

This tutorial drives a delivery-vs-payment (DvP) settlement across two domains through the canonical Pipeline.Submit(GoalSettlement) path with a multi-party approval gate.

Run the demo

bash
cd examples/multi-party-trade
go run .

What it demonstrates

  • GoalSettlement with two Leg entries (one local, one cross-chain bridge)
  • Production SettlementDispatcher wiring with real ReservationManager, BridgeMessageDispatcher, and per-state settlement hooks
  • Separation-of-duties approval policy requiring 2-of-N signatures from the board_member role
  • Trust-drift gate that invalidates the plan if any referenced TrustProfile degrades mid-flight

Source

The example main is at examples/multi-party-trade/main.go. The plan compilation, approval flow, and settlement dispatch are routed through the same code paths a production deployment would use.

Released under the MIT License.