Install the required packages using pnpm. Make sure you have Node.js >= 20 installed.
Terminal window
pnpmaddiso-filecoin
If you plan to use React hooks, install iso-filecoin-react as well:
Terminal window
pnpmaddiso-filecoin-react
For wallet functionalities (Ledger, Filecoin App), install iso-filecoin-wallets:
Terminal window
pnpmaddiso-filecoin-wallets
Project Structure
This project uses a monorepo structure managed by pnpm workspaces. Core libraries reside in the packages/ directory, examples in examples/, and this documentation site in docs/.
.
├── packages/
│ ├── iso-filecoin/ # Core Filecoin library
│ ├── iso-filecoin-react/ # React hooks and context
│ └── iso-filecoin-wallets/ # Wallet adapters
├── examples/ # Usage examples and demos
├── docs/ # This documentation site
├── pnpm-workspace.yaml # Workspace configuration
└── package.json # Root package file
Usage
Here’s a basic example of how to use iso-filecoin to generate a wallet and address: