Desplegar
Despliega el contrato escrow y define las propiedades del escrow.
Encabezados
Content-Type
application/json
x-api-key
<token>
Hito
descripción
cadena
Texto que describe la función del hito
estado
cadena (Valor por defecto: "peding")
Estado del hito. Ej: Aprobado, En disputa, etc...
aprobado
booleano (Valor por defecto: false)
Indicador que señala si un hito ha sido aprobado por el aprobador
Roles:
aprobador
cadena
Dirección de la entidad que requiere el servicio.
proveedorDeServicios
cadena
Dirección de la entidad que presta el servicio.
direccionPlataforma
cadena
Dirección de la entidad que es dueña del escrow
firmaDeLiberacion
cadena
Dirección del usuario encargado de liberar los fondos del escrow al proveedor del servicio.
resolutorDeDisputas
cadena
Dirección encargada de resolver disputas dentro del escrow.
receptor
cadena
Dirección a la que se enviarán los fondos del escrow
Línea de confianza:
dirección
cadena
Dirección pública que establece permiso para aceptar y usar un token específico.
símbolo
cadena
Abreviatura oficial que representa el token en carteras, exchanges y documentación.
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
Amount to be transferred upon completion of escrow milestones
1000Commission 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:
- Amount cannot be zero
- Escrow already initialized
- The platform fee cannot exceed 99%
- Escrow initialized without milestone
- Cannot define more than 50 milestones in an escrow
- All flags (approved, disputed, released) must be false in order to execute this function
- An unexpected error occurred
POST /deployer/single-release HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 603
{
"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...",
"receiver": "GAPPROVER1234567890..."
},
"amount": 1000,
"platformFee": 50,
"milestones": [
{
"description": "Initial phase of the project"
},
{
"description": "Completion of design work"
}
],
"trusline": {
"symbol": "USDC",
"address": "GBBD47IF6LWK7P7MDEVSC..."
}
}{
"status": "SUCCESS",
"unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
}
¿Qué devuelve este Endpoint?
Este endpoint devuelve la transacción sin firmar para que la transacción pueda ser firmada por medio de la cartera del cliente.
Ejemplo de uso:
Última actualización