ATMN Documentation

Complete guide to mining, integration, and development

Overview

Welcome to the Antimony (ATMN) cryptocurrency network documentation. This comprehensive guide covers everything from basic coin specifications to advanced integration techniques.

What is ATMN?

Antimony (ATMN) is a high-performance proof-of-work cryptocurrency designed for secure, fast transactions and efficient mining operations.

Key Specifications

ParameterValue
Total Supply500,000,000 ATMN
Premine50,000,000 ATMN (10%)
Block Reward50 ATMN
Block Time12 seconds
AlgorithmSHA256d
P2P Port9000
RPC Port8332

Mining Pool Setup Guide

Requirements

Installation Steps

# Install dependencies sudo apt update sudo apt install -y build-essential libssl-dev pkg-config # Clone ATMN node git clone https://github.com/atmn/atmn-node.git cd atmn-node # Build the node cargo build --release # Start the node ./target/release/atmn-node --datadir=/var/atmn --rpcport=8332

Mining Pool Configuration

# Pool configuration (pool.conf) { "pool_address": "your_atmn_address_here", "pool_fee": 0.02, "min_payout": 1.0, "stratum_port": 3001, "node_rpc": "http://127.0.0.1:8332" }

Start Mining Client

# CPU Mining ./cpuminer -a sha256d -o stratum+tcp://pool.address:3001 -u YOUR_WALLET -p x # GPU Mining (NVIDIA) ./cudaminer -o stratum+tcp://pool.address:3001 -u YOUR_WALLET -p x

Wallet Integration Guide

Creating a Wallet

# Generate new wallet address curl -X POST http://localhost:8332/api/wallets/create \ -H "Content-Type: application/json" \ -d '{"email": "user@example.com"}' # Response { "address": "atmn1abc123...", "public_key": "04abc...", "created_at": "2024-12-05T10:00:00Z" }

Check Balance

curl http://localhost:8332/api/wallets/atmn1abc123.../balance # Response { "address": "atmn1abc123...", "balance": 1250.50, "pending": 0.00 }

Send Transaction

curl -X POST http://localhost:8332/api/transactions \ -H "Content-Type: application/json" \ -d '{ "from_address": "atmn1sender...", "to_address": "atmn1recipient...", "amount": 100.0, "fee": 0.01 }' # Response { "tx_hash": "0xabc123...", "status": "pending", "timestamp": "2024-12-05T10:00:00Z" }

Rosetta API Complete Reference

What is Rosetta API?

Rosetta API is a standard interface specification developed by Coinbase to simplify blockchain integration for exchanges, wallets, and other applications.

Network Endpoints

# Get Network List curl -X POST http://localhost:8080/network/list \ -H "Content-Type: application/json" \ -d '{}' # Response { "network_identifiers": [{ "blockchain": "atmn", "network": "mainnet" }] }
# Get Network Status curl -X POST http://localhost:8080/network/status \ -H "Content-Type: application/json" \ -d '{ "network_identifier": { "blockchain": "atmn", "network": "mainnet" } }' # Response { "current_block_identifier": { "index": 12458, "hash": "0x7a9b3c2d..." }, "current_block_timestamp": 1701781200000, "genesis_block_identifier": { "index": 0, "hash": "0x000000..." }, "peers": [ {"peer_id": "node1"}, {"peer_id": "node2"} ] }

Account Balance

curl -X POST http://localhost:8080/account/balance \ -H "Content-Type: application/json" \ -d '{ "network_identifier": { "blockchain": "atmn", "network": "mainnet" }, "account_identifier": { "address": "atmn1abc123..." } }' # Response { "block_identifier": { "index": 12458, "hash": "0x7a9b3c2d..." }, "balances": [{ "value": "125050000000", "currency": { "symbol": "ATMN", "decimals": 8 } }] }

Block Information

curl -X POST http://localhost:8080/block \ -H "Content-Type: application/json" \ -d '{ "network_identifier": { "blockchain": "atmn", "network": "mainnet" }, "block_identifier": { "index": 12458 } }'

Exchange Integration Guide

Prerequisites

Deposit Monitoring

