Skip to content

AlphaAlpha. No public network is running yet, and there is no CLKC to buy, mine, or receive today. Anyone offering you CLKC right now is not us.Project status →Figures on this site come from the mainnet network.

Developers

Build on Clanker Coin

A JSON-RPC API on every node, a token-free explorer API for public network data, SDKs in Rust and TypeScript, and a merchant payment service for checkout flows.

JSON-RPC

JSON-RPC 2.0 over HTTP

Every node serves JSON-RPC 2.0 over HTTP on its RPC port. Requests must include a bearer token, read by default from a local cookie file thatclankerd writes at startup. The RPC port should never be exposed to the public internet; anything meant for public consumption belongs behind the explorer API instead.

  • Amounts are decimal strings, not numbers: the supply cap exceeds JavaScript's safe integer range.
  • Hashes and ids are lowercase hex.
  • Every response names the network it answered from.
  • Paginated methods cap the page size the server will return.

Example

Request:

POST /
Authorization: Bearer <token>
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"chain.getBestBlock"}

Response:

{"jsonrpc":"2.0","id":1,"result":{"block_id":"…","chain_work":"…","height":241,"network":"mainnet","timestamp":1788314430}}

Public methods

The following methods are documented for public use. Administrative and control methods are intentionally not published here.

MethodDescription
chain.getInfoChain height, network, best block id, and chain work.
chain.getBestBlockThe current tip block.
chain.getBlockA block by id. Verbosity 0 returns raw hex, verbosity 1 returns a decoded block.
chain.getBlockByHeightA block by height. Verbosity 0 returns raw hex, verbosity 1 returns a decoded block.
chain.getHeaderA block header only, without its transactions.
chain.getBlockHashesBlock ids in a height range, paginated by start_height and count.
chain.getTransactionA transaction by txid, with an optional block_id hint to speed up the lookup.
chain.getUtxoAn unspent transaction output, if it still exists.
chain.getAddressOutputsOutputs paid to an address, when the address index is enabled.
mempool.getInfoMempool size, byte total, and current relay policy.
mempool.getTransactionA pending transaction by txid.
mempool.getFeeEstimateProvisional fee-rate percentiles derived from the current mempool.
mempool.sendRawTransactionBroadcasts a signed raw transaction to the network.
mining.getBlockTemplateA header prefix and candidate transaction set, the basis for Clanker Stratum jobs.
mining.getMiningInfoCurrent difficulty, target, and the node’s network hash estimate.
mining.submitBlockSubmits a mined block; answers connected, side_chain, reorganized, or already_known.
network.getInfoThe local node’s network identity and listening configuration.
network.getPeersCurrently connected peers.
network.listBansCurrently banned peer addresses.
node.getInfoNode software version and uptime.
node.getMetricsNode metrics, the same figures served at GET /metrics.

Health and metrics

Alongside JSON-RPC, every node serves GET /health, GET /ready, and GET /metrics in Prometheus text format, none of which require a token.

SDKs

Rust and TypeScript clients

clanker-sdk is the Rust crate; @clankercoin/sdk is the TypeScript equivalent, published as plain ES modules with.d.ts type declarations, no build step, and no runtime dependencies. In both, every amount is represented as a big integer type, so an amount can never silently lose precision.

Both SDKs are held to frozen fixtures generated from a real node, so a client that passes the test suite has been checked against real chain data.

A generic example, reading status from the explorer API and printing a balance without ever touching a float:

import { ExplorerClient } from '@clankercoin/sdk';

// The public explorer's origin is published with the testnet.
const client = new ExplorerClient({ url: 'https://EXPLORER-HOST', network: 'testnet' });

const status = await client.status();
console.log(`indexed height: ${status.syncedHeight}`);

const account = await client.address('clank1q...');
const clanks: bigint = account.balance; // every amount is a bigint, never a float

const whole = clanks / 100_000_000n;
const frac = (clanks % 100_000_000n).toString().padStart(8, '0');
console.log(`${whole}.${frac} CLKC`);

Explorer API

The public, token-free read API

The explorer indexer serves a read-only API with no authentication required, meant for anything that only needs public chain data. Amounts are decimal strings, pages are capped, and errors are returned as {"error", "network"}.

EndpointDescription
GET /api/v1/statusIndexer chain height, network, and sync state.
GET /api/v1/blocks?before=&limit=A page of recent blocks, cursor-paginated.
GET /api/v1/blocks/<height or id>A single block by height or block id.
GET /api/v1/transactions/<txid>A single transaction by id.
GET /api/v1/addresses/<address>Balance and summary for an address.
GET /api/v1/addresses/<address>/outputs?cursor=&limit=&unspent=An address’s outputs, optionally restricted to unspent ones.
GET /api/v1/search?q=Resolves a query to a block, transaction, or address.
GET /api/v1/mempoolA summary of the current mempool.

This website's /api/stats

This site also serves its own read-only /api/stats JSON document, composed from the explorer API and a public node's metrics. Its top-level members are:

  • chain — height, best block id, and chain totals.
  • window — hashrate and difficulty estimated over a recent block window.
  • reward — the current subsidy, era, and the next halving height.
  • supply — issued and maximum supply.
  • mempool — pending transaction count and byte total.
  • nodes — a count of nodes known to the network, where available.
  • price — a market price quote, when a price source is configured.
  • recentBlocks — the most recent blocks in summary form.
  • sources — which upstream sources answered when the document was composed.

Payments

Accept CLKC

Invoices, confirmation tiers by amount, and HMAC-signed webhooks for merchants.

Payments documentation

Web3

Build Web3 applications

Payments, payment requests, and blockchain data APIs. No smart contracts in v1.

Web3 documentation