OpenCan-io / opencan

12 stars 7 forks source link

How would an app hosted outside the IC accept tokens created on the IC? #13

Open dostro opened 3 years ago

dostro commented 3 years ago

Problems:

@SuddenlyHazel has suggested this on Twitter

1. Token contract implements http_request method so It can serve a UI.
2. Apps redirect users to token contact passing b64 encoded request (w/ payment metadata) in URL.
3. Token contract ui extracts request from URL, handles the rest.

Using the above with the some token events scheme - once a user checks out, the app contract would be notified, and everything would "just work" from the users perspective.

@ALLiDoizCode suggested in the same thread: Another solution for those app would be to expose canister methods through JavaScript and loading that canister’s UI in a headless web view and evaluating the JavaScript. That way those apps have access to all the available canister methods

dostro commented 3 years ago

@FloorLamp @ccyanxyz any thoughts here? @FloorLamp I know you're working on tokens in Sailfish - will this specifically be an issue for you?