Support haf-app based lite accounts
This is probably best done as a haf app, but creating issue here for now.
Purpose: allow people to use Hive (or other Hive based apps like some games) without a need to create Hive account.
Initial design goals/functionality for further discussion:
- App code reuse. It should be possible to embed this app code by 3rd party apps. Reusing should be done by explicit Lite-Account app integration into parent application code to expose final functionality together with other final app services (i.e provided via REST)
- While configuring the app, regular Hive account should be used as Hive-blockchain bridge and allow interaction to Hive
- Lite account identifiers should be unique - to make it possible we need to introduce some namespaces
- Bridge account name should be used as a namespace holding account identifiers.
- Only account creation operation is limited to namespace matching the bridge account. All other operations (i.e. property modification) are accepted regardless to matching account namespace and bridge account and are only confirmed by matching a public key associated to LA.
- Lite-Account should have associated its public key, used to authorize actions performed by LA (i.e. changing its properties)
- Lite-Account properties can be created/modified/deleted by any bridge account when LA public key is matching
- All actions specific to Lite-Accounts should be done by using custom operation (custom_binary/custom/custom_json). The internal action embedded into custom operation should be signed by LA private key to proof that given account scheduled given action. Whole Hive transaction containing a custom operation should be signed by bridge account, to match Hive protocol requirements.
- If Lite-Account would like to perform regular Hive activity (i.e. vote or write a post), it could be possible by preparing (inside single transaction) a custom operation containing required Hive action being signed by LA private key, followed by regular Hive operation finally signed by bridge account. Above solution will allow to distinguish LA direct Hive activity from bridge account operations.
Edited by Bartek Wrona