Skip to content

Agoric web-wallet integration #7322

Answered by samsiegart
carlos-kryha asked this question in Q&A
Discussion options

You must be logged in to vote

The dapp renders the DappWalletBridge component from @agoric/web-components. That component serves an iframe with the location of bridgeUrl (e.g. https://wallet.agoric.app/wallet/bridge.html, or whatever the dapp specifies). That iframe can then communicate with both the dapp through window.postMessage , and the wallet UI through local storage (since bridgeUrl is meant to be the same origin as your desired wallet UI), hence bridging the dapp and wallet ui together.

dapp-psm is still a good example to follow, and works pretty much the same as dapp-inter. You can see requestDappConnection in the file I linked above. That's what prompts the wallet UI to present the dapp approval modal. Once …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@samsiegart
Comment options

Answer selected by turadg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants