Celereum

Celereum

Celereum Documentation

Complete technical reference for building on Celereum blockchain.

Installation

Install the Celereum SDK using npm or yarn:

bash
npm install @celereum/sdk

Dependencies: @noble/ed25519, @noble/hashes, bs58

Quick Start

Connect to the network and check the current block height:

typescript
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:

typescript
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
typescript
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)); // true

Transactions

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:

fee = signatures × 5,000 + compute_units × price_per_unit
UnitValue
1 CEL1,000,000,000 celers
Base fee5,000 celers
Fee burn50%

SDK Packages

@celereum/sdk

Core SDK - Connection, Keypair, Transaction

v0.1.0
@celereum/wallet-adapter-base

Wallet adapter interfaces

v1.0.0
@celereum/wallet-adapter-react

React hooks - useWallet, useConnection

v1.0.0
@celereum/wallet-adapter-react-ui

Pre-built UI components

v1.0.0
@celereum/wallet-adapter-wallets

CelereumX adapter

v1.0.0

RPC Endpoints

Development
http://localhost:8899
Local
Testnet
https://testnet.celereum.com
Live
Mainnet
https://rpc.celereum.com
Coming Soon

WebSocket available on same endpoints

Network Parameters

Current Implementation (Lite Mode)

Timing

Slot Time320ms
Ticks/Slot32
Slots/Epoch270,000
Finality<500ms

Limits

Max Block Size32 MB
Max TX/Block3,200
TPS10,000
Base Fee5,000 celers

Target Specifications (Full Mode)

Timing

Slot Time200ms
Ticks/Slot32
Slots/Epoch270,000
Finality50ms

Limits

Max Block Size32 MB
Max TX/Block10,000
TPS200,000
Base Fee5,000 celers

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:

typescript
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

typescript
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

typescript
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

typescript
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); // boolean

System Program

Core program for account management and native CEL transfers:

typescript
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)

typescript
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):

typescript
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

MethodDescription
getBalanceGet account balance in celers
getBlockHeightGet current block height
getBlockGet block by slot number
getTransactionGet transaction by signature
getAccountInfoGet account data and metadata
sendTransactionSubmit signed transaction
simulateTransactionSimulate without submitting
getRecentBlockhashGet blockhash for signing
getSignatureStatusesGet transaction status
getSlotGet current slot

WebSocket Subscriptions

typescript
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