commitCvmProvision
POST /cvms
Commits a CVM provision, finalizing the deployment. This is the second phase of the two-phase flow started by provisionCvm.
The required parameters differ based on the KMS type:
- PHALA KMS:
app_idcomes from theprovisionCvmresponse. - On-chain KMS (ETHEREUM/BASE):
app_idcomes from deploying an AppAuth contract viadeployAppAuth. You must also providekms_id,contract_address, anddeployer_address.
| Field | Type | Required | Description |
|---|---|---|---|
app_id | string | Yes | App ID from provision (PHALA) or contract deployment (on-chain) |
compose_hash | string | Yes | Hash from provisionCvm |
encrypted_env | string | No | Hex-encoded encrypted environment variables |
env_keys | string[] | No | Allowed environment variable keys |
kms_id | string | No | KMS instance slug (required for on-chain KMS) |
contract_address | string | No | AppAuth contract address (on-chain KMS only) |
deployer_address | string | No | Deployer wallet address (on-chain KMS only) |
CommitCvmProvision — full CVM details with metadata.
Example — PHALA KMS:
safeCommitCvmProvision
Safe variant that returns aSafeResult<CommitCvmProvision> instead of throwing on errors.
