Api

Setup Guide

Install and run Hydra App with Docker Compose

This guide walks you through running Hydra App and connecting to it from a client. The app is the gRPC server that exposes every API documented in this section.

Prerequisites

  • Docker & Docker Compose
  • ~2 GB free disk for the data directory
  • A funded wallet for whatever networks you enable

Building a bot or trading agent? After completing the setup below, jump to the Bot Quickstart for a minimum runnable template.


Mainnet or staging?

Everything in this guide applies to both. They differ in three places — the image you pull, the config.yaml you write, and the peers you connect to — so pick a track now and stay on it.

MainnetStaging
FundsRealTestnet only
Imageghcr.io/offchain-dex/hydra-app-public:latestghcr.io/offchain-dex/hydra-app-tester:latest
NetworksBitcoin, Ethereum, Arbitrum OneBitcoin Signet, Ethereum Sepolia, Arbitrum Sepolia, Tron Shasta
EndpointsPublic — *.hydranet.app, shown in full belowAccess-controlled — request via Discord
Config templateMainnet config.yamlStaging config.yaml
PeersMainnet peersStaging peers

Both images are built with reduced logging (release_max_level_info), so neither carries debug or trace lines: hydra-app-public from the production code on every release, hydra-app-tester on request, from the branch it is started from. Either runs against either network — the image does not pin the network, config.yaml does — but pair them as above unless you have a reason not to.

⚠️ Mainnet access is invite-gated at launch

Running the software is not the same as being admitted. Before you write a config, make sure your identity key is either whitelisted or covered by an invite you can redeem — see Mainnet access is gated.

⚠️ Never point a mainnet config at a data directory that has held testnet state

Give mainnet its own settings.data_path_name and its own volume. Sharing a data directory across networks mixes wallets and channel state, and the failure mode on the mainnet side involves real funds.


Architecture

Your Application (gRPC client)
          ↓
    gRPC over HTTP/2  (or gRPC-Web)
          ↓
Hydra App  (your machine, default :5003)
          ↓
   ├─ authentication-service  (auth tokens)
   ├─ liquidity-service        (channel leases — see Lease API)
   ├─ orderbook                (markets & matching)
   ├─ hydra-proxy              (Electrum / Esplora / Web3 / Subgraph proxy)
   └─ Local data store         (fjall key-value DB on disk)

Hydra App brokers everything. You never talk to the orderbook, liquidity service, or chain RPCs directly — the app does it for you and exposes a single gRPC surface.

Authentication is handled by Hydra App, not by your client. The app obtains and refreshes tokens with the authentication service automatically, using the seed/MNEMONIC you set up below. Clients connect to the local app over plain gRPC with no API keys, no headers, no auth handshake. The auth_grpc_url / auth_ws_url and proxy_auth fields in config.yaml configure Hydra App's upstream connection — not your client. Your client never sees those URLs.


Mainnet access is gated

At launch, mainnet is invite-gated: the authentication service admits a known set of identities, and a node whose identity is not among them will not get past authentication. Two ways in:

  1. Redeem an invite code — the usual route. Someone already on mainnet mints one with CreateInvite and sends it to you privately. Redeem it in the web app, or from your own node with RedeemInvite.
  2. Ask the team to whitelist your identity key — open a ticket in Discord with the key below.

An invite can be redeemed before your identity is authenticated. That is deliberate — the referral client connects without authentication, so redeeming is what gets you admitted rather than something you do once you are already in. Redeeming from your own node needs referral_config.referral_service_url in config.yaml; redeeming in the web app needs nothing configured.

Finding your identity key

The key to hand over is your Ed25519 identity public key, hex-encoded (32 bytes → 64 hex characters). Three ways to read it, all the same value:

On startup, the app logs it before anything else initialises:

Initializing HydraApp with signer 9f4c1e…  ← this is the key

Over the API, at any time — app.GetPublicKey returns it and takes no parameters:

curl -s http://localhost:5003 -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"app_getPublicKey","params":{}}'

On disk, as the data directory name — state lives under <data_dir>/<identity-hex>/.

⚠️ The identity follows the mnemonic, not the machine

The identity key is derived from your BIP-39 seed by HKDF-SHA512 under a fixed, versioned domain-separation tag — so the same mnemonic produces the same identity everywhere: CLI, desktop, and the web app alike. Move your node to a new host with the same mnemonic and you keep your access.

The converse is what catches people: a new mnemonic is a new identity, and a new identity is not whitelisted. Generating a fresh wallet — or entering a different passphrase, which opens a different wallet — means redeeming another invite or asking to be whitelisted again. Whitelist the key you actually intend to run with.

The identity is cryptographically independent of your BIP-32 / BIP-44 wallet keys; it authenticates you and signs for the backup, referral and liquidity services, and it is not an address that holds funds.


Step 1: Configuration files

Create a working directory and two files: config.yaml and .env.

mkdir hydra-app && cd hydra-app

Mainnet config.yaml

Every mainnet endpoint is public — nothing here is redacted, and you do not need to request access to run against mainnet. Copy this template as-is and adjust the ports, the data path and the token list to taste.

settings:
  data_path_name: hydra-app-mainnet   # keep mainnet state in its own directory
  critical_db: &fjall_hot             # fund-critical data (required)
    type: fjall
    compression:
      type: zstd
      preset: balanced                # fast | balanced | best (or `level: <i32>`)
    cache_size_mb: 96
    max_memtable_size_mb: 32
    max_write_buffer_size_mb: 192
    max_journaling_size_mb: 192
    worker_threads: 4
  db: *fjall_hot                      # non-critical data (required)
  archive_db:                         # cold settled history — rare reads,
    type: fjall                       # bursty writes
    compression:
      type: zstd
      preset: balanced
    cache_size_mb: 32
    max_memtable_size_mb: 128
    max_write_buffer_size_mb: 256
    max_journaling_size_mb: 512
    worker_threads: 2
  # Automatic archive retention (optional; omit to disable). The two filters
  # ARE the whole policy — pacing is derived at runtime. See auto_prune below.
  # auto_prune:
  #   max_age_secs: 7776000           # keep 90 days (minimum 172800 = 48h)
  #   max_entries: 100000             # and at most 100k newest rows per table
  server_port: 5003
  metrics_port: 9090
  # metrics_bind_address: 0.0.0.0     # metrics bind 127.0.0.1 unless set; set it for a scraper on another host

authentication_config:
  auth_grpc_url: https://authentication-service.hydranet.app
  auth_ws_url:   wss://authentication-service-ws.hydranet.app

proxy_url: https://hydra-proxy.hydranet.app

# Server-side wallet backups. NOT recommended for liquidity providers —
# adds latency on high-volume nodes. Comment out to disable.
backup_config:
  grpc_url: https://backup-service.hydranet.app

liquidity_config:
  liquidity_url: https://liquidity-service.hydranet.app

orderbook_config:
  orderbook_url: https://orderbook.hydranet.app

pricing_config:
  price_oracle_url: https://price-oracle.hydranet.app
  fiat_currencies:
    - USD

# Needed only to mint or redeem invites FROM THIS NODE (CreateInvite /
# RedeemInvite / ListInvites / GetInviteEligibility). Redeeming an invite in
# the web app instead needs nothing here. See "Mainnet access is gated".
referral_config:
  referral_service_url: https://referral-service.hydranet.app

