MaxKeySize
untyped bigintValue
(65536 <untyped> bigint)
MaxKeyTypeSize
untyped bigintValue
(64 <untyped> bigint)
commit
typecommit is everything the registry knows about one account.
Value
v1.commit
latestKept
untyped bigintlatestKept is the number of accounts the home page lists.
Value
(10 <untyped> bigint)
commits
v0.Tree// address -> \*commit
- OID
- 01e997…7c65:4
commits details
bound
int// number of accounts with a bound key
Value
1
latest
[]string- OID
- 01e997…7c65:42
latest details
Register
func(rootSHA256 string, rootKeccak256 string, height int)Register stores the Quantum Recovery Commit of the calling account: the roots of its SHA-256 and Keccak-256 trees, hex encoded, and their height. An account registers once. Its usual key has no say over the commit afterwards; only the one-time keys can replace it, through Rotate. A registration can never be corrected or withdrawn, and nothing here checks that the roots are a SHA-256 tree and a Keccak-256 tree of the given height: derive both roots and the height from the kit, in this order, and check them before sending. The caller must be the account itself, in a direct call or in a script it runs; a session key is refused.
- OID
- 01e997…7c65:7
Register details
Bind
func(account .uverse.address, leaf int, keyType string, key []uint8, proofSHA256 []uint8, proofKeccak256 []uint8)Bind registers key as the new public key of account, under the free label keyType (for instance "ML-DSA-65"). key holds 1 to MaxKeySize bytes; a scheme with a longer public key can bind a digest of it, under a label that says so. The request must be signed with one-time key number leaf of both trees of the account: proofSHA256 and proofKeccak256 are the proofs of qrc.BindMessage for these arguments, with the account written as the chain writes it (lower case), whatever spelling the account argument uses. The leaf is spent. A signed request stays valid until its leaf is spent or the account rotates, and whoever holds it may send it at any time: requests take effect in the order they land, not the order they were signed. To replace a key while an earlier Bind for another key may still be pending, rotate first, bind in the new generation, then check Key. After a failure, send the same signed request again rather than sign for another key. Anyone may send the transaction. Whoever sends it pays the storage deposit of the bytes it adds and receives the refund of the bytes it frees. In a transaction, the three byte arguments are written in base64, which the chain decodes before the call.
- OID
- 01e997…7c65:9
Bind details
Rotate
func(account .uverse.address, leaf int, rootSHA256 string, rootKeccak256 string, height int, proofSHA256 []uint8, proofKeccak256 []uint8)Rotate replaces the commit of account by a new one: two new roots, hex encoded, and their height. The public key bound to the account stays. Nothing checks the new roots any more than Register checks the first ones. The request must be signed with one-time key number leaf of both current trees: the proofs are those of qrc.RotateMessage for these arguments, with the account written as the chain writes it (lower case). Proofs against the replaced trees are refused afterwards. The registry cannot see inside new roots: new trees must not reuse the old keys. The Rotated event reports the new generation; its leaf belongs to the one before. A signed rotation stays valid until its leaf is spent or the account rotates: only another rotation can cancel it. Anyone may send the transaction. Whoever sends it pays the storage deposit of the bytes it adds and receives the refund of the bytes it frees. In a transaction, the two proofs are written in base64, which the chain decodes before the call.
- OID
- 01e997…7c65:10
Rotate details
Authorize
func(account .uverse.address, leaf int, payload []uint8, proofSHA256 []uint8, proofKeccak256 []uint8)Authorize spends one-time key number leaf of account on payload, on behalf of the calling realm. It returns only if both proofs are valid signatures of qrc.AuthorizeMessage for the caller's package path and payload, and panics otherwise. account must be written as the chain writes it, in lower-case bech32, so that the calling realm holds exactly the account whose keys signed. It lets a realm act for an account on the sole strength of its recovery keys. A proof made for one realm is useless to any other, and what the payload means is entirely up to the caller. An approval stays valid until its leaf is spent or the account rotates: the registry gives it no deadline and no nonce, so an app must put both in the payload and check them. The approval names a package path, not code: check what runs at that path before signing. The calling realm sees the proofs before its transaction ends and may still make it fail, which leaves the leaf unspent here although its signature is public. A wallet must treat a leaf as spent as soon as a signature made with it leaves the wallet, and never sign anything else with it.
- OID
- 01e997…7c65:11
Authorize details
spend
func(c *v1.commit, leaf int, msg []uint8, proofSHA256 []uint8, proofKeccak256 []uint8)spend checks that msg is signed with one-time key number leaf of both trees of c, then marks the leaf as used. It panics, leaving c as it was, if the leaf was used before or if either proof fails.
- OID
- 01e997…7c65:12
spend details
commitID
func(account .uverse.address, c *v1.commit) v1.IDcommitID returns the ID that messages signed for the current commit of account must carry.
- OID
- 01e997…7c65:13
commitID details
canonical
func(account .uverse.address) .uverse.address- OID
- 01e997…7c65:14
canonical details
get
func(account .uverse.address) *v1.commitget returns the commit of account, or nil if it has none. The account must be in its canonical form.
- OID
- 01e997…7c65:15
get details
mustGet
func(account .uverse.address) *v1.commit- OID
- 01e997…7c65:16
mustGet details
hashHex
func(b []uint8) string- OID
- 01e997…7c65:17
hashHex details
checkTrees
func(rootSHA256 [32]uint8, rootKeccak256 [32]uint8, height int)- OID
- 01e997…7c65:18
checkTrees details
checkKeyType
func(keyType string)- OID
- 01e997…7c65:19
checkKeyType details
decodeRoot
func(s string) [32]uint8- OID
- 01e997…7c65:20
decodeRoot details
Has
func(account .uverse.address) boolHas reports whether account has a commit.
- OID
- 01e997…7c65:21
Has details
Count
func() (accounts int, withKey int)Count returns the number of accounts that hold a commit and, among them, the number that bound a new public key.
- OID
- 01e997…7c65:23
Count details
IsUsed
func(account .uverse.address, leaf int) boolIsUsed reports whether one-time key number leaf of account was spent. It is false for an account without commit and for a leaf out of range. It only knows of keys spent by a transaction that succeeded: a signature made public in a failed one leaves its leaf unspent here, yet no wallet should sign with that leaf again.
- OID
- 01e997…7c65:24
IsUsed details
Key
func(account .uverse.address) (keyType string, key []uint8, ok bool)Key returns a copy of the public key last bound to account, with its label. ok is false if the account has no commit or never bound a key.
- OID
- 01e997…7c65:25
Key details
KeyBase64
func(account .uverse.address) stringKeyBase64 returns the public key last bound to account, base64 encoded, or an empty string if there is none.
- OID
- 01e997…7c65:26
KeyBase64 details
Lookup
func(account .uverse.address) stringLookup returns what the registry holds about account as a JSON object, or the JSON value null if the account has no commit. It leaves out the roots of earlier generations. registeredAt, rotatedAt and keyAt are block heights, rotatedAt being 0 before any rotation; registeredTime is in Unix seconds. "used" is the bitmap of the one-time keys spent in the current trees, in hexadecimal: key number n is spent when bit n%8, counting from the least significant, of byte n/8 is set. The key fields are only present once a key was bound; keyLeaf is a leaf of generation keyGeneration, which a later rotation retires. The key itself is served by KeyBase64.
- OID
- 01e997…7c65:27
Lookup details
Latest
func() stringLatest returns the accounts that registered last, newest first, at most latestKept of them, as a JSON array of objects. Each object holds the account, its rank, the height of its trees, the number of one-time keys spent in its current trees, its generation and, once a key was bound, the label of that key. The rest of what the registry holds about an account is served by Lookup.
- OID
- 01e997…7c65:28
Latest details
Render
func(path string) stringRender shows the registry: its home page for an empty path, the page of an account for "\<address>" or "account?address=\<address>".
- OID
- 01e997…7c65:29
Render details
renderHome
func() string- OID
- 01e997…7c65:30
renderHome details
renderAccount
func(input string) string- OID
- 01e997…7c65:31
renderAccount details
keySummary
func(c *v1.commit) stringkeySummary describes the key bound to c. The label is whatever the account chose, so it goes in a code span: nothing in it can then turn into a link or into formatting on a page that other people read.
- OID
- 01e997…7c65:32
keySummary details
plural
func(n int, one string, many string) string- OID
- 01e997…7c65:33
plural details
queryValue
func(query string, name string) stringqueryValue returns the raw value of the first parameter called name in a URL query string, or "". Values are not unescaped: the only one read here is an address, which needs no escaping. A space typed around it arrives as '+', which the caller trims.
- OID
- 01e997…7c65:34