Referência / Quadra Command API
Templates
1 operação em Quadra Command API 0.2.0.
/v1/template-transfersExecute a Transfer Template
Execute an operator-defined transfer template as one atomic custody Hydra transaction (LaaS-26).
The named template's typed params drive an ordered set of legs (fees, multi-leg payouts) over the existing custody validator — no new on-chain code. Yields exactly one Hydra transaction and one obligation row per leg (all sharing the tx hash, each carrying template attribution).
Requires an Idempotency-Key header. Callers MAY pin ``template_version``; a mismatch with the deployed version returns 409 TEMPLATE_VERSION_MISMATCH.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
TemplateTransferRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
Esquemas
Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.
HTTPValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| detail | array de ValidationError |
TemplateTransferRequest
A template-transfer invocation. ``params`` is a free-form object validated against the named template's declared params (typed enum: account_id | cents | bps | string) — the engine rejects unknown params and any attempt to supply an operator constant. ``template_version`` is an optional pin: if supplied and it does not match the deployed version, the engine raises 409 TEMPLATE_VERSION_MISMATCH (there is no template-version negotiation — the deployed JSON is authoritative).
| Campo | Tipo | Detalhe |
|---|---|---|
| params | object | obrigatórioCaller-supplied typed parameters |
| template_id | string | obrigatórioRegistered template id (e.g. 'fee_bearing_transfer') |
| template_version | integer, opcional | Optional expected template version; mismatch → 409 |
ValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| ctx | object | |
| input | não declarado | |
| loc | array de string ou integer | obrigatório |
| msg | string | obrigatório |
| type | string | obrigatório |