SUBTC Protocol over Tor — Stateless Bitcoin API Execution via Onion Network

permalink SUBTC
#bitcoin#protocol#stateless#subtc#tor

1. Introduction

SUBTC Protocol is designed as a curl-first, stateless Bitcoin API layer that can operate across multiple network environments, including the Tor onion network.

This enables private, resilient, and censorship-resistant financial execution for both human developers and autonomous AI agents.


2. Tor Integration Overview

By deploying SUBTC endpoints over Tor, the protocol becomes accessible through:

.onion /health

This allows full system verification without relying on traditional DNS or public infrastructure.

Example endpoint:<br>

http://ofwahoue652hjkwdc4osoc52tc6gu62ybjgc43jnuz4fleojadx73wyd.onion/health


3. System Health Validation

A successful Tor-based health response indicates:

  • Bitcoin node configuration active
  • Mainnet synchronization complete
  • Testnet synchronization complete
  • API gateway operational
  • RPC layer available (or idle in event-driven mode)

Example response:

{
  "ok": true,
  "result": {
    "coin": "btc",
    "configured": true,
    "mainnet": true,
    "mainnet_synced": true,
    "testnet": true,
    "testnet_synced": true,
    "rpc_active": 0
  }
}

  1. Architecture Model

SUBTC over Tor follows a layered design:

AI Agent Layer<br>↓<br>SUBTC Stateless API<br>↓<br>Tor Onion Gateway<br>↓<br>Bitcoin RPC Node Layer

This architecture ensures:

No persistent sessions

No centralized dependency

Full network anonymity layer

Deterministic API execution


  1. Curl-First Execution Model

All operations in SUBTC are executed using simple HTTP requests.

Example: Health Check via Tor<br>

curl --socks5-hostname 127.0.0.1:9050 \
http://<onion-host>/health


Example: Wallet Receive Request<br>

curl --socks5-hostname 127.0.0.1:9050 \
-X POST "http://<onion-host>/v1/btc?mode=wallet_receive" \
-H "X-SUBTC-KEY: test" \
-d '{
  "wallet_id": "agent_01"
}'


  1. Stateless Design Principles

SUBTC operates without server-side session storage:

Every request is self-contained

No hidden state between calls

All execution context passed via payload

This makes it ideal for:

AI agents

Automated trading systems

Payment automation pipelines


  1. AI Agent Compatibility

SUBTC over Tor is optimized for autonomous systems:

Instant API discovery via /health

Machine-readable endpoints

Curl-compatible interface

No SDK requirement

This allows LLM agents to:

Generate wallets

Send BTC in SATs

Monitor transactions

Rebalance liquidity


  1. Security and Isolation

Tor adds an additional security layer:

Hides physical server location

Prevents direct IP tracing

Reduces attack surface exposure

Combined with SUBTC stateless design:

No session hijacking risk

No persistent identity leakage

Reduced systemic attack persistence


  1. Observed System Behavior

From real execution results:

Onion endpoint responds successfully

Mainnet and testnet are fully synced

RPC layer remains idle until triggered

System behaves event-driven and lightweight


  1. Conclusion

SUBTC Protocol over Tor represents a privacy-first financial execution layer that combines:

Stateless API design

Curl-first architecture

Bitcoin-native SAT execution

AI agent compatibility

Tor anonymity network integration

This creates a new category of infrastructure:

> A sovereign, machine-readable financial protocol that can operate inside anonymous networks without losing performance or determinism.