-
Notifications
You must be signed in to change notification settings - Fork 57
Description
While explaining the metadata / mosaic transactions, I found challenging to follow the examples if we have to refer to the key as random UInt64
value that the dev has to store its meaning in a separate database.
To permit the dev to use NEM as a fully decentralized service without having to store data somewhere else and enhance the usability in the SDK, we could provide with a KeyGenerator
that takes a string as an input and returns a deterministic UInt64
object.
You can see how this is possible currently using the NamespaceIdGenerator
(https://github.com/nemtech/nem2-docs/blob/master/source/resources/examples/typescript/restriction/RestrictingMosaicsTransfersMosaicGlobalRestriction.ts#L42).
In the docs, we can explain more about the maximum value the string can have to be translated to a valid UInt64 value, as well as if can contain special chars or not.