A model that represents an affirmed role.

Note: Depends on the reverse maps of the LeuteModel to be able to find the someone from the personId and objectEvents to listen for new instances/signatures.

Hierarchy (view full)

Implements

Constructors

Properties

onFound: OEvent<(() => void | Promise<void>)> = ...
onInitialised: OEvent<(() => void | Promise<void>)> = ...
onUpdated: OEvent<(() => void)> = ...
state: StateMachine<"Uninitialised" | "Initialised", "shutdown" | "init">

Methods

  • Checks if the data is affirmed by the role person ids.

    Parameters

    • data: SHA256Hash | SHA256IdHash

      The data to check.

    • OptionalbyPersonId: SHA256IdHash<Person>

      The personId that should be trusting the data.

    Returns Promise<boolean>

    True if the data is affirmed, false otherwise.

  • Checks if the data is signed by the role person ids.

    Parameters

    • data: SHA256Hash

      The data to check.

    • OptionalbyPersonId: SHA256IdHash<Person>

      The personId that should be signing the data.

    Returns Promise<boolean>

    True if the data is signed, false otherwise.

  • Checks if the person is a role person.

    Parameters

    • OptionalpersonId: SHA256IdHash<Person>

      The personId to check. Default is the current person.

    Returns Promise<boolean>

    True if the person is a role person, false otherwise.

  • Parameters

    • _rolePersonId: SHA256IdHash<Person>
    • _shareWithPersonIds: SHA256IdHash<Person>[]

    Returns Promise<void>

  • Parameters

    • shareWithPersonIds: SHA256IdHash<Person>[]
    • options: {
          forcePropagate?: boolean;
          rolePersonId?: SHA256IdHash<Person>;
      } = {}
      • OptionalforcePropagate?: boolean
      • OptionalrolePersonId?: SHA256IdHash<Person>

    Returns Promise<void>

""