A venue owns matching. This package owns the shape of what leaves it.
Integration is deliberately shallow: a matching engine that produces a firm two-sided fill, and a signature from each side. No custody changes, no margin posted, no credit risk taken on the trades you submit.
git clone https://github.com/IndentLayer/indent-sdk
cd indent-sdk
node --test "test/**/*.test.js"
node examples/submit.jsimport { fromFill, typedData } from '@indent/sdk';
const obligation = fromFill({
venue: yourVenueAddress,
buyer: fill.buyer,
seller: fill.seller,
asset: fill.asset,
quantity: fill.quantity,
price: fill.price,
}, { window: currentWindow, ttl: 120 });
const payload = typedData(obligation);
// hand payload to whichever wallet library you already usetypedData returns a plain EIP-712 structure. This package carries no signing
dependency on purpose: the definition is the contract, the library is yours.
Obligations come back frozen. An object that has been shown to a counterparty should not be mutable afterwards.
Submitted ─┬─ Admitted ─┬─ Novated ── Netted ── Settled
└─ Rejected └─ Rejected
import { track, isFinal } from '@indent/sdk';
track(['Admitted', 'Novated', 'Netted', 'Settled']); // 'Settled'
track(['Admitted', 'Novated', 'Rejected']); // throwsSubmission is atomic. An obligation is either admitted and novated, or it is
rejected. There is no state in which a venue believes a trade is cleared while
Indent Layer does not, and track throws on an impossible sequence so a bad feed
surfaces as an error rather than as a silently wrong position.
Once settled, an obligation is final. Nothing moves it again, including us.
| indent-core | Netting, waterfall and position limits, with the maths |
| indentlayer.xyz/docs | The model behind all of it |
Pre-mainnet. The clearing contracts are not deployed, so nothing here reaches a chain yet. The shapes are published first so venues can build against them and tell us where they are wrong.
MIT licensed.
