StaticfromStaticfromCreate a new XID from data (validates length).
Returns error if the data is not the correct length.
StaticfromStaticfromStaticrandomGenerate a random XID (for testing purposes).
Note: In practice, XIDs should be created from the SHA-256 hash of a public signing key's CBOR encoding.
Return the data of the XID.
Get the data of the XID as a byte slice.
Get a copy of the raw XID bytes.
Get hex string representation (lowercase, matching Rust implementation).
Get base64 representation.
Get short description (first 4 bytes) as hex.
Get short reference (first 4 bytes) as hex (alias for shortDescription).
Get the first four bytes of the XID as upper-case ByteWords.
If true, prepends the XID prefix "🅧 "
Space-separated uppercase bytewords, e.g., "🅧 URGE DICE GURU IRIS"
Get the first four bytes of the XID as Bytemoji.
If true, prepends the XID prefix "🅧 "
Space-separated emojis, e.g., "🅧 🐻 😻 🍞 💐"
Get string representation.
Returns the CBOR tags associated with XID.
Returns the untagged CBOR encoding (as a byte string).
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
StaticfromStaticfromStaticfromReturns the UR representation of the XID. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.
Returns the UR string representation.
StaticfromStaticfrom
Create a new XID from data.