Installation
Install Razor Kit using your preferred package manager, a <script>
tag, or
build it from source.
Package Manager
Install the required packages.
pnpm add @razorlabs/razorkit
CDN
If you're not using a package manager, you can also use Razor Kit via an ESM-compatible
CDN such as esm.sh. Simply add a <script type="module">
tag to the
bottom of your HTML file with the following content.
<script type="module">
import { useWallet } from 'https://esm.sh/@razorlabs/razorkit'
</script>
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 master
branch).
pnpm add @razorlabs/razorkit@canary
Or clone the Razor Kit repo to your local machine, build, and link it yourself.
gh repo clone razorlabsorg/razorkit
cd razorkit
pnpm install
pnpm build
pnpm link --global
Then go to the project where you are using Razor Kit and run pnpm link --global @razorlabs/razorkit
(or the package manager that you used to link Razor Kit globally).
Security
Web3 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.
- Install the Socket Security GitHub App to help detect and block supply-chain attacks.
- Add a Content Security Policy to defend against external scripts running in your app.