Command-Line Reference
For technical users who prefer command-line control, want to automate their setup, or are building tooling on top of Arkeo.
Provider Setup
Run these commands on the server where your blockchain node is running. You'll need Go 1.21+ and a publicly reachable IP with port 3636 open.
Install arkeod
git clone https://github.com/arkeonetwork/arkeo.git cd arkeo make install make tools
Installs the arkeod binary and supporting tools. Verify with arkeod version.
Create a hot wallet
arkeod keys add provider-hot-wallet --keyring-backend test
Creates a dedicated signing key for your sentinel. Use a hot wallet with minimal funds — not your main wallet. Save the mnemonic securely.
Bond your provider service
arkeod tx arkeo bond-provider \ --from="<your-key>" \ --fees="200uarkeo" \ --keyring-backend="test" \ -b sync -y \ "$PUBKEY" "$SERVICE" -- "$BOND_AMOUNT"
| Variable | Description |
|---|---|
| $PUBKEY | Your provider bech32 pubkey (arkeopub1...) |
| $SERVICE | Service name, e.g. base-mainnet-fullnode |
| $BOND_AMOUNT | Amount in uarkeo. 1000000uarkeo = 1 ARKEO (minimum recommended) |
Stakes ARKEO as collateral and registers your provider on-chain. Run once per service you want to offer.
Configure metadata & rates
arkeod tx arkeo mod-provider \ "$PUBKEY" "$SERVICE" "$SENTINEL_URI" \ "$NONCE" "$STATUS" \ "$MIN_DURATION" "$MAX_DURATION" \ "$SUB_RATES" "$PAYG_RATES" \ "$SETTLEMENT_DURATION" \ --from="<your-key>" \ --fees="200uarkeo" \ --keyring-backend="test" -y
| Variable | Description |
|---|---|
| $SENTINEL_URI | Your public sentinel URL, e.g. https://myprovider.com |
| $NONCE | Increment by 1 each time you update (start at 1) |
| $STATUS | 1 = ONLINE, 2 = OFFLINE |
| $MIN_DURATION | Minimum contract length in blocks |
| $MAX_DURATION | Maximum contract length in blocks |
| $SUB_RATES | Subscription rate in uarkeo, e.g. 1uarkeo |
| $PAYG_RATES | Pay-as-you-go rate per request, e.g. 200uarkeo |
| $SETTLEMENT_DURATION | Blocks after contract end to submit claims (e.g. 1000) |
Sets your sentinel URL, pricing, and contract parameters on-chain. Re-run whenever you update your config.
Configure your sentinel
# sentinel_config.yaml provider: pubkey: "<your-bech32-pubkey>" name: "My Provider" services: - name: base-mainnet-fullnode id: 89 type: base rpc_url: http://localhost:8545 api: listen_addr: "0.0.0.0:3636"
curl http://YOUR-PUBLIC-IP:3636/metadata.json from an external machine to confirm.The sentinel reverse-proxies requests to your node and handles billing. See the Arkeo GitHub for the full sentinel config reference.
Verify your provider is live
# Check sentinel is responding curl https://your-sentinel-url/metadata.json # Check on-chain registration arkeod query arkeo show-provider $PUBKEY # List all online providers arkeod query arkeo list-providers --output json | \ jq '.provider[] | select(.status=="ONLINE")'
Claim earnings
arkeod tx arkeo claim-contract-income \ "$CONTRACT_ID" "$NONCE" "$SIGNATURE" nil \ --from "$PROVIDER_KEY" \ --fees="200uarkeo" \ --keyring-backend="test" -y
Submits accumulated PAYG claims to the chain for settlement. Run on a schedule — daily at minimum, hourly is safer.
Subscriber Setup
Open contracts and query providers directly from the command line. Useful for automation, scripting, or integrating Arkeo into your own tooling.
Find an online provider
# List all online providers arkeod query arkeo list-providers --output json | \ jq '.provider[] | select(.status=="ONLINE")' # Filter by service number (e.g. service 89 = base-mainnet-fullnode) arkeod query arkeo list-providers --output json | \ jq '.provider[] | select(.status=="ONLINE" and .service==89)' # List all available services and their IDs arkeod query arkeo all-services
Open a contract
arkeod tx arkeo open-contract \ "$PROVIDER_PUBKEY" "$SERVICE" "$CLIENT_PUBKEY" \ "$CONTRACT_TYPE" "$DEPOSIT" "$DURATION" \ "$RATE" "$QPM" "$SETTLEMENT" "$AUTH" "$DELEGATE" \ --from="$CLIENT_KEY" \ --fees="200uarkeo" \ --keyring-backend="test" -y
| Variable | Description |
|---|---|
| $CONTRACT_TYPE | 1 = Subscription, 2 = Pay-as-you-go |
| $DEPOSIT | Tokens to lock, e.g. 5000000uarkeo. Unused PAYG deposit is returned. |
| $DURATION | Contract length in blocks |
| $RATE | Rate in uarkeo (must match or exceed provider's minimum) |
| $QPM | Queries per minute limit. 0 = unlimited |
| $SETTLEMENT | Settlement duration in blocks after contract ends |
| $AUTH | 0 = open access, 1 = whitelist |
| $DELEGATE | Delegate pubkey for signing. Use nil if none. |
Make requests
# Subscription: just pass the contract ID — no signing needed curl "https://PROVIDER-SENTINEL:3636/SERVICE?arkauth=$CONTRACT_ID" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# 1. Get current nonce NONCE=$(curl -s "https://PROVIDER:3636/claims?contract_id=$ID&client=$PUBKEY" | jq .highestNonce) NEXT_NONCE=$((NONCE + 1)) # 2. Sign the claim (message format: CONTRACT_ID:NONCE: — note trailing colon) MSG="$CONTRACT_ID:$NEXT_NONCE:" SIG=$(signhere -u "$KEY" -m "$MSG" | tail -n 1) # 3. Make the request curl "https://PROVIDER:3636/SERVICE?arkauth=$CONTRACT_ID:$PUBKEY:$NEXT_NONCE:$SIG" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
PAYG requires signing each request. The nonce must increment with every request. Arkauth format: {contractId}:{pubkey}:{nonce}:{sig}
Check your contract
# Show a specific contract arkeod query arkeo show-contract $CONTRACT_ID # List all your contracts arkeod query arkeo list-contracts --output json | \ jq '.contract[] | select(.client=="$PUBKEY")' # Check your balance arkeod query bank balances $ADDRESS
x402 Setup
x402 lets AI agents pay per-request in USDC — no subscription contract needed on the agent side. You run a lightweight proxy on your server that sits in front of your Arkeo provider endpoint.
Open a backing Arkeo contract
# Example: open PAYG contract with 10 ARKEO deposit on Base
arkeod tx arkeo open-contract \
"$PROVIDER_PUBKEY" "base-mainnet-fullnode" "$YOUR_PUBKEY" \
2 "10000000uarkeo" "5000000" \
"200" "0" "1000" "0" "nil" \
--from="$YOUR_KEY" \
--fees="200uarkeo" \
--keyring-backend="test" -y
Your x402 proxy uses this PAYG contract to authenticate requests to the Arkeo provider. The proxy signs each request with its delegate key. Save the contract ID — you'll need it in your proxy config.
Install x402 middleware
npm install express @x402/express @x402/core @x402/evm
npm install hono @x402/hono @x402/core @x402/evm
pip install fastapi uvicorn x402
go get github.com/coinbase/x402/go/x402
Test your x402 endpoint
# Should return HTTP 402 Payment Required (expected — means it's working) curl -i https://your-proxy-url/ # Verify your backing contract is active arkeod query arkeo show-contract $CONTRACT_ID # Monitor request usage curl "https://your-arkeo-provider:3636/claims?contract_id=$CONTRACT_ID&client=$YOUR_PUBKEY"
A 402 response on the bare endpoint is correct — it means the payment wall is working. AI agent clients using the x402 protocol will handle the payment flow automatically.
Quick Reference
Common commands for day-to-day use.
arkeod query arkeo show-provider $PUBKEY
arkeod query arkeo list-providers \ --output json | jq \ '.provider[] | select(.status=="ONLINE")'
arkeod query arkeo show-contract $CONTRACT_ID
arkeod query arkeo list-contracts \ --output json | jq \ '.contract[] | select(.client=="$PUBKEY")'
arkeod query bank balances $ADDRESS
arkeod query arkeo all-services
docker logs arkeo-data-engine-provider -f
docker logs arkeo-data-engine-subscriber -f
journalctl -u sentinel -f
curl http://localhost:3636/open-claims