3.0 KiB
Requirements
Wagmi is optimized for modern browsers. It is compatible with the latest versions of the following browsers.
::: tip Depending on your environment, you might need to add polyfills. See Viem Platform Compatibility for more info. :::
Using Unreleased Commits
If you can't wait for a new release to test the latest features, you can either install from the canary tag (tracks the main branch).
::: code-group
pnpm add {{packageName}}@canary
npm install {{packageName}}@canary
yarn add {{packageName}}@canary
bun add {{packageName}}@canary
:::
Or clone the Wagmi repo to your local machine, build, and link it yourself.
gh repo clone wevm/wagmi
cd wagmi
pnpm install
pnpm build
cd packages/{{packageDir}}
pnpm link --global
Then go to the project where you are using Wagmi and run pnpm link --global {{packageName}} (or the package manager that you used to link Wagmi globally). Make sure you installed any required peer dependencies and their versions are correct.
Finally, pull requests are continuously released via pkg.pr.new and can be installed using the pull request number or short commit ID.
::: code-group
pnpm add https://pkg.pr.new/{{packageName}}@123
npm install https://pkg.pr.new/{{packageName}}@123
yarn add https://pkg.pr.new/{{packageName}}@123
bun add https://pkg.pr.new/{{packageName}}@123
:::
Security
Ethereum-related projects are often targeted in attacks to steal users' assets. Make sure you follow security best-practices for your project. Some quick things to get started.
- Pin package versions, upgrade mindfully, and inspect lockfile changes to minimize the risk of supply-chain attacks.
- Use npm's
min-release-ageor pnpm'sminimumReleaseAgeandtrustPolicyto mitigate against supply-chain attacks. - Install the Socket GitHub App to help detect and block supply-chain attacks.
- Add a Content Security Policy to defend against external scripts running in your app.
- Pin GitHub Action versions to commits instead of tags. Actions Up is a good tool for using commits instead of tags.