Gathering detailed insights and metrics for @metamask/onboarding
Gathering detailed insights and metrics for @metamask/onboarding
Gathering detailed insights and metrics for @metamask/onboarding
Gathering detailed insights and metrics for @metamask/onboarding
npm install @metamask/onboarding
99.1
Supply Chain
98
Quality
82.6
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
145 Stars
70 Commits
53 Forks
43 Watching
2 Branches
268 Contributors
Updated on 23 Sept 2024
Minified
Minified + Gzipped
TypeScript (83.19%)
JavaScript (16.81%)
Cumulative downloads
Total Downloads
Last day
-8.3%
29,517
Compared to previous day
Last week
7.2%
172,542
Compared to previous week
Last month
2.9%
702,947
Compared to previous month
Last year
795.2%
5,026,715
Compared to previous year
1
17
This library is used to help onboard new MetaMask users. It allows you to ask the MetaMask extension to redirect users back to your page after onboarding has finished.
This library will register the current page as having initiated onboarding, so that MetaMask knows where to redirect the user after onboarding. Note that the page will be automatically reloaded a single time once a MetaMask installation is detected, in order to facilitate this registration.
@metamask/onboarding
is made available as either a CommonJS module, and ES6 module, or an ES5 bundle.
import MetaMaskOnboarding from '@metamask/onboarding'
const MetaMaskOnboarding = require('@metamask/onboarding')
dist/metamask-onboarding.bundle.js
(this can be included directly in a page)See § Onboarding Library on the MetaMask Docs website for examples.
Assuming import MetaMaskOnboarding from '@metamask/onboarding'
, the following API is available.
MetaMaskOnboarding.isMetaMaskInstalled()
Returns true
if a MetaMask-like provider is detected, or false
otherwise. Note that we don't provide any guarantee that this is correct, as non-MetaMask wallets can disguise themselves as MetaMask.
MetaMaskOnboarding.FORWARDER_MODE
A set of constants for each of the available forwarder modes.
Constant | Description |
---|---|
INJECT | Inject a iframe to that will refresh until MetaMask has installed |
OPEN_TAB | Open a tab to a new page that will refresh until MetaMask has installed—this is only useful if the client app has disallowed iframes |
new MetaMaskOnboarding()
The constructor accepts an optional options bag with the following:
Option | Description |
---|---|
forwarderOrigin | Override the forwarder URL, useful for testing. Optional, defaults to 'https://fwd.metamask.io' . |
forwarderMode | One of the available forwarder modes. Optional, defaults to MetaMaskOnboarding.FORWARDER_MODE.INJECT . |
startOnboarding()
Starts onboarding by opening the MetaMask download page and waiting for MetaMask to be installed. Once the MetaMask extension installation is detected, a message will be sent to MetaMask to register the current site as the onboarding initiator.
stopOnboarding()
Stops onboarding registration, including removing the injected iframe
(if any).
nvm use
will automatically choose the right node version for you.yarn setup
to install dependencies and run any requried post-install scripts
yarn
/ yarn install
command directly. Use yarn setup
instead. The normal install command will skip required post-install scripts, leaving your development environment in an invalid state.Run yarn lint
to run the linter.
The project follows the same release process as the other libraries in the MetaMask organization:
main
1.x
)yarn version --minor --no-git-tag-version
)main
or 1.x
)This project is available under the MIT license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
all changesets reviewed
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
9 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More