ExchainDocs
DocsAPI

CosignHow Cosign works

How Cosign works

Exchain co-signs agent payments from the owner's own wallet.

Every agent payment from a guarded wallet needs two signatures: the agent's and the attested quorum's. Exchain co-signs only payments that fit the wallet's mandate.

TermMeaning
Guarded walletA wallet the owner holds, where an agent payment needs the agent key and every member of the attested quorum
Attested quorumExchain's signing enclaves. Each member runs attested code and checks every payment itself: Trust model
MandateThe limits the owner sets: caps, rolling windows and seller rules
Node TokenThe bearer token for every API call. It also decides the network
Cosign on Cardano
Cardano contractsignatures, ceiling409 refusedAgent nodebuilds, signsCo-sign servicebody, mandate, gatesAttested quorumre-verify bodyWitness setPOST /v1/cosignallowedrefusedsign200submitsCardano contractsignatures, ceiling409 refusedAgent nodebuilds, signsCo-sign servicebody, mandate, gatesAttested quorumre-verify bodyWitness setPOST /v1/cosignallowedrefusedsign200submits
A refusal stops at the service and nothing is signed; the contract still enforces the owner's ceiling.

Guarded wallets per chain

CardanoEVM chains
WalletMasumi smart walletStock Safe 1.4.1, no custom contract
SignersAgent key and every attested quorum key, threshold 3Agent address and one address per attested quorum member, threshold = all owners
OwnerOwner key, outside the quorumOwner address, installed as the only module
AssetsUp to 16 per wallet: ADA, USDM, USDCxSeveral per Safe: USDC, EURC, PYUSD, USDG, USDT, by chain

Chains per network: Networks.

Who enforces what

RuleCardanoEVM chainsExchain
Agent and quorum signaturesContractSafeYes
Per-period ceilingContract, per assetNone. The Safe balance is the limitCardano: checked before signing
Payee pinningNoNoService and each quorum member
Mandate limits and seller rulesNoNoService
Owner exit and on-chain policyOwner key onlyOwner module onlyNot involved

If the agent key and every quorum key were compromised together:

  • Cardano: at most the rest of the current on-chain period ceiling could move, to any address.
  • EVM chains: never more than what the owner chose to put at risk: the Safe's balance, plus any treasury allowance and Permit2 approval the owner set. Everything else stays out of reach, and the owner can withdraw at any time without Exchain.

GET /v1/wallets/{walletId}/bound reports this as worstCase: Bound statement.

Rails

RailEndpointGuide
Cardano layer 1POST /v1/cosignCardano
Cardano Hydra headPOST /v1/cosign with a snapshotHydra in-head payments
EVM direct, to any addressPOST /v1/evm/cosignEVM chains
EVM inside x402POST /v1/x402/cosignEVM chains

Steps at a glance

StepGuide
1. Create and register the guarded walletCreate and register a wallet
2. Co-sign each payment before it is sentCo-sign a payment
3. Handle refusals and retriesRefusals and retries

On this page