Render
func(path string) stringRender serves the directory index at "" and one identity card at "\<name>". The index deliberately does not compute a Berty link per row: base58 over a 70-byte payload is big-integer work, and it belongs on the page that a human actually asked for.
- OID
- 0ecaa6…7ead:3
Render details
renderIndex
func() string- OID
- 0ecaa6…7ead:5
renderIndex details
renderIdentity
func(name string) string- OID
- 0ecaa6…7ead:6
renderIdentity details
modeLabel
func(id *v0.identity) string- OID
- 0ecaa6…7ead:7
modeLabel details
activeDevices
func(id *v0.identity) intactiveDevices counts the distinct devices whose latest sigchain entry is an add. A device can be added, revoked and added again, so only the last entry for each key decides.
- OID
- 0ecaa6…7ead:8
activeDevices details
short
func(s string) stringshort abbreviates a long hex string for table cells.
- OID
- 0ecaa6…7ead:9
short details
MinNameLen
untyped bigintValue
(3 <untyped> bigint)
MaxNameLen
untyped bigintValue
(32 <untyped> bigint)
MaxDevices
untyped bigintValue
(64 <untyped> bigint)
MaxRotations
untyped bigintValue
(32 <untyped> bigint)
rotation
typerotation is one seed (or commitment) an identity has published.
Value
v0.rotation
deviceEntry
typedeviceEntry is one verified sigchain statement.
Value
v0.deviceEntry
identity
typeidentity is a published Wesh identity bound to one gno address. payload holds the public rendezvous seed when committed is false, and H(seed ‖ salt) when it is true. head is the digest of the last accepted sigchain entry, which the next entry must chain to.
Value
v0.identity
byName
v0.Tree- OID
- 0ecaa6…7ead:11
byName details
byOwner
v0.Tree- OID
- 0ecaa6…7ead:13
byOwner details
byAccount
v0.Tree- OID
- 0ecaa6…7ead:15
byAccount details
Register
func(name string, accountPKHex string, seedHex string, displayName string, sigHex string)Register publishes an identity whose rendezvous seed is public. sigHex must be an ed25519 signature by the account private key over wesh.BindStatement(chainID, caller, accountPK, seed, 1). Revision 1 is fixed at registration so a signature captured from a later rotation cannot be replayed to re-register the name after it is released.
- OID
- 0ecaa6…7ead:16
Register details
RegisterCommitted
func(name string, accountPKHex string, commitmentHex string, displayName string, sigHex string)RegisterCommitted publishes an identity that keeps its rendezvous point off chain: commitmentHex is wesh.SeedCommitment(seed, salt), and the seed itself is shared out of band. The chain still attests the binding (this account key really did claim this commitment from this gno address), so a seed later disclosed privately can be checked against it. What it does not do is tell the world where the account listens.
- OID
- 0ecaa6…7ead:18
RegisterCommitted details
register
func(caller .uverse.address, name string, accountPKHex string, payloadHex string, displayName string, sigHex string, committed bool)register is shared by Register and RegisterCommitted. It takes the already resolved caller rather than a realm: a helper whose first parameter is \`realm\` would be a second crossing hop, and Previous() inside it would resolve to this realm rather than to the user who called in.
- OID
- 0ecaa6…7ead:19
register details
Rotate
func(payloadHex string, sigHex string)Rotate publishes a new seed (or commitment) for the caller's identity. This is the operation weshnet's ContactRequestResetReference has no counterpart for. There, resetting the seed silently invalidates every link ever shared. Here the new value is numbered and the old one stays in the history, so a holder of a stale link can see that it was superseded and when. The signature must be over revision+1, which is what stops a superseded binding being replayed to roll a rotation back.
- OID
- 0ecaa6…7ead:20
Rotate details
AppendDevice
func(prevHex string, op string, devicePKHex string, sigHex string)AppendDevice adds one entry to the caller's device sigchain. prevHex must be the digest of the current head (all zeros for the first entry), and the signature must cover the whole statement including the sequence number and that digest. Chaining every entry to its predecessor is what stops the log being reordered or having an entry quietly dropped: any gap changes every digest after it. op is "add" or "revoke". Adding a device that is already active, or revoking one that is not, is refused: an append-only log is only useful if its entries are meaningful.
- OID
- 0ecaa6…7ead:21
AppendDevice details
SetDisplayName
func(displayName string)SetDisplayName updates the identity's free-form label. It carries no signature because it authenticates nothing: the display name is app metadata, and berty's own link format keeps it outside the signed payload for the same reason. Only the owning address may change it.
- OID
- 0ecaa6…7ead:22
SetDisplayName details
Release
func()Release removes the caller's identity and frees its name and account key. The sigchain goes with it. That is the honest behaviour: a directory entry is a live claim, not an archive, and keeping a dangling roster for a name somebody else can now take would be worse than keeping nothing.
- OID
- 0ecaa6…7ead:23
Release details
Resolve
func(name string) (accountPKHex string, payloadHex string, committed bool, ok bool)Resolve returns the account key and current payload of a name, both hex, and whether the payload is a commitment rather than a seed. ok is false when the name is not registered.
- OID
- 0ecaa6…7ead:24
Resolve details
Link
func(name string) stringLink returns the shareable Berty web link for a name, or "" when the name is unknown or its rendezvous point is committed rather than published.
- OID
- 0ecaa6…7ead:25
Link details
RendezvousPointAt
func(name string, unixSec int64) stringRendezvousPointAt returns the hex rendezvous point the named account announces on during the rotation period containing unixSec, or "" when the name is unknown or committed. This is what makes a directory entry checkable rather than merely claimed: anyone can compare it against the DHT without trusting this realm.
- OID
- 0ecaa6…7ead:26
RendezvousPointAt details
DeviceStatus
func(name string, devicePKHex string) stringDeviceStatus reports "active", "revoked" or "unknown" for a device under a name. "unknown" also covers an unregistered name: a caller must not be able to tell those apart by status alone.
- OID
- 0ecaa6…7ead:27
DeviceStatus details
SigchainHead
func(name string) stringSigchainHead returns the hex digest the next sigchain entry must chain to, or "" when the name is unknown. A client builds its next statement from this.
- OID
- 0ecaa6…7ead:28
SigchainHead details
NameOf
func(owner .uverse.address) stringNameOf returns the handle owned by an address, or "".
- OID
- 0ecaa6…7ead:29
NameOf details
Count
func() intCount returns the number of registered identities.
- OID
- 0ecaa6…7ead:30
Count details
lookup
func(name string) *v0.identity- OID
- 0ecaa6…7ead:31
lookup details
contactOf
func(id *v0.identity) v0.Contact- OID
- 0ecaa6…7ead:32
contactOf details
deviceIsActive
func(id *v0.identity, devicePK []uint8) bool- OID
- 0ecaa6…7ead:33
deviceIsActive details
deviceSeen
func(id *v0.identity, devicePK []uint8) bool- OID
- 0ecaa6…7ead:34
deviceSeen details
mustOwnIdentity
func(caller .uverse.address) *v0.identity- OID
- 0ecaa6…7ead:35
mustOwnIdentity details
mustAccountPK
func(s string) []uint8- OID
- 0ecaa6…7ead:36
mustAccountPK details
mustPayload
func(s string, committed bool) []uint8- OID
- 0ecaa6…7ead:37
mustPayload details
mustSig
func(s string) []uint8- OID
- 0ecaa6…7ead:38
mustSig details
assertDisplayName
func(s string)- OID
- 0ecaa6…7ead:39
assertDisplayName details
assertNameAvailable
func(name string)- OID
- 0ecaa6…7ead:40
assertNameAvailable details
normalizeName
func(name string) stringnormalizeName lowercases a handle so lookups are case-insensitive and two handles cannot differ only by case.
- OID
- 0ecaa6…7ead:41