Implantar
Implante o contrato de escrow e defina as propriedades do escrow.
Cabeçalhos
Content-Type
application/json
x-api-key
<token>
Marco
descrição
string
Texto descrevendo a função do marco
status
string (Valor padrão: "peding")
Status do marco. Ex: Aprovado, Em disputa, etc...
aprovado
booleano (Valor padrão: false)
Flag indicando se um marco foi aprovado pelo aprovador
quantia
string
Valor do marco
destinatário
string
Endereço para onde os recursos do escrow serão enviados
Papéis:
aprovador
string
Endereço da entidade que requer o serviço.
prestadorDeServiço
string
Endereço da entidade que fornece o serviço.
endereçoDaPlataforma
string
Endereço da entidade que possui o escrow
assinanteDeLiberação
string
Endereço do usuário responsável por liberar os fundos do escrow ao prestador de serviço.
resolvedorDeDisputas
string
Endereço responsável por resolver disputas dentro do escrow.
Trustline:
endereço
string
Endereço público que estabelece permissão para aceitar e usar um token específico.
símbolo
string
Abreviação oficial que representa o token em carteiras, exchanges e documentação.
Inicializar Escrow
Entity that signs the transaction that deploys and initializes the escrow
GABC...XYZUnique identifier for the escrow
ENG12345Name of the escrow
Escrow TestText describing the function of the escrow
Escrow Test descriptionRoles that make up the escrow structure
Commission that the platform will receive when the escrow is completed
5Objectives to be completed to define the escrow as completed. (In this case it is not necessary to send the properties “approvedFlag” and “status” inside the objects of these milestones)
Information on the trustline that will manage the movement of funds in escrow
This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.
Bad request
Unauthorized access
Too Many Requests
Possible errors:
- Escrow already initialized
- The platform fee cannot exceed 99%
- Escrow initialized without milestone
- Cannot define more than 50 milestones in an escrow
- Amount cannot be zero
- All flags (approved, disputed, released) must be false in order to execute this function
- An unexpected error occurred
POST /deployer/multi-release HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 648
{
"signer": "GAPPROVER1234567890...",
"engagementId": "ENG12345",
"title": "Project Title",
"description": "This is a detailed description of the project.",
"roles": {
"approver": "GAPPROVER1234567890...",
"serviceProvider": "GAPPROVER1234567890...",
"platformAddress": "GAPPROVER1234567890...",
"releaseSigner": "GAPPROVER1234567890...",
"disputeResolver": "GAPPROVER1234567890..."
},
"platformFee": 50,
"milestones": [
{
"description": "Initial phase of the project",
"amount": 5,
"receiver": "GAPPROVER1234567890..."
},
{
"description": "Completion of design work",
"amount": 5,
"receiver": "GAPPROVER1234567890..."
}
],
"trustline": {
"symbol": "USDC",
"address": "GBBD47IF6LWK7P7MDEVSC..."
}
}{
"status": "SUCCESS",
"unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
}
O que este endpoint retorna?
Este endpoint retorna a transação não assinada para que a transação possa ser assinada por meio da carteira do cliente.
Exemplo de uso:
Atualizado