Client responsibilities

Integration guide

An integration coordinates signed documents, token approvals, role operators, evidence storage and clocks around a deliberately small escrow contract.

Source published · no supported SDKThe contracts, client modules, schemas and three local examples are published at github.com/Sinetti-ai/Sinetti (Apache-2.0). There is no supported SDK package or public deployment. The flow below describes integration responsibilities.

1. Preflight

2. Build and open

terms = buildSellerAcceptance({
  buyer, seller, verifier, arbitrator, token,
  amount, bond, challengerBond, termsHash,
  buyerIdentityRef, sellerIdentityRef,
  verifierIdentityRef, arbitratorIdentityRef,
  duration, challengeWindow, rulingWindow,
  openBy, salt, metaEvidenceURI
})
sellerSignature = signTypedData(domain, terms)
verifyLocally(domain, terms, sellerSignature, seller)
approveToken(escrow, buyerPrincipal)
openDeal(terms, sellerSignature)

This is protocol-shaped pseudocode, not a published SDK. Use the contract interfaces and client modules from the published source and compare emitted deal fields with the preflight object.

3. Watch states and clocks

Event or stateClient action
DealOpenedPersist deal ID, full signed terms and chain position.
Seller bond requiredTrack allowance and postBond() before the delivery path proceeds.
DeliverySubmittedResolve the evidence envelope and verify committed digests.
VerificationRecordedNotify the disadvantaged party and expose the exact challenge deadline.
ChallengedFreeze normal finalization; preserve both parties' evidence and track ruling deadline.
SettledRead explicit credits, then prompt each beneficiary to withdraw.

4. Transaction discipline

5. Failure handling

FailureSafe response
Artifact cannot be retrieved or digest differsDo not claim successful verification; preserve the mismatch and use Inconclusive where authorized.
Role service unavailableExpose the relevant deadline and escalation path; do not silently substitute another address.
Transaction reverts after stale stateRe-read state and recompute the valid action set.
Withdrawal receiver failsKeep the credit visible and retry from the beneficiary; other settlements need not be blocked.