Deployment combines authored agreement JSON with liveDocumentation Index
Fetch the complete documentation index at: https://docs.shodai.network/llms.txt
Use this file to discover all available pages before exploring further.
initValues, participant wallet mappings, optional observers, and a signed EIP-712 permit so the API can create a live agreement.
Structural validation checks the authored agreement. Deployment preflight checks the assembled deployment request. Deployment with permit creates the agreement.
SDK deployment path
For TypeScript integrations, use the SDK for both deployment preflight and permit signing.Before deployment, make sure your integration has a
walletClient for the deploying signer and a publicClient connected to the target chain/RPC. The signer must be able to produce an EIP-712 signature; the SDK cannot deploy from a wallet address alone. For automated tests that only need signatures, see Create a test-only wallet client.Preflight the assembled deployment request
- SDK
- HTTP
validation.variables, validation.participants, validation.observers, validation.contributors, and validation.warnings before signing. In raw HTTP flows, review the equivalent fields in the preflight response.Sign and deploy with the high-level helper
validation.variables contains the effective deployment values the SDK signs after participant mappings are applied. Keep the same participants array in the helper call so hosted agreement context still records the participant mappings. publicClient must be connected to the target chain/RPC. The helper resolves the chain-specific factory context, reads the current permit nonce, signs the permit, and submits deployWithPermit.Raw deployment flow
Assemble deployment context
Provide the authored Participant wallet identities belong in
agreement, initValues for values required at initialization, participants for participant-role wallet mappings, and optional observers. Preflight uses these fields; deployment adds displayName and signed permit fields.Send the full authored agreement JSON in agreement. The nested agreement below is shortened to its top-level sections for readability, but the request shape includes the required agreement field.participants, not duplicated in initValues, when the agreement models them as participant variables.Preflight the deployment request
Call Deployment preflight checks authored agreement JSON,
POST /v0/agreements/validate before signing.initValues, participant mappings, observers, and normalized variables. It does not deploy the agreement and does not validate permit signatures.Review normalized values
The preflight response includes participant keys, normalized participants, normalized observers, contributors, warnings, and effective deployment Resolve warnings before signing. If participant mappings changed any value included in the permit, sign the post-mapping values from
variables.variables.Sign the deployment permit
The wallet in The TypeScript client uses a one-hour default permit lifetime through
signer authorizes deployment by signing EIP-712 typed data. The API uses that authorization to submit the transaction. For direct API deploy, the hosted record owner comes from the authenticated API principal’s primary wallet and may differ from signer.computeDefaultDeadlineSeconds(). Use a shorter deadline if your integration requires a tighter replay window, and regenerate the signature whenever the deadline expires.If you construct the deploy permit typed data directly, read the current nonce from AgreementFactory.nonces(signer) on the target chain through a live RPC before signing. Do not hardcode 0; a successful deploy permit consumes the nonce, so the same signature cannot be reused after deployment or any other signer nonce change.Deploy with the permit
Submit the signed request to
POST /v0/agreements/deploy-with-permit.Build deploy-with-permit.json from the same full agreement object and deployment context you preflighted, plus displayName and the permit fields.Inspect the deployed record
A successful response is an agreement record.The top-level
owner is the hosted record owner associated with the authenticated API principal. Carry forward the agreement ID, deployed address, chain ID, hosted record owner, participant context, observer context, and current state.After deployment, the agreement’s core definition is fixed. This is intentional: the deployed agreement becomes a shared operational source of truth that parties can inspect and rely on.If the agreement needs to change, model the change explicitly through the agreement itself, deploy a new agreement, or use an amendment pattern appropriate to the application.
Helper boundaries
The higher-leveldeployAgreementWithPermit(...) helper signs and submits the deployment request, but it does not replace the deployment preflight review step. Use client.validateDeployment(...) first when participant mappings or deployment values affect the permit payload.
Low-level signDeployWithPermit(...) requires an explicit deadline; high-level deployAgreementWithPermit(...) defaults to computeDefaultDeadlineSeconds().
Keep deployment boundaries clear
| Boundary | What to remember |
|---|---|
POST /v0/agreements/validate-template | Checks authored agreement JSON only. |
POST /v0/agreements/validate | Checks agreement JSON plus deployment context and normalized variables. |
POST /v0/agreements/deploy-with-permit | Creates the live agreement with signed authorization. |
participants | Maps participant-role variables to wallet addresses. |
observers | Adds optional email context; it is not participant identity. |
| deployment permit | Authorizes deployment; it does not submit post-deploy inputs. |