networks:
  - protocol: bitcoin
    network: bitcoin                  # mainnet — NOT "bitcoin-mainnet"
    blockchain:
      type: electrum
      urls:
        - wss://hydra-proxy.hydranet.app/electrum/mainnet/ws
      esplora_url:    https://hydra-proxy.hydranet.app/esplora/mainnet
      waterfalls_url: https://hydra-proxy.hydranet.app/waterfalls/mainnet
      waterfalls_request_cost: 5       # one Waterfalls request, counted in standard requests (10 when unset)
      proxy_auth: true
    lightning_tcp_port: 19735
    lightning_ws_port: 19736
    gossip_sync:
      type: rgs
      rgs_server_url: https://rapidsync.lightningdevkit.org   # public RGS
    # The Hydranet node, dialled after the initial sync and kept connected.
    peers:
      - "03eaace825811aee04ea8e56d31a8927104d5f301ff2aa8998cc431903ec26289a@wss://lightning-ws.hydranet.app:443"
    # Channel terms, in blocks (144/day). Mirrors the hub: propose a
    # three-day window to punish a stale commitment, accept at most five
    # days before we can claim our own balance.
    lightning:
      channel_handshake:
        our_to_self_delay_blocks: 432
      channel_handshake_limits:
        their_to_self_delay_blocks: 720
      invoice_route_hints: all          # which channels the invoices you create hint: unannounced (when unset), all or none

  - protocol: evm
    network: ethereum                 # mainnet — NOT "ethereum-mainnet"
    web3_provider:
      url: wss://hydra-proxy.hydranet.app/web3/ws/1
      proxy_auth: true
    # Enriched endpoints, proxy-fronted. The Hydranet mainnet node runs with
    # these; the plain web3_provider alone works but answers history and
    # log queries less efficiently.
    alchemy_rpc:
      custom_url: https://hydra-proxy.hydranet.app/alchemy/rpc/1
      proxy_auth: true
    alchemy_ws:
      custom_url: wss://hydra-proxy.hydranet.app/alchemy/ws/1
      proxy_auth: true
    lithium:
      subgraph:
        http_url: https://index-api.onfinality.io/sq/7446948102396997632/ethereum
        # fallback_http_urls: []       # further endpoints of the same chain and contract, tried in order when one fails
      contract_address: "0xcc4c47cf0175AA8108e78679c2586A0a6abb242a"
      contract_deploy_block: 25667649
      tcp_quic_port: 29980
      ws_port: 29981
      # Channel terms, in seconds. A channel opens with the LONGER of the
      # two peers' dispute_period proposals, within both ceilings: propose
      # two days, accept at most five.
      channel_handshake:
        dispute_period_secs: 172800
      channel_handshake_limits:
        max_dispute_period_secs: 432000
    # Third-party watchtower this node hands its channel evidence to. The
    # node dials it itself after its initial sync and keeps it attached.
    watchtowers:
      - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://ethereum-ws.hydranet.app:443"
    # The Hydranet node as the channel peer: a session of its own, kept the
    # same way.
    peers:
      - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://ethereum-ws.hydranet.app:443"
    tokens:
      - "erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"   # USDC
      - "erc20:0xdAC17F958D2ee523a2206206994597C13D831ec7"   # USDT (Tether)

  - protocol: evm
    network: arbitrum                 # Arbitrum One — NOT "arbitrum-one"
    web3_provider:
      url: wss://hydra-proxy.hydranet.app/web3/ws/42161
      proxy_auth: true
    alchemy_rpc:
      custom_url: https://hydra-proxy.hydranet.app/alchemy/rpc/42161
      proxy_auth: true
    alchemy_ws:
      custom_url: wss://hydra-proxy.hydranet.app/alchemy/ws/42161
      proxy_auth: true
    lithium:
      subgraph:
        http_url: https://index-api.onfinality.io/sq/7446948102396997632/arbitrum
      contract_address: "0x895090D931660fbFc5F6bDEdC24A87dD3D64202D"
      contract_deploy_block: 490348527
      tcp_quic_port: 29982
      ws_port: 29983
      channel_handshake:
        dispute_period_secs: 172800
      channel_handshake_limits:
        max_dispute_period_secs: 432000
    watchtowers:
      - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://arbitrum-ws.hydranet.app:443"
    peers:
      - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://arbitrum-ws.hydranet.app:443"
    tokens:
      - "erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831"   # USDC
      # This contract reports "USD₮0" as both symbol and name — it is Tether
      # bridged to Arbitrum by LayerZero. Listed under the asset's own
      # identity instead. See "Token display overrides" below.
      - id: "erc20:0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
        symbol: USDT
        name: "Tether USD"
      - "erc20:0xB0F66Bdb39acBb043308eb9Dbe78F5bB47ea5430"   # HDN

What differs from staging

MainnetStaging
Network namesbitcoin, ethereum, arbitrumbitcoin-signet, ethereum-sepolia, arbitrum-sepolia, tron-shasta
EndpointsPublic *.hydranet.appAccess-controlled
gossip_sync.rgs_server_urlPublic LDK RGS, no proxy_authProxy-fronted, proxy_auth: true
alchemy_rpc / alchemy_wsProxy-fronted, custom_urlProxy-fronted, custom_url
htlc_factory_addressAbsent — see belowPresent on Tron
TronNot part of mainnet launchtron-shasta available
watchtowersDeclared per EVM networkDeclared per EVM network, or attached at runtime

On-chain HTLC settlement is off at mainnet launch

Neither mainnet EVM network sets htlc_factory_address, so mainnet settles through channels only. The on-chain half of the HTLC & Preimage API — CreateHtlc, SettleHtlcPreimage, the OrderSettlement on-chain leg options — is inactive there. This is deliberate for launch, not an omission to fix in your own config: pointing the field at an unaudited factory of your own would put real funds behind it.

Channel settlement is the default path and needs nothing configured. When factories are deployed, adding htlc_factory_address to the network block is the only change required.

pricing_config is optional. Omit the block and the Pricing API has no oracle to answer from. (2026-10-14) Nor do the confirmation_tiers: they value an operation through that oracle, and without it every operation waits their last step, the full depth.

Staging config.yaml

Endpoints redacted. The staging service endpoints, subgraph URLs, and Lithium contract addresses below are placeholders. The real values are distributed privately to approved testers — open a ticket in our Discord to request access. The structure of this file (every field name, every nesting level) is accurate; only the access-controlled values are masked. On-chain values (token and HTLC-factory contracts, deploy blocks) and the staging peer strings are public and shown in full.

The block below is the staging template. Copy it, fill in the placeholders (anywhere you see <...>) with the values you receive, and adjust ports / tokens to taste.

settings:
  data_path_name: hydra-app
  # Per-role storage backends. Each of critical_db / db / archive_db takes a
  # `type` (fjall | redb | indexed_db) plus its own compression. Optional
  # MiB tuning fields (cache_size_mb, max_memtable_size_mb, …) may be added;
  # omitted means the backend default. Full reference + environment profiles:
  # hydra-app/docs/database-tuning.md.
  critical_db:                    # fund-critical data (required)
    type: fjall
    compression:
      type: zstd
      preset: balanced            # fast | balanced | best (or explicit `level: <i32>`)
  db:                             # non-critical data (required)
    type: fjall
    compression:
      type: zstd
      preset: balanced
  archive_db:                     # cold, append-only settled history (optional)
    type: fjall
    compression:
      type: zstd
      preset: best                # cold storage — favour ratio over speed
  # Automatic archive retention (optional; omit to disable). These two
  # filters ARE the whole policy — pacing is derived at runtime (2026-08-26).
  # At least one filter is required. Pruning a settled payment also deletes
  # its stored preimage, so payments prune by max_age_secs only.
  # auto_prune:
  #   max_age_secs: 7776000       # keep 90 days (minimum 172800 = 48h)
  #   max_entries: 100000         # and at most 100k newest rows per table
  server_port: 5003
  metrics_port: 9090

authentication_config:
  auth_grpc_url: <auth-grpc-url>             # provided by the team
  auth_ws_url:   <auth-ws-url>               # provided by the team

proxy_url: <hydra-proxy-url>                  # provided by the team

# backup_config:
#   Uncomment if you want server-side wallet backups. NOT recommended for
#   liquidity providers — adds latency on high-volume nodes.
#   grpc_url: <backup-service-url>

liquidity_config:
  liquidity_url: <liquidity-service-url>     # provided by the team

orderbook_config:
  orderbook_url: <orderbook-url>             # provided by the team

pricing_config:
  price_oracle_url: <price-oracle-url>       # provided by the team
  fiat_currencies:
    - USD

# referral_config:                           # optional — enables invites / referral
#   referral_service_url: <referral-service-url>   # provided by the team

networks:
  - protocol: bitcoin
    network: bitcoin-signet
    blockchain:
      type: electrum
      urls:
        - <electrum-ws-url>                   # provided by the team
      esplora_url:    <esplora-url>           # provided by the team
      waterfalls_url: <waterfalls-url>        # provided by the team
      proxy_auth: true
    lightning_tcp_port: 19735
    lightning_ws_port: 19736
    gossip_sync:
      type: rgs
      rgs_server_url: <rgs-url>               # provided by the team (proxy-fronted)
      proxy_auth: true
    peers:                                    # the Hydranet staging node, kept connected
      - "03726edb9778282abf3b08cbac5114fe45e8b0d302ad278bd1dc7af5d3bb134083@wss://lightning-ws.staging.hydranet.ai:443"

  - protocol: evm
    network: ethereum-sepolia
    web3_provider:
      url: <ethereum-sepolia-web3-ws-url>     # provided by the team
      proxy_auth: true
    alchemy_rpc:                              # optional enriched RPC
      custom_url: <ethereum-alchemy-rpc-url>  # provided by the team
      proxy_auth: true
    alchemy_ws:
      custom_url: <ethereum-alchemy-ws-url>   # provided by the team
      proxy_auth: true
    lithium:
      subgraph:
        http_url: <ethereum-subgraph-url>     # provided by the team
      contract_address: <lithium-eth-contract>  # provided by the team
      contract_deploy_block: 11262882         # first block to index from
      tcp_quic_port: 29980
      ws_port: 29981
    peers:
      - "0xd78f26fdc770e4041960d3e06a58fb9b91fa5ff6@wss://ethereum-ws.staging.hydranet.ai:443"
    tokens:
      - "erc20:0x8cd0dA3d001b013336918b8Bc4e56D9DDa1347E0"  # USDC on Sepolia (Circle public faucet)

  - protocol: evm
    network: arbitrum-sepolia
    web3_provider:
      url: <arbitrum-sepolia-web3-ws-url>     # provided by the team
      proxy_auth: true
    alchemy_rpc:
      custom_url: <arbitrum-alchemy-rpc-url>  # provided by the team
      proxy_auth: true
    alchemy_ws:
      custom_url: <arbitrum-alchemy-ws-url>   # provided by the team
      proxy_auth: true
    lithium:
      subgraph:
        http_url: <arbitrum-subgraph-url>     # provided by the team
      contract_address: <lithium-arb-contract>  # provided by the team
      contract_deploy_block: 287009472
      tcp_quic_port: 29982
      ws_port: 29983
    peers:
      - "0xd78f26fdc770e4041960d3e06a58fb9b91fa5ff6@wss://arbitrum-ws.staging.hydranet.ai:443"
    tokens:
      - "erc20:0x67E6a7eaE40107FF676908B28C3FC632A38f1499"  # HDN
      - "erc20:0x1baAbB04529D43a73232B713C0FE471f7c7334d5"  # USDC2 (Arbitrum Sepolia)

  - protocol: tron
    network: tron-shasta                      # mainnet | shasta | nile
    provider:
      url: <tron-provider-url>                # Tron node HTTP API base (/wallet, /walletsolidity)
      proxy_auth: true
    indexer:                                  # optional enriched indexer
      url: <tron-indexer-url>
      proxy_auth: true
    rpc:                                      # eth-compatible JSON-RPC endpoint
      url: <tron-jsonrpc-url>
      proxy_auth: true
    # Required for on-chain HTLC settlement on Tron; omit to disable it.
    htlc_factory_address: "TFuhf6EWZs2suo1V2mnR5fpqpijbLtvnoy"
    lithium:
      contract_deploy_block: 66576623
      subgraph:
        http_url: <tron-subgraph-url>         # provided by the team
      contract_address: <lithium-tron-contract>  # base58check (T...)
      tcp_quic_port: 29984
      ws_port: 29985
    peers:
      - "TUQi2SbHaqQWYkgNwvsDRRVwUtXjwKhYwW@wss://tron-ws.staging.hydranet.ai:443"
    tokens:
      - "trc20:TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs"  # USDT

