Business records · specification
The anchor/1 protocol
A business keeps its records in its own system, hash-chains them under a secret salt, and sends Rightshold one signed root per period. Rightshold checks that the period continues the one before, countersigns it, and timestamps each day's roots in Bitcoin. Later the owner can show one record to one party, who checks it against the anchored root without seeing any other record and without trusting Rightshold. This is the protocol in full, for anyone building a system that records into it or checks what it produced.
What it is for, in plain words
1. Roles
- The owner (a business, or the system its builder runs for it) holds the records, the stream's secret salt and the stream's Ed25519 signing key, and a Rightshold account key. It builds the hash chain, anchors one root per period and chooses what to disclose.
- Rightshold stores commitments only: the stream's registration, its public keys, one record per anchored period (roots, counts, period bounds, the signer's key id and signature) and its own signed receipt. It checks each period's signature and continuity when it arrives. It never receives a record.
- A verifier (a lender, a buyer, an adviser, anyone) holds one or more disclosed records and checks them against the anchored roots. No account is needed.
2. Hashing
All hashes are SHA-256; every digest on the wire is 64 lowercase hex characters. A single prefix byte separates the kinds of hash.
The event envelope. Each record is a JSON object {stream_id, seq, type, occurred_at, payload}. seq counts from 1 per stream with no gaps. The canonical bytes are the envelope as JSON with object keys sorted at every level and no white space; for the values allowed here this is the same as RFC 8785 (JCS). Numbers are integers only (amounts in minor units, times as RFC 3339 UTC strings); strings are UTF-8. The same stored record must always give the same envelope.
genesis prev_hash = 64 hex zeros
chain_hash(seq) = SHA-256( 0x43 || prev_hash || canonical_envelope_bytes )
leaf(seq) = SHA-256( 0x00 || salt || chain_hash(seq) )
prev_hash(seq+1) = chain_hash(seq)
node(left, right) = SHA-256( 0x01 || left || right )
The period tree. A period covers a contiguous range first_seq to last_seq; its leaves are leaf(seq) in order. Pairs are hashed with node; an odd node at any level is promoted unchanged, never duplicated. The single remaining node is merkle_root (for one leaf, the leaf itself). A proof is the ordered list of sibling hashes, each with a side, L or R; a promoted level adds no step.
Root chaining. Each anchor carries prev_root, the previous anchor's merkle_root for the stream (64 hex zeros for the first). Rightshold refuses an anchor that does not continue the latest one, so a period cannot be dropped, swapped or reordered afterwards.
3. Salts
The salt is 32 random bytes, kept with the signing key and never sent to Rightshold. It makes a leaf impossible to test against a guess of the record. A disclosure carries the salt of its period, so whoever receives it can test guesses against the other leaves of that period.
Use a salt per period. Software that uses one salt for the whole stream reveals every period by sharing a single record. The client kit derives each period's salt from one master salt (section 11.4) and refuses to disclose otherwise; a checking room warns when records of two periods carry the same salt.
4. Registering a stream
POST /v1/anchor-streams with the owner's account key (Authorization: Bearer <key>):
{
"stream_id": "<stream id>",
"display_name": "<the owner's own name for it>",
"key_id": "<key id>",
"public_key_pem": "-----BEGIN PUBLIC KEY-----\n…\n-----END PUBLIC KEY-----\n"
}
stream_id: 3 to 64 characters, lowercase letters, digits and dashes, starting with a letter or digit, unique.display_name: up to 120 characters. It is stored and shown only to the owner.key_id: 1 to 64 characters of letters, digits,.,_and-.public_key_pem: an Ed25519 public key in SPKI PEM form.- Answers
201 {stream}with the owner's view (section 6).401 api_key_requiredwithout an account key;409 anchor_stream_existswhen the id is taken;422 invalid_anchor_payloadfor a malformed field.
A stream id is a handle, not a secret. The routes are addressed by it, so anyone who guesses it learns that it is registered and which public number it has; anchor_id is derived from it (section 5), and the receipt signature covers it. Choose an id that names no one: never a business's or a person's name.
Rotating keys. POST /v1/anchor-streams/{stream_id}/keys with the account key and a body {add_key?: {key_id, public_key_pem}, retire_key_ids?: [key id, …], signature}. signature is made by a key of the stream that is not retired, over the canonical JSON of the body without signature. Answers 200 {stream}; 404 anchor_stream_not_found when the account has no stream with that id; 401 invalid_anchor_signature; 409 anchor_key_exists. Anchors already made under a retired key stay valid; a retired key signs nothing new.
5. Anchoring a period
POST /v1/anchors. No account key: the stream key's signature is the credential.
{
"stream_id": "<stream id>",
"period_start": "YYYY-MM-DDTHH:MM:SSZ",
"period_end": "YYYY-MM-DDTHH:MM:SSZ",
"first_seq": <integer>,
"last_seq": <integer>,
"event_count": <last_seq - first_seq + 1>,
"merkle_root": "<hex>",
"prev_root": "<hex: the latest anchored root, or 64 zeros>",
"key_id": "<key id>",
"signature": "<base64 Ed25519>"
}
The signature is Ed25519 over the canonical JSON (section 2) of the body without signature, in base64. Every other field you send is signed too; the client kit sends exactly the nine fields above.
Rightshold checks, in this order, and stores nothing when a check fails. Errors are problem details (RFC 9457) with a stable code:
stream_idis a string of at most 64 characters, and the stream has budget left: 60 submissions a minute per stream, then429 rate_limited.- The stream exists (
404 anchor_stream_not_found) and is active (409 anchor_stream_inactive). key_idis registered for the stream (404 anchor_key_not_found) and not retired (409 anchor_key_retired).merkle_rootandprev_rootare 64 lowercase hex;first_seq,last_seqandevent_countare integers of at least 1;period_startandperiod_endare strings of at most 40 characters (422 invalid_anchor_payload).- The signature verifies with that key (
401 invalid_anchor_signature). prev_rootis the stream's latest anchored root, or 64 zeros for its first anchor (409 anchor_chain_break).first_seqis the previous anchor'slast_seqplus one, or 1 (409 anchor_seq_gap).event_countequalslast_seq - first_seq + 1(422 invalid_anchor_payload).
Rightshold does not compare the period bounds with its clock: they are the owner's statement. The time Rightshold vouches for is received_at.
The answer is 201 {anchor}: the stored record exactly as signed, with Rightshold's receipt.
{
"anchor": {
"anchor_id": "anc_…", "stream_id": "<stream id>", "server_seq": <n>,
"period_start": "…", "period_end": "…", "first_seq": <n>, "last_seq": <n>, "event_count": <n>,
"merkle_root": "<hex>", "prev_root": "<hex>", "key_id": "<key id>", "client_signature": "<base64>",
"received_at": "<RFC 3339, milliseconds, UTC>",
"receipt": { "anchor_id": "anc_…", "stream_id": "<stream id>", "merkle_root": "<hex>", "server_seq": <n>, "received_at": "…", "signature": "<base64>" }
}
}
anchor_id is anc_ followed by the first 24 hex characters of SHA-256 of the text stream_id|merkle_root|last_seq. server_seq counts the stream's anchors from 1. Anchors are append-only: there is no route that changes or removes one.
6. The countersignature, and reading a stream
The receipt. Rightshold signs, with its issuer Ed25519 key, the canonical JSON of {anchor_id, stream_id, merkle_root, server_seq, received_at}. The key is receipt_public_key_pem (with receipt_key_id) at GET /v1/anchor-service-info, and the same key is listed with its status at /.well-known/rightshold-keys.json. Fetch it yourself; never trust a copy that came inside the material you are checking.
What a receipt holder can show. server_seq counts up by one per stream, so an owner holding its receipts can show any anchor that went missing; a receipt proves Rightshold received that root at received_at.
Reads. Each read answers with one of two views. A caller with no key, or with another account's key, gets the public view: the stream's public number (Stream 1, Stream 2, … by order of registration), never its id, its name or a client key id. The account that registered the stream, calling with its own key, gets its signed originals.
GET /v1/anchor-streams/{stream_id}: public{stream: {label, status, created_at, protocol, anchor_count, latest_root, latest_anchor_at}}; the owner also getsstream_id,display_name,keysandverify_page.GET /v1/anchor-streams/{stream_id}/anchors:{label, protocol, continuous, anchors}. Public anchors carryanchor_id, label, server_seq, period_start, period_end, first_seq, last_seq, event_count, merkle_root, prev_root, received_at, receipt_verifiedandreceipt: {anchor_id, merkle_root, server_seq, received_at, signature}; the owner's carrystream_id,key_id,client_signatureand the full receipt.GET /v1/anchors/{anchor_id}:{anchor}in the same two shapes, plus asuper_rootblock once the anchor's day has closed (section 10).GET /anchor/{stream_id}: a page built from the public view for every visitor.
continuous is recomputed on every read from the stored roots, never stored. receipt_verified is the receipt checked on read; because the signature covers the stream id, which the public view leaves out, whoever already knows the stream id (the owner, or a verifier holding a disclosed record, whose envelope carries it) can check it offline. A key of another account gets the public view with the same status codes, and no error repeats a stream id, a name or a key id.
7. Disclosing one record
To prove one record, the owner hands over a bundle:
{
"anchor_id": "anc_…",
"event": { "stream_id": "<stream id>", "seq": <n>, "type": "…", "occurred_at": "…", "payload": { … } },
"prev_hash": "<hex: chain_hash of seq - 1, or 64 zeros>",
"salt": "<hex: the salt of this record's period>",
"leaf_index": <seq - first_seq>,
"merkle_proof": [ { "side": "L", "hash": "<hex>" }, … ]
}
The verifier recomputes chain_hash from prev_hash and the envelope, then the leaf with the salt, walks the proof to a root, and compares it with the anchored merkle_root; then checks Rightshold's receipt. It learns that one record, the chain hash before it and salted sibling hashes, and nothing about any other record.
POST /v1/anchors/verify-disclosure (no key, 30 a minute per address) does the same and stores nothing. It answers 200 {valid, anchor_id, seq, checks: {event_in_anchor, chain_link, leaf, merkle_proof, anchor_receipt}, detail}, and 404 anchor_not_found for an unknown anchor. event_in_anchor says the envelope's stream and seq belong to that anchor; the answer never names the stream.
8. What it proves, and what it does not
It proves
- A disclosed record is exactly what was anchored, at its position in the chain, in the period it names.
- Rightshold received that period's root at
received_at, and the periods form one unbroken chain from the first. - Once a day has closed and its proof is confirmed, that the day's roots existed by a Bitcoin block nobody can move.
It does not
- That a record is true, complete or happened as recorded: the records are the owner's own account.
- Anything about records changed before they were anchored. Anchor often to keep that window small.
- That a signed record was not invented by whoever holds the stream key.
- Anything about records that were never disclosed.
Rightshold learns that the stream exists, its name, when each period arrived, the period bounds, counts, roots and key ids. It publishes only the public view of section 6. It learns nothing about the contents, types, parties or amounts of any record.
9. Versions
This is protocol anchor/1. Its hashing and canonical form are fixed for every stream registered under it; a change would be a new protocol version and new streams, so every anchor already made stays checkable as it is.
10. Daily super-roots
Once a UTC day has closed, its anchors (by received_at) are folded into one super-root, timestamped in Bitcoin through OpenTimestamps and offered to witnesses to cosign. A day with no anchors has none; a super-root is computed once and never recomputed.
leaf 0 = SHA-256( 0x53 || previous super-root ) (64 hex zeros before the first)
leaf i = SHA-256( 0x53 || anchor_id || merkle_root || server_seq || received_at )
text fields as UTF-8, merkle_root as its 32 raw bytes, server_seq as decimal text
leaves in received_at order, ties broken by anchor_id
super-root = the section 2 tree over the leaves
GET /v1/anchors/super-roots: every day, newest first, withots_statusandbitcoin_block_height.GET /v1/anchors/super-roots/{date}: the day's leaves and anchors, to recompute it yourself.GET /v1/anchors/super-roots/{date}.ots: the OpenTimestamps proof; check it withots verify -d <super-root> <file>.ots.GET /v1/anchors/super-roots/{date}/witnessesandPOST /v1/anchors/super-roots/{date}/cosign: witnesses sign the canonical header{protocol, date, super_root, anchor_count, prev_super_root_hash}with the key they publish on their own domain, after recomputing it.
States never run ahead of the proof: anchored (computed), stamped (submitted, Bitcoin pending), bitcoin-confirmed (an attestation with its block height). A day counts as externally witnessed from two witness domains outside common ownership with Rightshold, and fully witnessed from three; a witness under common ownership with Rightshold is always shown as affiliated and never counts. Super-roots carry aggregates only: no stream is named. The live count of witnesses confirmed to have no tie to Rightshold is on /independence.
11. The client kit (anchor-kit/1)
The client kit is software for the owner's machine that implements all of the above: anchor-kit.mjs (one file, Node.js 22, no dependencies), its SHA-256 at /cli/anchor-kit.sha256, and the installer's guide. It runs with the owner's own account key and stream key. This section fixes the choices section 2 leaves to the owner, so two builders produce the same bytes for the same record.
11.1 Envelope. type is bookkeeping.<kind> for the five kinds below; these are frozen, and a changed shape gets a new type name. occurred_at is when the kit added the record, UTC whole seconds (YYYY-MM-DDTHH:MM:SSZ), never decreasing; the payload repeats it as recorded_at. Text is Unicode NFC, trimmed, 1 to 200 characters unless stated, with no control characters. Amounts are integer cents (-0 is stored as 0), signed only where stated. Dates are YYYY-MM-DD; a period is {start, end} with end not before start. Hashes are lowercase hex SHA-256 of a file's bytes. Absent optional fields are omitted, never null or empty; unknown fields are refused.
11.2 Record kinds. Every payload also carries recorded_at.
bookkeeping.document:document_sha256(required),label(required text),kind(required:invoice,receipt,bank_statement,payroll_report,tax_filing,contract,financial_statement,other),period(optional).bookkeeping.entry:entry_id(required, up to 100, unique in the stream),type(required:invoice_issued,payment_received,expense,payout,payroll,tax,transfer,refund,adjustment,other),date(required),amount_cents(required, positive),currency(required, ISO 4217),counterparty_ref(optional opaque reference, up to 100; a name is never needed),category(required:revenue,cost_of_sales,operating_expense,asset,liability,equity,other),invoice_number(required forinvoice_issued),document_sha256(optional),cash(required boolean,falsewhen not given),account_ref(required whencashis true, absent otherwise),source:"books".bookkeeping.bank_line:line_id(required, up to 100, unique peraccount_ref),account_ref(required),date(required),amount_cents(required, signed, not zero: deposits positive),currency(required),balance_after_cents(optional, signed),reference(optional),statement_document_sha256(required),source(required:bankorprocessor).bookkeeping.period_statement:periodandcurrency(required); optionalrevenue_cents,cost_of_sales_cents,operating_expenses_cents(not negative),net_result_cents,cash_start_cents,cash_end_cents(signed),receivables_start_cents,receivables_end_cents,payables_start_cents,payables_end_cents(not negative),headcount,invoices_issued_count,invoices_paid_count,statement_document_sha256.bookkeeping.correction:corrects(required{seq, chain_hash}of an original record, never of another correction; the latest correction byseqstands),reason(required, up to 1000),replacement(required{kind, content}: the full new content in the same kind's shape, withoutrecorded_at; an entry keeps itsentry_id, a bank line itsline_idandaccount_ref). Nothing is ever edited.
11.3 Files on the owner's machine. The key file (anchor-kit-key/1: stream_id, key_id, created_at, public_key_pem, private_key_pem, salt), mode 0600, created once and never overwritten: losing every copy ends the stream's history, and anyone holding a copy can sign for it. The journal (anchor-kit-journal/1: the records with their chain hashes, the sealed periods with their receipts, a pending submission, and Rightshold's receipt key as first seen), rewritten atomically. The journal holds the record contents and never leaves the machine; the salt is only in the key file. The account key is read from RIGHTSHOLD_API_KEY and stored nowhere.
11.4 Period salts. Period n (n = 1 for the stream's first period, equal to its server_seq) uses period_salt(n) = HMAC-SHA256(key = master salt bytes, message = ASCII "anchor-kit/1 period " followed by n in decimal), and leaf(seq) = SHA-256(0x00 || period_salt(n) || chain_hash(seq)) for each record of the period. The chain hash runs on across periods. A disclosure reveals one period's salt, never the master salt.
11.5 Sealing. seal closes every record not yet in a period: period_start is the previous period_end (first period: the first record's occurred_at), period_end the seal time, never earlier than the last record. The payload is the nine fields of section 5. The prepared payload is kept as pending before it is sent; after a lost answer the next seal looks for that root in the stream's history and keeps its receipt, or sends the same bytes again, and never prepares a second root while one is pending. It refuses when the journal does not recompute or does not match what Rightshold holds. Each receipt is checked against Rightshold's key before it is kept.
11.6 CSV import. import --entries <file> --bank-lines <file>: RFC 4180, UTF-8, header row, any column order, empty cell = absent, unknown columns refused, all or nothing. Entries: entry_id, type, date, amount_cents, currency, counterparty_ref, category, invoice_number, document_sha256, cash, account_ref. Bank lines: line_id, account_ref, date, amount_cents, currency, balance_after_cents, reference, statement_document_sha256, source. Amounts are whole cents; a decimal point is refused.
11.7 Disclosures and rooms. disclose --seq 3,7 writes, per record, the section 7 bundle (with its period's salt), wrapped as {format: "anchor-kit-disclosures/1", disclosures: [{label, document_sha256, disclosure}]}; --verify posts each to verify-disclosure. --room <room id> shares them into a checking room (section 13) by the owner's room id (arm_…), 50 per request, in seq order, skipping records already there.
11.8 Test vectors. Master salt = bytes 0x00 to 0x1f, stream id vector-stream, four records in one period (n = 1). (e3b0…b855 is the SHA-256 of an empty file; b111…be52 of the ASCII text statement.)
period_salt(1) = 55fc993361b857f49cea1f7997dd8b09d31c422124ef58aba6665e31ba2171d1
period_salt(2) = c222746efa7f0e1c8cde7fb5383f14cfaab33f076b401688b0634ef440d4ab34
seq 1 canonical: {"occurred_at":"2026-01-31T10:00:00Z","payload":{"document_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","kind":"invoice","label":"Invoice 1001","recorded_at":"2026-01-31T10:00:00Z"},"seq":1,"stream_id":"vector-stream","type":"bookkeeping.document"}
chain_hash b80b3808936fc4cce76d957d976db1c84a3cf7bb327fd6c74daf6edf8d69520b
leaf 75d190082a1243cfdf3e49a300623baf7c52e71ff8289e094a224cd5554ff102
seq 2 canonical: {"occurred_at":"2026-01-31T10:01:00Z","payload":{"amount_cents":125000,"cash":false,"category":"revenue","counterparty_ref":"C-0042","currency":"USD","date":"2026-01-31","document_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","entry_id":"E-1001","invoice_number":"1001","recorded_at":"2026-01-31T10:01:00Z","source":"books","type":"invoice_issued"},"seq":2,"stream_id":"vector-stream","type":"bookkeeping.entry"}
chain_hash 47e8dd6c9692df3ce252922c75697ab281b1b56e15af34f43db5c3c673ae8c2f
leaf 0db98d0953b2945c7d1bc622268310671145e45a9e38850f7d52da705fd77e90
seq 3 canonical: {"occurred_at":"2026-02-03T09:00:00Z","payload":{"account_ref":"ACC-1","amount_cents":125000,"balance_after_cents":525000,"currency":"USD","date":"2026-02-03","line_id":"L-1","recorded_at":"2026-02-03T09:00:00Z","source":"bank","statement_document_sha256":"b111c6e1d318f203063e5c16bab43c108326af0aa2f7b65760c95547a43dbe52"},"seq":3,"stream_id":"vector-stream","type":"bookkeeping.bank_line"}
chain_hash 7cc36181f4c8f5557543c26940781b9829d995126712e1d7dac25b475743c716
leaf 2aa6125d2f030915b3713bea4396962ff5f96b6c624100013107ddc0d2e6a2b8
seq 4 canonical: {"occurred_at":"2026-02-03T09:05:00Z","payload":{"corrects":{"chain_hash":"47e8dd6c9692df3ce252922c75697ab281b1b56e15af34f43db5c3c673ae8c2f","seq":2},"reason":"Discount agreed before issue","recorded_at":"2026-02-03T09:05:00Z","replacement":{"content":{"amount_cents":120000,"cash":false,"category":"revenue","counterparty_ref":"C-0042","currency":"USD","date":"2026-01-31","document_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","entry_id":"E-1001","invoice_number":"1001","source":"books","type":"invoice_issued"},"kind":"entry"}},"seq":4,"stream_id":"vector-stream","type":"bookkeeping.correction"}
chain_hash 8c843fa03d39c2dd0f742f93a951889881a7fca266783224f2f51175fac8664e
leaf 23d20bfb60b25f7ae66a7847f3be0087a3440bc7b16a991f4cd202a07b419c2c
merkle_root (period 1) ce54ab1c032e311b230abd56c37d9536bd02f06ce4bdfb88b58421f91c053620
merkle_proof (leaf_index 2) [{"side":"R","hash":"23d20bfb60b25f7ae66a7847f3be0087a3440bc7b16a991f4cd202a07b419c2c"},
{"side":"L","hash":"e262e37b62c81083f8c90face0b8a3ca81d6995b08e3700fc9b546e9418cff5d"}]
day leaf (§10) of {anchor_id "anc_000000000000000000000000", that root, server_seq 1,
received_at "2026-02-03T12:00:00.000Z"} = 4eadb79854dc5c3fa1868fa64e81aaf0efe18c20c338b4b76263a00906773f5512. The offline bundle (anchor-kit-bundle/1)
One JSON file with everything needed to check chosen records with no network access. The kit writes it (export), and a checking room's download is the same layout with two blocks added. One checker reads both: check-anchor-bundle.mjs, SHA-256 at /cli/check-anchor-bundle.sha256.
{
"format": "anchor-kit-bundle/1", "protocol": "anchor/1", "created_at": "YYYY-MM-DDTHH:MM:SSZ",
"stream_id": "<stream id>",
"stream_keys": [ { "key_id", "public_key_pem" } ],
"issuer_key_hint": { "public_key_pem", "note" },
"periods": [ { "anchor_id", "server_seq", "period_start", "period_end", "first_seq", "last_seq", "event_count",
"merkle_root", "prev_root", "key_id", "client_signature", "received_at",
"receipt": { "anchor_id", "stream_id", "merkle_root", "server_seq", "received_at", "signature" },
"daily_root": null | { "date", "super_root", "leaf_index", "inclusion_proof" } } ],
"records": [ { "seq", "kind", "envelope", "sealed_in_period", "anchor_id", "countersigned_at" } ],
"disclosures": [ { "label", "document_sha256", "disclosure", "id"?, "corrects"? } ],
"timestamps": [ { "date", "super_root", "ots_base64" } ],
"room"?: { … },
"forensic_checks"?: { "signed", "signature", "key_id", "public_key_pem", "report" }
}
periods start at server_seq 1 with a zero prev_root, in chain order (the checker does not sort them). daily_root is the super_root block of GET /v1/anchors/{anchor_id}; timestamps holds each named day's .ots file. records[i].envelope equals its disclosure's event; countersigned_at is the receipt-signed received_at of its period. issuer_key_hint proves nothing: pass Rightshold's key yourself with --issuer-key or --trusted-keys.
The checker verifies continuity; each receipt; each client signature; each disclosure's recomputation and that consecutive disclosures link; that a named file's hash is inside its record; each day's inclusion; and that each .ots proof reaches a Bitcoin attestation, whose block height and Merkle root it prints for you to compare with the chain. It says what it did not check. Exit 0 when every check passes, 3 when everything passes but a named file matches no disclosed record, 1 on a failure, 2 on unreadable input.
13. Private checking rooms
A stream is public only under its number. To show its history to one party, the owner opens a checking room: an unguessable link, returned once, showing that party the periods the owner chose, the records the owner shared into it, each day's Bitcoin timestamp and the forensic checks run on those records. The owner's routes need the account key and ownership of the stream:
GET /v1/me/anchor-streams
GET /v1/me/anchor-streams/{stream_id}/rooms
POST /v1/me/anchor-streams/{stream_id}/rooms
GET /v1/me/anchor-rooms/{room_id}
GET /v1/me/anchor-rooms/{room_id}/forensic-checks
POST /v1/me/anchor-rooms/{room_id}/extend
POST /v1/me/anchor-rooms/{room_id}/revoke
POST /v1/me/anchor-rooms/{room_id}/disclosures
POST /v1/me/anchor-rooms/{room_id}/disclosures/{id}/remove
Opening. {counterparty, business_name, purpose, purpose_note?, periods?: {first, last}, expires_in_days?}. purpose is one of loan_application, sale_of_business, partner_review, other. periods are period numbers (server_seq), by default every period so far. expires_in_days is 1 to 90 (default 30); a room can be extended, never past 90 days after it was opened. The answer carries the link once; only its hash is stored. Limits: 20 rooms per stream, 200 records per room, 50 per request; labels up to 120 characters. The counterparty and business names are the owner's own words for that one party and appear only in that room and the owner's views.
Sharing records. {disclosures: [item, …]}, each item the section 7 bundle plus optional document_sha256 (a file the record names), label and corrects (the room id, ard_…, of an earlier record it corrects). An item is accepted only if its anchor is a period of the room's stream within the room's scope, the recomputation reaches that anchor's root, a given document_sha256 is a string value inside the record's payload (record it as payload.document_sha256), and the record is not already in the room. One refused item refuses the whole request and is named (disclosures[i]). When a room closes, the stored proofs are blanked; the owner's list of what was shared stays.
The counterparty's link (no account): GET /room/{token} (the page: not indexed, not cached, no referrer), GET /room/{token}/room.json (the same, format rightshold-anchor-room/1) and GET /room/{token}/bundle.json (the section 12 bundle with its room block and the signed forensic_checks report). Unknown, expired and revoked links answer the same 404. Opens are kept as times only.
Sealing. Opening, revoking, sharing and withdrawing are each sealed on the public ledger as a salted commitment (type anchor.room_record, subject anchor-room, public payload {commitment} only), which the owner can open later to prove what was shown, to whom and when. The forensic checks are the published engine (/forensic-checks), run on exactly the records shared into the room and signed by Rightshold; anyone holding the bundle re-runs them offline and gets the same report.
