Workflows
Everything wallet-api does: MPC wallet provisioning, ERC-3643 identity onboarding, asset lifecycle, dual-intent trade & settlement, and the MPC ceremony.
Everything wallet-api does, end to end.
1. MPC wallet provisioning
Creates a per-user V42 threshold-multisig wallet around the user's MPC-derived address.
- The device runs a 2-of-3 keygen (share1+share2 on device, share3 on node3) via the relay and obtains the MPC address.
- Caller sends
POST /wallet { user_id, user_address, country, wallet_profile }. All four fields are required - there are no defaults and no inferred values, so a wallet is only ever created from an explicit, complete request.countryis an ISO 3166-1 numeric code (840 = US);wallet_profileis the on-chain profile (INDIVIDUALorORG) baked into the clone at creation. - wallet-api registers the signer's identity (required by the strict V42
guard), deploys the V42 clone, provisions its executor + guardian, and funds
it for gas. Idempotent on
user_id.
Two identities are registered per fully-onboarded user: the signer (auto, at wallet creation) and the V42 holder (via
/identity/register, so it can receive ERC-3643 tokens).
2. Identity & ERC-3643 onboarding
Makes a wallet a verified participant in the IdentityRegistry (ONCHAINID + KYC/accreditation claims) so it can hold compliant tokens.
POST /identity/register·POST /identity/deregister·GET /identity/{wallet}/verifiedPOST /asset/accredit- grant Reg D accreditation (ACCREDITED / ACCREDITED_VERIFIED).
3. Asset lifecycle (issuer operations)
POST /asset- deploy an ERC-3643 token (+ optional initial mint). Supports regime-native types (Reg D 506(b)/506(c), Reg S, Reg A, Reg CF, §4(a)(2)).POST /asset/mint·POST /asset/burn- supply management.POST /asset/freeze·/freeze-partial·/unfreeze-partial·/forced-transfer- issuer controls.POST /asset/transfer- treasury transfers (e.g. cash dividends).POST /deposit- mint USDL (the cash leg).
4. Trade & settlement (dual-intent DvP)
An atomic delivery-versus-payment swap of a security for cash, where both sides authorize their own order on-chain.
- Vouch - each side builds an unsigned
proposeOrderIntentviaPOST /trade/propose-tx, MPC-signs the returnedsign_hashon the device overGET /wallet/mpc/sign, and broadcasts. (POST /trade/proposedoes this server-side in engine mode.) The returned order_nonce must be replayed at settle. - Settle -
POST /settlement/settlefills the matched maker/taker pair atomically on TokenSettlement. One endpoint handles exact, partial, and independent-quantity fills. - Commission -
fee_payerselects who bears the fee:"seller"(default - carved out of the seller's proceeds) or"buyer"(added on top). The contract applies it; seller-paid requires the buyer to vouch as maker. POST /trade/cancel-tx- cancel a resting order + revoke its unconsumed allowance.
Who-does-what for the fee
The fee is owned by the TokenSettlement contract. wallet-api only sets the market rate/recipient and routes the vouched intents into their maker/taker slots. See data-model.
5. Chain reads (the read gateway)
So consumers never dial the chain directly:
GET /chain/head·/chain/block/{n}/hash·POST /chain/logs·GET /chain/tx/{hash}/receiptGET /asset/{token}·/asset/{token}/balance/{holder}(with?block=for record-date snapshots) ·/asset/{token}/frozen/{holder}GET /contracts- deployed shared-infra addresses.
6. The MPC ceremonies (keygen + sign)
The device runs the 2-of-3 ceremonies against node3, through wallet-api's relays - the device never learns node3's URL or credentials.
GET /wallet/mpc-config- the keygen + signing relay paths, the party set, and the threshold. Read these rather than hardcoding them.GET /wallet/mpc/relay(WebSocket) - keygen frames to node3 (/k1/d/ws).GET /wallet/mpc/sign(WebSocket) - signing frames to node3 (/k1/d/sign).
Keygen and signing are different protocols with different round structures, so they are separate sockets on separate node3 endpoints. There is no pre-params endpoint: the live Doerner engine has no pre-computation, unlike the CMP engine it replaced.
In the product topology the browser reaches this through liq-ats -> ta-api (Device -> liq-ats -> ta-api -> wallet-api -> node3); both gateways are transparent hops that hold no share and no node3 secret. See mpc for the full mechanism.
Areas-touched matrix
| Operation | Wallet | Identity | Asset | Chain | Settlement | MPC |
|---|---|---|---|---|---|---|
| Create wallet | ● | ● | ● | ● | ||
| Register identity | ● | ● | ||||
| Create/mint/burn asset | ● | ● | ||||
| Deposit USDL | ● | ● | ||||
| Freeze / forced-transfer | ● | ● | ||||
| Propose (vouch) | ● | ● | ● | ● | ||
| Settle | ● | ● | ● | |||
| Chain read | ● |
Data Model
wallet-api's PostgreSQL schema and the on-chain ERC-3643 / V42 / TokenSettlement contracts it operates.
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.