Skip to main content
Not yet released. The packages on this page are not published to npm yet, so the install commands below will not resolve. The documented interface is stable and the code exists; only publication is outstanding. To use KeyStone from a frontend today, call the REST API or the TypeScript SDK, which is published. Contact us if you need early access.

Import

Usage

Parameters

The submit function accepts a SubmitInstructionInput:
Fee allocation is not set per instruction. Who bears the settlement fee is set by fee_mode on the platform environment - see Fees. A fee mode sent with an instruction is accepted and ignored.

InstructionPartyInput

InstructionLegInput

Each DvP instruction should include two legs: asset_delivery and payment. The direction is derived from your role - sellers deliver assets and receive payment, buyers deliver payment and receive assets.

Return Type

InstructionResult

Paired flow

The settlement flow works in two steps:
  1. First party submits - Gets status: "pending_match" and a trade reference
  2. Second party submits with same trade reference - Gets status: "matched" and a settlement ID
The pending_match / matched statuses describe reference correlation of a pre-agreed trade, not order matching - see what “matched” means.