AuraChain Documentation
Welcome to the official AuraChain documentation. Learn how to use the wallet and interact with the blockchain through our comprehensive APIs.
🚀 What is AuraChain?
AuraChain is a hybrid blockchain combining Proof of Work (PoW) and Proof of Stake (PoS) consensus mechanisms, featuring:
- Native cryptocurrency (AURA)
- Smart contract support (AUR-20 tokens)
- NFT support (AUR-721 standard)
- Decentralized storage integration
- RESTful JSON-RPC API
Getting Started
Installation
# Clone the repository
git clone https://github.com/yourusername/aurachain.git
cd aurachain
# Build the project
cargo build --release
# Run the wallet
./target/release/aurachain-fullnode-wallet
Quick Start
- Launch the wallet application
- Create or import a wallet from the Wallets tab
- Start mining from the Mining tab to earn AURA
- Use the APIs to deploy contracts and NFTs
Wallet Features
📊 Dashboard
View network statistics, blockchain height, mining status, and recent blocks at a glance.
💰 Wallets
Create multiple wallets, import from private keys, send AURA, and manage your balances.
⛏️ Mining
Start/stop mining, monitor hashrate, and earn block rewards through PoW consensus.
🌐 Network
View connected peers, manage network connections, and monitor network health.
💾 Mempool
View pending transactions waiting to be included in the next block.
📊 Explorer
Browse blocks, search transactions, and explore the entire blockchain history.
API Reference
AuraChain provides a comprehensive JSON-RPC API for developers. All APIs are accessible at http://localhost:12345
Blockchain APIs
Get Blockchain Info
Retrieve current blockchain information including height and difficulty.
{
"jsonrpc": "2.0",
"method": "aura_getBlockchainInfo",
"params": [],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"height": 1234,
"difficulty": 4,
"latest_block_hash": "0x...",
"latest_block_time": "2025-01-30T12:00:00Z"
},
"id": 1
}
Get Block By Number
Fetch a specific block by its height.
{
"jsonrpc": "2.0",
"method": "aura_getBlockByNumber",
"params": [100],
"id": 1
}
Get Balance
Get the AURA balance for an address.
{
"jsonrpc": "2.0",
"method": "aura_getBalance",
"params": ["0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51"],
"id": 1
}
Contract APIs
Deploy Contract
Deploy a new smart contract to the blockchain.
{
"jsonrpc": "2.0",
"method": "aura_deployContract",
"params": [
"0xdeployer_address",
"contract_bytecode",
0,
3000000
],
"id": 1
}
Parameters:
| Name | Type | Description |
|---|---|---|
| deployer_address | string | Address deploying the contract |
| bytecode | string | Contract bytecode (hex) |
| value | number | AURA to send with deployment |
| gas_limit | number | Maximum gas for execution |
Get Deployed Contracts
List all deployed smart contracts.
{
"jsonrpc": "2.0",
"method": "aura_getDeployedContracts",
"params": [],
"id": 1
}
Call Contract Method
Execute a method on a deployed contract.
{
"jsonrpc": "2.0",
"method": "aura_callContract",
"params": [
"0xcontract_address",
"method_name",
["arg1", "arg2"]
],
"id": 1
}
NFT (AUR-721) APIs
Deploy NFT Collection
Create a new NFT collection contract.
{
"jsonrpc": "2.0",
"method": "aura_deployNFTCollection",
"params": [
"0xowner_address",
"Collection Name",
"SYMBOL",
"Collection description",
"ipfs://base/",
10000,
"Native"
],
"id": 1
}
Parameters:
| Name | Type | Description |
|---|---|---|
| owner_address | string | Collection owner address |
| name | string | Collection name |
| symbol | string | Collection symbol |
| description | string | Collection description |
| base_uri | string | Base URI for metadata |
| max_supply | number | Maximum supply (0 for unlimited) |
| storage_type | string | "Native", "IPFS", or "Arweave" |
Mint NFT
Mint a new NFT in a collection.
{
"jsonrpc": "2.0",
"method": "aura_mintNFT",
"params": [
"0xcollection_address",
1,
"ipfs://metadata/1",
"0xowner_address"
],
"id": 1
}
Transfer NFT
Transfer an NFT to another address.
{
"jsonrpc": "2.0",
"method": "aura_transferNFT",
"params": [
"0xcollection_address",
"0xfrom_address",
"0xto_address",
1
],
"id": 1
}
Get User NFTs
Retrieve all NFTs owned by an address.
{
"jsonrpc": "2.0",
"method": "aura_getUserNFTs",
"params": ["0xuser_address"],
"id": 1
}
Get All Collections
List all NFT collections on the blockchain.
{
"jsonrpc": "2.0",
"method": "aura_getAllCollections",
"params": [],
"id": 1
}
Transaction APIs
Get Pending Transactions
Get all transactions in the mempool.
{
"jsonrpc": "2.0",
"method": "aura_getPendingTransactions",
"params": [],
"id": 1
}
Get Transaction Confirmation
Check confirmation status of a transaction.
{
"jsonrpc": "2.0",
"method": "aura_getTransactionConfirmation",
"params": ["0xtransaction_hash"],
"id": 1
}
Code Examples
JavaScript/Node.js Example
const axios = require('axios');
const RPC_URL = 'http://localhost:12345';
// Deploy NFT Collection
async function deployNFTCollection() {
const response = await axios.post(RPC_URL, {
jsonrpc: '2.0',
method: 'aura_deployNFTCollection',
params: [
'0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51',
'My Art Collection',
'MYART',
'A collection of digital art',
'ipfs://QmBase/',
1000,
'IPFS'
],
id: 1
});
console.log('Collection deployed:', response.data.result);
return response.data.result.contract_address;
}
// Mint NFT
async function mintNFT(collectionAddress, tokenId, owner) {
const response = await axios.post(RPC_URL, {
jsonrpc: '2.0',
method: 'aura_mintNFT',
params: [
collectionAddress,
tokenId,
`ipfs://QmMetadata/${tokenId}`,
owner
],
id: 1
});
console.log('NFT minted:', response.data.result);
}
// Get User NFTs
async function getUserNFTs(userAddress) {
const response = await axios.post(RPC_URL, {
jsonrpc: '2.0',
method: 'aura_getUserNFTs',
params: [userAddress],
id: 1
});
console.log('User NFTs:', response.data.result);
return response.data.result;
}
// Usage
(async () => {
const collectionAddress = await deployNFTCollection();
await mintNFT(collectionAddress, 1, '0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51');
await getUserNFTs('0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51');
})();
Python Example
import requests
import json
RPC_URL = 'http://localhost:12345'
def call_rpc(method, params):
payload = {
'jsonrpc': '2.0',
'method': method,
'params': params,
'id': 1
}
response = requests.post(RPC_URL, json=payload)
return response.json()
# Get blockchain info
blockchain_info = call_rpc('aura_getBlockchainInfo', [])
print('Blockchain height:', blockchain_info['result']['height'])
# Get balance
balance = call_rpc('aura_getBalance', ['0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51'])
print('Balance:', balance['result'])
# Deploy NFT collection
collection = call_rpc('aura_deployNFTCollection', [
'0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51',
'Python NFTs',
'PYNFT',
'NFTs created from Python',
'ipfs://base/',
5000,
'Native'
])
print('Collection deployed:', collection['result'])
cURL Example
# Get blockchain info
curl -X POST http://localhost:12345 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "aura_getBlockchainInfo",
"params": [],
"id": 1
}'
# Get user NFTs
curl -X POST http://localhost:12345 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "aura_getUserNFTs",
"params": ["0x79daa69ac78c2e50c59b2b3b5163597ae90c0c51"],
"id": 1
}'