Transactions API

Transfer Tokens (v2)

Send XRGE or custom tokens to another address using client-side ML-DSA-65 signing.

POST /api/v2/transfer
Content-Type: application/json

Request Body

{
  "payload": {
    "toPubKeyHex": "recipient-public-key-hex",
    "amount": 100.0,
    "fee": 0.1,
    "token": "XRGE",
    "from": "sender-public-key-hex",
    "timestamp": 1706745600000,
    "nonce": "random-hex-string"
  },
  "signature": "ml-dsa65-signature-hex",
  "public_key": "sender-public-key-hex"
}
FieldTypeRequiredDescription
toPubKeyHexstringYesRecipient's public key (hex) or rouge1 address
amountnumberYesAmount to send
feenumberNoTransaction fee (default: 0.1)
tokenstringNoToken symbol (default: "XRGE")

Security: Private keys never leave your application. The transaction is signed client-side using ML-DSA-65 and the server verifies the signature before processing.

Response

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

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
}

Get Transaction by Hash

GET /api/tx/:hash

Response

{
  "success": true,
  "tx": {
    "version": 1,
    "txType": "transfer",
    "fromPubKey": "abc...",
    "nonce": 1234567890,
    "payload": {
      "toPubKeyHex": "def...",
      "amount": 100
    },
    "fee": 0.1,
    "sig": "ghi...",
    "blockHeight": 42,
    "blockTime": 1706745600000
  }
}

Get Transaction Receipt

GET /api/tx/:hash/receipt

Returns execution receipt for contract calls and other complex transactions.


Request Faucet (v2)

Get free testnet XRGE tokens.

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

Request Body

{
  "payload": {
    "from": "your-public-key-hex",
    "timestamp": 1706745600000,
    "nonce": "random-hex-string"
  },
  "signature": "your-signature-hex",
  "public_key": "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 or token transfer
faucetFaucet distribution
stakeStake tokens to become validator
unstakeUnstake tokens
create_tokenCreate custom token
burnBurn tokens permanently
shieldShield tokens (make private)
unshieldUnshield tokens (make public)
contract_deployDeploy WASM smart contract
contract_callCall smart contract method