# Monitor new blocks for deposits while true; do LATEST_BLOCK=$(curl -s http://localhost:8080/network/status | jq '.current_block_identifier.index') # Process transactions in block curl -X POST http://localhost:8080/block \ -H "Content-Type: application/json" \ -d "{ \"network_identifier\": {\"blockchain\": \"atmn\", \"network\": \"mainnet\"}, \"block_identifier\": {\"index\": $LATEST_BLOCK} }" sleep 12 done

Withdrawal Processing

# Create and submit withdrawal transaction curl -X POST http://localhost:8332/api/transactions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "from_address": "exchange_hot_wallet", "to_address": "user_destination_address", "amount": 100.0, "fee": 0.01, "memo": "Withdrawal #12345" }'

Security Best Practices

Node Deployment Instructions

System Requirements

ComponentMinimumRecommended
CPU2 cores4+ cores
RAM4 GB8+ GB
Storage50 GB SSD200+ GB NVMe
Network10 Mbps100+ Mbps

Docker Deployment

# Pull ATMN node image docker pull atmn/node:latest # Run node container docker run -d \ --name atmn-node \ -p 9000:9000 \ -p 8332:8332 \ -v /var/atmn-data:/data \ atmn/node:latest \ --datadir=/data \ --rpcport=8332 \ --p2pport=9000 \ --rpcallowip=0.0.0.0/0

Systemd Service

# /etc/systemd/system/atmn-node.service [Unit] Description=ATMN Full Node After=network.target [Service] Type=simple User=atmn ExecStart=/usr/local/bin/atmn-node --datadir=/var/atmn --rpcport=8332 Restart=always RestartSec=10 [Install] WantedBy=multi-user.target # Enable and start sudo systemctl enable atmn-node sudo systemctl start atmn-node

Firewall Configuration

# Allow P2P connections sudo ufw allow 9000/tcp # Allow RPC (restrict to specific IPs in production) sudo ufw allow from 10.0.0.0/8 to any port 8332 # Enable firewall sudo ufw enable

Complete API Examples

Python Integration

import requests import json # API Configuration BASE_URL = "http://localhost:8332/api" ROSETTA_URL = "http://localhost:8080" # Get wallet balance def get_balance(address): response = requests.get(f"{BASE_URL}/wallets/{address}/balance") return response.json() # Send transaction def send_transaction(from_addr, to_addr, amount): data = { "from_address": from_addr, "to_address": to_addr, "amount": amount, "fee": 0.01 } response = requests.post(f"{BASE_URL}/transactions", json=data) return response.json() # Get block via Rosetta def get_block(block_number): data = { "network_identifier": { "blockchain": "atmn", "network": "mainnet" }, "block_identifier": { "index": block_number } } response = requests.post(f"{ROSETTA_URL}/block", json=data) return response.json() # Example usage balance = get_balance("atmn1abc123...") print(f"Balance: {balance['balance']} ATMN") tx = send_transaction("atmn1sender...", "atmn1recipient...", 100.0) print(f"Transaction hash: {tx['tx_hash']}") block = get_block(12458) print(f"Block transactions: {len(block['block']['transactions'])}")

JavaScript/Node.js Integration

const axios = require('axios'); const BASE_URL = 'http://localhost:8332/api'; const ROSETTA_URL = 'http://localhost:8080'; // Get wallet balance async function getBalance(address) { const response = await axios.get(`${BASE_URL}/wallets/${address}/balance`); return response.data; } // Send transaction async function sendTransaction(fromAddr, toAddr, amount) { const response = await axios.post(`${BASE_URL}/transactions`, { from_address: fromAddr, to_address: toAddr, amount: amount, fee: 0.01 }); return response.data; } // Monitor new blocks async function monitorBlocks() { let lastBlock = 0; setInterval(async () => { const status = await axios.post(`${ROSETTA_URL}/network/status`, { network_identifier: { blockchain: 'atmn', network: 'mainnet' } }); const currentBlock = status.data.current_block_identifier.index; if (currentBlock > lastBlock) { console.log(`New block: ${currentBlock}`); lastBlock = currentBlock; } }, 12000); } // Example usage (async () => { const balance = await getBalance('atmn1abc123...'); console.log(`Balance: ${balance.balance} ATMN`); monitorBlocks(); })();

Troubleshooting

Common Issues

Node Won't Start

Mining Connection Issues

Transaction Not Confirming

Support Resources