Celereum Documentation
Complete technical reference for building on Celereum blockchain.
Installation
Install the Celereum SDK using npm or yarn:
npm install @celereum/sdkDependencies: @noble/ed25519, @noble/hashes, bs58
Quick Start
Connect to the network and check the current block height:
import { Connection } from '@celereum/sdk';
// Connect to local node (development)
const connection = new Connection('http://localhost:8899');
// Get current block height
const blockHeight = await connection.getBlockHeight();
console.log('Current block:', blockHeight);
// Get balance
const balance = await connection.getBalance(publicKey);
console.log('Balance:', balance, 'celers');First Transaction
Create and send your first CEL transfer:
import {
Connection,
Keypair,
Transaction,
SystemProgram,
sendAndConfirmTransaction
} from '@celereum/sdk';
// Generate wallet
const wallet = Keypair.generate();
console.log('Address:', wallet.publicKey.toBase58());
// Create transfer instruction
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey: wallet.publicKey,
toPubkey: recipientPublicKey,
celers: 1_000_000_000, // 1 CEL
})
);
// Send transaction
const signature = await sendAndConfirmTransaction(
connection,
transaction,
[wallet]
);
console.log('Transaction:', signature);Accounts & Keypairs
Celereum uses SEVS (post-quantum) keypairs for account addresses. Each account has:
- Public Key: 64-byte address (base58 encoded)
- Private Key: 32-byte seed
- Balance: Amount in celers (1 CEL = 10⁹ celers)
- Owner: Program that controls the account
- Data: Arbitrary byte array for program state
import { Keypair, PublicKey } from '@celereum/sdk';
// Generate new keypair
const keypair = Keypair.generate();
// From secret key
const fromSecret = Keypair.fromSecretKey(secretKeyBytes);
// Public key from string
const pubkey = new PublicKey('ABC123...');
// Check if valid
console.log(PublicKey.isOnCurve(pubkey)); // trueTransactions
Transactions contain one or more instructions that are executed atomically:
Transaction Structure
- •
signatures- SEVS signatures (128 bytes) - •
message.header- Account counts - •
message.accountKeys- Participating accounts - •
message.recentBlockhash- For replay protection - •
message.instructions- Program calls
Programs
Programs are stateless executables deployed on-chain. Celereum has 5 built-in programs:
System
Account creation, CEL transfers
Token (CEL-20)
Fungible token operations
AMM
DEX with x*y=k formula
Bridge
Cross-chain transfers
Vesting
Token vesting schedules
Fees & Celers
Transaction fees are calculated as:
| Unit | Value |
|---|---|
| 1 CEL | 1,000,000,000 celers |
| Base fee | 5,000 celers |
| Fee burn | 50% |
SDK Packages
@celereum/sdkCore SDK - Connection, Keypair, Transaction
@celereum/wallet-adapter-baseWallet adapter interfaces
@celereum/wallet-adapter-reactReact hooks - useWallet, useConnection
@celereum/wallet-adapter-react-uiPre-built UI components
@celereum/wallet-adapter-walletsCelereumX adapter
RPC Endpoints
http://localhost:8899https://testnet.celereum.comhttps://rpc.celereum.comWebSocket available on same endpoints
Network Parameters
Current Implementation (Lite Mode)
Timing
Limits
Target Specifications (Full Mode)
Timing
Limits
Network starts in Lite Mode and progressively scales to Full Mode as validator infrastructure matures. See Whitepaper §12 for details.
Connection Class
The Connection class handles all RPC communication:
import { Connection } from '@celereum/sdk';
const connection = new Connection(
'http://localhost:8899',
'confirmed' // commitment level
);
// Methods
await connection.getBalance(publicKey);
await connection.getBlockHeight();
await connection.getRecentBlockhash();
await connection.getAccountInfo(publicKey);
await connection.sendTransaction(transaction);
await connection.confirmTransaction(signature);Keypair Class
import { Keypair } from '@celereum/sdk';
// Generate random keypair
const keypair = Keypair.generate();
// From secret key (Uint8Array)
const fromBytes = Keypair.fromSecretKey(secretKey);
// Properties
keypair.publicKey; // PublicKey
keypair.secretKey; // Uint8Array (64 bytes)Transaction Class
import { Transaction } from '@celereum/sdk';
const tx = new Transaction();
// Add instructions
tx.add(instruction1);
tx.add(instruction2, instruction3);
// Set recent blockhash
tx.recentBlockhash = blockhash;
tx.feePayer = payerPublicKey;
// Sign
tx.sign(signer1, signer2);
// Serialize
const serialized = tx.serialize();PublicKey Class
import { PublicKey } from '@celereum/sdk';
// From base58 string
const pubkey = new PublicKey('ABC123...');
// From bytes
const fromBytes = new PublicKey(uint8Array);
// Methods
pubkey.toBase58(); // string
pubkey.toBytes(); // Uint8Array
pubkey.equals(other); // boolean
PublicKey.isOnCurve(pubkey); // booleanSystem Program
Core program for account management and native CEL transfers:
import { SystemProgram } from '@celereum/sdk';
// Transfer CEL
SystemProgram.transfer({
fromPubkey: sender.publicKey,
toPubkey: recipient,
celers: 1_000_000_000, // 1 CEL
});
// Create account
SystemProgram.createAccount({
fromPubkey: payer.publicKey,
newAccountPubkey: newAccount.publicKey,
celers: rentExemptBalance,
space: dataSize,
programId: ownerProgram,
});
// Allocate space
SystemProgram.allocate({
accountPubkey: account.publicKey,
space: newSize,
});Token Program (CEL-20)
import { TokenProgram } from '@celereum/sdk';
// Initialize mint
TokenProgram.initializeMint({
mint: mintKeypair.publicKey,
decimals: 9,
mintAuthority: authority.publicKey,
freezeAuthority: null,
});
// Mint tokens
TokenProgram.mintTo({
mint: mintAddress,
destination: tokenAccount,
authority: mintAuthority.publicKey,
amount: 1_000_000_000,
});
// Transfer tokens
TokenProgram.transfer({
source: sourceAccount,
destination: destAccount,
owner: owner.publicKey,
amount: 500_000_000,
});AMM Program
Automated Market Maker with constant product formula (x × y = k):
import { AmmProgram } from '@celereum/sdk';
// Create pool
AmmProgram.createPool({
tokenA: tokenAMint,
tokenB: tokenBMint,
fee: 30, // 0.3%
});
// Add liquidity
AmmProgram.addLiquidity({
pool: poolAddress,
amountA: 1000_000_000_000,
amountB: 500_000_000_000,
minLpTokens: 0,
});
// Swap
AmmProgram.swap({
pool: poolAddress,
amountIn: 1_000_000_000,
minAmountOut: 490_000_000,
tokenIn: tokenAMint,
});JSON-RPC Methods
| Method | Description |
|---|---|
| getBalance | Get account balance in celers |
| getBlockHeight | Get current block height |
| getBlock | Get block by slot number |
| getTransaction | Get transaction by signature |
| getAccountInfo | Get account data and metadata |
| sendTransaction | Submit signed transaction |
| simulateTransaction | Simulate without submitting |
| getRecentBlockhash | Get blockhash for signing |
| getSignatureStatuses | Get transaction status |
| getSlot | Get current slot |
WebSocket Subscriptions
const ws = new WebSocket('ws://localhost:8899');
// Subscribe to account changes
ws.send(JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'accountSubscribe',
params: [publicKey.toBase58()]
}));
// Subscribe to slot updates
ws.send(JSON.stringify({
jsonrpc: '2.0',
id: 2,
method: 'slotSubscribe'
}));
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Update:', data);
};Documentation v1.4.0 • December 2025
