Skip to content

feat: Solana Wallet Standard #31705

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

Merged
merged 15 commits into from
Apr 10, 2025
Merged

feat: Solana Wallet Standard #31705

merged 15 commits into from
Apr 10, 2025

Conversation

baptiste-marchand
Copy link
Contributor

@baptiste-marchand baptiste-marchand commented Apr 8, 2025

Description

This PR implements Solana Wallet Standard using script injection, enabling users use MetaMask on Solana dApps.

The communication between the dApp and MetaMask uses the Multichain API.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Run yarn then yarn start:flask
  2. If you already have a local Flask extension installed, then first uninstall it from chrome://extensions
  3. Install the built flask build by loading dist/chrome and setup a Solana account
  4. Go to any Solana Wallet Standard compatible app, such as Wallet Standard Demo or https://jup.ag/
  5. Connect with MetaMask
  6. Try the features proposed by the dApp

Screenshots/Recordings

MetaMask icon is the first one (the 2nd being Solflare):
Screenshot 2025-04-08 at 15 09 48
Connection modal:
Screenshot 2025-04-08 at 15 17 28
When connected:
Screenshot 2025-04-08 at 15 17 46

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This link was pointing to a dead site, this fixes it to point to the
correct URL.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29733?quickstart=1)

## **Related issues**

N/A

## **Manual testing steps**

1. Go to
https://github.com/MetaMask/metamask-extension/blob/develop/docs/README.md
2. Click the link to Developer Docs 

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Copy link

socket-security bot commented Apr 8, 2025

Copy link

socket-security bot commented Apr 8, 2025

All alerts resolved. Learn more about Socket for GitHub ↗

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • @wallet-standard/base@1.1.0
  • @wallet-standard/features@1.1.0
  • @wallet-standard/wallet@1.1.0
  • @solana/wallet-standard-features@1.3.0
  • @solana/wallet-standard-chains@1.1.1
  • @metamask/multichain-api-client@0.1.1
  • @metamask/solana-wallet-standard@0.1.1

View full report ↗

Copy link
Contributor

github-actions bot commented Apr 8, 2025

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@baptiste-marchand
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@baptiste-marchand baptiste-marchand force-pushed the bm/solana-wallet-standard branch from dd6d8fe to 611ced3 Compare April 8, 2025 14:54
@baptiste-marchand baptiste-marchand changed the base branch from main to sip-26 April 8, 2025 14:54
Base automatically changed from sip-26 to main April 9, 2025 20:52
@adonesky1 adonesky1 force-pushed the bm/solana-wallet-standard branch from 961c77e to 589013f Compare April 9, 2025 21:32
@adonesky1 adonesky1 force-pushed the bm/solana-wallet-standard branch from 589013f to da55096 Compare April 9, 2025 21:36
@adonesky1 adonesky1 changed the title Feat: Solana Wallet Standard feat: Solana Wallet Standard Apr 9, 2025
@adonesky1 adonesky1 marked this pull request as ready for review April 9, 2025 21:52
adonesky1
adonesky1 previously approved these changes Apr 9, 2025
Copy link
Contributor

@adonesky1 adonesky1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on both Beta and Flask!

adonesky1
adonesky1 previously approved these changes Apr 9, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [4f0e9db]
UI Startup Metrics (1238 ± 65 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238111914556512851351
load10859791266581143984
domContentLoaded10799751261571142991
domInteractive17135361731
firstPaint792831272421229300
backgroundConnect74121710
firstReactRender19143742027
getState13540879
initialActions001001
loadScripts83473999855866928
setupStore8532378
WebpackHomeuiStartup21391694258420622862428
load16991307225217617932004
domContentLoaded16921304224517417881988
domInteractive171263111453
firstPaint162674356224179
backgroundConnect3010250323157
firstReactRender164533711096297
getState1331911969
initialActions316135
loadScripts16871303221316917861959
setupStore2262393369
FirefoxBrowserifyHomeuiStartup13601165176811314111619
load12201039163911412821454
domContentLoaded12201039163811412821454
domInteractive10540270378996
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect211392112048
firstReactRender22195852226
getState7437478
initialActions001001
loadScripts12011023161911612671439
setupStore6423267
WebpackHomeuiStartup1522134917519816021693
load1316115415319213841466
domContentLoaded1316115315309213841465
domInteractive10064244269197
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22154572343
firstReactRender34296163647
getState9455789
initialActions002111
loadScripts1297113815159213621448
setupStore9531578

adonesky1
adonesky1 previously approved these changes Apr 10, 2025
@adonesky1
Copy link
Contributor

@metamaskbot update-policies

@adonesky1 adonesky1 requested review from a team as code owners April 10, 2025 14:28
@adonesky1
Copy link
Contributor

@SocketSecurity ignore-all

@adonesky1 adonesky1 force-pushed the bm/solana-wallet-standard branch from 0bd40d1 to 1d9922c Compare April 10, 2025 14:52
@adonesky1 adonesky1 enabled auto-merge April 10, 2025 15:11
@metamaskbot
Copy link
Collaborator

Policy update failed. You can review the logs or retry the policy update here

@metamaskbot
Copy link
Collaborator

Builds ready [7a538dd]
UI Startup Metrics (1205 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1205110114516312501295
load10589621262521133993
domContentLoaded10529581243511129990
domInteractive17136371629
firstPaint704821137421240987
backgroundConnect7420278
firstReactRender21154572038
getState13455979
initialActions004001
loadScripts81372499549844889
setupStore7515278
WebpackHomeuiStartup21251766266619422492437
load16691349227316117431977
domContentLoaded16611345226415817391971
domInteractive16126391442
firstPaint161653516023981
backgroundConnect26913219289
firstReactRender158523611046593
getState1733004179
initialActions315134
loadScripts16571344223615517371944
setupStore266247452479
FirefoxBrowserifyHomeuiStartup13731195179812214181680
load12321039167412412741502
domContentLoaded12311039167312412741502
domInteractive10339338378895
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21135882146
firstReactRender22196062228
getState8437489
initialActions001001
loadScripts12131023165912512601487
setupStore6436567
WebpackHomeuiStartup15641394207014616331905
load13491209182412714141630
domContentLoaded13481209182312714141629
domInteractive9541179258896
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect241685122442
firstReactRender35285553648
getState10435689
initialActions102111
loadScripts13291194180112613951612
setupStore9546689

@adonesky1 adonesky1 added this pull request to the merge queue Apr 10, 2025
Merged via the queue into main with commit 58752f1 Apr 10, 2025
164 of 166 checks passed
@adonesky1 adonesky1 deleted the bm/solana-wallet-standard branch April 10, 2025 18:43
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2025
@metamaskbot metamaskbot added the release-12.18.0 Issue or pull request that will be included in release 12.18.0 label Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.18.0 Issue or pull request that will be included in release 12.18.0 team-be team-wallet-api-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants