General specifiation of the Perun use case
This issue will detail the general use-case and all related useful information we can aggregate around the Perun service integration in Startinblox.
First, attached is the available WebSocket API documentation: Perun_websocket_api.pdf
This API can be used as soon as a Startinblox user defines an Ethereum wallet address, so the account needs to be extended to bear this wallet information. And all those interactions will be applied to the Ethereum Rinkeby Test Network so that we can both demonstrate usage of Perun and PiSwap APIs. The availability of the Perun API with Rinkeby address still needs to be validated though.
So the different steps I foresee:
-
Add an Ontochain specific Wallet Address relation to our user model (1 user to N address, ideally with the associated network specified) -
Implement a JavaScript Perun Api Client interface/class -
Confirm with the Perun team the availability of a Test API ? And the associated base URL so that we can use it as data-src for the Perun component -
Implement the template allowing the Perun POC component to display a "tipping" button if the account and its wallet are properly configured -
If no button displayed, display a message stating the error/issue -
Publish a draft of this component to NPM -
Once the component is published, add it to the component registry with proper default parameters based on test networks, including its dependencies on the directory -
Work on an isolated demonstration of the component, just displaying a user profile (having an account too) and the tipping button and executing the tip, including the metamask transaction validation and success/error validation messages