Toolchain Overview
A complete map of the Fiber ecosystem — tools, libraries, and how they fit together
The Fiber ecosystem includes several tools and libraries that serve different roles. This page provides a complete map to help you understand what's available and choose the right tool for your use case.
Ecosystem Map
┌─────────────────────────────────────────────────────────┐
│ Node Layer │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ fnn │ │ fiber-js │ │
│ │ (Rust Native) │ │ (WASM Node) │ │
│ │ Server/Desktop │ │ Browser/Node.js │ │
│ └────────┬─────────┘ └────────┬──────────┘ │
│ │ │ │
├───────────┼────────────────────────┼──────────────────────┤
│ ▼ ▼ │
│ Access Layer │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ HTTP RPC │ │ fiber-js API │ │
│ │ (JSON-RPC 2.0) │ │ (WASM Bindings) │ │
│ │ Any language │ │ JS/TS only │ │
│ └────────┬─────────┘ └────────┬──────────┘ │
│ │ │ │
├───────────┼────────────────────────┼──────────────────────┤
│ ▼ ▼ │
│ CLI & Tools │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ fnn-cli │ │ fnn-migrate │ │
│ │ Node management │ │ Data migration │ │
│ └──────────────────┘ └──────────────────┘ │
│ │
├──────────────────────────────────────────────────────────┤
│ Cryptography & Contracts │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ fiber-sphinx │ │ fiber-scripts │ │
│ │ Onion routing │ │ On-chain locks │ │
│ │ cryptography │ │ (Funding/Commit) │ │
│ └──────────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘Node Layer
fnn — Rust Native Node
fnn is the reference implementation of the Fiber Network Node, written in Rust. It runs as a native binary on Linux, macOS, and Windows.
Choose fnn if:
- You want to run a production node on a server
- You need the best performance and full feature set
- You want to be a relay node or liquidity provider on the network
fiber-js — WASM Node
fiber-js is a WebAssembly build of the Fiber node that runs in the browser or Node.js. It provides the same core functionality as fnn but can be embedded into JavaScript applications.
Choose fiber-js if:
- You want to build a browser-based wallet or dApp
- You don't want to run a separate server
- You are building a web game with micro-payments
Access Layer
HTTP RPC
The HTTP JSON-RPC interface is the standard way to interact with a running fnn node. Any language with an HTTP client can use it.
Choose HTTP RPC if:
- You have a running fnn node and want to control it programmatically
- You are building a backend service that integrates with Fiber
- You prefer to use a language other than JavaScript/TypeScript
See the HTTP RPC Guide for details.
@ckb-ccc/core (Community)
@ckb-ccc/core is a community library that provides a JavaScript/TypeScript wrapper for the Fiber HTTP RPC. It is not an official SDK, but it simplifies RPC access from JavaScript.
CLI & Tools
fnn-cli
fnn-cli is the official command-line tool for managing a Fiber node. It supports both one-shot commands and an interactive REPL with tab completion.
fnn-migrate
fnn-migrate is a data migration tool used when upgrading between Fiber versions that have breaking changes in the storage format.
Cryptography & Contracts
fiber-sphinx
fiber-sphinx is the cryptography library implementing Sphinx-based onion routing for Fiber's payment privacy. It handles the construction and peeling of onion packets used in multi-hop payments.
fiber-scripts
fiber-scripts contains the on-chain CKB scripts (smart contracts) that secure Fiber payment channels:
- Funding Lock: Secures the multi-sig output that funds a channel
- Commitment Lock: Enforces the revocation mechanism and dispute resolution