Why redacted? During the alpha, the staging endpoints are not public. Every URL marked <...> and every <lithium-*-contract> is access-controlled. Public values (chain IDs, ports, deploy blocks, well-known testnet token contracts) are kept inline because they're already publicly known.

What each block does

BlockPurpose
settings.server_portThe gRPC and JSON-RPC port your client connects to (here 5003) — one port, both protocols, routed by content type. Optional: omit it and no server starts at all, which is how you run a headless node with no API. The process binds 0.0.0.0, so map it in Docker on loopback — the API is unauthenticated.
settings.metrics_portPrometheus-style metrics, your wallet's on-chain and channel balances among them. Optional — omit for no metrics server. Binds 127.0.0.1 unless settings.metrics_bind_address says otherwise; in Docker set that to 0.0.0.0 and map the port on loopback, as for the API.
settings.data_path_nameOn-disk directory name for the wallet/DB. Bump this (e.g. hydra-app → hydra-app-2) to start fresh.
settings.critical_db / db / archive_dbPer-role storage backends (as of 2026-06). Each takes a type (fjall | redb | indexed_db), its own compression, and optional tuning — see Storage backends. critical_db/db are required; archive_db (cold settled history) defaults to fjall. Replaces the old flat critical_db_option / db_option / top-level compression. See database-tuning.md.
settings.critical_db_migrate_from / db_migrate_from / archive_db_migrate_from(optional) A previous backend to copy data from at startup, same schema as the backend it feeds. The migration is idempotent — it runs only when the destination is empty — so leaving it set is safe but logs a warning on every boot. Remove it once the migration is confirmed.
settings.auto_prune(2026-07-08, optional) Archive retention per network — see Archive Prune and below. At least one of max_age_secs / max_entries required. interval_secs was removed on 2026-08-26 — delete it if your config still has it.
settings.fund_first_reveal(2026-11-17, optional) When your node, having bought a channel on demand funded first (FUNDING_ORDER_FUND_FIRST), claims the payment it bought the channel for, on every network: broadcast (the default) once its chain provider shows the funding sent, waiting to be mined or in a block; confirmed once the funding is in a block, at the depth the node takes the chain at (one confirmation on Lightning, the chain's trusted depth on Lithium). With broadcast, the node trusts the peer with the payment until the funding lands; with confirmed, it trusts nobody. See The funding order.
settings.blacklist(optional) { path: <file> } — a runtime peer-connection blacklist. Loaded at startup and watched for live changes, so edits apply without a restart; its entries plus any runtime bans are pushed into every node. Each non-empty, non-comment line is <network-name> <node-id>. The parent directory must exist for the watch to attach. See Node API → Peer Blacklist.
authentication_configHydranet auth service. Hydra App handles tokens for you.
proxy_urlSingle endpoint for the proxy that fronts Electrum, Esplora, Web3, and Subgraph requests.
liquidity_configProvider for service-backed channel liquidity (used by the Lease API).
orderbook_configThe matching engine.
pricing_configPrice oracle for fiat conversion, plus the fiat_currencies you want quoted (used by the Pricing API).
referral_config(2026-07-08, optional) Referral service URL enabling CreateInvite / RedeemInvite / GetReferral.
networks[]Per-network blockchain config. Each entry is a network the app will activate.

Per-network blocks

For Bitcoin networks:

FieldDescription
networkbitcoin (mainnet), bitcoin-signet, bitcoin-testnet (testnet4), bitcoin-testnet3, bitcoin-regtest — see Network identifiers
blockchain.typeTagged: electrum (takes urls) or esplora (takes url). Required — there is no default
blockchain.urls(electrum) Electrum endpoints. All of them receive header-subscribe pushes; the first reachable one serves RPC, with failover to the next healthy server
blockchain.validate_tls(electrum, default true) Validate the Electrum server's TLS certificate. Turn off only against a server you control
blockchain.url(esplora) Esplora-compatible HTTP endpoint
blockchain.esplora_url(electrum) Esplora endpoint used as a fallback for Electrum RPCs that aren't supported, or when no Electrum server is reachable
blockchain.waterfalls_url(both variants) Waterfalls (QuickSync) endpoint
blockchain.proxy_auth(both variants) If true, Hydra App authenticates with the proxy automatically
lightning_tcp_portLightning peer TCP port
lightning_ws_portLightning peer WebSocket port (for browser clients)
lightning_relay_url(optional) WebSocket relay used to tunnel TCP peers through the proxy. For browser/wasm builds; a native node does not need it
gossip_syncLightning gossip source. Required, tagged, no default — see Gossip sync
lightning(2026-09-03, optional) Channel terms this node proposes, accepts and advertises — see Channel terms.
peers(2026-10-29, optional) Lightning peers this node keeps connected — see Peers.
announced_addresses(2026-10-29, optional) Where other nodes can dial this one by its id alone: host:port over TCP, to an IP address or a host name. A node with a public channel announces them; a node announcement carries no WebSocket address. Empty, the default, announces none.
trusted_depth(2026-10-29, optional) Where this node acts on a transaction; default 1 — see Trusted depth.

For EVM networks:

FieldDescription
networkethereum / arbitrum (mainnets), ethereum-sepolia, arbitrum-sepolia, … — see Network identifiers. No -mainnet suffix exists.
web3_provider.urlWebSocket Web3 RPC endpoint
web3_provider.proxy_authSame as Bitcoin — proxy auth handshake
alchemy_rpc / alchemy_ws(optional) Enriched Alchemy HTTP / WebSocket endpoints used for richer queries than the plain web3_provider. Each takes either custom_url (any URL — this is how the proxy-fronted mainnet endpoints are set) or api_key (Hydra builds the *.g.alchemy.com URL itself), plus proxy_auth. An api_key on a network Alchemy does not serve fails at boot. Omit both to rely on web3_provider alone.
lithium.subgraph.http_urlSubQuery indexer endpoint. Required: channel discovery and catch-up anchor on it, while channel state itself is read from the contract's event logs and verified against contract storage. A node without it refuses to start. Use the endpoint for the environment you are running against.
lithium.subgraph.ws_url(optional) WebSocket subgraph endpoint, for live subscription rather than polling
lithium.subgraph.proxy_auth(optional) Authenticate the subgraph client with the proxy
lithium.relay_url(optional) WebSocket relay for Lithium peer connections. For browser/wasm builds
lithium.contract_addressLithium contract on the network
lithium.contract_deploy_blockBlock the Lithium contract was deployed at — indexing starts here instead of from genesis. Set it to avoid a full-chain scan on first sync.
lithium.tcp_quic_port / ws_portLithium peer ports
lithium.announced_addresses(2026-10-29, optional) Where other nodes can dial this one, each written as after the @ of a peer (host:port, quic://host:port, ws:// or wss://host:port). A node with an announced channel announces them, and a node given only its id dials them. Empty, the default, announces none.
lithium.channel_handshake etc.(2026-09-03, optional) Channel terms — see Channel terms.
htlc_factory_address(optional) HtlcFactory contract for on-chain HTLCs. Omit and that network settles through channels only. Not set on mainnet — see the mainnet template.
watchtower(optional, default false) Whether this node runs a watchtower service for others.
watchtowers(2026-09-04, optional) Watchtowers this node hands its own evidence to — see Watchtowers.
peers(2026-10-29, optional) Lithium peers this node keeps a channel session with — see Peers.
tokensTokens to activate: erc20:<contract> strings, or maps with display overrides — see Token display overrides.
trusted_depth(2026-10-29, optional) Where this node acts on a transaction; default 12 on Ethereum, 1 on Arbitrum, Optimism and Fantom, final on BSC, Polygon, Avalanche and Gnosis — see Trusted depth.

For Tron networks:

FieldDescription
networktron (mainnet), tron-shasta, or tron-nile. Not part of mainnet launch.
provider.urlTron node HTTP API base URL (serves /wallet, /walletsolidity)
indexer.url(optional) Enriched indexer (TronGrid / Alchemy-Tron) for richer history queries
rpc.urleth-compatible JSON-RPC endpoint
htlc_factory_addressbase58check HTLC factory. Required for on-chain HTLC settlement on Tron — omit and that network settles through channels only.
lithium.*Same shape as EVM; contract_address is base58check (T...)
address_poll_interval_secs(optional) How often to poll the indexer for native TRX / TRC-10 activity
watchtower / watchtowers / peersSame as EVM
tokenstrc20:<address> strings, or maps with display overrides
trusted_depth(2026-10-29, optional) Where this node acts on a transaction; default final, the solidified block about a minute behind the head — see Trusted depth.

The token list determines which assets you can hold balances of and trade. To add a token after first run, add it here, restart the app, then call asset.AddToken for it.

On-chain HTLC settlement (trading a currency you hold on-chain without a channel — see the HTLC & Preimage API) requires an htlc_factory_address on EVM and Tron networks; Bitcoin uses native P2WSH/Taproot and needs no factory. Without it, that network settles through channels only.

Token display overrides

(2026-09-03) A tokens[] entry is either the bare id string it has always been, or a map declaring what to show for it:

tokens:
  - "erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831"    # USDC — chain's own symbol
  - id: "erc20:0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
    symbol: USDT
    name: "Tether USD"

A contract's symbol() is its deployer's choice — LayerZero's bridged Tether on Arbitrum reports USD₮0, with a non-ASCII ₮ — while every consumer of your node expects the asset's own identity. A declared symbol / name replaces the chain's wherever the node hands the token out, and is re-applied on every registration.

Rules, enforced at boot: a symbol must be a single word with no whitespace; a name must be non-blank with no leading or trailing whitespace; an id must not be listed twice on one network. Any violation names the offending token and stops the node.

There is no decimals override, by design. Decimals define the token's units and are only ever read from the chain — a declared wrong value would silently misprice every amount. The same overrides are available at runtime via asset.AddToken.

Gossip sync

Lightning pathfinding needs the gossip graph. gossip_sync is required on a Bitcoin network and is tagged by type — there is no default:

typeKeysWhat the node does
rgsrgs_server_url, proxy_authTakes its graph from a trusted server's compact snapshots, at start and every hour after. (2026-11-25) It exchanges no gossip with its peers: it takes none of the gossip they send, relays none, and serves no peer its graph. Fast, low bandwidth, and you trust the server's view
p2pbootstrap_nodes[]Gossips with its peers as any Lightning node does: it takes the gossip they send, relays it, and answers their gossip queries. No trusted third party, much more bandwidth, slow to bootstrap
hybridrgs_server_url, proxy_auth, bootstrap_nodes[]Takes the server's snapshots, at start and every hour after, and gossips with its peers as p2p does to stay current between them

bootstrap_nodes are Lightning peers, each as <node_id>@<host>:<port>, that the node keeps connected as it keeps its peers: gossip reaches a node only through the peers it is connected to. A node also listed under peers keeps the address given there.

On mainnet, point rgs_server_url at the public LDK server (https://rapidsync.lightningdevkit.org) with no proxy_auth — it is large and reliable enough not to need proxying. On staging it is proxy-fronted, so set proxy_auth: true alongside it.

Channel terms (optional)

(2026-09-03) What this node proposes, accepts and advertises on its channels. Every key is optional and defaults to the value the node used before the block existed, so an existing config keeps its behaviour — set only what you mean to change. A value outside the protocol floors, or one the underlying node would refuse, fails at boot naming the key.

Bitcoin networks take a top-level lightning block. Units are blocks (144/day):

BlockKeys (with defaults)
channel_handshake — what we proposeour_to_self_delay_blocks: 144 (counterparty's wait after a unilateral close; LDK floor 144), their_channel_reserve_millionths: 10000 (1%), our_max_accepted_htlcs: 483 (1..=483), minimum_depth_blocks (default = the network's own), confirmation_tiers (2026-10-14; no default, not beside minimum_depth_blocks — see below), announce_for_forwarding: true
channel_handshake_limits — what we accepttheir_to_self_delay_blocks: 2016 (longest wait we accept on our own balance; LDK ceiling 2016), max_self_reserve_millionths: 10000, min_funding_amount: "0.00001" (2026-10-29) in bitcoin, or min_funding_satoshis: 1000, max_minimum_depth_blocks: 144, max_dust_limit_satoshis: 546 (2026-11-17) (the highest dust limit a peer may propose for a channel it opens to this node; at least 354)
channel_policy — ours alone, advertised via channel_updatecltv_expiry_delta_blocks: 72 (LDK floor 48), forwarding_fee_base: "0.00000001" (2026-10-29) in bitcoin, or forwarding_fee_base_msat: 1000, forwarding_fee_proportional_millionths: 0, forwarding_fee_base_usd (2026-10-29; no default): the flat fee in dollars instead, taken in msat at the node's bitcoin price and kept there as it moves (see below), the flat fee in bitcoin or msat being charged until the first price. A channel opened with a fee of its own keeps it
jit_channels — channels this node opens for a peer the moment a payment for the peer arrives (bLIP-52), its fee taken out of that payment (2026-10-14)min_fee: "0.00001" (2026-10-29) in bitcoin, or min_fee_sats: 1000 (the least an opening costs), funding_cost_multiple_millionths: 2000000 (at least twice the funding transaction's cost at the current feerate), proportional_fee_millionths: 0 (a share of the payment; the larger of the three wins), min_payment_usd: "10" (2026-11-17; min_payment, min_payment_sats, max_payment and max_payment_sats fail the boot) (the smallest payment a channel is opened for, in dollars at the node's price), size_bands: 8 (2026-11-17) (the equal payment-size bands the terms are quoted in, each priced apart, between the smallest payment and the largest, which is what the node can lend divided by max_pending_opens), offer_validity_secs: 3600 (how long quoted terms stand), min_channel_lifetime_blocks: 1008 (promised to the buyer, from the funding's confirmation), extra_capacity_millionths: 0 (capacity beyond the payment, as a share of it), fee_payment_window_secs: 60 (a channel whose fee is not paid by then is closed once idle), max_pending_opens: 4 (held channels waiting for their fee at once), max_unfunded_sales_per_peer: 4 (2026-11-17) (channels sold to one peer and not yet funded), prepaid_deposits: false (2026-11-17) (true: where a swap's receive into a peer's channel to this node needs capacity on demand, this node sells the peer a deposit into that channel instead of a new channel, its fee paid in advance: once the fee's payment is held it splices its own coins in, locked at zero confirmations by both sides, and claims the fee once both have locked it, failing it back otherwise. Lightning's CreateJitInvoice buys a new channel (LSPS2) only), max_chained_deposits: 3 (2026-11-17) (how many such deposits a channel takes on top of each other, each spending the one before, until the first is six blocks deep; 1 to 11), fund_first_budget_usd_per_day (2026-11-17; no default) (what channels this node sells fund first may cost it in a rolling day while their fee goes unpaid, in dollars, each at the modelled fee of its funding and of a close; once that is spent it sells only secret first until the day rolls, and absent or 0 it sells only secret first). Absent, the node opens none. A server node only: a wasm wallet refuses the block. (2026-10-29) Beside lease_pricing the fee comes from it, and min_fee, min_fee_sats, funding_cost_multiple_millionths and proportional_fee_millionths fail the boot. (2026-11-17) The buyer names the order a channel is funded in, at the same price: funded first, the funding is broadcast before the payment goes over the channel; secret first, it is held back until the buyer has claimed
offline_peer_hold_secs (2026-10-14)A key of the lightning block itself: how long a payment this node forwards waits for a peer that is offline and has no public channel beyond this node — sent on once the peer is back, failed back when the wait is over. 0 (the default) waits for none; at most 300.

EVM / Tron networks take the same three blocks inside lithium. Units are whole seconds:

BlockKeys (with defaults)
channel_handshakedispute_period_secs: 86400 (protocol floor 3600), safety.reserve_proportional_millionths: 10000, safety.max_pending_payments: 100, safety.min_reserve_amount (2026-10-29; no default): a reserve never below this amount, in the asset's own denomination, confirmation_tiers (2026-10-14; no default — see below), announce_for_forwarding: true (2026-10-14; whether the channels this node opens or accepts are announced to the network; a channel is announced only when both sides want it, and an unannounced one is reached through the hints in this node's invoices)
channel_handshake_limitsmax_dispute_period_secs: 1209600 (14 days), min_counterparty_reserve_millionths: 1000, max_self_reserve_millionths: 100000, min_max_pending_payments: 1
channel_policycltv_expiry_delta_secs: 28800 (protocol floor 28800), routing.fee_proportional_millionths: 1000 (0.1% of the amount the node forwards (2026-10-29)), routing.min_payment_amount_millionths: 0, routing.max_payment_amount_millionths: 1000000, fee_base_usd (2026-10-29; no default): a flat fee on every payment part forwarded, on top of the rate, in dollars, taken in each asset's units at the node's prices and kept there as they move (see below)
per_assetA map of overrides keyed by canonical asset id (lowercase erc20:0x…, or trc20:T… as the base58 address is spelled). Any subset of the safety / routing keys, and limits.min_funding_amount (2026-10-29), the smallest channel this node accepts; the rest stays node-wide. Amounts are in the asset's own denomination ("0.001" is a thousandth of the asset). routing.fee_base (2026-10-29) sets the asset's flat fee, in place of fee_base_usd, and is never re-priced; a node-wide one in units is refused at boot.
invoice_route_hints (2026-10-14)A key of the lithium block itself, beside the four: which channels the invoices this node creates carry route hints for — unannounced (the channels a payer's graph cannot hold; the default), all (every channel that can take the payment, as lightning.invoice_route_hints: all does) or none (no channel, for a node every payer reaches through its announced channels). A channel that can receive nothing is never hinted. (2026-10-14) An invoice carries at most 20 hints.
jit_channels (2026-10-29)A key of the lithium block itself, beside the four: channels this node funds for a peer the moment a payment for the peer arrives that none of its channels to the peer can carry, its fee taken out of that payment. It deposits into the peer's channel when that one carries nothing else, and opens one otherwise. (2026-11-17) The peer names the order the funding comes in, at the same price: funded first, it is published before the payment goes out, and the peer claims once it sees it out; secret first, it stays off the chain until the peer has claimed the payment. Dollar amounts are taken in the payment's asset at the node's prices, and an asset with no price is funded for no one. min_fee_usd: "1" (the least a funding costs), funding_cost_multiple_millionths: 2000000 (at least twice the funding transaction's cost at the current fee), proportional_fee_millionths: 0 (a share of the payment; the largest of the three wins), min_payment_usd: "10", size_bands: 8 (2026-11-17; max_payment_usd, here or for an asset, fails the boot) (the equal payment-size bands the terms are quoted in, each priced apart, between the smallest payment and the largest, which is what the node can lend divided by max_pending_opens), offer_validity_secs: 3600 (how long quoted terms stand), min_channel_lifetime_secs: 604800 (promised to the buyer, from the funding reaching the chain), extra_capacity_millionths: 0 (capacity beyond the payment, as a share of it), fee_payment_window_secs: 60 (secret first, from the funding being co-signed: a funding whose payment is not claimed by then is dropped, never having reached the chain. (2026-11-17) Funded first, a channel the funding opened whose payment goes unclaimed is closed once nothing is in flight on it), max_pending_opens: 4 (fundings waiting for their claim at once), max_unfunded_sales_per_peer: 4 (2026-11-17) (channels sold to one peer and not yet funded), fund_first_budget_usd_per_day (2026-11-17; no default) (what fundings this node sells fund first may cost it in a rolling day while their payment goes unclaimed, in dollars, each at the modelled fee of its funding and of a close; once that is spent it sells only secret first on the network until the day rolls, and absent or 0 it sells only secret first). per_asset.<id>.jit_channels overrides any of these for one asset except fund_first_budget_usd_per_day, which only the node-wide block sets. Absent, the node funds none. A server node only: a wasm wallet refuses the block. (2026-10-29) Beside lease_pricing the fee comes from it, and min_fee_usd, funding_cost_multiple_millionths and proportional_fee_millionths, node-wide or for one asset, fail the boot
offline_peer_hold_secs (2026-10-29)A key of the lithium block itself, beside the four: how long a payment this node forwards waits for a next hop that is not connected and has no announced channel beyond this node carrying an asset — sent on once the next hop is back, failed back when the wait is over. A next hop that routes for others is failed back at once. 30 by default; 0 waits for none; at most 300.

A flat fee in dollars follows the prices (2026-10-29)

A fee set with fee_base_usd or forwarding_fee_base_usd follows the node's prices, announced again as they move it. Without a price the fee stays as it is. Beside a dollar figure, an asset's own figure (per_asset.<id>.routing.fee_base in the asset's denomination, or forwarding_fee_base_msat on Lightning) is the least it charges. $0.001 is 312,500,000,000 wei at $3,200 an ether, and 1,000 msat at $100,000 a bitcoin.

A peer writes the fee it last learned into the hints of the invoices it issues, so after a rise the fee before it is still accepted for 5 minutes, and a node tells its connected peers a new fee at once. A payer pays a hint as written: a payment at a fee from before a rise fails once the 5 minutes are over, and its payee issues a new invoice. Both protocols work the same way.

A channel opened with a forwarding fee of its own keeps it for its life; the node's fee and its dollar figure apply to the others. A node with several channels to the same peer may carry a payment over any of them: Lithium charges the lowest of their fees, and Lightning the fee of the channel the payer named.

Amounts in config are in the asset's own denomination. On Bitcoin networks each also reads in its unit under its older key (_satoshis, _msat, _sats); a config gives one of the two forms of an amount. A figure finer than the asset's smallest unit rounds up for a fee or a least amount, and down for a most amount.

The dispute window is a negotiation, and longer wins

A channel opens with the longer of the two peers' dispute_period_secs proposals, provided it is within both peers' max_dispute_period_secs. So:

  • Your proposal is the shortest window you can end up with.
  • Your limit is the longest — and it is how long your own funds stay locked behind a unilateral close.

Raising the proposal buys you more time to catch a peer publishing a stale state; raising the limit is what lets you open a channel with a more conservative peer at all. The mainnet template proposes two days and accepts five, mirroring the hub. The Bitcoin to_self_delay pair works the same way in blocks.

safety is bilateral: the merged reserve is the maximum of the two peers' proposals and the merged max_pending_payments is the minimum, so each side's caution is respected.

A peer's funds wait confirmations by what they are worth (2026-10-14)

confirmation_tiers sets how many confirmations this node waits for before it relies on what a peer put on the chain: a channel or a splice the peer funds on Bitcoin, and an on-chain update of a Lithium channel on EVM and Tron, whichever side made it. Each step names a below_usd threshold and its confirmations; the last step names no threshold, and (2026-10-29) waits until the network has made the operation final, written final:

confirmation_tiers:
  - { below_usd: "1000", confirmations: 1 }
  - { below_usd: "10000", confirmations: 2 }
  - { confirmations: final }
  • An operation is valued in dollars together with every other operation, from any peer, that is not yet final. It waits the fewest confirmations at which what the node relies on short of each step's depth stays below that step's below_usd.
  • A Lithium update is valued at the larger of its asset channel's value before and after it, and a splice at the larger of its channel's value before and after it. An operation the node cannot price waits the last step.
  • The list fails the boot when it is empty, when its last step names a threshold, when a step waits zero confirmations, when a step other than the last is final, or when its thresholds do not rise or its depths fall. On Bitcoin it is refused beside minimum_depth_blocks, and its last step is also the depth a splice waits. (2026-10-29) Its last step must be final; on Bitcoin, where a transaction counts as final 6 confirmations deep, 6 stands for it as well. A list ending anywhere else is dropped with a warning at boot, and the node waits as it does without one.
  • A peer the node trusts before confirmations, or one it has a depth of its own set for, is not weighed: that depth applies.
  • (2026-10-29) Without the list, an on-chain update of a Lithium channel waits until the network has made it final: on Ethereum 13 to 19 minutes, on Arbitrum about 19 minutes, on Tron 19 blocks. On Bitcoin a channel or splice a peer funds waits minimum_depth_blocks, or else the node's trusted depth, 1 by default.

On a Lithium channel each side declares itself ready for an update at its own depth, and the update is promoted once both have: the channel pays on it, as on a Lightning channel once both sides sent splice_locked. is_updatable and is_closable rise once the update is promoted on both sides, (2026-11-17) an open and an update that leaves the asset channel empty included. See AssetChannel.

Lease pricing (optional)

(2026-10-29) lease_pricing, a key of any network block, is what this node charges for the liquidity it lends on the network: its own funds put on its side of a channel for a liquidity provider, which asks Quote Channel Liquidity and Get Lease Terms for the price, and each channel it opens on demand under jit_channels. A server node only. Absent, the node lends nothing on the network: the two calls answer FAILED_PRECONDITION, and jit_channels keeps fees of its own.

networks:
  - protocol: evm
    network: arbitrum
    lease_pricing:
      fee_ratio_per_hour: "0.00002"     # the share of the amount lent charged each hour: 0.002%
      asset_fee_ratios_per_hour:        # an asset's own share, by its id as the network writes it
        "erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831": "0.00003"
      funding_fee_margin: "1.2"         # the open or the deposit, at the priority asked, times this
      min_setup_fee_usd: "0.1"          # the least one channel's setup fee comes to, in dollars
      forced_fee_priority: medium       # what a forced on-chain step is priced at: low, medium or high
      forced_fee_margin: "2"            # those prices times this
      scarcity:                         # absent, the share stays flat
        target_utilization: "0.8"
        min_multiplier: "1"
        max_multiplier: "5"
  • What it can lend. Of the native asset the node never lends what it keeps back for the on-chain steps it may be forced to take, priced at forced_fee_priority, times forced_fee_margin. Of any asset it lends no more than it holds on chain, less what its fundings under way take until their coins leave the wallet. GetLeaseTerms reports it as available.
  • What a lending costs once. The fee of putting the liquidity in on chain, times funding_fee_margin, and for a channel the node has not put its own funds into before, its close at forced_fee_priority, times forced_fee_margin; never less than min_setup_fee_usd, at the node's price for the native asset.
  • What an hour of it costs. The amount, times fee_ratio_per_hour (or the asset's own share), times the scarcity multiplier: min_multiplier with nothing lent, rising in a straight line to 1 at target_utilization and on to max_multiplier with nothing left to lend, averaged over the use the lending moves through. The use is the share of what the node holds of the asset, on chain and on its side of its channels, that it cannot lend.
  • A channel opened on demand is priced the same way: its least fee is the setup fee of a new channel, in the asset of the payment, and its share of the payment is the hourly share for lending what the largest payment takes, over the lifetime the node promises. It lends no more than it can, and the largest payment shrinks to fit.
  • The boot fails on a negative share or setup fee, a margin below 1, a target_utilization not between 0 and 1, a min_multiplier not above 0 and at most 1, a max_multiplier below 1, an asset id that is not the network's, or one written otherwise than the network writes it, naming the form to write.

Peers (optional)

(2026-10-29) Any network block can declare the peers this node keeps connected:

peers:
  - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://arbitrum-ws.hydranet.app:443"

Each entry takes the <node_id>@<host>:<port> form ConnectToPeer uses; on a Bitcoin network it is the Lightning node id and address. The node dials them itself once its initial chain sync completes and redials one whenever its connection drops, so the session comes back after a restart, the node's or the peer's, without an operator re-issuing ConnectToPeer. Verify with GetConnectedPeers.

  • DisconnectFromPeer or a blacklist entry stops the redialing until the node starts again; the list is read at every start.
  • The node refuses to start with a node id listed twice, with its own node id, or, on Bitcoin, with an address it cannot dial: an onion address, or a host name with a path in it.
  • On Bitcoin, the gossip bootstrap_nodes are kept connected and checked the same way.
  • The channel session and the watchtower session with the same node are independent: to keep both with the Hydranet node, list its string under peers and under watchtowers.

Trusted depth (optional)

(2026-10-29) trusted_depth sets where the node acts on a transaction on that network: a count of confirmations, or final to wait until the network makes it final. Leave it out for the network's own. It moves:

  • TX_STATUS_COMPLETED, and the depth an HTLC is watched to when the call names none;
  • what GetNetworkInfo reports in depths;
  • on Bitcoin, the depth a channel or a splice a peer funds waits for when lightning sets none; on EVM and Tron, the depth at which a Lithium channel's state read back from the chain is relied on.

The node refuses a venue that confirms on-chain locks on that network at fewer confirmations than a depths.trusted count, or at any count where depths.trusted is final, and then does not trade: keep it at or below the confirmation_depth the venue's on-chain settlements carry for the network (see MatchedOrder). On Bitcoin, where a block is final at 6 confirmations, a count above 6 stops the node at boot: write final instead, which reads back as 6.

networks:
  - protocol: bitcoin
    network: bitcoin
    trusted_depth: 2       # or: final

Watchtowers (optional)

(2026-09-04) An EVM / Tron network block can declare the watchtowers this node hands its channel evidence to:

watchtowers:
  - "0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://arbitrum-ws.hydranet.app:443"

Each entry takes the <node_id>@<host>:<port> form ConnectToPeer uses. The node dials them itself once its initial chain sync completes and keeps them attached from then on, so coverage survives a restart without an operator re-issuing ConnectToWatchtower. Verify with GetConnectedWatchtowers.

On mainnet the Hydranet node serves both roles: the peer string and the watchtower string are the same, and the two are reached as independent sessions on the same address. Declaring it under watchtowers opens the watchtower session; declaring it under peers (2026-10-29), or calling ConnectToPeer, opens the channel session. Connecting one does not connect the other, so a node that wants both makes both.

⚠️ What a watchtower can and cannot defend

A watchtower acts on evidence against a channel's counterparty. It therefore cannot defend a channel whose counterparty is the watchtower — there is nobody for it to act against. With the Hydranet node in both roles, it defends your channels with other peers, and your channels with Hydranet itself rest on your own node being available to respond to a stale-state publication.

This matters most if Hydranet is your only peer, which it will be for most nodes at launch. Keeping your node online and its state backed up is the protection there; the watchtower is what extends coverage as you peer more widely.

Point watchtowers at a node that is not the counterparty of the channels you most want defended, once such a node is available to you.

Distinct from watchtower: true, which makes this node run a watchtower service for others.

Storage backends

Each of critical_db / db / archive_db is a tagged block: type selects the backend and the rest of the keys belong to it. Every tuning key is optional and falls back to the backend's own default.

type: fjall (LSM-tree, write-optimised — the native default):

KeyDefaultMeaning
cache_size_mb96Block cache of decompressed SST blocks
max_memtable_size_mb32Per-keyspace memtable before it flushes to an L0 SST. Smaller ⇒ more flushes ⇒ more compaction work
max_write_buffer_size_mb192Global cap on active memtables for this DB. 0 disables the cap (not recommended)
max_journaling_size_mb192WAL on disk. fjall requires ≥ 64 MiB. Too small blocks writes under sustained load
worker_threadsmin(cpus, 4)Background flushes and compactions. Pin to your CPU limit minus one
durabilityimmediateimmediate fsyncs on every commit; buffered returns as soon as the journal has the data

Worst-case RAM per opened fjall DB is roughly cache_size_mb + max_write_buffer_size_mb. Multiply by the number of active DBs — one per role per network — when sizing a container.

durability: buffered trades crash-safety for latency

immediate is the default and is what fund-critical state needs: LDK monitors, payment shards, the settled-payment archive. A commit does not return until it is on disk.

buffered drops the per-commit fsync. It survives a clean shutdown but can lose the most recent commits on a hard crash — so use it only for the non-critical db role, whose contents (gossip graph, sync cursors, watchtower replicas) are re-acquired from peers on restart. Never set it on critical_db.

type: redb (copy-on-write B-tree):

KeyDefaultMeaning
cache_size_mb256Cache covering both reads and writes
durabilityimmediateimmediate flushes on every commit; none does not, and can lose data on a crash
two_phase_committrueCross-database consistency
quick_repairtrueFaster recovery from a partial commit, at some write amplification

type: indexed_db is the browser backend (wasm builds only) and takes no tuning — the browser owns the storage policy.

compression

Per-DB, and also tagged. The default is type: none — the templates above set zstd explicitly because they want it:

compression:
  type: zstd
  preset: balanced     # fast (level 1) | balanced (3) | best (9)
  # level: 7           # explicit level overrides preset; valid range -7..=22

A level outside -7..=22 is rejected at boot.

Storage-backend gotchas

  • backup_config requires authentication_config. The backup service is reached with the authenticated session, so the combination is rejected at boot rather than silently dropping backups.
  • auto_prune.max_entries must be ≥ 1. Zero is not "unlimited" — omit the key for that.

auto_prune: the filters are the whole policy

(2026-08-26) settings.auto_prune takes max_age_secs and/or max_entries — and nothing else. Everything about how pruning runs (how often each network is visited, how long a chunk may hold the archive write lock, what share of the node's time goes to pruning) is derived at runtime from what the node measures about itself, and escalates automatically when retention falls behind.

interval_secs was removed. If your config still sets it, delete it. At least one filter is required, and max_age_secs has a 48-hour floor (172800): pruning a settled payment deletes its stored preimage, which an in-flight swap may still need.

Settled wallet transactions prune by both filters; settled payments prune by max_age_secs only — never by entry count, since a count-based cap could delete the preimage of a payment settled moments ago. With no max_age_secs, payments are not auto-pruned at all.

When the archive stops keeping up, the node emits a retention_lagging event with how far past the deadline it is, and prunes harder at the cost of foreground latency.

.env

# Log filter. Quiet by default, debug only the Hydra crates.
# Mirrors the .env.sample shipped with hydra-app.
RUST_LOG="hydra_app_bin=debug,hydra_app=debug,hydra_core=debug,hydra_node=debug,hydra_bitcoin=debug,hydra_evm=debug,hydra_tron=debug,lithium=debug"

# Wallet secrets. Leave MNEMONIC empty for interactive mode; set it, in
# quotes, to run in daemon mode. PASSWORD is the BIP-39 passphrase, empty
# for none. Mount this file into the container, never pass it as
# environment: see "Choose a mode" below + the security note.
MNEMONIC=""
PASSWORD=""
VariablePurpose
RUST_LOGtracing-subscriber filter. The published images contain no debug or trace lines, whatever the filter asks for; a build of your own without the tester feature has them.
MNEMONICOptional BIP-39 mnemonic. Empty → interactive mode (CLI prompt). Set → daemon mode. Quote it: it contains spaces.
PASSWORDOptional BIP-39 passphrase (the "25th word"), empty for none. It is not an encryption password that can be wrong: a different passphrase opens a different wallet, with no error. Single-quote it: inside single quotes every character is taken as written, while unquoted $name silently becomes the value of the variable name, and inside double quotes $ and \ need escaping. A passphrase containing ' goes in PASSWORD_FILE instead.
MNEMONIC_FILE(2026-10-14) Path of a file holding the mnemonic — a Docker or Kubernetes secret — read in place of MNEMONIC. Its trailing line breaks are not part of it.
PASSWORD_FILE(2026-10-14) Path of a file holding the passphrase, read in place of PASSWORD, the same way.

Those are the only env vars the binary reads. Older versions of these docs listed GRPC_PORT and DATA_PATH_NAME — those do nothing. The gRPC/JSON-RPC port comes from settings.server_port in config.yaml; the data directory name from settings.data_path_name. Setting them in .env is a no-op.

(2026-10-14) A secret that cannot be read stops the startup with an error: a MNEMONIC that is not a valid BIP-39 phrase, a variable and its _FILE both set, a _FILE that cannot be read, or a .env that cannot be parsed. Earlier versions skip a .env from the line they cannot parse, and fall back to interactive mode on a mnemonic they cannot parse — in a container without a TTY, an exit with Error: NotTTY.

⚠️ Mnemonic & passphrase security

A container's environment variables are stored in its configuration, and docker inspect prints them in plain text — env_file:, environment:, docker run -e and --env-file alike. Anyone who can reach the Docker daemon can read them there, and they travel with every copy of that output: a support ticket, a monitoring agent, a backup of Docker's data. Hand the wallet's secrets over as files instead:

  • Mount the .env read-only at /app/.env, the image's working directory: the app reads it itself at startup. The compose file below does this.
  • (2026-10-14) Or use Docker or Kubernetes secrets and point MNEMONIC_FILE / PASSWORD_FILE at them, e.g. MNEMONIC_FILE=/run/secrets/mnemonic. Only the path is in the environment.
  • Restrict the files to their owner (chmod 600 .env) and never commit them — add them to .gitignore.
  • Keep non-secret settings such as RUST_LOG wherever is convenient: in the environment they are harmless.
  • Back the mnemonic up offline before you fund the wallet. It is the only thing that recovers the funds — the on-disk channel state is not a backup, and backup_config covers the wallet, not your seed.

Step 2: Choose a mode

ModeWhen to useHow
InteractiveLocal dev, exploration, first runLeave MNEMONIC="". The app prompts you on stdin for the mnemonic and passphrase of an existing wallet; it does not create one. Requires tty: true and stdin_open: true in compose.
DaemonBots, servers, CISet MNEMONIC (and PASSWORD if the wallet has a passphrase) in the mounted .env, or (2026-10-14) name files holding them with MNEMONIC_FILE / PASSWORD_FILE. The app boots the wallet automatically, no terminal needed.

For a trading bot, you almost always want daemon mode. For your first run on a new machine, use interactive mode once to confirm the wallet opens and the networks initialize cleanly.


Step 3: docker-compose.yml

services:
  hydra-app:
    # Mainnet: hydra-app-public — production code, reduced logs.
    # Staging:  ghcr.io/offchain-dex/hydra-app-tester:latest
    image: ghcr.io/offchain-dex/hydra-app-public:latest
    # tini reaps the interactive-mode child cleanly on Ctrl-C / SIGTERM.
    init: true
    # No `env_file:` — Docker would store every value in the container's
    # configuration, where `docker inspect` prints it. The app reads the
    # mounted `.env` itself.
    volumes:
      # Wallet secrets: read-only, never as environment variables.
      - ./.env:/app/.env:ro

      # Config: read-only mount so the container can't accidentally modify it.
      - ./config.yaml:/app/config.yaml:ro

      # Wallet + DB persistence. The binary writes to
      #   $XDG_DATA_HOME (= /root/.local/share on the official image)
      #   joined with `settings.data_path_name` from config.yaml.
      # If `data_path_name: hydra-app` (the staging default), state lives at
      #   /root/.local/share/hydra-app/
      # Mount the whole `/root/.local/share` directory so the path stays
      # correct even if you change `data_path_name` later.
      - hydra-data:/root/.local/share
    ports:
      # gRPC / JSON-RPC — must match settings.server_port in config.yaml.
      # Bound to the loopback interface ON PURPOSE: the API is unauthenticated.
      - "127.0.0.1:5003:5003"

      # Prometheus metrics — optional. Drop the line if metrics_port is unset.
      # They include your balances: loopback too, like the API. Needs
      # `settings.metrics_bind_address: 0.0.0.0` inside the container.
      - "127.0.0.1:9090:9090"

      # Per-network peer ports. Required only for nodes that should ACCEPT
      # inbound connections (channel openings to you, liquidity providers).
      # If you only OPEN channels outbound, you can remove these entirely.
      # Match these to your config.yaml's per-network lightning_*/lithium_* ports.
      - "19735:19735"    # Bitcoin Signet — Lightning TCP
      - "19736:19736"    # Bitcoin Signet — Lightning WS (for browser peers)
      - "29980:29980"    # Ethereum Sepolia — Lithium TCP
      - "29980:29980/udp" # Ethereum Sepolia — Lithium QUIC
      - "29981:29981"    # Ethereum Sepolia — Lithium WS
      - "29982:29982"    # Arbitrum Sepolia — Lithium TCP
      - "29982:29982/udp" # Arbitrum Sepolia — Lithium QUIC
      - "29983:29983"    # Arbitrum Sepolia — Lithium WS

    # Required ONLY for interactive mode (so the CLI prompt can read stdin).
    # In daemon mode (MNEMONIC + PASSWORD set in .env), drop these — the
    # container will run quietly and `docker compose logs` works as expected.
    tty: true
    stdin_open: true

    restart: unless-stopped

volumes:
  hydra-data:
    # Named volume. Survives `docker compose down`; gone after `down -v`.
    # For host-bind persistence instead, replace with:
    #   volumes:
    #     - ./hydra-data:/root/.local/share

Why this volume path matters

The Hydra App binary stores all persistent state — wallet, encrypted seed, channel state, the embedded fjall DB, interactive-mode log.txt, etc. — under:

${XDG_DATA_HOME:-$HOME/.local/share}/<settings.data_path_name>/

On the official rust:latest-based image, $HOME is /root and $XDG_DATA_HOME is unset, so the path resolves to /root/.local/share/<data_path_name>/. Mounting the parent (/root/.local/share) as a volume keeps the wallet across container restarts and image updates.

Per-network peer ports

Listed ports above match the staging template (Bitcoin Signet + Ethereum Sepolia + Arbitrum Sepolia). If you enable other networks in config.yaml, look up each entry's lightning_tcp_port / lightning_ws_port / lithium.tcp_quic_port / lithium.ws_port and add a matching host:container line. lithium.tcp_quic_port takes two lines, one for TCP and one with /udp, because QUIC runs over UDP.

If you don't intend to receive inbound channel openings (most bots), you can drop these port lines entirely — outbound channels work without them.


Step 4: Start the app

The mounted .env sets MNEMONIC, and PASSWORD if the wallet has a passphrase:

docker compose up -d
docker compose logs -f hydra-app

You're ready when the logs include lines like:

Nodes initialized
DEX initialized

…and the gRPC port is open. Sanity-check it from another shell:

curl -s -X POST http://127.0.0.1:5003 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"app_getNetworks"}'

You should get back the list of active networks.

Interactive mode (first run, exploration)

.env leaves MNEMONIC empty. The container will start an interactive prompt asking for wallet type, mnemonic and passphrase. Bring a mnemonic you already have: the app does not create one.

With tty: true, the container's log records everything the terminal shows. Keep the log out of it with logging: { driver: "none" } on the service while you use interactive mode — docker attach still works, and the app's own log goes to log.txt (below) either way.

# Foreground — see the prompt directly:
docker compose up

# OR background then attach:
docker compose up -d
docker attach hydra-app    # use Ctrl-P Ctrl-Q to detach without stopping

Important: interactive mode logs to a file, not stdout. In interactive mode the binary redirects logs to <data_dir>/log.txt (i.e. /root/.local/share/<data_path_name>/log.txt inside the container) so the CLI prompt isn't trampled by log lines. docker compose logs will look mostly empty. To follow the log file:

docker compose exec hydra-app tail -F /root/.local/share/hydra-app/log.txt

In daemon mode, logs go to stdout normally and docker compose logs -f works as expected.

Stopping cleanly

docker compose stop                # gracefully stops; state preserved in the named volume
docker compose down                # stops and removes the container; state still preserved
docker compose down -v             # removes the data volume too — WIPES the wallet

init: true in the compose file ensures interactive-mode prompts shut down quickly on Ctrl-C / SIGTERM. Without it the container can take up to 10 seconds to stop because Rust's default Drop cleanup gets killed by Docker's hard timeout.

⚠️ The API port is unauthenticated — keep it on loopback

Hydra App has no authentication layer of its own. Every RPC — signing, sending, force-closing, setting allowances, cancelling orders — is reachable by anyone who can open a TCP connection to settings.server_port. The authentication_config in config.yaml is how the app authenticates to the Hydranet services; it does nothing for the port your clients connect to.

Publish the port as 127.0.0.1:5003:5003, as the compose file above does. A bare "5003:5003" binds 0.0.0.0 and, on a host without a firewall, hands the wallet to the internet. If you need remote access, use an SSH tunnel or put your own authenticating reverse proxy in front — and note that a release build sends no permissive CORS headers, so a browser page on another origin cannot reach it directly either (see Browser & gRPC-Web Specifics).


Step 5: Generate a client from the proto files

Hydra App speaks raw gRPC. To call it from your language, you need generated client stubs from the .proto schema files. The schema lives on this docs site as a downloadable bundle, plus individually browsable .proto files.

⬇ Download hydra-protos.zip

Or grab a single file:

curl -O https://docs.hydranet.ai/proto/hydra-protos.zip && unzip hydra-protos.zip -d hydra-protos
# → hydra-protos/{wallet,liquidity,orderbook,...}.proto

Each individual .proto is also at https://docs.hydranet.ai/proto/<name>.proto — handy for import paths or quick browsing.

Generate client stubs

Pick your language. All examples assume the protos are unpacked at ./hydra-protos/.

# Buf is the modern polyglot codegen tool. Install: https://buf.build/docs/installation
# Add a buf.gen.yaml describing your target languages, then:
buf generate hydra-protos
# → produces stubs for every plugin you configured

After running the relevant command, you'll have generated source files (one per .proto) you can import in your project. The exact import path depends on your language — see your generator's output.

Already have a Python client? If you've built one for your own bot, drop it in your repo and skip codegen. Want to share it back? Open a Discord ticket — we may be interested in publishing community SDKs.

Future: post-launch the protos will move to Buf Schema Registry at buf.build/offchain-dex/hydra and codegen will collapse to a one-liner: buf generate buf.build/offchain-dex/hydra. Until then, the static download above is the canonical source.


Step 6: Sanity-check from the client side

Once the app is running and you have generated stubs, hit it from your language. Examples below assume your generated code lives where the imports show.

import { AppServiceClient } from './proto/AppServiceClientPb'
import { GetNetworksRequest } from './proto/app_pb'

const client = new AppServiceClient('http://localhost:5003')

const response = await client.getNetworks(new GetNetworksRequest(), {})
for (const n of response.getNetworksList()) {
  console.log(`Network: protocol=${n.getProtocol()} id=${n.getId()}`)
}

You should see one entry per network you enabled in config.yaml.


Mainnet peers & watchtowers

List the Hydranet node under peers on each mainnet network you enabled, as the mainnet template does (2026-10-29), and the node connects to it on its own; or connect to it once the app is running. The peer string format is <node_id>@<host>:<port> — the same form ConnectToPeer and ConnectToWatchtower both take.

NetworkPeer string
Bitcoin03eaace825811aee04ea8e56d31a8927104d5f301ff2aa8998cc431903ec26289a@wss://lightning-ws.hydranet.app:443
Ethereum0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://ethereum-ws.hydranet.app:443
Arbitrum One0x53f1067c4d85000f24d8019b8d676fbf7f321ca3@wss://arbitrum-ws.hydranet.app:443

⚠️ The port is always 443, on every network

Hydranet's mainnet endpoints are served through Cloudflare, which cannot proxy the Lithium / Lightning ports. Use port 443: other ports are not reachable through the public hostname, and a peer string carrying one times out rather than failing fast, the most common way to get a silent hang instead of a connection.

Confusing matters, those are also the ports your own node listens on (lightning_ws_port, lithium.ws_port). Same numbers, different machine — yours are for peers dialling you, and neither belongs in the string you dial out with. Use 443.

The same address is also the watchtower. Declare it in the network block's watchtowers list and the node attaches on its own after the initial sync — that is what the mainnet template does. Passing the identical string to ConnectToWatchtower attaches one at runtime instead. The watchtower session is independent of the peer session, so connecting one does not connect the other.

Both EVM networks share one node identity (0x53f106…), since a single EVM node serves Ethereum and Arbitrum.


Staging peers & watchtowers

List the Hydranet staging node under peers on each network you enabled, as the staging template does (2026-10-29), and the node connects to it on its own; or connect to it once the app is running. The peer string format is <node_id>@<host>:<port> — the same form ConnectToPeer and ConnectToWatchtower both take.

NetworkPeer string
Bitcoin Signet03726edb9778282abf3b08cbac5114fe45e8b0d302ad278bd1dc7af5d3bb134083@wss://lightning-ws.staging.hydranet.ai:443
Ethereum Sepolia0xd78f26fdc770e4041960d3e06a58fb9b91fa5ff6@wss://ethereum-ws.staging.hydranet.ai:443
Arbitrum Sepolia0xd78f26fdc770e4041960d3e06a58fb9b91fa5ff6@wss://arbitrum-ws.staging.hydranet.ai:443
Tron ShastaTUQi2SbHaqQWYkgNwvsDRRVwUtXjwKhYwW@wss://tron-ws.staging.hydranet.ai:443

The port is always 443, on all four networks. Your own lightning_ws_port / ws_port are for peers dialling you: don't copy a config port into a peer string.

The same address also accepts watchtower sessions, but it cannot tower for the channels you open with it. A tower never acts on a channel it is itself a party to — publishing the penalty would mean publishing it against itself — so for a channel whose counterparty is the staging node, that session is an off-site backup of your state, not enforcement. To have a channel actually watched, hand it to a third party neither side of the channel controls. Pass the string to ConnectToWatchtower if you want the backup; that session is independent of the peer session, so connecting one does not connect the other.

Don't put the staging node in your own watchtowers: config list. That field is for towers this node hands evidence to, and an entry naming your channel counterparty is inert for exactly the reason above.

Both EVM networks share one node identity (0xd78f26…), since a single EVM node serves Ethereum and Arbitrum.


Network identifiers (config string ↔ proto fields)

config.yaml uses human-readable network names. The gRPC API uses { protocol, id } integers and hex strings. Map between them:

⚠️ Mainnet names have no -mainnet suffix

The mainnet network name is the bare chain name — bitcoin, ethereum, arbitrum, tron. Only testnets carry a suffix. There are no aliases: bitcoin-mainnet, ethereum-mainnet, arbitrum-one and tron-mainnet are not accepted and fail at boot with InvalidNetworkName.

Bitcoin (protocol: 1 / PROTOCOL_BITCOIN)

config.yaml networkproto id (hex magic bytes)
bitcoinf9beb4d9mainnet
bitcoin-testnet1c163f28testnet4
bitcoin-testnet30b110907testnet3
bitcoin-signet0a03cf40
bitcoin-regtestfabfb5da

bitcoin-testnet is testnet4, magic 1c163f28. Testnet3 is a separate name, bitcoin-testnet3 (0b110907). This page previously mapped bitcoin-testnet to the testnet3 magic bytes — a node configured for one and addressed with the other's id will not match.

EVM (protocol: 2 / PROTOCOL_EVM)

config.yaml networkproto id (decimal chain ID)
ethereum1mainnet
arbitrum42161mainnet (Arbitrum One)
optimism10mainnet
polygon137mainnet
bsc56mainnet
ethereum-sepolia11155111
arbitrum-sepolia421614
ethereum-holesky17000

Also accepted: avalanche, fantom, gnosis, optimism-sepolia, bsc-testnet, polygon-amoy, avalanche-fuji, fantom-testnet, gnosis-chiado, ethereum-local.

Tron (protocol: 3 / PROTOCOL_TRON)

config.yaml networkproto id (decimal chain ID)
tron728126428mainnet
tron-shasta2494104990
tron-nile3448148188
tron-local3360022319TRE container

When passing a Network to any RPC, use { protocol, id }. The name and chain_id fields you may see in older client code no longer exist.


Troubleshooting

SymptomLikely causeFix
Nodes initialized never appearsConfig parse error or missing required fieldCheck docker compose logs for the YAML parse line
Boot fails with InvalidNetworkNameUsed a -mainnet suffix — ethereum-mainnet, bitcoin-mainnet, arbitrum-one, tron-mainnetMainnet names are bare: bitcoin, ethereum, arbitrum, tron. See Network identifiers
ConnectToPeer hangs, then times outPeer string carries a Lithium/Lightning port (19736, 29981, 29983) instead of 443Cloudflare cannot proxy those ports, so the public hostname answers only on 443. See Mainnet peers
Boot fails naming an auto_prune keyConfig still sets interval_secs, removed 2026-08-26Delete it — the filters are the whole policy. See auto_prune
Boot fails naming a token's symbol or nameA declared symbol contains whitespace, or a name is blank / space-paddedA symbol must be one word; a name non-blank and untrimmed. See Token display overrides
Boot fails naming a channel-terms keyA value is outside the protocol floors or what the node acceptsThe message names the key — see Channel terms
GetConnectedWatchtowers returns emptyThe node attaches declared watchtowers only after its initial chain syncNormal early in a boot. Persisting on a synced node means your channels are undefended while it is offline
A payment fails despite a sufficient balanceSized off free_local rather than max_sendable — a per-payment ceiling binds below the balanceSee max_sendable
Order rejected for precisionAmount carries more decimals than the market side allows; the orderbook rejects rather than roundsQuantise first: a base amount to base_precision, a quote amount to its decimal places, a price to quote_precision — see Amounts and prices
docker compose logs is empty in interactive modeInteractive mode writes logs to <data_dir>/log.txt, not stdoutdocker compose exec hydra-app tail -F /root/.local/share/<data_path_name>/log.txt
Wallet wiped after restartOlder docs used the wrong volume mount (/app/data)Use hydra-data:/root/.local/share — the binary writes to $HOME/.local/share/<data_path_name>
failed to connect to electrumProxy auth failingConfirm your auth credentials and network connectivity to proxy_url
Daemon mode restart-loops on Error: NotTTY, or the wallet prompt appears although MNEMONIC is setThe mnemonic does not parse, so the app fell back to interactive mode: quotes kept as part of the value by docker run --env-file, or an unquoted mnemonic in the mounted .env, which stops .env from loading at that lineQuote the mnemonic in the mounted .env. (2026-10-14) The startup stops instead, saying what is wrong
A restored wallet is empty, or its identity is not whitelistedPASSWORD is not the passphrase the wallet was created with — a different passphrase is a different wallet, with no errorSet the original passphrase, single-quoted in .env: unquoted, $name in it silently becomes the value of the variable name
docker inspect shows MNEMONIC and PASSWORDThey were passed as environment variables (env_file:, environment:, -e, --env-file)Mount them as files instead — see the security note under .env
Container restart-loops on first runPort collision on hostCheck lsof -i :5003 (gRPC) and the Lightning/Lithium ports listed in compose
Container takes ~10s to stop on docker compose downinit: true missing — Docker hard-kills before Rust's cleanup completesAdd init: true to the service (already in the compose template above)
bitcoin activated / bitcoin-signet activated but no balanceWallet is brand newSend funds to the address returned by wallet_getDepositAddress. On mainnet, send a small amount first and confirm it lands before committing more.
GRPC_PORT / DATA_PATH_NAME env vars seem to do nothingThey aren't read by the binaryRemove them from .env; the values come from config.yaml

Next steps

  • Bot Quickstart — minimum runnable trading-bot template
  • Getting Started — first API calls explained
  • Common Patterns — fee structures, amounts, error handling
  • /proto — the .proto files themselves; with rpc.discover on a running app, the authoritative schema

Copyright © 2025