Smart contract APIs, P2P networking, Kademlia DHT, and everything you need to build on MumbleChat Protocol.
Deployed on Ramestta Mainnet (Chain ID: 1370)
ERC-20 utility token with halving and fee pool.
0xEfD7B65676FCD4b6d242CbC067C2470df19df1dE
// Standard ERC-20
function balanceOf(address) view returns (uint256)
function transfer(address to, uint256 amount) returns (bool)
function approve(address spender, 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)
Core identity and user blocking registry.
0x4f8D4955F370881B05b68D2344345E749d8632e3
// Identity
function register(bytes32 publicKeyX, string displayName)
function isRegistered(address) view returns (bool)
function updatePublicKey(bytes32 newPublicKeyX)
function updateDisplayName(string newDisplayName)
function deactivate()
// User Blocking
function blockUser(address userToBlock)
function unblockUser(address userToUnblock)
function isBlocked(address blocker, address blocked) view
// Legacy Relay (use RelayManager for V4)
function registerAsRelay(string endpoint, uint256 storageMB)
function heartbeat()
V4 Node Identity System with tier-based staking and rewards.
0xF78F840eF0e321512b09e98C76eA0229Affc4b73
// Node Registration (V4 Node Identity)
function registerNodeWithId(
bytes32 nodeId,
bytes32 machineIdHash,
bytes32 serialHash,
string endpoint,
uint256 storageMB,
NodeTier tier // Bronze=0, Silver=1, Gold=2, Platinum=3
)
function deactivateNodeById(bytes32 nodeId)
function heartbeatByNodeId(bytes32 nodeId)
// Tier Staking (100/200/300/400 MCT)
function getStakeForTier(NodeTier tier) view returns (uint256)
function getUptimeForTier(NodeTier tier) view returns (uint256)
function getFeePercentForTier(NodeTier tier) view returns (uint256)
// Daily Pool Rewards
function claimDailyPoolReward(uint256 dayId)
function submitRelayProof(bytes32 nodeId, bytes32 messageHash, ...)
// Protection Protocol
function reportViolation(bytes32 nodeId, string reason)
function slashNode(bytes32 nodeId, string reason) // owner only
function blacklistNode(address wallet, string reason) // owner only
// View Functions
function getNodeByNodeId(bytes32 nodeId) view
function getWalletNodeIds(address wallet) view returns (bytes32[])
function getActiveNodeIds() view returns (bytes32[], address[])
Register a new identity on-chain with your X25519 public key.
username - Display name (3-32 chars)publicKey - 32-byte X25519 public keyvoidGet the public key for a registered user. Used for key exchange.
user - User's wallet addressbytes32 - Public keyUpdate your public key (key rotation).
Register as a relay node with V4 Node Identity. Requires MCT stake based on tier.
nodeId - Unique node identifier (SHA256 hash)machineIdHash - Hash of machine MAC addressserialHash - Hash of hardware serialendpoint - P2P endpoint (multiaddr format)storageMB - Storage capacity in MBtier - Bronze=0, Silver=1, Gold=2, Platinum=3Heartbeat function. Call every 5 minutes to record uptime.
Stop being a relay node. Returns staked MCT.
Claim your share of the daily 100 MCT pool for a specific day.
Submit cryptographic proof of message relay for rewards.
Send an encrypted message to a recipient.
to - Recipient wallet addressciphertext - AES-256-GCM encrypted messageuint256 - Message IDGet all messages for a user (encrypted).
import { ethers } from 'ethers';
// Connect to Ramestta
const provider = new ethers.JsonRpcProvider('https://blockchain.ramestta.com');
const signer = new ethers.Wallet(PRIVATE_KEY, provider);
// Contract addresses
const REGISTRY = '0x4f8D4955F370881B05b68D2344345E749d8632e3';
const MCT = '0xEfD7B65676FCD4b6d242CbC067C2470df19df1dE';
// Load contract (simplified ABI)
const registryABI = [
'function register(string username, bytes32 publicKey)',
'function getPublicKey(address user) view returns (bytes32)',
'function isRegistered(address user) view returns (bool)'
];
const registry = new ethers.Contract(REGISTRY, registryABI, signer);
// Check if registered
const isReg = await registry.isRegistered(myAddress);
console.log('Registered:', isReg);
// Register identity
if (!isReg) {
const { publicKey, privateKey } = generateX25519KeyPair();
await registry.register('MyUsername', publicKey);
}
// Get recipient's public key for encryption
const recipientPubKey = await registry.getPublicKey(recipientAddress);
// Derive shared secret using X25519 ECDH
const sharedSecret = x25519.scalarMult(myPrivateKey, recipientPubKey);
// Encrypt message with AES-256-GCM
const ciphertext = encryptAES256GCM(message, sharedSecret);
// Send encrypted message on-chain
await registry.sendMessage(recipientAddress, 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 |
┌─────────────────────────────────────────────────────────────────────────┐
│ MUMBLECHAT ENCRYPTION FLOW │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. KEY GENERATION (per user) │
│ ├── Algorithm: X25519 (Curve25519 ECDH) │
│ ├── Private Key: 32 bytes random │
│ └── Public Key: 32 bytes (stored on-chain) │
│ │
│ 2. KEY EXCHANGE (per conversation) │
│ ├── Alice gets Bob's public key from contract │
│ ├── Perform X25519 ECDH: shared = X25519(alice_priv, bob_pub) │
│ ├── Derive encryption key: key = HKDF-SHA256(shared, salt) │
│ └── 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) │
│ ├── Plaintext: UTF-8 message │
│ └── Output: nonce || ciphertext || authTag │
│ │
│ 4. MESSAGE FORMAT (on-chain) │
│ ├── Bytes 0-11: Nonce (12 bytes) │
│ ├── Bytes 12-N: Ciphertext (variable) │
│ └── Bytes N-N+16: Authentication Tag (16 bytes) │
│ │
│ 5. DECRYPTION (recipient) │
│ ├── Extract nonce, ciphertext, authTag │
│ ├── Derive same shared secret via ECDH │
│ ├── AES-256-GCM decrypt with authTag verification │
│ └── Return plaintext or throw if tampered │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Kademlia DHT, NAT traversal, and security features in V3
Distributed hash table for peer discovery without central servers.
STUN servers and UDP hole punching for direct P2P connections.
Wallet signature verification prevents fake node attacks.
Per-category rate limits prevent DoS and spam attacks.
| 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 battery | 15-minute polling, no relay |
| STORE_FORWARD | Background / doze mode | Rely on relay nodes, sync on wake |
Source code for RamaPay wallet and MumbleChat.
Ramestta blockchain explorer.
Ramestta blockchain official site.
View MCT token contract on explorer.
View MumbleChatRegistry contract.
Get the Android wallet with MumbleChat.
Full ABI JSON files for contract integration.
[
"function name() view returns (string)",
"function symbol() view returns (string)",
"function decimals() view returns (uint8)",
"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 allowance(address owner, address spender) view returns (uint256)",
"function transferFrom(address from, address to, 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)",
"function lastClaimBlock(address) view returns (uint256)",
"event Transfer(address indexed from, address indexed to, uint256 value)",
"event Approval(address indexed owner, address indexed spender, uint256 value)",
"event FeeCollected(uint256 amount)",
"event RewardClaimed(address indexed user, uint256 amount)"
]
[
"function register(string username, bytes32 publicKey)",
"function updatePublicKey(bytes32 newPublicKey)",
"function updateUsername(string newUsername)",
"function isRegistered(address user) view returns (bool)",
"function getPublicKey(address user) view returns (bytes32)",
"function getUsername(address user) view returns (string)",
"function registerAsRelay(uint256 storageGB)",
"function deactivateRelay()",
"function recordUptime()",
"function getTier(address relay) view returns (uint8)",
"function isActiveRelay(address relay) view returns (bool)",
"function getRelayInfo(address relay) view returns (tuple)",
"function getActiveRelays() view returns (address[])",
"function sendMessage(address to, bytes ciphertext) returns (uint256)",
"function getMessages(address user) view returns (tuple[])",
"function markMessageRead(uint256 messageId)",
"event UserRegistered(address indexed user, string username)",
"event RelayRegistered(address indexed relay, uint256 storageGB)",
"event RelayDeactivated(address indexed relay)",
"event MessageSent(address indexed from, address indexed to, uint256 id)",
"event TierUpdated(address indexed relay, uint8 newTier)"
]