← CreditChain

Developers

CreditChain's own website (OUTERNET) is just one client of a plain HTTP + JSON API - the same one you can build against. No API key, no signup: reads are open, and writes are authorized by a signature from the wallet keypair itself (see "Authenticating writes" below).

Try it right now

This calls the live node this website is talking to - a real, unauthenticated GET request.

GET /network
(response will appear here)

Base URL

Every endpoint below is relative to the node's own base URL - same host as this website, port 8080 (this website's static files are served separately, from a different port, purely for local development convenience). In production that's https://creditchain.site:8080 (or wherever the node you're talking to is actually hosted, if you're running your own - see "Run your own node/testnet" below).

Connecting to Testnet vs Mainnet

Testnet and Mainnet are two completely independent CreditChain networks - separate chains, separate genesis, separate validator pools, separate everything - reachable through the exact same protocol on two different ports of the same host. There's no separate API shape for either: build against the Base URL above, and point it at whichever network's port you want.

CORS is wide open (Access-Control-Allow-Origin: *) on both, same as every other endpoint documented here - a third-party wallet or app can call either network directly with no special allowlisting. The OUTERNET website itself switches between the two the same way: the network picker in the top banner just changes which port its own requests go to and reloads - there's no hidden coordination between the two chains, they're genuinely separate.

Reading data (no auth needed)

Every GET endpoint is a plain, unauthenticated public read - wallet balances, the block explorer, governance proposals, hub rates, everything. Example:

curl "/wallet?address=YOUR_ADDRESS_HEX"

Authenticating writes

Every mutating (POST) endpoint requires a signed envelope proving you actually hold the wallet's private key - the same Ed25519 signing the browser wallet itself uses via crypto.subtle (Web Crypto), no third-party crypto library needed. An address is just SHA256(publicKey)[:20], so the server never needs to pre-register your key - each signed request proves itself.

{
  "address": "<your 40-hex-char address>",
  "publicKey": "<hex-encoded Ed25519 public key>",
  "timestamp": 1234567890,
  "payload": { /* endpoint-specific fields */ },
  "signature": "<hex - Ed25519 signature over address|publicKey|timestamp|compact-JSON(payload)>"
}

Timestamps outside a ±60s window are rejected (replay protection), and an exact signature can't be replayed twice. See website/js/api.js's apiPostSigned in this project's own source for a complete, working reference implementation you can port to any language with Ed25519 support.

Endpoint reference

Grouped by area - GET unless marked (POST, signed). This isn't every field of every request/response; read the linked source file for exact shapes.

Price-reference pools (ETHTEST / BTCTEST)

Two developer-only, CCT-paired AMM pools exist purely as real, on-chain price-discovery references - ETHTEST and BTCTEST. Both use the exact same core.LiquidityPool constant-product mechanics every custom-token pool uses, and both are fully reachable through the ordinary public endpoints (/pool?symbol=ETHTEST, /token/balance?symbol=BTCTEST&address=..., the existing swap/add-liquidity handlers, GET /pool/price-history?symbol=BTCTEST). CreditChain itself does not surface a direct trading UI for these two - no nav link, no swap page entry - so if you want to seed liquidity or trade against them, do it directly against the API, same as any other pool endpoint. They exist so governance's PREDICTION proposal kind (see api/prediction_vote.go) has a real, tamper-resistant price to resolve against, not a UI feature of their own.

Mainnet Mechanics

A real explainer of the mechanics already live on both networks today - not a marketing roadmap. Reachable from its own "Mainnet Mechanics" link in the main site's navbar, separate from "Whitepaper" (which now points to the actual whitepaper PDF on mainnet, and to the testnet-specific whitepaper.html page on testnet).

Consensus - Proof of Stake with Reputation (PoSR)

