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

WalletConnect example for substrate in wasm #1555

Open
amiyatulu opened this issue Apr 23, 2024 · 3 comments
Open

WalletConnect example for substrate in wasm #1555

amiyatulu opened this issue Apr 23, 2024 · 3 comments

Comments

@amiyatulu
Copy link

Can you provide a web3modal example for signing in transactions in Polkadot that also works in Android, using the WASM framework like Leptos or Yew?

A javascript example with wasmbindgen will do fine.

Examples given are for ethereum.

https://docs.walletconnect.com/web3modal/javascript/about

@jsdw
Copy link
Collaborator

jsdw commented May 3, 2024

We already have this example which uses Subxt in WASM to construct a transaction and pass it to a wallet to sign it:

https://github.com/paritytech/subxt/tree/master/examples/wasm-example

I suspect you could use that as inspiration for whatever it is you'd like to do, but haven't looked into web3modal before.

@amiyatulu
Copy link
Author

amiyatulu commented May 6, 2024

I have already used the wasm example in my code, it uses the browser addon, but not sure what to do with the mobile wallet, like calling the mobile wallet. Ok, let me try the code of Wallet Connect, and then I will get back.

@jsdw
Copy link
Collaborator

jsdw commented May 7, 2024

Ah right, I see! We haven't tried using a library to connect to external wallets yet, but essentially you'd follow the same steps as in any normal JS dApp, with the only difference being that you'd be handed the relevant details to JS via your WASM based Subxt app (and that aspect of handing data to JS from Rust to sign stuff or whatever is covered in the WASM example) :)

If you do get something working, we'd love to see a link!

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

2 participants