add Transaction schema
This commit is contained in:
parent
fae434465d
commit
697dbd5c42
@ -39,22 +39,17 @@ paths:
|
||||
- name: address
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||
- name: token_symbol
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: string
|
||||
- name: include_pending
|
||||
in: query
|
||||
required: false
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
@ -79,15 +74,12 @@ paths:
|
||||
- name: address
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||
- name: limit
|
||||
in: query
|
||||
required: false
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
@ -112,16 +104,12 @@ paths:
|
||||
- name: password
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
allowReserved: true
|
||||
schema:
|
||||
type: string
|
||||
- name: register
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
allowReserved: true
|
||||
schema:
|
||||
type: boolean
|
||||
@ -146,29 +134,23 @@ paths:
|
||||
- name: from_address
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||
- name: to_address
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
|
||||
- name: value
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: token_symbol
|
||||
in: query
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
@ -192,42 +174,32 @@ paths:
|
||||
in: query
|
||||
description: Ethereum address of sender
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
- name: to_address
|
||||
in: query
|
||||
description: Ethereum address of recipient
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
- name: value
|
||||
in: query
|
||||
description: Estimated return from conversion
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: integer
|
||||
- name: token_symbol
|
||||
in: query
|
||||
description: ERC20 token symbol of token to send
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
type: string
|
||||
- name: spender_address
|
||||
in: query
|
||||
description: Ethereum address of recipient
|
||||
required: true
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/0xAddress"
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK.
|
||||
@ -238,9 +210,85 @@ paths:
|
||||
x-openapi-router-controller: cic_eth.server.controllers.account_controller
|
||||
components:
|
||||
schemas:
|
||||
"0xAddress":
|
||||
type: string
|
||||
example: 0x-hex
|
||||
Transaction:
|
||||
type: object
|
||||
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:
|
||||
type: object
|
||||
properties:
|
||||
|
Loading…
Reference in New Issue
Block a user