draft
Convenience alias for SmartContractService.createDraft.
Allows callers to write service.draft(request) instead of service.createDraft(request).
suspend fun SmartContractService.draft(block: ContractDraftBuilder.() -> Unit): Result<SmartContract>
DSL form of SmartContractService.createDraft.
trustWeave.contracts.draft {
contractType = ContractType.Insurance
executionModel = ExecutionModel.Parametric
parties = ContractParties(insurerDid, insuredDid)
terms = contractTerms
effectiveDate = "2026-05-28T00:00:00Z"
contractData {
"domain" to "flood"
"thresholds" { "floodDepthCm" to 50.0 }
}
}Content copied to clipboard