Class: EntityInterface

EntityInterface(client, payload)

Interface Class for Entity instances (non-static methods) Not meant to be used by itself. Use `Entity` instead.

Constructor

new EntityInterface(client, payload)

Create a new EntityInterface instance
Parameters:
Name Type Description
client Client a `Client` instance
payload object the `EntityObject` that the `CID` represents
Author:
  • Michael Hirn <michael.j.hirn+rlay[]gmail.com>
Source:

Methods

_schemaKeyHandler()

Manages a payload key e.g. annotations, target, or subject etc. and either finds (resolves) the CID or decodes the value/target.
Source:
Returns:
[Array>] - Array of Array with path and Object

(async) assert(assertions) → {Array.<String>}

Create the class, data, object, and other assertions for an `Individual`
Parameters:
Name Type Description
assertions Object The non-inherent properties of the individual
Source:
Returns:
- The `CID`s of the assertions
Type
Array.<String>

(async) fetch()

Given the payload of the entity it fetches the related entities and instantiates proper `Entities` from them.
Source: