Skip to content

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

@dostro

Description

@dostro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions