Documentation Index
Fetch the complete documentation index at: https://base-a060aa97-pat-schemav2-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Welcome to OnchainKit! So you want to contribute to this project? You came to the right place.
In this guide, you will learn how to:
Setup
Clone the repo
git clone git@github.com:coinbase/onchainkit.git
Install Node and pnpm
Use nvm, mise, n or your favorite version manager to install Node.js.
For pnpm, see the installation instructions on the pnpm website.
Install dependencies
From the root of the repository:
Codebase
This project is a monorepo managed with pnpm. The @coinbase/onchainkit package is located in:
Here is a rough layout of the codebase:
packages/onchainkit/
└── src/
├── api/ - API related components and functions
├── core/ - Files with zero dependencies
├── styles/ - Styles
│ ├── index-with-tailwind.css - CSS entrypoint
├── {Component}/ - Component folder
│ ├── components/ - React components
│ │ ├── {Name}.tsx
│ │ ├── {Name}.test.tsx
│ │ └── {Name}.css
│ ├── core/ - Utility functions
│ ├── index.ts - Entrypoint for the folder
│ └── types.ts - Export types
│
├── index.ts - Main package entry point
├── types.ts - Core types
└── OnchainKitProvider.tsx - OnchainKit provider
Workflows
Development
To work on OnchainKit components with live UI feedback:
This will build the OnchainKit package in watch mode, and start a development environment (the playground) where you can see your components in action.
As you make changes, the playground will update automatically.
Navigate to http://localhost:3000 to open the playground.
Building
To build the package:
Testing
Write and update existing unit tests. You can run tests with:
For watching file changes and rerunning tests automatically:
We expect 100% code coverage for any updates. You can get coverage information with:
If the coverage drops below 100%, look at the coverage report generated by the above command with:
Updating changelog
To update the change log, run:
Select minor and use the following format for the summary:
- **feat**: feature update information. By @your-github-id #XX (XX is the PR number)
Possible values are:
Feature request
Have a component in mind that we are not supporting yet? You can submit a feature request to our Github. Create a “New issue” and label it “Feature Request: …”.