Third-Party Services & Libraries
Every external service and library wallet-api touches: the EVM chain, node3/mpcium, the HSM keystore, PostgreSQL, and key Go libraries.
Every external system and significant library wallet-api depends on.
External services
| Service | Role | Config |
|---|---|---|
| blockchain09 EVM | The chain wallet-api deploys to and settles on (chain id 8675399). | WALLET_CHAIN_RPC_URL, WALLET_CHAIN_WS_URL, WALLET_CHAIN_ID |
| node3 (MPC platform party) | Holds share3 of every user key and runs the Doerner engine; the device runs its 2-of-3 keygen (/k1/d/ws) and signing (/k1/d/sign) against it through wallet-api's relays. | MPC_NODE3_URL, MPC_NODE3_JWT_SECRET, MPC_NODE3_STATIC_TOKEN (stopgap) |
| ta-api + liq-ats (callers) | ta-api is the Transfer Agent that drives every wallet/asset/trade call and proxies the MPC ceremony; liq-ats is the browser-facing edge in front of it. Both are transparent MPC hops - neither holds the node3 secret. | wallet-api sees them as API-key callers (WALLET_API_KEY) |
| mpcium cluster | Engine-mode server-side MPC (DKG + signing) over NATS - used for server-to-server automation. | WALLET_MPC_MODE=engine, WALLET_MPC_NATS_URL, WALLET_MPC_INITIATOR_KEY |
| HSM keystore | Digest-mode signer backing the platform keys (ta-admin, asset-executor, guardian) and the source of per-wallet executor keys (POST /generate-address). | WALLET_HSM_URL, WALLET_HSM_*_LABEL, WALLET_HSM_*_ADDRESS |
| PostgreSQL | Persistence: get-or-deploy state, one-wallet-per-user, the durable job queue. | WALLET_DB_URL |
| Substrate node (sponsor mode) | Pays user trade gas so the user wallet can hold zero balance. | WALLET_TRADING_GAS_MODE=sponsor, WALLET_TRADING_SUBSTRATE_URL, WALLET_TRADING_SPONSOR_SECRET |
Key libraries
| Library | Use |
|---|---|
github.com/ethereum/go-ethereum | EVM client, ABI encoding, tx signing, receipts |
github.com/jackc/pgx/v5 | PostgreSQL driver + pool |
github.com/pressly/goose/v3 | Embedded SQL migrations at boot |
github.com/fystack/mpcium | The MPC engine (keygen/sign) - local-replace module |
github.com/fystack/tss-lib/v2 v2.0.3 | The threshold-signature library behind mpcium sessions (a pinned fork of bnb-chain/tss-lib, replaced at module level) |
github.com/go-chi/chi/v5 | HTTP router |
github.com/gorilla/websocket | Both MPC relay WebSockets (keygen + sign) |
github.com/centrifuge/go-substrate-rpc-client | Substrate gas-sponsor client |
prometheus/client_golang | /metrics |
Build-time dependency
wallet-api imports the MPC engine via a local replace
(github.com/fystack/mpcium => ../mpcium), so it builds only when the mpcium
source is checked out as a sibling directory named mpcium. Two further replaces
pin the cryptography: bnb-chain/tss-lib/v2 => fystack/tss-lib/v2 v2.0.3 (the
hardened fork) and agl/ed25519 => binance-chain/edwards25519. See
mpc for why those pins matter.
Bundled at build
The compiled ERC-3643 forge artifacts (contracts/3643/*.json) are baked into
the image and read from disk at deploy time.
MPC: How It Works & What We Use
The 2-of-3 threshold-signature scheme behind every user wallet: the Doerner ceremonies, the device -> liq-ats -> ta-api -> wallet-api -> node3 relay chain, the signing modes, the libraries and pins, and the trust boundaries.
Deployment & Configuration
How to configure and run wallet-api: the WALLET_* environment variables, Docker, Kubernetes, and the HSM + node3 secrets.