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

Ownable Webview #85

Open
jasny opened this issue Jun 28, 2023 · 1 comment
Open

Ownable Webview #85

jasny opened this issue Jun 28, 2023 · 1 comment
Milestone

Comments

@jasny
Copy link
Member

jasny commented Jun 28, 2023

Each ownable is loaded and displayed through a webview. Within the webview, we should be able to accomplish the same logic as we do in the Ownables SDK.

In the SDK wallet, we create an iframe for each Ownable. The iframe loads ownable.js, which creates a sandboxed worker for the smart contract and iframe for the widget.

The Ownable Webview should load a similar javascript file. Instead of using HTTP Messaging, we need an alternative way of communication between the webview and the native app. The communication is 2-way.

  • CosmWasm Messages are pushed to the webview. These are processed by the smart contract and have a response. This response potentially includes an updated state, which needs to be stored by the native app.
  • Actions within the widget need to bubble up to the native application. There is no response to the widget.
@jasny
Copy link
Member Author

jasny commented Jun 28, 2023

How do we load a static JavaScript file in a Webview?

Does Webview support the Web Workers API? If not we need an alternative method to load CosmWasm contract in a sandboxed environment.

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