API Documentation
The POWPAD API lets you deploy and manage proof-of-work blockchains programmatically. Generate addresses, send transactions, track deposits, and receive webhooks - all with simple REST calls.
https://privacy.energy/v1
Authentication
All authenticated endpoints require an API key. Include it in the X-API-Key header or as an api_key query parameter.
# Using header (recommended)
curl https://privacy.energy/v1/chains/xxx/balance \
-H "X-API-Key: pow_your_api_key_here"
# Using query parameter
curl https://privacy.energy/v1/chains/xxx/balance?api_key=pow_your_api_key_here
Rate Limits
Rate limits depend on your pricing tier. Limits reset every hour.
| Tier | Requests/Hour | Chains | Webhooks | Price |
|---|---|---|---|---|
| Free | 100 | 1 | 1 | $0 |
| Developer | 1,000 | 5 | 10 | $29/mo |
| Startup | 10,000 | 25 | 50 | $99/mo |
| Enterprise | 100,000 | Unlimited | Unlimited | $499/mo |
List Chains
Returns a list of all live POWPAD chains.
Response
{
"chains": [
{
"name": "X Chain",
"ticker": "XXX",
"color": "#00ff88",
"launchedAt": 1705942800000
}
]
}
Get Chain Stats
Get network and pool statistics for a chain.
Response
{
"chain": { "name": "X Chain", "ticker": "XXX" },
"network": {
"height": 12847,
"difficulty": 1203,
"hashrate": 20,
"synchronized": true
},
"pool": {
"miners": 5,
"hashrate": 4200,
"blocksFound": 847,
"fee": 1
}
}
Validate Address
Check if an address is valid for this chain.
Response
{
"valid": true,
"integrated": false,
"nettype": "mainnet"
}
Create Deposit Address
Generate a new deposit address. The address will be monitored for incoming transactions and trigger webhooks.
Request Body
| Parameter | Type | Description |
|---|---|---|
label |
string | Optional label for the address |
Response
{
"address": "9mV37g7iQtUCgkCfBqhGGg2xv1NduzTEPjgePggNsGeT...",
"addressIndex": 1
}
Get Balance
Get the balance of a specific address.
Response
{
"address": "9mV37g7iQtUCgkCfBqhGGg2xv1NduzTEPjgePggNsGeT...",
"balance": 50000000000000,
"balanceFormatted": "50.00000000",
"unlockedBalance": 45000000000000,
"unlockedFormatted": "45.00000000",
"blocksToUnlock": 12
}
Send Transfer
Send coins to an address.
Request Body
| Parameter | Type | Description |
|---|---|---|
address required |
string | Destination address |
amount required |
number | Amount to send (in coins, not atomic units) |
paymentId |
string | Optional 64-character hex payment ID |
Response
{
"txid": "a1b2c3d4e5f6...",
"txKey": "f6e5d4c3b2a1...",
"fee": 10000000,
"feeFormatted": "0.00001000"
}
Transaction History
Get transaction history for the wallet.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
type |
string | in, out, or omit for both |
limit |
number | Max results (default 50, max 100) |
Response
{
"transactions": [
{
"txid": "a1b2c3d4...",
"direction": "in",
"amount": 50000000000000,
"amountFormatted": "50.00000000",
"height": 12345,
"timestamp": 1705942800,
"confirmations": 60,
"locked": false
}
]
}
Create Webhook
Register a webhook URL to receive event notifications.
Request Body
| Parameter | Type | Description |
|---|---|---|
url required |
string | HTTPS URL to receive webhook POSTs |
events required |
array | Events to subscribe to |
Response
{
"id": "wh_abc123",
"url": "https://yourapp.com/webhook",
"events": ["deposit.received"],
"secret": "whsec_..."
}
Webhook Events
Webhooks are sent as POST requests with a JSON body. Verify the signature using the X-POWPAD-Signature header.
| Event | Description |
|---|---|
deposit.received |
New deposit detected on a tracked address |
block.found |
New block mined on the network |
transfer.sent |
Outgoing transfer completed |
* |
Subscribe to all events |
Webhook Payload
{
"event": "deposit.received",
"timestamp": 1705942800000,
"data": {
"address": "9mV37g7iQtUCgkCfBqhGGg2xv1NduzTEPjgePggNsGeT...",
"amount": 50000000000000,
"amountFormatted": "50.00000000",
"txid": "a1b2c3d4...",
"confirmations": 1
}
}
Verifying Signatures
// Node.js example
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return signature === expected;
}