Pular para o conteúdo

An intent represents a request to execute an action within the system, which shall eventually be executed if fully approved. In Harmonize, all security-critical operations follow the below execution lifecycle:

  1. a user submits a properly signed intent to execute an action;
  2. Harmonize browses through the policies, sorted by rank, and selects the first policy with matching intentTypes and condition;
  3. Harmonize validates that the policy authorizes the author of the intent to submit it and sets the full approval workflow required for execution;
  4. Harmonize waits for the required quorum of approvals as defined in the selected policy workflow;
  5. Once fully approved, Harmonize executes the intent and mutates the state of the system, possibly triggering the execution of a side effect such as the processing of a transaction.

The author of an intent defines, in particular, the following fields:

  • payload, which sets the type of the intent and the details of the operation to process;
  • expiry, which sets an expiration time to the intent;
  • targetDomainId, which sets the domain in which to execute the intent (either in the current domain or within a descendant domain);
  • type, which defines whether the intent is an original submission (Propose), an intention to approve an existing intent (Approve) or an intention to reject an existing intent (Reject).

There exist four intent types for most entities in the system, as prefixed by:

  • Create to create an entity of a given type;
  • Update to update the definition of an entity;
  • Lock to lock an entity;
  • Unlock to unlock an entity.

Exceptions exist, such as for the release of quarantined transfers, which has its dedicated intent called ReleaseQuarantinedTransfers.

A generic intent, named NotarizeData, allows the submission of intents not related to internal processes of Harmonize. Such intents may be used to trigger external effects to extend the capabilities of the system, such as to initiate fiat payment orders or trading orders.

Propose an intent

Requisição

Segurança
httpAuth
Cabeçalhos
requestIdstring, (uuid)
Corpoapplication/jsonobrigatório
requestobjectobrigatório
signaturestring, (base64)obrigatório
curl -i -X POST \
  https://docs.ripple.com/_mock/pt-br/products/custody/devbox/v1/intents \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'requestId: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -d '{
    "request": {
      "author": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e"
      },
      "expiryAt": "2019-08-24T14:15:22Z",
      "targetDomainId": "6319e504-a82c-4cca-93a5-b46145310588",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "payload": {
        "backupId": "eb7cea43-10b2-42dd-8819-ab9aed37565f",
        "type": "v0_AcknowledgeBackup"
      },
      "description": "string",
      "customProperties": {
        "property1": "string",
        "property2": "string"
      },
      "type": "Propose"
    },
    "signature": "string"
  }'

Respostas

Accepted

Cabeçalhos
requestIdstring, (uuid)obrigatório
Corpoapplication/json
requestIdstring, (uuid)obrigatório
Resposta
{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6" }