@roomy-chat/sdk
    Preparing search index...

    Class Roomy

    A roomy instance.

    Contains everything necessary to interact with Roomy data

    Hierarchy (View Summary)

    Index

    Accessors

    Methods

    • Register a callback that will be run when the entity is committed.

      Parameters

      • listener: () => void

      Returns () => void

      A function that may be called to unregister the callback.

    • Create a Roomy instance.

      Parameters

      • peer: Peer

        You must first construct a Leaf Peer and configure it's storage backend and syncer implementations before constructing the Roomy instance.

      • catalogId: IntoEntityId

        The catalogId ID of the entity that will be used to store the user's list of joined spaces, preferences, etc.

      Returns Promise<Roomy>

    • Checks whether the given entity matches this wrapper type.

      The default implementation is to return true for every entity, but some wrappers will override it to check for the existence of certain marker components.

      Parameters

      Returns boolean

    General

    • get id(): `leaf:${string}`

      The string entity ID.

      Returns `leaf:${string}`

    • Commit any changes made to the entity.

      Important: You must call commit after making changes in order for those changes to be immediately applied, reacted to, and synced to network and/or storage.

      Returns void

    Advanced

    entity: Entity

    The underlying Leaf Entity.

    peer: Peer

    The leaf peer instance.