The published SDKs are pre-release (
0.1.x) and currently lag the live API - some methods and field names below may not match the API yet. For anything you run today, prefer the REST examples in the API reference and Quickstart. The SDK snippets show the intended shape and return when the SDKs catch up.dvp/v1) and is not defined by the template.
list
const { items: templates } = await client.templates.list();
for (const template of templates) {
console.log(`${template.slug}: ${template.name}`);
console.log(` Machine: ${template.config.machine}`);
console.log(` Roles: ${template.config.requiredRoles.join(", ")}`);
}
| Field | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Max items per page |
offset | number | 0 | Items to skip |
get
const template = await client.templates.get("template-uuid");
console.log(template.config.machine); // "dvp/v1"
console.log(template.config.timeoutSeconds); // 3600
console.log(template.config.requiredRoles); // ["seller", "buyer"]
SettlementTemplateRead
| Field | Type | Description |
|---|---|---|
id | string | Template UUID |
slug | string | URL-friendly identifier (e.g., "dvp-standard") |
name | string | Human-readable name |
description | string | null | Template description |
config | TemplateConfig | Template parameter pack |
version | number | Current version |
isActive | boolean | Whether the template is available |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
TemplateConfig
| Field | Type | Description |
|---|---|---|
machine | string | State machine this template runs (e.g. "dvp/v1"). Fixed in code, selected here. |
timeoutSeconds | number | Settlement timeout in seconds (minimum 60, default 3600) |
compliance | ComplianceConfig | Compliance provider configuration |
requiredRoles | string[] | Party roles needed (e.g., ["seller", "buyer"]) |
actions | Record<string, ActionConfig> | Per-state action handlers, keyed by engine-owned state name |
ComplianceConfig
| Field | Type | Description |
|---|---|---|
entityProviders | string[] | KYC/AML providers (e.g., ["lseg_worldcheck"]) |
walletProviders | string[] | Wallet screening providers (e.g., ["cipherowl"]) |
recheckAtStates | string[] | States where compliance is re-verified |
ActionConfig
| Field | Type | Description |
|---|---|---|
type | string | Action type (e.g., "compliance_check", "register_escrow") |
provider | string | Provider handling this action |
resolution | string | "immediate", "webhook", "poll", or "manual" |
timeoutSeconds | number | Max time for the action to complete (default 300) |
params | object | Action-specific configuration |