Block-producer selection blends three weighted factors, not raw stake size: 25% normalized stake, 55% reputation (Trust Score), and 20% uptime - deliberately reputation-dominant so this isn't "Proof of Richest." A validator needs at least 1,000 CCT staked, 20+ reputation, and 90%+ uptime to be selection-eligible. Missed blocks and double-signs both cost real stake (slashed, burned) and reputation, with a permanent-ban threshold after repeated offenses. See core/consensus.go/core/slashing.go.

Staking and validator delegation

Staking CCT/ETHB mints a small proportional reward plus, for ETHB specifically, an oETH receipt usable as loan collateral (core/staking.go's RewardForStake). Anyone can delegate stake to an existing registered validator rather than running their own node - the validator's own dashboard can generate a shareable delegate-join link (see "Run your own node" below and the Validator page's Download/Join section).

Moderators

Moderators are auto-assigned round-robin to P2P trades, loan negotiations, and Trading Hub applications to arbitrate disputes and verify hub certificates. Registering costs a small anti-spam CCT fee. A moderator's decisions are visible in that trade/application's own history; governance can act on a pattern of bad decisions through the ordinary proposal/voting system.

Trading Hubs

A Trading Hub is a moderator-verified market-maker that posts buy/sell rates for CCT and other tokens (both OFF_APP off-chain-settled and ONCHAIN atomic modes). Applying costs a flat CCT fee (HubApplyFeeCCT in api/companies.go); a moderator reviews the application before it's marked verified. Only verified hubs can post EXTERNAL-settlement offers on the Marketplace - see core/company.go/api/companies.go.

Governance

Any activated wallet can create and vote on a proposal; vote weight is a blend of staked CCT and reputation, not one-address-one-vote. Beyond plain informational proposals, dedicated proposal kinds exist for protocol parameter changes (PARAM_CHANGE), version activation gates, token creation, and RC-backed prediction markets - see core/governance.go and website/governance.html's Voting Ballots tab. A small top-reputation "executive" tier can vote on a narrower set of higher-trust parameters.

Bridge / unification (ETHB, BTCB)

CreditChain never holds an ETH or BTC signing key on any user's behalf. ETH and BTC deposited into your own self-custodial address (derived client-side from your recovery phrase) are automatically credited as ETHB/BTCB - CreditChain-native balances that mirror the real self-custodial funds 1:1. Sending picks a network at send time (CCT network = fast internal move to another CreditChain user, flat network fee; Direct/BTC network = a real external broadcast signed entirely in your browser, live-gas-based fee only, no CreditChain fee) - there's no separate manual "bridge" step and no CreditChain-controlled custodian anywhere in the flow. See api/eth_bridge.go/api/btc_bridge.go and the Settings page's own "How your ETH/BTC balance works" explainer.

Token standards

Every registered token declares a standard: C101 (CCT itself, reserved), C117S (stable/pegged - pool intentionally left unseeded), or C1 (independent/market-priced - a real AMM pool auto-created, price floats once liquidity is added). New token creation is governance-gated (a passed TOKEN_CREATION proposal), not instant self-service. See core/token_standard.go.

Run your own node - or your own entire testnet

Yes - a node is a separate, ordinary process (creditchaind) with its own DATA_DIR. Run one with no PEERS set and you have your own fully isolated private testnet from block zero, completely separate from the public CreditChain network - useful for local development or a private staging environment. Run several nodes pointed at each other (PEERS + a shared NETWORK_SECRET you choose yourself) and you have your own private multi-node network. This network is currently permissioned (not open/permissionless) - joining someone else's live network (including the public CreditChain one) requires that operator to hand you their NETWORK_SECRET and add your node to their PEERS list; there's no self-serve join flow yet.

git clone https://github.com/Danielcruse/creditchaind.git
cd creditchaind
go build -o creditchaind .

DATA_DIR=./data PORT=8080 ./creditchaind
# no PEERS set - this is now its own standalone chain, genesis block already produced

Full environment variable reference, Docker Compose setup, and how to verify two nodes have actually converged: see ops/NODE_OPERATOR.md in the project source.

Disclosures