// ledger · robinhood chain
SemoraAccessLedger. Hashes, grants and seals.
The optional public record behind the vault. It never stores notes, names or ciphertext, holds no funds (no payable function), has no admin, no fee and no upgrade. Deploy gas about 1.95 million, paid in ETH.
// contract
Written and tested, not deployed yet. The owner deploys it once; until then the vault, grants and log work on the server alone, and this page shows the contract's rules.
// functions
commitFolder(folderId, expectedVersion, cipherHash, size)Record a folder version. A stale expectedVersion is refused, so two devices cannot overwrite each other silently.
grant(folderId, appKeyHash, appSigner, scope, expiresAt)One folder to one app key: read (1), propose (2) or both (3), at most 366 days.
revoke(id) · revokeAll() · setPaused(bool)Owner only, effective in the same block. The app can never change or extend a grant.
check(id, appKeyHash, folderId, want)A reason bitmask, 0 = allowed. Apps and the site read it before acting (a reverted transaction leaves no log).
recordAccess(id, version, readHash) · propose(id, hash)For apps that have an on-chain signer: a read record, a proposal hash.
decide(hash, approve, newCipherHash, expectedVersion, size)Owner approves or rejects; an approval can move the folder to its next version in the same call.
anchorSeal(root, entries, fromTs, toTs) · verifyEntry(...)Anchor the Merkle root of access-log entries; anyone can verify one entry with its proof.
| bit | name | meaning |
|---|---|---|
| 1 | R_NO_GRANT | No such grant on the ledger. |
| 2 | R_REVOKED | Revoked by the vault owner. |
| 4 | R_EXPIRED | The grant has expired. |
| 8 | R_EPOCH_ENDED | The owner ended every earlier grant (revoke all). |
| 16 | R_APP_MISMATCH | A different app key is asking. |
| 32 | R_FOLDER_MISMATCH | The grant is for another folder. |
| 64 | R_SCOPE_MISSING | The grant does not include this scope. |
| 128 | R_BAD_SCOPE | The scope asked for is not valid. |
| 256 | R_FOLDER_RETIRED | The folder was retired. |
| 512 | R_PAUSED | The owner paused every grant of this vault. |
// live from robinhood chain
Real chain, read just now.
// this server, counted as you load the page (it can count what it stores, not read it)
// what each ledger step costs right now
Gas measured in forge tests (first call). Fee = gas × live gas price × Chainlink ETH/USD; your wallet shows the exact fee.