Skip to main content
ALL CHAINS

Blockchain Developer Guide

The Elastos blockchain is one of four Elastos pillars (alongside PC2, Runtime, and Carrier). This section covers building on the blockchain.

Architecture: Three Chains

The Elastos blockchain is a multi-chain system with three layers:

The Main Chain (ELA) is the foundation. It uses a UTXO model (like Bitcoin), is secured by Bitcoin's mining power through merged mining (AuxPoW), and runs BPoS consensus with ~70 elected validators plus 12 Elastos Council nodes. It handles ELA transfers, staking, governance, and cross-chain coordination.

The Smart Chain (ESC) is an EVM-compatible sidechain for smart contracts. Standard Ethereum tooling works: Hardhat, ethers.js, MetaMask, Foundry, Remix. Chain ID 20.

The Identity Chain (EID) is a sidechain for decentralized identity. It hosts W3C DID documents through precompiled contracts. Also EVM-compatible, Chain ID 22.

Cryptography: The Dual-Curve Architecture

The main chain uses P-256 (secp256r1) — the NIST standard curve found in TLS, Apple Secure Enclave, and government systems. The sidechains (ESC and EID) use secp256k1 — the same curve as Ethereum and Bitcoin.

This is a deliberate design choice, not an oversight. It means:

  • MetaMask, ethers.js, and web3.js work for ESC and EID but cannot sign main chain transactions.
  • Main chain operations require the Elastos Wallet JS SDK or Essentials.
  • A single BIP39 mnemonic can derive keys for all chains using different derivation paths (see below).

What You Can Build

GoalChainTools
Deploy smart contracts, DeFi, NFTsESCHardhat, ethers.js, Solidity
Accept ELA paymentsMain Chain or ESCMain Chain SDK or standard EVM
Issue and verify decentralized identityEIDDID SDK
Store user data in personal vaultsHiveHive SDK
Move ELA between chainsBridgeCross-Chain Development
Integrate exchange deposits/withdrawalsMain ChainExchange Integration
Connect to Essentials walletESCConnectivity SDK
Build P2P applicationsCarrierCarrier Developer Guide

Key Management

HD Derivation Paths

From a single BIP39 mnemonic:

Main Chain (ELA):  m/44'/0'/0'          → P-256 (secp256r1) keys
DID Keys: m/44'/0'/0'/0/<idx> → P-256 (secp256r1) keys
ESC/EID: m/44'/60'/0'/0/<idx> → secp256k1 keys (standard Ethereum)

Address Formats

ChainFormatPrefixExample
Main Chain (standard)Base58Check, version byte 0x21Starts with 88VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3ta
Main Chain (multi-sig)Base58Check, version byte 0x12Starts with 88ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3
Main Chain (cross-chain)Base58Check, version byte 0x4BStarts with XXKUh4GLhFJiqAMTF6HyWQrV9pK9HcGUdfJ
ESCHex, EIP-55 checksum0x0x1234...abcd
EIDHex, EIP-55 checksum0x0x1234...abcd

Repository Map

RepositoryPurposeLanguage
elastos/Elastos.ELAMain chain full nodeGo
elastos/Elastos.ELA.SideChain.ESCESC sidechain nodeGo (geth fork)
elastos/Elastos.ELA.SideChain.EIDEID sidechain nodeGo (geth fork)
elastos/Elastos.ELA.ArbiterCross-chain bridgeGo
elastos/Elastos.DID.JS.SDKDID operationsTypeScript
elastos/Elastos.Hive.NodeDecentralized storage backendPython/Flask
elastos/Elastos.ELA.Wallet.JS.SDKMain chain wallet operationsTypeScript
CyberRepublic/Elastos.Essentials.AppMobile super-walletTypeScript/Ionic
elastos/Elastos.Connectivity.Client.JS.SDKdApp-to-wallet connectorTypeScript

Next Steps