IObjectInteraction
Handles object interactions via directed relations (arcs).
Encodings
- SID : {uint64 set | uint64 id} → uint128
- Node : {uint64 data | uint32 _ | uint32 grant | uint64 set | uint64 id} → uint256
- Arc : {uint64 data | uint64 rel | uint64 set | uint64 id} → uint256
Functions
relate
Links a tail object to a head object through a relation
function relate(uint256 tail, uint64 rel, uint256 head) external;
Parameters
Name | Type | Description |
---|---|---|
tail | uint256 | Encoded tail node |
rel | uint64 | Relation ID |
head | uint256 | Encoded head node |
unrelate
Unlinks a tail object from a head object
function unrelate(uint256 tail, uint64 rel, uint256 head) external;
Parameters
Name | Type | Description |
---|---|---|
tail | uint256 | Encoded tail node |
rel | uint64 | Relation ID |
head | uint256 | Encoded head node |
Events
Related
Emitted when a tail is linked to a head through a relation
event Related(uint128 head, Descriptor desc, uint256 arc);
Parameters
Name | Type | Description |
---|---|---|
head | uint128 | Encoded SID of the head object |
desc | Descriptor | Descriptor of the head after the relation |
arc | uint256 | Encoded incoming arc |
Related
Emitted when multiple tails are linked to a head
event Related(uint128 head, Descriptor desc, uint256[] arcs);
Parameters
Name | Type | Description |
---|---|---|
head | uint128 | Encoded SID of the head object |
desc | Descriptor | Descriptor of the head after the relations |
arcs | uint256[] | Array of encoded incoming arcs |
Unrelated
Emitted when a tail is unlinked from a head
event Unrelated(uint128 head, Descriptor desc, uint256 arc);
Parameters
Name | Type | Description |
---|---|---|
head | uint128 | Encoded SID of the head object |
desc | Descriptor | Descriptor of the head after unlinking |
arc | uint256 | Encoded incoming arc |
Unrelated
Emitted when multiple tails are unlinked from a head
event Unrelated(uint128 head, Descriptor desc, uint256[] arcs);
Parameters
Name | Type | Description |
---|---|---|
head | uint128 | Encoded SID of the head object |
desc | Descriptor | Descriptor of the head after unlinking |
arcs | uint256[] | Array of encoded incoming arcs |