// 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.

Prototypeunit + fuzz + invariant + fork testsno outside review yet

// 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.

// check(grant, appKey, folder, scope)

// 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.

bitnamemeaning
1R_NO_GRANTNo such grant on the ledger.
2R_REVOKEDRevoked by the vault owner.
4R_EXPIREDThe grant has expired.
8R_EPOCH_ENDEDThe owner ended every earlier grant (revoke all).
16R_APP_MISMATCHA different app key is asking.
32R_FOLDER_MISMATCHThe grant is for another folder.
64R_SCOPE_MISSINGThe grant does not include this scope.
128R_BAD_SCOPEThe scope asked for is not valid.
256R_FOLDER_RETIREDThe folder was retired.
512R_PAUSEDThe owner paused every grant of this vault.

// live from robinhood chain

Real chain, read just now.

The ledger →
// head block……
// gas price…gwei · eth_gasPrice
Live from chainledger: written + tested, not deployed yet

// this server, counted as you load the page (it can count what it stores, not read it)

…

// what each ledger step costs right now

01Record a folder version hashcommitFolder · 70,650 gas…
02Grant one folder to one app keygrant · 149,738 gas…
03Revoke a grant (same block)revoke · 47,743 gas…
04Anchor a seal of the access loganchorSeal · 92,981 gas…
05App records a read (app signer)recordAccess · 62,702 gas…
06App submits a proposal hashpropose · 86,117 gas…
07Approve or reject a proposaldecide · 48,825 gas…
08End every grant at oncerevokeAll · 45,268 gas…

Gas measured in forge tests (first call). Fee = gas × live gas price × Chainlink ETH/USD; your wallet shows the exact fee.