list
result = await client.templates.list()
for template in result.items:
print(f"{template.slug}: {template.name}")
print(f" Roles: {template.config.required_roles}")
print(f" Compliance: entity={template.config.compliance.entity_providers}")
get
template = await client.templates.get("template-uuid")
print(template.config.initial_state) # "INSTRUCTED"
print(template.config.terminal_states) # ["FINALIZED", "ROLLED_BACK", "TIMED_OUT"]
print(template.config.transitions) # {"INSTRUCTED": {"allowed_next": [...]}, ...}
SettlementTemplate fields
| Field | Type | Description |
|---|---|---|
id | UUID | Template UUID |
slug | str | URL-friendly identifier |
name | str | Human-readable name |
description | str | None | Template description |
config | TemplateConfig | State machine definition |
version | int | Current version |
is_active | bool | Whether available for new settlements |
TemplateConfig
| Field | Type | Description |
|---|---|---|
states | list[str] | All possible states |
initial_state | str | Starting state |
terminal_states | list[str] | End states |
failure_states | list[str] | Failure end states |
transitions | dict | { state: { "allowed_next": [...] } } |
required_roles | list[str] | Required party roles |
compliance | ComplianceConfig | Provider configuration |
actions | dict | Action handlers per state |