Readonly
idReturn all descriptions of a specific type from this.contactDescriptions.
You can modify the returned objects in-place and then save the profile in order to update the profile.
Return all endpoints of a specific type from this.communicationEndpoints.
You can modify the returned objects in-place and then save the profile in order to update the profile.
Load a specific profile version.
Save the profile to disk and load the latest version.
Why is there no pure save() function? The cause are crdts. The object that is eventually written to disk might differ from the current state of this instance. This happens when new data was received via chum since the last load. This means that we don't have a hash representing the current state.
TODO: It is possible to write the intermediary state and obtain a hash. So we can implement a pure save() function. But this requires the lower levels to write the top level object of the tree and return the corresponding hash to the caller. The storeVersionedObjectCRDT and the plan interfaces don't support that right now in a easy to grasp way.
Static
constructStatic
constructStatic
constructStatic
constructStatic
constructCreate a profile if it does not exist.
If you specify descriptions and / or endpoints here and a profile version already exists without those endpoints and / or descriptions it will add them again.
The latest version of the profile or an empty profile.
This class is a nicer frontend for the Profile recipe.
A profile describes a persons identity in more detail. What is an identity in one? The identity used throughout ONE is the SHA256IdHash. The profile glues additional information to such
an identity like:
Reasons for not using the Profile recipe directly:
There are alternative designs. I just want to try this approach because of the reasons mentioned above. This might be a start on how to represent CRDT managed types - but later in a generic way.