CLI
Every command and flag in the Python and Node packages. Every command works offline. Exit status is 0 for success, 1 when a verification fails and 2 for a usage or file error.
State lives in a folder you choose, .verdock by default. The Node package has init, check, keys, keys create, demo, exchange verify, disclose and verify with the same options and output. Producing exchanges (request, approve, accept) and exceptions over SQLite files are Python commands. Use npx verdock in place of verdock for Node.
init#
verdock init creates verdock.yaml with a starting policy and .verdock/ with a signing key. It refuses to replace an existing policy.
check#
verdock check OPERATION AMOUNT --currency CODE --counterparty ID evaluates verdock.yaml, prints allowed, needs approval or blocked with the reason, and writes a signed receipt. It reserves no money and executes no action.
verdock check payout 3500 --currency USD --counterparty c1Built in scene#
verdock demo [--scene all|payout|unknown|credit|data|exchange|fleet] [--offline] [--out DIR]
| Flag | Effect |
|---|---|
| none | The original double payout text. |
--scene | Runs one scene or all of them in the fixed order payout, unknown, credit, data, exchange, fleet, then the offline checks. |
--offline | Runs all scenes with socket calls blocked and prints Network: 0 attempts. as the last line. A socket call would stop the run with an error. |
--out DIR | Keeps the receipt logs (receipts-<scene>.ndjson), the exchange receipt (exchange-receipt-1.json) and trust.json. They hold public data only. |
The Node package prints the same text: npx verdock demo --scene all. Receipts written by one language verify in the other.
keys#
verdock keys prints the local public key. verdock keys create NAME [--dir DIR] writes DIR/keys/NAME.seed (a private Ed25519 seed, mode 0600) and NAME.pub. It refuses to overwrite a key. Names use lower case letters, digits, dot, underscore and hyphen.
verify#
verdock verify FILE --public-key HEX [--manifest-root HEX]. With --manifest-root, the first manifest of any delegation chain in the receipts must be signed by that key. It prints one line per receipt and a summary.
verdock verify .verdock/receipts.ndjson --public-key PUBLIC_KEY_HEXexchange#
| Command | What it does |
|---|---|
exchange request --sender S --recipient R --data-class C --payload FILE [--size N] [--approver A] [--ttl SECONDS] | The sender signs an exchange. Inside the send policy it waits for the receiver. Outside it, the exchange is held and nothing leaves. |
exchange enroll --approver A | Creates an authenticator seed for A in keys/A.totp (mode 0600) and stores an encrypted copy in the vault. |
exchange code ID --approver A | Shows the current 6 digit code for the exchange. This stands in for the approver's authenticator app. |
exchange approve ID --approver A [--code 123456] | A signs with their key, or gives the code. A code works once and only for this exchange. |
exchange accept ID --receiver R [--refuse] [--out FILE] | The receiver signs. The payload is then released and the exchange receipt is written. --refuse records a refusal and releases nothing. |
exchange status ID | Prints the state. |
exchange trust [--out FILE] | Writes the public keys of the state folder as a trust file. |
exchange verify FILE --trust TRUST [--payload FILE] | Verifies an exchange receipt offline. |
The state folder holds the vault master key and the attestor seed beside the other files. That suits one machine and a first run of the flow. In production keep the master key and the attestor seed apart from the approvers' keys. The send policy is exchange/send_policy.json, a list of {"sender", "data_class", "recipient", "limit"}. All public keys in keys/ are trusted for every role in this local flow. Give each party their own state folder when the roles must be separate.
exceptions#
verdock exceptions [--outcomes FILE] [--held FILE ...] [--exchange] [--older-than-minutes N] prints JSON: held items, MISMATCH, and UNKNOWN older than N minutes (default 15). --exchange adds held exchanges from the state folder.
disclose#
verdock disclose RECEIPT --field /params/customer_id --value-file VALUE.json --salt-file SALT.hex opens one committed field. The bank holds the salt. The output holds the value and a derived field salt, never the root salt.
egress#
python -m verdock egress --policy FILE --listen HOST:PORT --receipts FILE --seed FILE runs the egress gateway for the policy's egress.allow_hosts and prints its receipt public key. It creates the seed file if it does not exist. It is an opt in network API. No quickstart command starts it.