Skip to content

Protocol guidelines #34

@doerfli

Description

@doerfli
  • An Actor can only modify state through a component
    Exception: Actor InstanceOwner may directly modify instance state

  • A Service can only be called by a component

  • A Service will check if calling Component is registered in Registry

  • A Service will orchestrate Module calls

  • A Module can only be called by a Service with the same GIF major version

  • A Module cannot be called by another Module

  • A Module will check if the calling Service is registered in the Registry and also validate the version

  • An Instance is composed of a set of Modules that use the same GIF major version

Flows

Service registration

sequenceDiagram
    Service->>Registry: register(objectType: Service)
    Registry->>Service: serviceNftId
Loading

Instance registration

sequenceDiagram
    Instance->>Registry: register(objectType: Instance)
    Registry->>Instance: instanceNftId
Loading

Component registration

sequenceDiagram
    Component->>Instance: getInstanceNftId()
    Instance->>Component: instanceNftId
    Component->>ComponentOwnerService: registerComponent(componentType, instanceNftId, otherComponentNftId, token)
    ComponentOwnerService->>Registry: validateInstanceandOtherComponents()
    ComponentOwnerService->>Registry: registerComponent(instanceNftId)
    ComponentOwnerService->>Instance: registerComponent()
    ComponentOwnerService-->>Component: componentNftId
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions