Nervos CKB
GetBlock provides fast and reliable access to Nervos via JSON-RPC API. Connect to the Nervos network without running your own infrastructure.
Nervos CKB (Common Knowledge Base) is the Layer 1 of the Nervos Network — a public, permissionless, proof-of-work blockchain that takes a fundamentally different approach to state and computation.
While Ethereum uses an account-based model with on-chain smart contracts and Bitcoin uses UTXOs that hold only value, Nervos CKB introduces the Cell model: every piece of on-chain state lives in a typed cell that can hold arbitrary data, with smart contracts ("scripts") written in any language that compiles to RISC-V. Native PoW via the Eaglesong hash function with NC-MAX (an improved Nakamoto consensus) produces blocks every ~10 seconds.
The native token is CKByte (CKB) — 8 decimals; the smallest unit is Shannon (1 CKB = 100,000,000 Shannon). The RPC surface is organized into modules: Chain for canonical chain data, Pool for the transaction pool, Net for P2P network info, Stats for chain statistics, Indexer for cell/transaction lookups (built into the node since v0.105.0), Subscription for real-time WebSocket events, and Experiment for advanced features like Nervos DAO calculations.
Key Features
Cell Model: Programmable containers that hold arbitrary state plus typed scripts — a generalization of the UTXO model that supports arbitrary on-chain state and rich smart contracts
RISC-V Smart Contracts: Scripts run on a deterministic RISC-V VM (CKB-VM) — write contracts in C, Rust, JavaScript (via QuickJS), or any language with a RISC-V target
Layered Architecture: CKB is the store of assets; computation can happen on Layer 2 (Godwoken, Axon) or in off-chain generators with on-chain verification — keeps L1 lean while enabling rich applications
Eaglesong PoW: ASIC-friendly hash function specifically designed for CKB, providing strong proof-of-work security with predictable mining economics
NC-MAX Consensus: Improved Nakamoto consensus with ~10-second block times and dynamic difficulty — faster than Bitcoin while preserving its security properties
Nervos DAO: Native protocol-level mechanism for locking CKB to receive secondary issuance — counterbalances state-rent inflation and rewards long-term holders
State Rent Model: CKB is also a "right" to occupy state — long-term storage requires holding proportional CKB, aligning incentives between users and miners
Built-in Indexer: Cell and transaction indexing built into the node since v0.105.0 — no separate indexer service required
Native Token CKByte: 8 decimals — smallest unit Shannon. Fixed maximum issuance of 33.6 billion via base issuance, plus secondary issuance that funds protocol economics
Bech32 Addresses: Human-readable addresses prefixed
ckb1...(mainnet) andckt1...(testnet)WebSocket Subscriptions: Full-duplex subscribe/unsubscribe for new tip headers, pool transaction events, proposed transactions, rejected transactions, and reorgs
TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC SPECIFICATION
GetBlock's Nervos CKB API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for the CKB JSON-RPC interface — including module organization, request/response shapes, and deprecation policy — is maintained by the Nervos Foundation and CKB development team and published at github.com/nervosnetwork/ckb/blob/master/rpc/README.md. For Cell model semantics, RISC-V CKB-VM details, Eaglesong PoW, NC-MAX consensus, and the Nervos DAO, consult the official Nervos documentation.
SCOPE: NERVOS CKB LAYER 1 ONLY — GODWOKEN L2 IS A SEPARATE PRODUCT
This documentation covers Nervos CKB Layer 1 — the native chain with snake_case methods, the Cell model, and RISC-V scripts.
Nervos also has Godwoken, an EVM-compatible Layer 2 built on top of CKB that exposes the standard Ethereum JSON-RPC surface (eth_blockNumber, eth_getBalance, etc.). Godwoken is a separate product with a different URL pattern, different chain ID, and different developer experience. If you need EVM-compatible Solidity deployment on Nervos, you want Godwoken — not this package.
For Godwoken documentation, see docs.godwoken.io or the Godwoken GitHub.
Network Information
Network Name
Nervos CKB Mainnet (Mirana)
Chain Identifier
"ckb" (mainnet), "ckb_testnet" (testnet)
Native Currency
CKByte (CKB)
Decimals
8 (1 CKB = 100,000,000 Shannon)
Block Time
~10 seconds
Consensus
NC-MAX (improved Nakamoto consensus over Eaglesong PoW)
Smart Contract VM
CKB-VM (RISC-V)
Data Model
Cell model (extended UTXO with arbitrary data + typed scripts)
Address Format
Bech32 (ckb1... mainnet, ckt1... testnet)
Mainnet Launch
November 19, 2019
Block Explorer
Base URL
All Nervos CKB JSON-RPC methods are called by sending a POST request to the base URL with a JSON-RPC 2.0 body. For Subscription module methods (subscribe / unsubscribe), use WebSocket: wss://go.getblock.io/<ACCESS-TOKEN>/.
Supported Networks
Mainnet (Mirana)
✅
✅
✅
✅
✅
✅
✅
✅
Quickstart
In this section, you will learn how to make your first call with either:
Axios (JavaScript / Node.js)
Python (Requests library)
Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).
Available API Methods
Nervos CKB exposes ~40 methods organized across 7 modules. Method names use snake_case (e.g. get_tip_header) — different from Ethereum's camelCase convention.
Module Chain (22 methods)
Canonical chain queries — blocks, transactions, headers, epochs, consensus parameters, fee statistics, and cell lookups.
get_tip_header
Returns the header of the tip block in the canonical chain
get_tip_block_number
Returns the number of the tip block in the canonical chain
get_current_epoch
Returns the epoch with the highest number in the canonical chain
get_epoch_by_number
Returns the epoch in the canonical chain with the specified number
get_block_hash
Returns the hash of a block in the canonical chain by block number
get_block
Returns the information about a block by hash
get_block_by_number
Returns the information about a block by block number
get_header
Returns the information about a block header by hash
get_header_by_number
Returns the information about a block header by block number
get_block_economic_state
Returns block rewards and other economic state of a finalized block
get_block_median_time
Returns the past median timestamp used for time-locked transactions
get_block_filter
Returns the block filter data for a block (for light clients)
get_consensus
Returns chain consensus parameters
get_fork_block
Returns the information about a block by hash (including fork blocks)
get_transaction
Returns the information about a transaction by hash
get_transaction_proof
Returns a Merkle proof that transactions were included in a block
verify_transaction_proof
Verifies a Merkle proof and returns transaction hashes
get_transaction_and_witness_proof
Returns a Merkle proof of transactions plus their witnesses
verify_transaction_and_witness_proof
Verifies a Merkle proof of transactions and witnesses
get_live_cell
Returns the live cell at the given out point
estimate_cycles
Returns the estimated cycles needed to execute a transaction's scripts
get_fee_rate_statistics
Returns fee rate statistics over recent blocks
Module Pool (5 methods)
Transaction pool submission and inspection.
send_transaction
Submits a new transaction to the tx pool
tx_pool_info
Returns the statistics of the tx pool — total count, size, fees
tx_pool_ready
Returns true once the tx pool has finished initialization
get_pool_tx_detail_info
Returns detailed status of a transaction in the pool by hash
get_raw_tx_pool
Returns all transactions in the pool grouped by state (pending, proposed, gap)
Module Net (4 methods)
P2P network info — local node identity, connected peers, sync state, banned addresses.
local_node_info
Returns information about the local node (node ID, version, addresses)
get_peers
Returns the connected peers
sync_state
Returns chain synchronization state
get_banned_addresses
Returns the addresses currently banned by the node
Module Stats (2 methods)
get_blockchain_info
Returns statistics about the chain — chain name, median time, epoch, difficulty
get_deployments_info
Returns the active soft fork deployments and their states
Module Indexer (4 methods) — built-in since v0.105.0
Cell and transaction indexing — query live cells by lock or type script, paginated transaction history.
get_indexer_tip
Returns the indexed tip — sequence at which the indexer is current
get_cells
Returns live cells matching a lock or type script filter (paginated)
get_transactions
Returns transactions matching a lock or type script filter (paginated)
get_cells_capacity
Returns the total capacity of live cells matching a filter — the canonical balance query
Module Subscription (2 methods) — WebSocket only
Real-time event subscriptions over WebSocket.
subscribe
Subscribes to a topic — new_tip_header, new_tip_block, new_transaction, proposed_transaction, rejected_transaction
unsubscribe
Cancels an existing subscription by ID
Module Experiment (1 method)
calculate_dao_maximum_withdraw
Calculates the maximum CKB a Nervos DAO deposit cell can withdraw
Restricted Modules (not available on shared infrastructure)
The following modules exist in the CKB node software but are not exposed on shared RPC infrastructure such as GetBlock's standard endpoints. They require self-hosted nodes with explicit configuration:
Miner module:
get_block_template,submit_block— for miners running their own nodeAlert module:
send_alert— for broadcasting network-wide alerts (requires alert signing key)Debug module:
jemalloc_profiling_dump,update_main_logger,set_extra_logger— for node operators onlyIntegrationTest module:
truncate,generate_block,process_block_without_verify, etc. — for test-net development only
These methods are not documented per-page in this package. If you need access, contact GetBlock about dedicated-node options.
Support
For technical support and questions:
Support Email: support@getblock.io
See Also
Godwoken (EVM Layer 2) — separate product, not covered here
Last updated
Was this helpful?