Using the key-lock pattern in Sui by Examples, I am envisioning the creation of a verification system on Sui. A central trusted authority can build the following:
3 structs
- Certificate: shared-object - contained within is another object and contained within this object are the metadata related to the certification, e.g. Name, Type of Certification, etc.
- Permission - a struct that must be injected into getters to read metadata of a particular certificate: Certificate and is itself destroyed at the end of the transaction, providing only a one-time read. Transferable to intended recipients. Getters to check if transaction sender owns the Permission.
- Permission key - non-transferable (except on initialization, to be transferred to transaction sender), used to generate Permissions (explained above).
My only concern is that since entry functions cannot return a value, it might be hard to implement the above design, how should I approach this problem?