Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
createStatementgetStatementlistStatementssupersedeStatementtombstoneStatementretractStatementstatementHistory
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKStatementssupersedeStatement

supersedeStatement

Correct a claim by writing its replacement — the old version stays readable and the chain records the order.

PURPOSE

Replace a statement with a new version. The old one stops being current, stays readable, and the chain records the order. This is what a correction is — as distinct from tombstoning, which asserts the claim was never true.

POST/v1/statements/:id/supersedeBearer API keystable
supersedeStatement(statementId: string, input: CreateStatementInput): Promise<SupersedeStatementResult>
Handshake credentialstable
supersedeStatement(request: StatementSupersedeRequest): Promise<StatementSupersedeResponse>

Parameters

ParameterTypeRequired
statementIdstringrequired

The statement being replaced.

(new statement)CreateStatementInputrequired

A whole new statement, with the same fields createStatement takes. On the wire this is newStatement inside a StatementSupersedeRequest, with the old id as oldStatementId.

Returns

FieldTypePresence
newStatementIdstringalways

The replacement.

chainRootstringalways

Unchanged — the chain root is stable across versions.

versionintegeralways

The new version number.

Store the chain root, not the version

Every version has its own id; only chainRoot is stable. A reference that should mean "where Priya works" belongs on the chain root, and a reference that should mean "the claim as it stood in March" belongs on the version.

On the wire

subject is UUID bytes and kind is an integer discriminant rather than a string. evidence is a single reference, not an array of ids. Every request carries a requestId plus an optional actAs.

See also
statementHistorySupersession

Was this page helpful?

listStatements

Query statements by subject, predicate, kind and confidence — cursor-paged.

tombstoneStatement

Mark a claim not-current with no replacement — this was never true.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground