# Vault Ipc

> Vault IPC Socket

- Skill: `qbt-labs/vault-ipc` (Agent Skill)
- Install (CLI): `npx skillmds@latest add qbt-labs/vault-ipc`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qbt-labs/vault-ipc/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: QBT-Labs (https://skillmd.com/u/qbt-labs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/qbt-labs/vault-ipc

---

# Vault IPC Socket

Unified Unix socket replacing the old two-socket model (x402-signer.sock + openmm-creds.sock).

## Socket
- Path: `/tmp/openmm.sock` (override via `OPENMM_SOCKET` env var)
- Permissions: mode `0600` (owner-only)
- Started by: `openmm serve` after interactive vault unlock

## Message Protocol
JSON messages over the socket, dispatched by `type`:
```json
{ "type": "sign_payment", "payload": {} }
→ { "signature": "0x..." }

{ "type": "get_credentials", "exchange": "mexc" }
→ { "apiKey": "...", "secret": "..." }

{ "type": "ping" }
→ { "status": "ok", "wallet": "0x...", "exchanges": ["mexc", "gateio"] }
```

## signAndWipe Pattern
Private key is decrypted inline, used once, and goes out of scope immediately.
It is NEVER held in a long-lived variable.

## Security Invariants
- Password typed once interactively in terminal — never passed as flag or env var
- Socket file = proof of authentication (exists → vault is unlocked)
- Stale socket cleaned up on startup, deleted on shutdown
- MCP server connects via socket — does NOT hold vault data in its own memory

