Smart contract APIs, encryption specs, P2P networking, and everything you need to build on MumbleChat Protocol.
4 production contracts on Ramestta Mainnet (Chain ID: 1370)
ERC-20 utility token with halving, fee pool, and verified minting.
0xEfD7B65676FCD4b6d242CbC067C2470df19df1dE
// ERC-20
function balanceOf(address) view returns (uint256)
function transfer(address to, uint256 amount) returns (bool)
// MCT-specific
function mintForRelay(address relay, uint256 messages)
function claimFeePoolReward()
function currentRate() view returns (uint256)
function halvingLevel() view returns (uint256)
function feePool() view returns (uint256)
On-chain identity, user blocking, and public key storage.
0x4f8D4955F370881B05b68D2344345E749d8632e3
// Identity
function register(bytes32 publicKeyX, string displayName)
function isRegistered(address) view returns (bool)
function updatePublicKey(bytes32 newPublicKeyX)
// User Blocking
function blockUser(address userToBlock)
function isBlocked(address blocker, address blocked) view
Node identity, tier-based staking, daily pool rewards, and violation handling.
0xF78F840eF0e321512b09e98C76eA0229Affc4b73
// Node Registration (V7 Node Identity)
function registerNodeWithId(
bytes32 nodeId,
bytes32 machineIdHash,
bytes32 serialHash,
string endpoint,
uint256 storageMB,
NodeTier tier // Bronze=0 to Platinum=3
)
function heartbeatByNodeId(bytes32 nodeId)
function deactivateNodeById(bytes32 nodeId)
// Daily Pool Rewards
function claimDailyPoolReward(uint256 dayId)
// Protection
function reportViolation(bytes32 nodeId, string reason)
function slashNode(bytes32 nodeId, string reason)
On-chain relay proof verification with commit-verify pattern. Anti-gaming protection.
0x9Ac287F9067F9DecaDa3ab20dda0d8E0f965006f
// Commit-Verify Pattern
function commitRelayBatch(
bytes32 nodeId,
bytes32[] calldata messageHashes
)
function verifyAndReward(
bytes32 nodeId,
uint256 claimedCount
)
// Anti-Gaming
// 35s commit cooldown
// 10K max hashes per batch
// Global hash uniqueness check
// Authorized consumer pattern
MumbleChat uses real X25519 Diffie-Hellman key exchange (BouncyCastle on Android, Web Crypto P-256 on browser) with AES-256-GCM symmetric encryption. Messages are authenticated with Ed25519 digital signatures.
┌───────────────────────────────────────────────────────────────────────┐
│ MUMBLECHAT ENCRYPTION FLOW │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ 1. KEY GENERATION (per user) │
│ ├── Algorithm: X25519 (Curve25519 ECDH via BouncyCastle) │
│ ├── Private Key: 32 bytes random │
│ └── Public Key: 32 bytes (stored on-chain in Registry) │
│ │
│ 2. KEY EXCHANGE (per conversation) │
│ ├── Alice gets Bob's public key from Registry contract │
│ ├── Perform X25519 ECDH: shared = X25519(alice_priv, bob_pub) │
│ ├── Derive key: HKDF-SHA256(shared, salt, 256 bits) │
│ └── Same shared secret on both sides (symmetric) │
│ │
│ 3. MESSAGE ENCRYPTION │
│ ├── Algorithm: AES-256-GCM │
│ ├── Key: derived shared secret (256 bits) │
│ ├── Nonce: 12 bytes random (unique per message) │
│ └── Output: nonce ‖ ciphertext ‖ authTag (16 bytes) │
│ │
│ 4. MESSAGE AUTHENTICATION │
│ ├── Algorithm: Ed25519 (BouncyCastle) │
│ ├── Sign: Ed25519(privateKey, messageHash) │
│ └── Verify: Ed25519.verify(publicKey, signature, hash) │
│ │
│ 5. LOCAL STORAGE │
│ ├── Database: SQLCipher (AES-256 encrypted SQLite) │
│ ├── Key: Derived from wallet private key │
│ └── All messages, contacts, keys encrypted at rest │
│ │
└───────────────────────────────────────────────────────────────────────┘
Register on-chain identity with X25519 public key. Wallet-signed authentication.
username - Display name (3-32 chars)publicKey - 32-byte X25519 public keyvoidGet X25519 public key for ECDH key exchange.
Rotate your public key. Old conversations will need re-keying.
Register as relay node with V7 Node Identity. Requires MCT stake.
nodeId - SHA256 hash of node identitymachineIdHash - Hash of machine MAC addressserialHash - Hash of hardware serialendpoint - P2P endpoint (multiaddr)tier - Bronze=0, Silver=1, Gold=2, Platinum=3Record uptime. Call every 5 minutes.
Claim your share of the daily 100 MCT pool.
Report a node for protocol violation. Triggers review.
Commit message hashes to blockchain before claiming rewards. 35s cooldown between commits.
Verify committed hashes ≥ claimed count, then mint reward via MCTToken.
import { ethers } from 'ethers';
// Connect to Ramestta Mainnet (Chain ID: 1370)
const provider = new ethers.JsonRpcProvider('https://blockchain.ramestta.com');
const signer = new ethers.Wallet(PRIVATE_KEY, provider);
// Contract addresses (production)
const REGISTRY = '0x4f8D4955F370881B05b68D2344345E749d8632e3';
const MCT = '0xEfD7B65676FCD4b6d242CbC067C2470df19df1dE';
const RELAY_MGR = '0xF78F840eF0e321512b09e98C76eA0229Affc4b73';
const VERIFIER = '0x9Ac287F9067F9DecaDa3ab20dda0d8E0f965006f';
// Register identity with X25519 public key
const { publicKey, privateKey } = generateX25519KeyPair();
await registry.register('MyUsername', publicKey);
// Get recipient's public key for encryption
const recipientPubKey = await registry.getPublicKey(recipientAddress);
// X25519 ECDH → shared secret → AES-256-GCM encrypt
const sharedSecret = x25519.scalarMult(myPrivateKey, recipientPubKey);
const ciphertext = encryptAES256GCM(message, sharedSecret);
// Send via relay node (encrypted, zero-knowledge)
relay.send({ to: recipientAddress, data: ciphertext });
| Network Name | Ramestta Mainnet |
| Chain ID | 1370 |
| RPC URL | https://blockchain.ramestta.com |
| Block Explorer | https://ramascan.com |
| Currency Symbol | RAMA |
| Currency Decimals | 18 |
Kademlia DHT for peer discovery, UDP hole punching for NAT traversal, wallet-signed Sybil resistance, and battery-aware notification strategies. Rate limiting prevents DoS attacks at every layer.
| Strategy | Condition | Behavior |
|---|---|---|
| PERSISTENT | Charging + WiFi | Always-on WebSocket, act as relay |
| ACTIVE | App in foreground | Full P2P, 1-minute keepalive |
| LAZY | Battery saver / low | 15-minute polling, no relay |
| STORE_FORWARD | Background / doze | Rely on relay nodes, sync on wake |
Full ABI JSON for contract integration.
[
"function name() view returns (string)",
"function symbol() view returns (string)",
"function totalSupply() view returns (uint256)",
"function balanceOf(address) view returns (uint256)",
"function transfer(address to, uint256 amount) returns (bool)",
"function approve(address spender, uint256 amount) returns (bool)",
"function mintForRelay(address relay, uint256 messageCount)",
"function claimFeePoolReward()",
"function currentRate() view returns (uint256)",
"function halvingLevel() view returns (uint256)",
"function totalMinted() view returns (uint256)",
"function feePool() view returns (uint256)",
"event Transfer(address indexed from, address indexed to, uint256 value)",
"event RewardClaimed(address indexed user, uint256 amount)"
]
[
"function register(string username, bytes32 publicKey)",
"function updatePublicKey(bytes32 newPublicKey)",
"function isRegistered(address user) view returns (bool)",
"function getPublicKey(address user) view returns (bytes32)",
"function blockUser(address userToBlock)",
"function unblockUser(address userToUnblock)",
"function isBlocked(address,address) view returns (bool)",
"function registerAsRelay(uint256 storageGB)",
"function getActiveRelays() view returns (address[])",
"event UserRegistered(address indexed user, string username)",
"event RelayRegistered(address indexed relay, uint256 storageGB)"
]