Skip to content

Instantly share code, notes, and snippets.

@faddat
Created October 22, 2021 10:12
Show Gist options
  • Save faddat/bc063d94cd2175d28d4aa381c78e839c to your computer and use it in GitHub Desktop.
Save faddat/bc063d94cd2175d28d4aa381c78e839c to your computer and use it in GitHub Desktop.
V Systems API Swagger definition
openapi: 3.0.1
info:
title: VSYS Full Node
description: The Web Interface to the VSYS Full Node API
license:
name: MIT License
url: https://github.com/virtualeconomy/vsys/blob/master/LICENSE
version: 0.3.2
servers:
- url: /
tags:
- name: blocks
- name: node
- name: peers
- name: transactions
- name: utils
- name: wallet
- name: addresses
- name: contract
- name: database
- name: debug
- name: leasing
- name: vsys
- name: spos
- name: consensus
paths:
/spos/contend:
post:
tags:
- spos
summary: Contend a slot
operationId: contend
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/ContendSlotsRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/spos/broadcast/release:
post:
tags:
- spos
summary: Broadcasts a signed release transaction
operationId: signRelease
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedReleaseSlotsRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/debug/stateVsys/{height}:
get:
tags:
- debug
summary: State at block
description: Get state at specified height
operationId: stateVsys
parameters:
- name: height
in: path
description: height
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/utils/seed/{length}:
get:
tags:
- utils
summary: Seed of specified length
description: Generate random seed of specified length
operationId: length
parameters:
- name: length
in: path
description: 'Seed length '
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/balance/details/{address}:
get:
tags:
- addresses
summary: Details for balance
description: Account's balances
operationId: balanceDetails
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/unconfirmed:
get:
tags:
- transactions
summary: Unconfirmed
description: Get list of unconfirmed transactions
operationId: unconfirmed
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses:
get:
tags:
- addresses
summary: Addresses
description: Get wallet accounts addresses
operationId: root
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
post:
tags:
- addresses
summary: Create
description: Create a new account in the wallet(if it exists)
operationId: create
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/wallet/seed:
get:
tags:
- wallet
summary: Seed
description: Export wallet seed
operationId: seed
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/peers/all:
get:
tags:
- peers
summary: Peer list
description: Peer list
operationId: allPeers
responses:
200:
description: Json with peer list or error
content: {}
/database/broadcast/put:
post:
tags:
- database
summary: Broadcasts a signed db put transaction
operationId: signPutKV
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedDbPutRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/addresses/balance/{address}:
get:
tags:
- addresses
summary: Balance
description: Account's balance
operationId: balance
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/contractId/{contractId}/tokenIndex/{tokenIndex}:
get:
tags:
- contract
summary: Token's Id
description: Token Id from contract Id and token index
operationId: tokenId
parameters:
- name: contractId
in: path
description: Contract ID
required: true
schema:
type: string
- name: tokenIndex
in: path
description: Token Index
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/spos/release:
post:
tags:
- spos
summary: Release a slot
operationId: release
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/ReleaseSlotsRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/consensus/mintingAverageBalance/{address}:
get:
tags:
- consensus
summary: Minting average balance
description: Account's minting average balance
operationId: mintingAverageBalance
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/blocks/height/{signature}:
get:
tags:
- blocks
summary: Height
description: Get height of a block by its Base58-encoded signature
operationId: heightEncoded
parameters:
- name: signature
in: path
description: Base58-encoded signature
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/spos/broadcast/contend:
post:
tags:
- spos
summary: Broadcasts a signed contend transaction
operationId: signedContend
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedContendSlotsRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/blocks/last:
get:
tags:
- blocks
summary: Last
description: Get last block data
operationId: last
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/{address}:
delete:
tags:
- addresses
summary: Delete
description: Remove the account with address {address} from the wallet
operationId: deleteAddress
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/node/status:
get:
tags:
- node
summary: Status
description: Get status of the running core
operationId: status
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/node/stop:
post:
tags:
- node
summary: Stop
description: Stop the node
operationId: stop
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/blocks/delay/{signature}/{blockNum}:
get:
tags:
- blocks
summary: Average delay
description: Average delay in milliseconds between last `blockNum` blocks starting
from block with `signature`
operationId: delay
parameters:
- name: signature
in: path
description: Base58-encoded signature
required: true
schema:
type: string
- name: blockNum
in: path
description: Number of blocks to count delay
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/debug/state:
get:
tags:
- debug
summary: State
description: Get current state
operationId: state
responses:
200:
description: Json state
content: {}
security:
- api_key: []
/database/put:
post:
tags:
- database
summary: create/modify a db entry
operationId: putKV
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/DbPutRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/consensus/mintTime:
get:
tags:
- consensus
summary: Mint time last
description: Mint time of a last block
operationId: mintTime
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/balance/{address}/{tokenId}:
get:
tags:
- contract
summary: Token's balance
description: Account's balance by given token
operationId: balance_1
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
- name: tokenId
in: path
description: Token ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/publicKey/{publicKey}:
get:
tags:
- addresses
summary: Address from Public Key
description: Generate a address from public key
operationId: publicKey
parameters:
- name: publicKey
in: path
description: Public key Base58-encoded
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/info/{contractId}:
get:
tags:
- contract
summary: Info
description: Get contract info associated with a contract id.
operationId: info_1
parameters:
- name: contractId
in: path
description: Contract ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/consensus/algo:
get:
tags:
- consensus
summary: Consensus algo
description: Shows which consensus algo being using
operationId: algo
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/seed/{address}:
get:
tags:
- addresses
summary: Seed
description: Export seed value for the {address}
operationId: seed_1
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/blocks/height:
get:
tags:
- blocks
summary: Height
description: Get blockchain height
operationId: height
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/peers/suspended:
get:
tags:
- peers
summary: Suspended peers list
description: Suspended peers list
operationId: suspendedPeers
responses:
200:
description: JSON with suspended peers or error
content: {}
/blocks/checkpoint:
post:
tags:
- blocks
summary: Checkpoint
description: Broadcast checkpoint of blocks
operationId: checkpoint
requestBody:
description: Checkpoint message
content:
'*/*':
schema:
$ref: '#/components/schemas/Checkpoint'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: message
/consensus/generatingBalance/{address}:
get:
tags:
- consensus
summary: Generating balance
description: Account's generating balance(the same as balance atm)
operationId: generatingBalance
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/unconfirmed/size:
get:
tags:
- transactions
summary: Size of UTX pool
description: Get number of unconfirmed transactions in the UTX pool
operationId: utxSize
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/info/{id}:
get:
tags:
- transactions
summary: Info
description: Get transaction info
operationId: info_2
parameters:
- name: id
in: path
description: 'transaction id '
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/consensus/mintTime/{blockId}:
get:
tags:
- consensus
summary: Mint time
description: Mint time of a block with specified id
operationId: mintTimeId
parameters:
- name: blockId
in: path
description: 'Block id '
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/utils/hash/secure:
post:
tags:
- utils
summary: Hash
description: Return SecureCryptographicHash of specified message
operationId: hashSecure
requestBody:
description: Message to hash
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 'Json with error or json like {"message": "your message","hash":
"your message hash"}'
content: {}
x-codegen-request-body-name: message
/leasing/lease:
post:
tags:
- leasing
summary: Creates a lease
operationId: lease
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/LeaseRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/transactions/address/{address}/limit/{limit}:
get:
tags:
- transactions
summary: Address
description: Get list of transactions where specified address has been involved
operationId: addressLimit
parameters:
- name: address
in: path
description: 'Wallet address '
required: true
schema:
type: string
- name: limit
in: path
description: Specified number of records to be returned
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/lastTokenIndex/{contractId}:
get:
tags:
- contract
summary: Last Token Index
description: Token contract last token index
operationId: lastToken
parameters:
- name: contractId
in: path
description: Contract ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/unconfirmed/info/{id}:
get:
tags:
- transactions
summary: Transaction Info
description: Get transaction that is in the UTX
operationId: utxTransactionInfo
parameters:
- name: id
in: path
description: 'Transaction id '
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/leasing/cancel:
post:
tags:
- leasing
summary: Interrupt a lease
operationId: cancel
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/LeaseCancelRequest'
required: true
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
x-codegen-request-body-name: body
/utils/sign/{privateKey}:
post:
tags:
- utils
summary: Hash
description: Return FastCryptographicHash of specified message
operationId: sign
parameters:
- name: privateKey
in: path
description: privateKey
required: true
schema:
type: string
requestBody:
description: Message to hash
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 'Json with error or json like {"message": "your message","hash":
"your message hash"}'
content: {}
x-codegen-request-body-name: message
/transactions/activeLeaseList/{address}:
get:
tags:
- transactions
summary: Address
description: Get list of active lease transactions
operationId: activeLeaseList
parameters:
- name: address
in: path
description: 'Wallet address '
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/contract/content/{contractId}:
get:
tags:
- contract
summary: Contract content
description: Get contract content associated with a contract id.
operationId: content
parameters:
- name: contractId
in: path
description: Contract ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/data/{contractId}/{key}:
get:
tags:
- contract
summary: Contract Data
description: Contract data by given contract ID and key (default numerical 0).
operationId: getContractData
parameters:
- name: contractId
in: path
description: Contract Account
required: true
schema:
type: string
- name: key
in: path
description: Key
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/addresses/effectiveBalance/{address}:
get:
tags:
- addresses
summary: Balance
description: Account's balance
operationId: effectiveBalance
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/count:
get:
tags:
- transactions
summary: Count
description: Get count of transactions where specified address has been involved.
*This is a custom api, you need to enable it in configuration file.*
operationId: transactionCount
parameters:
- name: address
in: query
description: 'wallet address '
required: true
schema:
type: string
- name: txType
in: query
description: transaction type
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/validate/{address}:
get:
tags:
- addresses
summary: Validate
description: Check whether address {address} is valid or not
operationId: validate
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/blocks/address/{address}/{from}/{to}:
get:
tags:
- blocks
summary: Address
description: Get list of blocks generated by specified address
operationId: address
parameters:
- name: from
in: path
description: Start block height
required: true
schema:
type: integer
- name: to
in: path
description: End block height
required: true
schema:
type: integer
- name: address
in: path
description: 'Wallet address '
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/signText/{address}:
post:
tags:
- addresses
summary: Sign
description: Sign a message with a private key associated with {address}
operationId: signText
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
requestBody:
description: Message to sign as a plain string
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 'Json with error or json like {"message": "plain text","publickey":
"Base58-encoded", "signature": "Base58-encoded"}'
content: {}
security:
- api_key: []
x-codegen-request-body-name: message
/vsys/payment:
post:
tags:
- vsys
summary: Send payment from wallet.
description: Send payment from wallet to another wallet. Each call sends new
payment.
operationId: payment
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/vsys/broadcast/payment:
post:
tags:
- vsys
summary: Broadcast signed payment.
description: Publish signed payment to the Blockchain.
operationId: broadcastPayment
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/signedPaymentTransaction'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/addresses/verify/{address}:
post:
tags:
- addresses
summary: Verify
description: Check a signature of a message signed by an account
operationId: verify
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
requestBody:
description: Json with data
content:
'*/*':
schema:
$ref: '#/components/schemas/SignedMessage'
required: true
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
x-codegen-request-body-name: body
/peers/connect:
post:
tags:
- peers
summary: Connect to peer
description: Connect to peer
operationId: connect
requestBody:
description: Json with data
content:
'*/*':
schema:
type: string
default: "{\n\t\"host\":\"127.0.0.1\",\n\t\"port\":\"9084\"\n}"
required: true
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
x-codegen-request-body-name: body
/database/get/{nameSpace}/{dbKey}:
get:
tags:
- database
summary: get
description: Get db entry
operationId: getKV
parameters:
- name: nameSpace
in: path
description: Address
required: true
schema:
type: string
- name: dbKey
in: path
description: dbKey
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/execute:
post:
tags:
- contract
summary: Execute a contract function
operationId: execute
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/ExecuteContractFunctionRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/blocks/at/{height}:
get:
tags:
- blocks
summary: At
description: Get block at specified height
operationId: at
parameters:
- name: height
in: path
description: Block height
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/verifyText/{address}:
post:
tags:
- addresses
summary: Verify text
description: Check a signature of a message signed by an account
operationId: verifyText
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
requestBody:
description: Json with data
content:
'*/*':
schema:
$ref: '#/components/schemas/SignedMessage'
required: true
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
x-codegen-request-body-name: body
/blocks/child/{signature}:
get:
tags:
- blocks
summary: Child
description: Get children of specified block
operationId: child
parameters:
- name: signature
in: path
description: Base58-encoded signature
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/node/version:
get:
tags:
- node
summary: Version
description: Get VSYS node version
operationId: version
responses:
200:
description: Json VSYS node version
content: {}
/consensus/slotInfo/{slotId}:
get:
tags:
- consensus
summary: Minting average balance with slot ID
description: Account of supernode's minting average balance
operationId: mintingAverageBalanceId
parameters:
- name: slotId
in: path
description: Slot Id
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/leasing/broadcast/lease:
post:
tags:
- leasing
summary: Broadcasts a signed lease transaction
operationId: signedLease
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedLeaseRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/peers/clearblacklist:
post:
tags:
- peers
summary: Remove all blacklisted peers
description: Clear blacklist
operationId: clearBlacklist
responses:
200:
description: "200"
content: {}
security:
- api_key: []
/debug/rollback-to/{signature}:
delete:
tags:
- debug
summary: Block signature
description: Rollback the state to the block with a given signature
operationId: rollbackTo
parameters:
- name: signature
in: path
description: Base58-encoded block signature
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/blocks/signature/{signature}:
get:
tags:
- blocks
summary: Signature
description: Get block by a specified Base58-encoded signature
operationId: signature
parameters:
- name: signature
in: path
description: Base58-encoded signature
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/consensus/allSlotsInfo:
get:
tags:
- consensus
summary: Get all slots' info
description: Get all slots' information
operationId: allSlotsInfo
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/effectiveBalance/{address}/{confirmations}:
get:
tags:
- addresses
summary: Confirmed balance
description: Balance of {address} after {confirmations}
operationId: effectiveBalanceWithConfirmations
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
- name: confirmations
in: path
description: "0"
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/debug/rollback:
post:
tags:
- debug
summary: Rollback to height
description: Removes all blocks after given height
operationId: rollback
requestBody:
description: Json with data
content:
'*/*':
schema:
$ref: '#/components/schemas/RollbackParams'
required: true
responses:
200:
description: 200 if success, 404 if there are no block at this height
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/peers/connected:
get:
tags:
- peers
summary: Connected peers list
description: Connected peers list
operationId: connectedPeers
responses:
200:
description: Json with connected peers or error
content: {}
/addresses/seq/{from}/{to}:
get:
tags:
- addresses
summary: Seq
description: Get wallet accounts addresses
operationId: seq
parameters:
- name: from
in: path
description: Start address
required: true
schema:
type: integer
- name: to
in: path
description: address
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/register:
post:
tags:
- contract
summary: Register a contract
operationId: register
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterContractRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
security:
- api_key: []
x-codegen-request-body-name: body
/debug/info:
get:
tags:
- debug
summary: State
description: All info you need to debug
operationId: info
responses:
200:
description: Json state
content: {}
security:
- api_key: []
/contract/vBalance/{contractId}:
get:
tags:
- contract
summary: Contract balance
description: Get contract account v balance associated with contract id.
operationId: vBalance
parameters:
- name: contractId
in: path
description: Contract ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/transactions/list:
get:
tags:
- transactions
summary: List
description: Get list of transactions where specified address has been involved.
*This is a custom api, you need to enable it in configuration file.*
operationId: transactionList
parameters:
- name: address
in: query
description: 'wallet address '
required: true
schema:
type: string
- name: txType
in: query
description: 'transaction type '
schema:
type: integer
- name: limit
in: query
description: Specified number of records to be returned
required: true
schema:
type: integer
- name: offset
in: query
description: Specified number of records offset
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/addresses/sign/{address}:
post:
tags:
- addresses
summary: Sign
description: Sign a message with a private key associated with {address}
operationId: sign_1
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
requestBody:
description: Message to sign as a plain string
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 'Json with error or json like {"message": "Base58-encoded","publickey":
"Base58-encoded", "signature": "Base58-encoded"}'
content: {}
security:
- api_key: []
x-codegen-request-body-name: message
/leasing/broadcast/cancel:
post:
tags:
- leasing
summary: Broadcasts a signed lease cancel transaction
operationId: signedLeaseCancel
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedLeaseCancelRequest'
required: true
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
x-codegen-request-body-name: body
/blocks/seq/{from}/{to}:
get:
tags:
- blocks
summary: Seq
description: Get block at specified heights
operationId: seq_2
parameters:
- name: from
in: path
description: Start block height
required: true
schema:
type: integer
- name: to
in: path
description: End block height
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/utils/time:
get:
tags:
- utils
summary: Time
description: Current Node time (UTC)
operationId: time
responses:
200:
description: Json with time or error
content: {}
/contract/broadcast/execute:
post:
tags:
- contract
summary: Broadcasts a signed execute contract function transaction
operationId: signedExecute
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedExecuteContractFunctionRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
/utils/hash/fast:
post:
tags:
- utils
summary: Hash
description: Return FastCryptographicHash of specified message
operationId: hashFast
requestBody:
description: Message to hash
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 'Json with error or json like {"message": "your message","hash":
"your message hash"}'
content: {}
x-codegen-request-body-name: message
/blocks/first:
get:
tags:
- blocks
summary: First
description: Get genesis block data
operationId: first
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/peers/blacklisted:
get:
tags:
- peers
summary: Blacklisted peers list
description: Blacklisted peers list
operationId: blacklistedPeers
responses:
200:
description: Json with blacklisted peers or error
content: {}
/debug/blocks/{howMany}:
get:
tags:
- debug
summary: Blocks
description: Get sizes and full hashes for last blocks
operationId: blocks
parameters:
- name: howMany
in: path
description: How many last blocks to take
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
security:
- api_key: []
/utils/seed:
get:
tags:
- utils
summary: Seed
description: Generate random seed
operationId: seedRoute
responses:
200:
description: Json with peer list or error
content: {}
/contract/tokenInfo/{tokenId}:
get:
tags:
- contract
summary: Token's Info
description: Token's info by given token
operationId: tokenInfo
parameters:
- name: tokenId
in: path
description: Token ID
required: true
schema:
type: string
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/debug/blacklist:
post:
tags:
- debug
summary: Blacklist given peer
description: Moving peer to blacklist
operationId: blacklist
requestBody:
description: IP address of node
content:
'*/*':
schema:
type: string
required: true
responses:
200:
description: 200 if success, 404 if there are no peer with such address
content: {}
security:
- api_key: []
x-codegen-request-body-name: address
/debug/portfolios/{address}:
get:
tags:
- debug
summary: Portfolio
description: Get current portfolio considering pessimistic transactions in the
UTX pool
operationId: portfolios
parameters:
- name: address
in: path
description: An address of portfolio
required: true
schema:
type: string
- name: considerUnspent
in: query
description: Taking into account pessimistic transactions from UTX pool
schema:
type: boolean
default: true
responses:
200:
description: Json portfolio
content: {}
security:
- api_key: []
/addresses/balance/{address}/{confirmations}:
get:
tags:
- addresses
summary: Confirmed balance
description: Balance of {address} after {confirmations}
operationId: balanceWithConfirmations
parameters:
- name: address
in: path
description: Address
required: true
schema:
type: string
- name: confirmations
in: path
description: "0"
required: true
schema:
type: integer
responses:
200:
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/Function1RequestContextFutureRouteResult'
/contract/broadcast/register:
post:
tags:
- contract
summary: Broadcasts a signed register contract transaction
operationId: signedRegister
requestBody:
description: Json with data
content:
application/json:
schema:
$ref: '#/components/schemas/SignedRegisterContractRequest'
required: true
responses:
200:
description: Json with response or error
content: {}
x-codegen-request-body-name: body
components:
schemas:
Function1:
type: object
Function1RequestContextFutureRouteResult:
type: object
BlockCheckpoint:
required:
- height
type: object
properties:
height:
type: integer
format: int32
signature:
type: string
Checkpoint:
required:
- items
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/BlockCheckpoint'
signature:
type: string
SignedMessage:
required:
- message
- publickey
- signature
type: object
properties:
message:
type: string
signature:
type: string
publickey:
type: string
RegisterContractRequest:
required:
- contract
- fee
- feeScale
- initData
- sender
type: object
properties:
sender:
type: string
description: Base58 encoded sender address
contract:
type: string
description: Base58 encoded contract
initData:
type: string
description: Base58 encoded init data
description:
type: string
description: Description of contract
fee:
type: integer
format: int64
example: 10000000000
feeScale:
type: integer
format: int32
example: 100
ExecuteContractFunctionRequest:
required:
- contractId
- fee
- feeScale
- functionData
- functionIndex
- sender
type: object
properties:
sender:
type: string
description: Base58 encoded sender address
contractId:
type: string
description: Base58 encoded contract id
functionIndex:
type: integer
format: int32
functionData:
type: string
description: Base58 encoded function data
attachment:
type: string
description: Base58 encoded attachment of contract
fee:
type: integer
format: int64
example: 30000000
feeScale:
type: integer
format: int32
example: 100
SignedExecuteContractFunctionRequest:
required:
- contractId
- fee
- feeScale
- functionData
- functionIndex
- senderPublicKey
- signature
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
contractId:
type: string
description: Base58 encoded contract id
functionIndex:
type: integer
format: int32
functionData:
type: string
description: Base58 encoded function data
attachment:
type: string
description: Base58 encoded attachment
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
timestamp:
type: integer
format: int64
signature:
type: string
SignedRegisterContractRequest:
required:
- contract
- fee
- feeScale
- initData
- senderPublicKey
- signature
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
contract:
type: string
description: Base58 encoded contract
initData:
type: string
description: Base58 encoded init data
description:
type: string
description: Description of contract
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
timestamp:
type: integer
format: int64
signature:
type: string
SignedDbPutRequest:
required:
- dataType
- dbKey
- fee
- feeScale
- senderPublicKey
- signature
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
dbKey:
type: string
description: name
dataType:
type: string
description: dataType
data:
type: string
description: data
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
timestamp:
type: integer
format: int64
signature:
type: string
DbPutRequest:
required:
- dataType
- dbKey
- fee
- feeScale
- sender
type: object
properties:
sender:
type: string
description: Base58 encoded sender address
dbKey:
type: string
description: name
dataType:
type: string
description: dataType
data:
type: string
description: data
fee:
type: integer
format: int64
example: 100000000
feeScale:
type: integer
format: int32
example: 100
RollbackParams:
required:
- returnTransactionsToUtx
- rollbackTo
type: object
properties:
rollbackTo:
type: integer
format: int32
returnTransactionsToUtx:
type: boolean
LeaseRequest:
required:
- amount
- fee
- feeScale
- recipient
- sender
type: object
properties:
sender:
type: string
description: Base58 encoded sender public key
amount:
type: integer
format: int64
fee:
type: integer
format: int64
example: 10000000
feeScale:
type: integer
format: int32
example: 100
recipient:
type: string
description: Recipient address
LeaseCancelRequest:
required:
- fee
- feeScale
- sender
- txId
type: object
properties:
sender:
type: string
description: Base58 encoded sender public key
txId:
type: string
description: Base58 encoded lease transaction id
fee:
type: integer
format: int64
example: 10000000
feeScale:
type: integer
format: int32
example: 100
SignedLeaseRequest:
required:
- amount
- fee
- feeScale
- recipient
- senderPublicKey
- signature
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
amount:
type: integer
format: int64
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
recipient:
type: string
description: Recipient address
timestamp:
type: integer
format: int64
signature:
type: string
SignedLeaseCancelRequest:
required:
- fee
- feeScale
- senderPublicKey
- signature
- timestamp
- txId
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
txId:
type: string
description: Base58 encoded lease transaction id
timestamp:
type: integer
format: int64
signature:
type: string
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
PaymentRequest:
required:
- amount
- fee
- feeScale
- recipient
- sender
type: object
properties:
amount:
type: integer
format: int64
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
sender:
type: string
description: Base58 encoded sender
attachment:
type: string
description: Base58 encoded attachment
recipient:
type: string
description: Recipient address
signedPaymentTransaction:
required:
- amount
- fee
- feeScale
- recipient
- senderPublicKey
- signature
- timestamp
type: object
properties:
timestamp:
type: integer
format: int64
amount:
type: integer
format: int64
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
recipient:
type: string
description: Recipient address
senderPublicKey:
type: string
description: Base58 encoded sender public key
attachment:
type: string
description: Base58 encoded attachment
signature:
type: string
ContendSlotsRequest:
required:
- fee
- feeScale
- sender
- slotId
type: object
properties:
sender:
type: string
description: Base58 encoded sender public key
slotId:
type: integer
format: int32
fee:
type: integer
format: int64
example: 5000000000000
feeScale:
type: integer
format: int32
example: 100
ReleaseSlotsRequest:
required:
- fee
- feeScale
- sender
- slotId
type: object
properties:
sender:
type: string
description: Base58 encoded sender public key
slotId:
type: integer
format: int32
fee:
type: integer
format: int64
example: 10000000
feeScale:
type: integer
format: int32
example: 100
SignedContendSlotsRequest:
required:
- fee
- feeScale
- senderPublicKey
- signature
- slotId
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
slotId:
type: integer
format: int32
timestamp:
type: integer
format: int64
signature:
type: string
SignedReleaseSlotsRequest:
required:
- fee
- feeScale
- senderPublicKey
- signature
- slotId
- timestamp
type: object
properties:
senderPublicKey:
type: string
description: Base58 encoded sender public key
fee:
type: integer
format: int64
feeScale:
type: integer
format: int32
slotId:
type: integer
format: int32
timestamp:
type: integer
format: int64
signature:
type: string
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment