@cns-labs/agreements-api-client@0.3.0.
What changed
Agreements can now be deployed to more than one supported EVM chain in the same hosted API environment. Deployment, signing, and input submission code must carry the selectedchainId consistently instead of assuming a single environment chain.
| Package | Upgrade target | Why it matters |
|---|---|---|
@cns-labs/agreements-api-client@0.3.0 | 0.3.0 | Adds multi-chain signing checks and requires chainId for input signing helpers. |
@cns-labs/agreements-protocol-evm@0.1.3 | 0.1.3 | Adds protocol deployment registry entries for Base, Base Sepolia, and Ethereum Sepolia. |
| API environment | Supported chains |
|---|---|
testnet | Linea Sepolia (59141), Ethereum Sepolia (11155111), Base Sepolia (84532) |
production | Linea Mainnet (59144), Base Mainnet (8453) |
Upgrade checklist
- Upgrade to
@cns-labs/agreements-api-client@0.3.0. - Confirm your lockfile resolves
@cns-labs/agreements-protocol-evm@0.1.3or newer. - Choose a supported
chainIdbefore deployment preflight. - Include the same
chainIdinclient.validateDeployment(...), EIP-712 deploy signing, and deploy-with-permit requests. - Create the
publicClientandwalletClientfor the selected chain before signing. - For input signing, read the deployed agreement record and pass
agreementRecord.chainIdtosubmitAgreementInputWithPermit(...)orsignAgreementInputPermit(...). - Add
chainIdfilters to agreement list views when your UI or job should operate on one chain at a time. - Update error handling for unsupported chains and RPC/client chain mismatches.
Deployment code changes
Before this migration, integrations often treated the API environment as the chain selection:chainId and carry it through the whole deployment flow:
publicClient.getChainId() must match the selected chainId. If it does not, the SDK rejects before requesting a signature.
Input signing changes
The0.3.0 TypeScript client makes chainId required for input signing helpers. Use the chain stored on the deployed agreement record, not a hardcoded environment default.
Before 0.3.0:
0.3.0:
chainId. The API uses the stored agreement record after lookup. chainId is required by the SDK signing helpers so the EIP-712 domain is built for the deployed agreement’s chain and the RPC client can be checked before signing.
Raw HTTP changes
Deployment preflight and deploy-with-permit requests should includechainId:
chainId in the typed-data domain and use the factory address registered for that chain. For input signing, read GET /v0/agreements/{id} first and use the returned chainId and address.
Agreement list filtering
Agreement lists can now be filtered by chain:Protocol registry changes
The protocol SDK registry now includes five deployments. Use registry helpers instead of hardcoding factory addresses:chainId.
Common upgrade failures
| Symptom | Likely cause | Fix |
|---|---|---|
Requested chainId ... does not match publicClient chainId ... | The RPC client is connected to a different chain than the selected agreement chain. | Recreate publicClient for the selected chainId before signing. |
No AgreementFactory deployment registered for chain ... | The selected chain is not in the installed protocol SDK registry. | Upgrade to @cns-labs/agreements-protocol-evm@0.1.3 or choose a supported chain. |
Unsupported agreement.chainId ... | The API environment does not allow deployments on that chain. | Choose one of the chains supported by the target API environment. |
| Input signature is rejected or does not advance state | The signature was created for the wrong chain, contract address, payload, signer, nonce, or deadline. | Re-read the agreement record and current state, then sign again with agreementRecord.chainId and agreementRecord.address. |