add Transaction schema
This commit is contained in:
parent
fae434465d
commit
697dbd5c42
@ -39,22 +39,17 @@ paths:
|
|||||||
- name: address
|
- name: address
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
|
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||||
- name: token_symbol
|
- name: token_symbol
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: include_pending
|
- name: include_pending
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
@ -79,15 +74,12 @@ paths:
|
|||||||
- name: address
|
- name: address
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
|
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||||
- name: limit
|
- name: limit
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
default: 10
|
default: 10
|
||||||
@ -112,16 +104,12 @@ paths:
|
|||||||
- name: password
|
- name: password
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
allowReserved: true
|
allowReserved: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: register
|
- name: register
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
allowReserved: true
|
allowReserved: true
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -146,29 +134,23 @@ paths:
|
|||||||
- name: from_address
|
- name: from_address
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
|
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||||
- name: to_address
|
- name: to_address
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
|
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||||
- name: value
|
- name: value
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
- name: token_symbol
|
- name: token_symbol
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -192,42 +174,32 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
description: Ethereum address of sender
|
description: Ethereum address of sender
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
- name: to_address
|
- name: to_address
|
||||||
in: query
|
in: query
|
||||||
description: Ethereum address of recipient
|
description: Ethereum address of recipient
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
- name: value
|
- name: value
|
||||||
in: query
|
in: query
|
||||||
description: Estimated return from conversion
|
description: Estimated return from conversion
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
- name: token_symbol
|
- name: token_symbol
|
||||||
in: query
|
in: query
|
||||||
description: ERC20 token symbol of token to send
|
description: ERC20 token symbol of token to send
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: spender_address
|
- name: spender_address
|
||||||
in: query
|
in: query
|
||||||
description: Ethereum address of recipient
|
description: Ethereum address of recipient
|
||||||
required: true
|
required: true
|
||||||
style: form
|
|
||||||
explode: true
|
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/0xAddress"
|
type: string
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK.
|
description: OK.
|
||||||
@ -238,9 +210,85 @@ paths:
|
|||||||
x-openapi-router-controller: cic_eth.server.controllers.account_controller
|
x-openapi-router-controller: cic_eth.server.controllers.account_controller
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
"0xAddress":
|
Transaction:
|
||||||
type: string
|
type: object
|
||||||
example: 0x-hex
|
properties:
|
||||||
|
block_number:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 24531
|
||||||
|
date_checked:
|
||||||
|
type: string
|
||||||
|
example: 2021-11-12T09:36:40.725296
|
||||||
|
date_created:
|
||||||
|
type: string
|
||||||
|
example: 2021-11-12T09:36:40.131292
|
||||||
|
date_updated:
|
||||||
|
type: string
|
||||||
|
example: 2021-11-12T09:36:40.131292
|
||||||
|
destination_token:
|
||||||
|
type: string
|
||||||
|
example: 0x3ff776b6f888980def9d4220858803f9dc5e341e
|
||||||
|
destination_token_decimals:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 6
|
||||||
|
destination_token_symbol:
|
||||||
|
type: string
|
||||||
|
example: COFE
|
||||||
|
from_value:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 100000000
|
||||||
|
hash:
|
||||||
|
type: string
|
||||||
|
example: 0xc7d160b4f1c89f09cbccbc2c4f6a72760bc3c1634a88438870c31b2e4d9e2bf3
|
||||||
|
nonce:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 1
|
||||||
|
recipient:
|
||||||
|
type: string
|
||||||
|
example: 872e1ec9d499b242ebfcfd0a279a4c3e0cd472c0
|
||||||
|
sender:
|
||||||
|
type: string
|
||||||
|
example: 1a92b05e0b880127a4c26ac0f68a52df3ac6b89d
|
||||||
|
signed_tx:
|
||||||
|
type: string
|
||||||
|
example: 0xf8aa018310c8e0837a1200943ff776b6f888980def9d4220858803f9dc5e341e80b844a9059cbb000000000000000000000000872e1ec9d499b242ebfcfd0a279a4c3e0cd472c00000000000000000000000000000000000000000000000000000000005f5e10082466ca0617d50ea726dfe61d6dc5e8a4a85cf7469514f394250cecb019006317cfb94d3a04930e14524f0a87db623a80e0f841ab613f693f5031c6a136873052ae7bba08e
|
||||||
|
source_token:
|
||||||
|
type: string
|
||||||
|
example: 0x3ff776b6f888980def9d4220858803f9dc5e341e
|
||||||
|
source_token_decimals:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 6
|
||||||
|
source_token_symbol:
|
||||||
|
type: string
|
||||||
|
example: COFE
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
example: SUCCESS
|
||||||
|
status_code:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 4104
|
||||||
|
timestamp:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 1636709800
|
||||||
|
to_value:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 100000000
|
||||||
|
tx_hash:
|
||||||
|
type: string
|
||||||
|
example: 0xc7d160b4f1c89f09cbccbc2c4f6a72760bc3c1634a88438870c31b2e4d9e2bf3
|
||||||
|
tx_index:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
example: 0
|
||||||
|
|
||||||
Token:
|
Token:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
Loading…
Reference in New Issue
Block a user