Class EntityId

The ID of an Entity.

In string from an Entity ID looks like this:

leaf:ey02v80j9x376qgcczy8sq0pwvdbx01kbx0n7nbj90f87fnj5c50

Leaf entity IDs always start with leaf: and end with a Crockford base32 encoded sequence of 32 bytes.

Currently these are random bytes, in the future they will be public keys.

Constructors

Properties

Methods

Constructors

  • Create a new Entity ID.

    If id is not specified a random ID will be generated.

    Parameters

    • Optionalid: `leaf:${string}`

      a string starting with leaf: and ending with 32 bytes encoded as a Crockford base32 string.

    Returns EntityId

Properties

bytes: Uint8Array

The raw bytes of the Entity ID.

Methods

  • Get the string formatted Entity ID

    Returns `leaf:${string}`