Package-level declarations

Types

Link copied to clipboard

Looks up the verifiable credential that was issued for a contract.

Link copied to clipboard
data class ContractDraftRequest(val contractType: ContractType, val executionModel: ExecutionModel, val parties: ContractParties, val terms: ContractTerms, val effectiveDate: String, val expirationDate: String? = null, val contractData: JsonElement)

Contract draft request.

Link copied to clipboard
data class ContractStatusChange(val from: ContractStatus, val to: ContractStatus, val reason: String?, val metadata: JsonElement?, val at: String)

One recorded status change of a contract, including the optional reason and metadata.

Link copied to clipboard
data class ContractStoreLimits(val maxContracts: Int, val maxStatusHistoryPerContract: Int)

Capacity limits of DefaultSmartContractService's in-memory stores. Reaching maxContracts makes DefaultSmartContractService.createDraft fail loudly (nothing is evicted); the status history of one contract keeps only its most recent maxStatusHistoryPerContract changes.

Link copied to clipboard

Validates contract-related data.

Link copied to clipboard
class DefaultSmartContractService @JvmOverloads constructor(credentialService: CredentialService? = null, blockchainRegistry: BlockchainAnchorRegistry? = null, engines: EvaluationEngines = EvaluationEngines(), credentialResolver: ContractCredentialResolver? = null, trustedIssuerPolicy: TrustedIssuerPolicy? = null, verifyAnchorOnVerify: Boolean = false, limits: ContractStoreLimits = ContractStoreLimits()) : SmartContractService

Default in-memory implementation of SmartContractService.

Link copied to clipboard

Service for managing SmartContracts. Integrates with TrustWeave for verifiable credentials and blockchain anchoring.

Link copied to clipboard
fun interface TrustedIssuerPolicy

Decides whether issuerDid may vouch for contract in DefaultSmartContractService.verifyContract.

Functions

Link copied to clipboard
suspend fun SmartContractService.executeEvent(contract: SmartContract, vararg eventData: Pair<String, Any?>): Result<ExecutionResult>

Execute a contract with event data supplied as key/value pairs.

Link copied to clipboard
suspend fun SmartContractService.executeParametric(contract: SmartContract, vararg triggerData: Pair<String, Any?>): Result<ExecutionResult>

Execute a contract with parametric trigger data supplied as key/value pairs.

Link copied to clipboard