@shodai-network/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.
Supported hosted deployment chains:
Upgrade checklist
- Upgrade to
@shodai-network/agreements-api-client@0.3.0. - Confirm your lockfile resolves
@shodai-network/agreements-protocol-evm@0.1.4or 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.