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

Sui Wallet :: externally_connectable extension support #20753

Open
zanuka opened this issue Dec 31, 2024 · 1 comment
Open

Sui Wallet :: externally_connectable extension support #20753

zanuka opened this issue Dec 31, 2024 · 1 comment
Assignees
Labels
doc-issue Issue submitted using the Doc issue template sui-wallet

Comments

@zanuka
Copy link

zanuka commented Dec 31, 2024

New

I'm working on a new browser extension and would like users to be able to login to their Sui wallet from the extension popup and not have to call ConnectButton from a standard browser window.

I've tried multiple configs of my V3 extension manifest, using 'externally_connectable' like so:

  "externally_connectable": {
    "matches": [
      "https://*.sui.io/*",
      "https://*.suinet.app/*",
      "https://wallet-provider.sui.io/*",
      "chrome-extension://opcgpfmipidbgpenhmajoajpbobppdil/*"
    ]
  },

Using various configs, I can't get it to connect to the Sui Wallet extension, and am instead seeing the 'Get Started with Sui' heading and text prompting user to install the Sui extension, after clicking the 'Sui Wallet' button that appears on step 2 of the 'Connect Wallet' flow. ( screenshots attached for context )

I think that it will only work if your Sui Wallet extension exposes that particular API option publicly, using "*" wildcard in the matches[] array, as stated in Google extensions docs here - https://developer.chrome.com/docs/extensions/reference/manifest/externally-connectable

For more info on how my browser extension will be leveraging both Sui and Walrus, feel free to check out the official public repo here - https://github.com/zanuka/leaderport-core-ui - where I have a detailed readme and docs on the overall vision / plan.

It's open-source and will be free to download, featuring both on- and off-chain functionality. So it would be awesome to be able to have Sui Wallet as my first supported Web3 wallet.

Perhaps there will be other browser extensions that might also want to be able to connect this way as well and your team would find this extension-to-extension communication to be useful. 🤞🏼

Popup - Step 1
leaderport-sui-login-A

Popup - Step 2
leaderport-sui-login-B

Popup - Step 3
leaderport-sui-login-C

Thanks for your time!

@zanuka zanuka added the doc-issue Issue submitted using the Doc issue template label Dec 31, 2024
@zanuka
Copy link
Author

zanuka commented Jan 3, 2025

@hayes-mysten I had meant to include this link as well, which has the info on cross-extension messaging: https://developer.chrome.com/docs/extensions/develop/concepts/messaging#external

Also not sure how I added the 'doc-issue' label when creating the issue, or perhaps that was automatic. Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-issue Issue submitted using the Doc issue template sui-wallet
Projects
None yet
Development

No branches or pull requests

4 participants