Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

Render

func(path string) string

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

Open
OID
0ecaa6…7ead:3
Render details

Inspect func

renderIdentity

func(name string) string
Open
OID
0ecaa6…7ead:6
renderIdentity details

Inspect func

modeLabel

func(id *v0.identity) string
Open
OID
0ecaa6…7ead:7
modeLabel details

Inspect func

activeDevices

func(id *v0.identity) int

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

Open
OID
0ecaa6…7ead:8
activeDevices details

Inspect func

short

func(s string) string

short abbreviates a long hex string for table cells.

Open
OID
0ecaa6…7ead:9
short details

Inspect func

MinNameLen

untyped bigint

Value

(3 <untyped> bigint)

MaxNameLen

untyped bigint

Value

(32 <untyped> bigint)

MaxDevices

untyped bigint

Value

(64 <untyped> bigint)

MaxRotations

untyped bigint

Value

(32 <untyped> bigint)

rotation

type

rotation is one seed (or commitment) an identity has published.

Value

v0.rotation

deviceEntry

type

deviceEntry is one verified sigchain statement.

Value

v0.deviceEntry

identity

type

identity 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

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.

Open
OID
0ecaa6…7ead:16
Register details

Inspect func

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.

Open
OID
0ecaa6…7ead:18
RegisterCommitted details

Inspect func

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.

Open
OID
0ecaa6…7ead:19
register details

Inspect func

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.

Open
OID
0ecaa6…7ead:20
Rotate details

Inspect func

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.

Open
OID
0ecaa6…7ead:21
AppendDevice details

Inspect func

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.

Open
OID
0ecaa6…7ead:22
SetDisplayName details

Inspect func

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.

Open
OID
0ecaa6…7ead:23
Release details

Inspect func

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.

Open
OID
0ecaa6…7ead:24
Resolve details

Inspect func

RendezvousPointAt

func(name string, unixSec int64) string

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

Open
OID
0ecaa6…7ead:26
RendezvousPointAt details

Inspect func

DeviceStatus

func(name string, devicePKHex string) string

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

Open
OID
0ecaa6…7ead:27
DeviceStatus details

Inspect func

SigchainHead

func(name string) string

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

Open
OID
0ecaa6…7ead:28
SigchainHead details

Inspect func

NameOf

func(owner .uverse.address) string

NameOf returns the handle owned by an address, or "".

Open
OID
0ecaa6…7ead:29
NameOf details

Inspect func

Count

func() int

Count returns the number of registered identities.

Open
OID
0ecaa6…7ead:30
Count details

Inspect func

lookup

func(name string) *v0.identity
Open
OID
0ecaa6…7ead:31
lookup details

Inspect func

contactOf

func(id *v0.identity) v0.Contact
Open
OID
0ecaa6…7ead:32
contactOf details

Inspect func

deviceIsActive

func(id *v0.identity, devicePK []uint8) bool
Open
OID
0ecaa6…7ead:33
deviceIsActive details

Inspect func

deviceSeen

func(id *v0.identity, devicePK []uint8) bool
Open
OID
0ecaa6…7ead:34
deviceSeen details

Inspect func

mustOwnIdentity

func(caller .uverse.address) *v0.identity
Open
OID
0ecaa6…7ead:35
mustOwnIdentity details

Inspect func

mustAccountPK

func(s string) []uint8
Open
OID
0ecaa6…7ead:36
mustAccountPK details

Inspect func

mustPayload

func(s string, committed bool) []uint8
Open
OID
0ecaa6…7ead:37
mustPayload details

Inspect func

assertDisplayName

func(s string)
Open
OID
0ecaa6…7ead:39
assertDisplayName details

Inspect func

assertNameAvailable

func(name string)
Open
OID
0ecaa6…7ead:40
assertNameAvailable details

Inspect func

normalizeName

func(name string) string

normalizeName lowercases a handle so lookups are case-insensitive and two handles cannot differ only by case.

Open
OID
0ecaa6…7ead:41
normalizeName details

Inspect func
Render : func(path string) string Inspect
renderIndex : func() string Inspect
renderIdentity : func(name string) string Inspect
modeLabel : func(id *v0.identity) string Inspect
activeDevices : func(id *v0.identity) int Inspect
short : func(s string) string Inspect
MinNameLen : untyped bigint =(3 <untyped> bigint)
MaxNameLen : untyped bigint =(32 <untyped> bigint)
MaxDevices : untyped bigint =(64 <untyped> bigint)
MaxRotations : untyped bigint =(32 <untyped> bigint)
rotation : type =v0.rotation
deviceEntry : type =v0.deviceEntry
identity : type =v0.identity
byName : v0.Tree Inspect
byOwner : v0.Tree Inspect
byAccount : v0.Tree Inspect
Register : func(name string, accountPKHex string, seedHex string, displayName string, sigHex string) Inspect
RegisterCommitted : func(name string, accountPKHex string, commitmentHex string, displayName string, sigHex string) Inspect
register : func(caller .uverse.address, name string, accountPKHex string, payloadHex string, displayName string, sigHex string, committed bool) Inspect
Rotate : func(payloadHex string, sigHex string) Inspect
AppendDevice : func(prevHex string, op string, devicePKHex string, sigHex string) Inspect
SetDisplayName : func(displayName string) Inspect
Release : func() Inspect
Resolve : func(name string) (accountPKHex string, payloadHex string, committed bool, ok bool) Inspect
RendezvousPointAt : func(name string, unixSec int64) string Inspect
DeviceStatus : func(name string, devicePKHex string) string Inspect
SigchainHead : func(name string) string Inspect
NameOf : func(owner .uverse.address) string Inspect
Count : func() int Inspect
lookup : func(name string) *v0.identity Inspect
contactOf : func(id *v0.identity) v0.Contact Inspect
deviceIsActive : func(id *v0.identity, devicePK []uint8) bool Inspect
deviceSeen : func(id *v0.identity, devicePK []uint8) bool Inspect
mustOwnIdentity : func(caller .uverse.address) *v0.identity Inspect
mustAccountPK : func(s string) []uint8 Inspect
mustPayload : func(s string, committed bool) []uint8 Inspect
mustSig : func(s string) []uint8 Inspect
assertDisplayName : func(s string) Inspect
assertNameAvailable : func(name string) Inspect
normalizeName : func(name string) string Inspect