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