Fuelchain generates complete, type-safe TypeScript interfaces from Fuel smart contract ABI files. One command. Every method, every type, fully typed.
npm install fuelchain typechain-target-fuels --save-dev
Works with Sway contracts compiled by forc
Generates .d.ts typings compatible with the Fuel SDK — no runtime dependency, no extra bundle weight.
Point it at any ABI JSON file and get full type coverage. Works with scripts, predicates, and multi-contract projects.
Built specifically for the Fuel ABI JSON format — handles Sway-specific types, enums, structs, and nested generics correctly.
Rebuild types on every ABI change. Integrate with your build pipeline or CI to catch breaking contract changes before they reach production.
forc build
Forc outputs ABI JSON alongside your binary. That's your input.
npx fuelchain --target=fuels --out-dir=./src/contracts *.json
Point it at one file or a glob pattern. One output directory.
import { Token } from './src/contracts';
Full type safety on every contract call. Compile-time errors on signature mismatches.
Building on Fuel should not mean hand-typing your contract bindings from ABI documentation that doesn't match the code. Every method call, every event, every struct — fully typed, always in sync, generated automatically.
Fuelchain exists because the gap between a compiled Sway contract and a working TypeScript dApp should be zero.