# Functions
Cast takes an ID data slice, parses it and returns an ID.
Decode parses an ID-encoded string and returns an ID object.
ExtractEncoding from an ID.
FromAddr returns ID from a multiaddress if present.
KeyFromBytes returns a key by wrapping k.
KeyFromString returns a key by decoding a base32-encoded string.
NewIDV1 returns a new random ID using the given variant.
NewKey wraps service and read keys.
NewLibp2pIdentity returns a new Libp2pIdentity.
NewLibp2pPubKey returns a new PubKey.
NewRandomKey returns a random key, which includes a service and read key.
NewRandomServiceKey returns a random service-only key.
NewServiceKey wraps a service-only key.
NewToken issues a new JWT token from issuer for the given pubic key.
NewTokenContext adds Token to a context.
NewTokenFromMD returns Token from the given context, if present.
ToAddr returns ID wrapped as a multiaddress.
TokenFromContext returns Token from a context.
# Constants
Supports access control lists.
Code is the protocol code.
No description provided by the author
Name is the protocol slug.
Protocol is the threads protocol tag.
Variants.
Versions.
Version is the current protocol version.
# Variables
ErrIDTooShort means that the ID passed to decode was not long enough to be a valid ID.
ErrInvalidKey indicates an invalid byte slice was given to KeyFromBytes.
ErrInvalidToken indicates the token is invalid.
ErrTokenNotFound indicates the token was not found in the context.
ErrVarintBuffSmall means that a buffer passed to the ID parser was not long enough, or did not contain an invalid ID.
ErrVarintTooBig means that the varint in the given ID was above the limit of 2^64.
No description provided by the author
Undef can be used to represent a nil or undefined Cid, using Cid{} directly is also acceptable.
# Structs
Credentials implements PerRPCCredentials, allowing context values to be included in request metadata.
Head represents the log head (including the number of records in the log and the id of the head).
Info holds thread logs, keys and addresses.
Key is a thread encryption key with two components.
Libp2pIdentity wraps crypto.PrivKey, overwriting GetPublic with thread.PubKey.
Libp2pPubKey wraps crypto.PubKey.
LogInfo holds log keys, addresses, and heads.