2023-04-13 13:55:07 +02:00
|
|
|
{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"description": "Interact with CIC Custodial API",
|
|
|
|
"title": "CIC Custodial API",
|
|
|
|
"termsOfService": "https://grassecon.org/pages/terms-and-conditions.html",
|
|
|
|
"contact": {
|
|
|
|
"name": "API Support",
|
|
|
|
"url": "https://grassecon.org/pages/contact-us",
|
|
|
|
"email": "devops@grassecon.org"
|
|
|
|
},
|
|
|
|
"license": {
|
|
|
|
"name": "AGPL-3.0",
|
|
|
|
"url": "https://www.gnu.org/licenses/agpl-3.0.en.html"
|
|
|
|
},
|
|
|
|
"version": "1.0"
|
|
|
|
},
|
|
|
|
"basePath": "/api",
|
|
|
|
"paths": {
|
2023-04-14 09:56:21 +02:00
|
|
|
"/account/create": {
|
2023-04-13 13:55:07 +02:00
|
|
|
"post": {
|
|
|
|
"description": "Create a new custodial account.",
|
|
|
|
"consumes": [
|
|
|
|
"*/*"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2023-04-14 09:56:21 +02:00
|
|
|
"tags": [
|
|
|
|
"account"
|
|
|
|
],
|
2023-04-13 13:55:07 +02:00
|
|
|
"summary": "Create a new custodial account.",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
2023-04-14 09:56:21 +02:00
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.OkResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/account/status/{address}": {
|
|
|
|
"get": {
|
|
|
|
"description": "Return network balance and nonce.",
|
|
|
|
"consumes": [
|
|
|
|
"*/*"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"network"
|
|
|
|
],
|
|
|
|
"summary": "Get an address's network balance and nonce.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Account Public Key",
|
|
|
|
"name": "address",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.OkResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/sign/transfer": {
|
|
|
|
"post": {
|
|
|
|
"description": "Sign and dispatch a transfer request.",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"network"
|
|
|
|
],
|
|
|
|
"summary": "Sign and dispatch transfer request.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "Sign Transfer Request",
|
|
|
|
"name": "signTransferRequest",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
2023-04-13 13:55:07 +02:00
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
2023-04-14 09:56:21 +02:00
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"from": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"to": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"voucherAddress": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2023-07-10 08:32:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.OkResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/sign/transferAuth": {
|
|
|
|
"post": {
|
|
|
|
"description": "Sign and dispatch a transfer authorization (approve) request.",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"network"
|
|
|
|
],
|
|
|
|
"summary": "Sign and dispatch a transfer authorization (approve) request.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "Sign Transfer Authorization (approve) Request",
|
|
|
|
"name": "signTransferAuthorzationRequest",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"authorizedAddress": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"authorizer": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"voucherAddress": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2023-04-14 09:56:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.OkResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/track/{trackingId}": {
|
|
|
|
"get": {
|
|
|
|
"description": "Track an OTX (Origin transaction) status.",
|
|
|
|
"consumes": [
|
|
|
|
"*/*"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"track"
|
|
|
|
],
|
|
|
|
"summary": "Track an OTX (Origin transaction) status.",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Tracking Id",
|
|
|
|
"name": "trackingId",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.OkResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Internal Server Error",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/api.ErrResp"
|
2023-04-13 13:55:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-14 09:56:21 +02:00
|
|
|
},
|
|
|
|
"definitions": {
|
|
|
|
"api.ErrResp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"ok": {
|
|
|
|
"type": "boolean"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"api.H": {
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {}
|
|
|
|
},
|
|
|
|
"api.OkResp": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"ok": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"result": {
|
|
|
|
"$ref": "#/definitions/api.H"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-13 13:55:07 +02:00
|
|
|
}
|
|
|
|
}
|