Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dostro opened this issue Jun 2, 2021 · 1 comment
Open

Comments

@dostro
Copy link
Contributor

dostro commented Jun 2, 2021

Problems:

  • There are no flows for apps hosted outside the IC to accept tokens created on the IC
  • Since canisters are limited to 1 http_request method, the "payment" method would be helpful except in the case of the application wanting more control of this payment interface

@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
Copy link
Contributor Author

dostro commented Jun 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant