Parties
A party represents an entity in a settlement with a specific role. Party details are provided inline when submitting instructions - there is no separate registration step.Party fields
Roles
Roles are defined by the template’srequired_roles field. Every settlement must include parties covering all required roles. Role names are flexible - the template defines what roles are needed.
Common role patterns:
- DvP:
buyer,seller - Repo:
cash_provider,securities_provider - Lending:
lender,borrower
Wallet addresses and escrow
Thewallet_address field is used for off-chain identification and for recipient reveal at settlement execution time. With the commitment-based deposit scheme:
- Deposit authorization - Each leg has a
deposit_secret(random 32 bytes) and adeposit_key(keccak256 hash). The party deposits by providing the secret - no address-based validation. This preserves pre-execution privacy on public chains. - Recipients bound at registration - Each leg’s recipient wallet is fixed permanently in
registerSettlement. No later call can change where funds go, which is what makes execution autonomous and safe for any depositor to trigger. - Pre-built calldata - The API returns pre-built calldata for each leg so platforms can submit deposit transactions directly via their custody provider or any signing infrastructure.
Example: providing party details in an instruction
Cross-platform parties
In cross-platform settlements using bilateral instructions, both platforms provide their own party details independently. Each platform submits their party’s information in their instruction. When both instructions match, the settlement is created with both parties confirmed from the start. See Cross-Platform Settlements for the full flow.Legs
A leg represents a single obligation within a settlement - something that needs to move from one party to another.Leg fields
Instrument ID formats
Theinstrument_id identifies what is being transferred. The format depends on the asset type:
In production, always use the deployed contract address. In documentation examples, we sometimes use human-readable shorthand like
USDC or ISINs like US09311A1007 for clarity.
Who deposits to escrow?
Only legs withdirection: "deliver" require an escrow deposit. The party assigned to a deliver-direction leg is the one who must deposit the corresponding tokens to the escrow contract. Legs with direction: "receive" are fulfilled automatically when the escrow executes the atomic swap.
How legs relate to parties
Legs reference parties by role, not by ID:seller delivers 100 units of token 0xTokenAddress.”
How legs map to escrow deposits
Each leg withdirection: "deliver" creates a deposit obligation on the escrow contract. The escrow uses a commitment scheme: each leg has a deposit_key (hash) registered on-chain, and the party deposits by providing the deposit_secret (preimage). The contract verifies keccak256(secret) == depositKey. When all deliver-direction legs have confirmed deposits, the atomicity gate passes.
The API automatically generates deposit secrets and returns them (along with pre-built calldata) in the settlement response so platforms can submit deposit transactions directly.
Multiple legs
A settlement can have any number of legs. The template’srequired_leg_types ensures the minimum set is present: