Transactions API

Submit Transaction

Send XRGE tokens to another address.

POST /api/tx/submit
Content-Type: application/json

Request Body

{
  "fromPrivateKey": "your-private-key-hex",
  "fromPublicKey": "your-public-key-hex", 
  "toPublicKey": "recipient-public-key-hex",
  "amount": 100.0,
  "fee": 0.1
}
FieldTypeRequiredDescription
fromPrivateKeystringYesSender's ML-DSA-65 private key (hex)
fromPublicKeystringYesSender's ML-DSA-65 public key (hex)
toPublicKeystringYesRecipient's public key (hex)
amountnumberYesAmount of XRGE to send
feenumberNoTransaction fee (default: 0.1)

Response

{
  "success": true,
  "txId": "abc123...",
  "tx": {
    "version": 1,
    "txType": "transfer",
    "fromPubKey": "...",
    "nonce": 1234567890,
    "payload": {
      "toPubKeyHex": "...",
      "amount": 100
    },
    "fee": 0.1,
    "sig": "..."
  }
}

Error Response

{
  "success": false,
  "error": "insufficient balance: have 50.0000 XRGE, need 100.1000 XRGE"
}

Get Transactions

Retrieve recent transactions.

GET /api/txs?limit=50&offset=0

Query Parameters

ParameterTypeDefaultDescription
limitnumber50Max transactions to return
offsetnumber0Pagination offset

Response

{
  "txs": [
    {
      "version": 1,
      "txType": "transfer",
      "fromPubKey": "abc...",
      "nonce": 1234567890,
      "payload": {
        "toPubKeyHex": "def...",
        "amount": 100
      },
      "fee": 0.1,
      "sig": "ghi...",
      "blockHeight": 42,
      "blockTime": 1706745600000
    }
  ],
  "total": 150
}

Request Faucet (Testnet)

Get free testnet XRGE tokens.

POST /api/faucet
Content-Type: application/json

Request Body

{
  "publicKey": "your-public-key-hex"
}

Response

{
  "success": true,
  "amount": 1000,
  "txId": "abc123..."
}

Rate Limit

The faucet has additional rate limiting:

  • 1 request per address per hour
  • Whitelisted addresses bypass rate limits

Transaction Types

TypeDescription
transferStandard XRGE transfer
faucetFaucet distribution
stakeStake tokens to become validator
unstakeUnstake tokens
create_tokenCreate custom token