Wallet operations
Co-Signer
The BroSettlement Co-Signer is an open-source service that runs on infrastructure you control. It:
What the Co-Signer does
The BroSettlement Co-Signer is an open-source service that runs on infrastructure you control. It:
- polls BroSettlement for pending DKG and signing intents;
- authenticates requests with your Ed25519 API key;
- claims work through signed HTTPS requests;
- exchanges MPC protocol messages through BroSettlement;
- stores your MPC key share as an encrypted local file;
- participates in transaction signing without reconstructing a complete private key;
- reports the final result to BroSettlement.
Repository: BroLabel/brosettlement-mpc-co-signer
Trust boundary
BroSettlement and your Co-Signer each control separate MPC signing material. BroSettlement cannot complete an MPC signature without the client-controlled Co-Signer participating.
The Co-Signer uses a pull model. It initiates outbound HTTPS connections to BroSettlement; you do not need to expose the Co-Signer's local health port to the public internet.
Required configuration
| Variable | Required | Description |
|---|---|---|
CO_SIGNER_MONOLITH_URL | Yes | BroSettlement API base URL. For staging: https://brosettlement-staging-api.brolabel.io/. |
CO_SIGNER_API_KEY_ID | Yes | UUID of the API key created for this Co-Signer. |
CO_SIGNER_API_PRIVATE_KEY | Yes | Client-held Ed25519 private key in PKCS#8 PEM, hex, or Base64 format. |
CO_SIGNER_SHARE_ENCRYPTION_KEY | Yes | Client-generated secret used to derive the AES-256 key that encrypts MPC share files. |
CO_SIGNER_SHARES_DIR | No | Persistent encrypted-share directory. Default: ./data/shares. |
CO_SIGNER_HTTP_ADDR | No | Local health server address. Default: 0.0.0.0:8081. |
CO_SIGNER_PARTY_ID | No | MPC participant identifier. Default: co-signer. |
CO_SIGNER_MAX_CONCURRENT | No | Maximum concurrent workers. Default: 4. |
CO_SIGNER_POLL_MIN_INTERVAL | No | Minimum intent polling interval. Default: 2s. |
CO_SIGNER_POLL_MAX_INTERVAL | No | Maximum intent polling interval. Default: 10s. |
CO_SIGNER_POLL_BACKOFF_FACTOR | No | Polling backoff multiplier. Default: 1.5. |
CO_SIGNER_FRAME_POLL_INTERVAL | No | MPC message polling interval. Default: 500ms. |
CO_SIGNER_HTTP_TIMEOUT | No | Timeout for BroSettlement API requests. Default: 30s. |
Secret handling
Follow these rules for every environment:
- never commit
private.pem, the share-encryption key, or the shares directory; - never send secrets through command-line arguments, query strings, tickets, or chat;
- inject secrets at runtime through a secret manager or protected files;
- restrict the API key using the required scopes and access settings shown on the API-key page;
- bind the health endpoint to
127.0.0.1unless a private monitoring network requires otherwise; - restrict the shares directory to the operating-system user that runs the Co-Signer;
- disable core dumps and prevent secrets or share contents from entering logs.
Persistent storage and backup
The Co-Signer writes one encrypted JSON file per MPC key to CO_SIGNER_SHARES_DIR. Files use AES-256-GCM encryption and are created with restricted permissions.
Protect and back up:
- the complete persistent shares directory;
- the matching share-encryption key;
- the Ed25519 API private key or a documented API-key rotation procedure.
Store backups of encrypted shares and their encryption key in separate protected locations. Test restoration procedures before relying on them. A share file is not usable without the matching encryption key.
Do not delete, replace, or manually edit share files after MPC initialization. Do not copy share files between organizations.
Runtime and monitoring
The service writes structured JSON logs to standard output. Send stdout and stderr to your normal centralized logging system, but configure redaction and access controls appropriate for cryptographic infrastructure.
Monitor:
- process availability;
/healthresponse status;readyvalue;- reported version;
- shares-directory check;
- Co-Signer status and last heartbeat in the BroSettlement Console;
- authentication, polling, DKG, and signing errors.
Updates
Before updating:
- back up the encrypted shares directory;
- verify that the matching share-encryption key is available;
- read the release notes;
- build and test the target version;
- stop the old process cleanly;
- start the new version with the same persistent shares directory and secrets;
- verify local health and the BroSettlement heartbeat;
- run a testnet signing check before returning the service to production use.
Do not start two Co-Signer processes against the same organization and shares directory unless the release documentation explicitly supports that deployment model.
Troubleshooting
The Co-Signer does not start
Check that all required variables are set and that:
- the private key is a valid Ed25519 key;
CO_SIGNER_SHARES_DIRexists or can be created;- the service user can read and write the shares directory;
- the local health port is available.
Local health returns ready: false
Inspect the checks.shares_dir result. Confirm that the configured directory exists and that the service user has permission to access it.
The Console shows the Co-Signer as offline
Check:
CO_SIGNER_MONOLITH_URLmatches the environment; staging useshttps://brosettlement-staging-api.brolabel.io/;- API Key ID;
- private key and uploaded public key match;
- all three MPC scopes are enabled;
- the network and allow-list settings on the API-key page are complete;
- outbound HTTPS access is available;
- the API key is active and has not expired or been revoked.
MPC remains not configured
An online Co-Signer does not automatically initialize MPC. Open Multi-Party Computation and explicitly select Initialize MPC.
MPC initialization fails
Keep the Co-Signer running and inspect its JSON logs. Resolve authentication, IP allow-list, connectivity, version, or storage errors before retrying. Retry only after the previous initialization attempt reaches a terminal failed or expired state.
Wallet creation is unavailable
Confirm that:
- the MPC key is Active or Ready;
- the Co-Signer is Online;
- the selected chain is Ready;
- the organization's plan permits another wallet.