Leather is the most popular and trusted wallet for apps built on Bitcoin. Connect to apps and manage assets secured by Bitcoin and Bitcoin L2s with battle-tested wallet for the Stacks blockchain.
📚 See Leather Developer Documentation →
📩 Join the mailing list for updates →
Please see our contribution guide
This application is a browser extension. There is no ability to run it as a standalone web application.
Each child of the src
directory represents the JavaScript context in which it is ran.
pnpm i
When working on the extension, you can run it in development
mode which will watch for any file changes and
use react-refresh
to update the extension as you work. This gives us near instant reloading of our changes, and
persists the state of the application between changes. To start development mode for the extension, run this command:
pnpm dev
We bundle a test app to use along with the extension. It gives easy access to the various functions that the extension can do.
In a separate terminal, run:
pnpm dev:test-app
You'll need to add it to your browser of choice. Leather only
supports Chromium and Firefox browsers. When you run pnpm dev
, it will compile the application to the /dist
folder
Several testing scripts are available in package.json
.
The integration tests expect the extension to be built prior to running. The extension can be built for tests with the command below.
pnpm build:test
The integration tests use Playwright, which requires the system to have the browsers it needs. The following command installs everything Playwright needs.
pnpm playwright install --with-deps
Note that the installed browsers are tied to the version of Playwright being used, and it may be necessary to run the above command again in some situations, such as when upgrading Playwright or switching branches. Read the documentation for more information.
All integration tests can be run using:
pnpm test:integration
To run a suite of tests you can use:
pnpm playwright test specs/TEST.spec.ts
pnpm playwright test tests/specs --shard=3/8
To get more information when running tests you can pass the --debug
flag or the --ui
flag to playwright.
When running tests locally you must add the following to your .env
file:
WALLET_ENVIRONMENT=testing
Unit tests can be run with vitest using:
pnpm test:unit
See instructions on Leather.io to install from source
Alternatively, the following steps can be taken by technical users with the latest version of node installed on their machines.
Run the following from within this repository's root directory if you've pulled it with Git:
pnpm && pnpm prepare && pnpm build
The extension is now built in the ./dist
folder.
To build the extension in Firefox mode, the TARGET_BROWSER=firefox
variable needs to be set.
pnpm && pnpm prepare && TARGET_BROWSER=firefox pnpm build
Note that when building in a clean environment, some code may vary between this and the submitted build. This is because some variables are set within the scope of the production build's CI.
We consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.
If you discover a security vulnerability, please use one of the following means of communications to report it to us:
- Report the security issue to our HackerOne program
- Report the security issue directly at security@leather.io
Please note this email is strictly for reporting security vulnerabilities. For support queries, contact contact@leather.io. Your efforts to responsibly disclose your findings are sincerely appreciated and will be taken into account to acknowledge your contributions.
In Q1 2021, Leather partnered with Least Authority, a leading security consultancy with experience in the crypto space, to audit Leather. On April 29th 2021, after addressing the major concerns described in the initial findings, as well as a concluding sign off from the Least Authority team, a final report was delivered.