Skip to content
Permalink
master
Switch branches/tags
Go to file
@kushti
Latest commit 6e0131f May 18, 2022 History
18 contributors

Users who have contributed to this file

@kushti @oskin1 @knizhnik @andyceo @catena2w @mike-aksarin @semyonoskin @pragmaxim @ross-weir @Tolsi @greenhat @daron666
openapi: "3.0.2"
info:
version: "4.0.29"
title: Ergo Node API
description: API docs for Ergo Node. Models are shared between all Ergo products
contact:
name: Ergo Platform Team
email: ergoplatform@protonmail.com
url: https://ergoplatform.org
license:
name: CC0 1.0 Universal
url: https://raw.githubusercontent.com/ergoplatform/ergo/master/LICENSE
servers:
- url: /
description: Local full node
- url: http://213.239.193.208:9053
description: Known public node
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: api_key
schemas:
# Objects
ErgoTransactionInput:
type: object
required:
- boxId
- spendingProof
properties:
boxId:
$ref: '#/components/schemas/TransactionBoxId'
spendingProof:
$ref: '#/components/schemas/SpendingProof'
ErgoTransactionDataInput:
type: object
required:
- boxId
properties:
boxId:
$ref: '#/components/schemas/TransactionBoxId'
ErgoTransactionUnsignedInput:
type: object
required:
- boxId
properties:
boxId:
$ref: '#/components/schemas/TransactionBoxId'
extension:
type: object
additionalProperties:
$ref: '#/components/schemas/SValue'
example:
'1': 'a2aed72ff1b139f35d1ad2938cb44c9848a34d4dcfd6d8ab717ebde40a7304f2541cf628ffc8b5c496e6161eba3f169c6dd440704b1719e0'
SpendingProof:
description: Spending proof for transaction input
type: object
required:
- proofBytes
- extension
properties:
proofBytes:
$ref: '#/components/schemas/SpendingProofBytes'
extension:
type: object
description: Variables to be put into context
additionalProperties:
$ref: '#/components/schemas/SValue'
example:
'1': 'a2aed72ff1b139f35d1ad2938cb44c9848a34d4dcfd6d8ab717ebde40a7304f2541cf628ffc8b5c496e6161eba3f169c6dd440704b1719e0'
SerializedBox:
type: object
required:
- boxId
- bytes
properties:
boxId:
$ref: '#/components/schemas/TransactionBoxId'
bytes:
$ref: '#/components/schemas/HexString'
ScriptBytes:
type: object
required:
- bytes
properties:
bytes:
$ref: '#/components/schemas/HexString'
ErgoTransactionOutput:
type: object
required:
- value
- ergoTree
- additionalRegisters
- creationHeight
properties:
boxId:
$ref: '#/components/schemas/TransactionBoxId'
value:
description: Amount of Ergo token
type: integer
format: int64
minimum: 0
example: 147
ergoTree:
$ref: '#/components/schemas/ErgoTree'
creationHeight:
description: Height the output was created at
type: integer
format: int32
example: 9149
assets:
description: Assets list in the transaction
type: array
items:
$ref: '#/components/schemas/Asset'
additionalRegisters:
$ref: '#/components/schemas/Registers'
transactionId:
$ref: '#/components/schemas/TransactionId'
index:
description: Index in the transaction outputs
type: integer
format: int32
WalletBox:
type: object
required:
- box
- confirmationsNum
- address
- creationTransaction
- onchain
- creationOutIndex
- spendingTransaction
- spendingHeight
- inclusionHeight
- spent
- scans
properties:
box:
$ref: '#/components/schemas/ErgoTransactionOutput'
confirmationsNum:
description: Number of confirmations, if the box is included into the blockchain
type: integer
format: int32
minimum: 0
example: 147
nullable: true
address:
$ref: '#/components/schemas/ErgoAddress'
creationTransaction:
description: Transaction which created the box
$ref: '#/components/schemas/ModifierId'
spendingTransaction:
description: Transaction which created the box
nullable: true
$ref: '#/components/schemas/ModifierId'
spendingHeight:
description: The height the box was spent at
type: integer
format: int32
minimum: 0
example: 147
nullable: true
inclusionHeight:
description: The height the transaction containing the box was included in a block at
type: integer
format: int32
minimum: 0
example: 147
onchain:
description: A flag signalling whether the box is created on main chain
type: boolean
example: true
spent:
description: A flag signalling whether the box was spent
type: boolean
example: false
creationOutIndex:
description: An index of a box in the creating transaction
type: integer
format: int32
example: 2
scans:
description: Scan identifiers the box relates to
type: array
items:
type: integer
example: 1
default: 1
UnsignedErgoTransaction:
type: object
description: Unsigned Ergo transaction
required:
- inputs
- dataInputs
- outputs
properties:
id:
$ref: '#/components/schemas/TransactionId'
inputs:
description: Unsigned inputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionUnsignedInput'
dataInputs:
description: Data inputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionDataInput'
outputs:
description: Outputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionOutput'
ErgoTransaction:
type: object
description: Ergo transaction
required:
- inputs
- dataInputs
- outputs
properties:
id:
$ref: '#/components/schemas/TransactionId'
inputs:
description: Inputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionInput'
dataInputs:
description: Data inputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionDataInput'
outputs:
description: Outputs of the transaction
type: array
items:
$ref: '#/components/schemas/ErgoTransactionOutput'
size:
description: Size in bytes
type: integer
format: int32
WalletTransaction:
type: object
description: Transaction augmented with some useful information
required:
- inputs
- dataInputs
- outputs
- inclusionHeight
- numConfirmations
- scans
properties:
id:
$ref: '#/components/schemas/TransactionId'
inputs:
description: Transaction inputs
type: array
items:
$ref: '#/components/schemas/ErgoTransactionInput'
dataInputs:
description: Transaction data inputs
type: array
items:
$ref: '#/components/schemas/ErgoTransactionDataInput'
outputs:
description: Transaction outputs
type: array
items:
$ref: '#/components/schemas/ErgoTransactionOutput'
inclusionHeight:
description: Height of a block the transaction was included in
type: integer
format: int32
example: 20998
numConfirmations:
description: Number of transaction confirmations
type: integer
format: int32
example: 20998
scans:
description: Scan identifiers the transaction relates to
type: array
items:
type: integer
example: 1
default: 1
size:
description: Size in bytes
type: integer
format: int32
ErgoAddress:
description: Encoded Ergo Address
type: string
example: '3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt'
RewardAddress:
type: object
required:
- rewardAddress
properties:
rewardAddress:
$ref: '#/components/schemas/ErgoAddress'
RewardPubKey:
type: object
required:
- rewardPubkey
properties:
rewardPubkey:
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
DlogSecret:
description: Hex-encoded big-endian 256-bits secret exponent
type: string
example: '433080ff80d0d52d7f8bfffff47f00807f44f680000949b800007f7f7ff1017f'
DhtSecret:
description: Hex-encoded big-endian 256-bits secret exponent "w" along with generators "g", "h", and group
elements "u", "v", such as g^w = u, h^w = v
type: object
required:
- secret
- g
- h
- u
- v
properties:
secret:
description: Hex-encoded big-endian 256-bits secret exponent
type: string
example: '433080ff80d0d52d7f8bfffff47f00807f44f680000949b800007f7f7ff1017f'
g:
description: Hex-encoded "g" generator for the Diffie-Hellman tuple (secp256k1 curve point)
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
h:
description: Hex-encoded "h" generator for the Diffie-Hellman tuple (secp256k1 curve point)
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
u:
description: Hex-encoded "u" group element of the Diffie-Hellman tuple (secp256k1 curve point)
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
v:
description: Hex-encoded "v" group element of the Diffie-Hellman tuple (secp256k1 curve point)
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
TransactionSigningRequest:
description: A request to sign a transaction with secrets provided
type: object
required:
- tx
- secrets
properties:
tx:
description: Unsigned transaction to sign
type: object
$ref: '#/components/schemas/UnsignedErgoTransaction'
inputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
dataInputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
hints:
description: Optional list of hints used for signing
$ref: '#/components/schemas/TransactionHintsBag'
secrets:
description: Secrets used for signing
type: object
properties:
dlog:
description: Sequence of secret exponents (DLOG secrets)
type: array
items:
$ref: '#/components/schemas/DlogSecret'
dht:
description: Sequence of secret Diffie-Hellman tuple exponents (DHT secrets)
type: array
items:
$ref: '#/components/schemas/DhtSecret'
AddressHolder:
description: Holds encoded ErgoAddress
type: object
required:
- address
properties:
address:
$ref: '#/components/schemas/ErgoAddress'
BoxesRequestHolder:
description: Holds request for wallet boxes
type: object
required:
- targetAssets
- targetBalance
properties:
targetAssets:
description: Target assets
type: array
items:
description: Pair of TokenId and Long
type: array
minItems: 2
maxItems: 2
items:
description: TokenId or Long
anyOf:
- description: TokenId
type: string
- description: Long
type: integer
targetBalance:
description: Target balance
type: integer
format: int64
RequestsHolder:
description: Holds many transaction requests and transaction fee
type: object
required:
- requests
properties:
requests:
description: Sequence of transaction requests
type: array
items:
anyOf:
- $ref: '#/components/schemas/PaymentRequest'
- $ref: '#/components/schemas/BurnTokensRequest'
- $ref: '#/components/schemas/AssetIssueRequest'
fee:
description: Transaction fee
type: integer
format: int64
example: 1000000
inputsRaw:
description: List of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
dataInputsRaw:
description: List of data inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
SourceHolder:
type: object
required:
- source
properties:
source:
description: Sigma source to be compiled
type: string
ErgoLikeTransaction:
type: object
required:
- id
- inputs
- dataInputs
- outputs
properties:
id:
type: object
$ref: '#/components/schemas/ModifierId'
inputs:
type: array
items:
$ref: '#/components/schemas/ErgoTransactionInput'
dataInputs:
type: array
items:
$ref: '#/components/schemas/ErgoTransactionDataInput'
outputs:
type: array
items:
$ref: '#/components/schemas/ErgoTransactionOutput'
SigmaHeader:
type: object
description: Block header format used for sigma ErgoLikeContext
required:
- timestamp
- version
- adProofsRoot
- stateRoot
- transactionsRoot
- nBits
- extensionHash
- height
- parentId
- votes
properties:
id:
$ref: '#/components/schemas/ModifierId'
timestamp:
$ref: '#/components/schemas/Timestamp'
version:
$ref: '#/components/schemas/Version'
adProofsRoot:
$ref: '#/components/schemas/Digest32'
adProofsId:
$ref: '#/components/schemas/ModifierId'
stateRoot:
$ref: '#/components/schemas/AvlTreeData'
transactionsRoot:
$ref: '#/components/schemas/Digest32'
transactionsId:
$ref: '#/components/schemas/ModifierId'
nBits:
type: integer
format: int64
minimum: 0
example: 19857408
extensionHash:
$ref: '#/components/schemas/Digest32'
extensionRoot:
$ref: '#/components/schemas/Digest32'
extensionId:
$ref: '#/components/schemas/ModifierId'
height:
type: integer
format: int32
minimum: 0
example: 667
size:
type: integer
format: int32
minimum: 0
example: 667
parentId:
$ref: '#/components/schemas/ModifierId'
powSolutions:
$ref: '#/components/schemas/PowSolutions'
votes:
$ref: '#/components/schemas/Votes'
minerPk:
type: string
example: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"
powOnetimePk:
type: string
example: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"
powNonce:
$ref: '#/components/schemas/Digest32'
powDistance:
type: number
description: sigma.BigInt
example: 123456789
PreHeader:
type: object
required:
- timestamp
- version
- nBits
- height
- parentId
- votes
properties:
timestamp:
$ref: '#/components/schemas/Timestamp'
version:
$ref: '#/components/schemas/Version'
nBits:
type: integer
format: int64
minimum: 0
example: 19857408
height:
type: integer
format: int32
minimum: 0
example: 667
parentId:
$ref: '#/components/schemas/ModifierId'
votes:
$ref: '#/components/schemas/Votes'
minerPk:
type: string
example: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"
AvlTreeData:
required:
- digest
properties:
digest:
$ref: '#/components/schemas/Digest32'
treeFlags:
type: integer
format: int32
keyLength:
type: integer
format: int32
valueLength:
type: integer
format: int32
nullable: true
ErgoLikeContext:
required:
- lastBlockUtxoRoot
- headers
- preHeader
- dataBoxes
- boxesToSpend
- spendingTransaction
- selfIndex
- extension
- validationSettings
- costLimit
- initCost
properties:
lastBlockUtxoRoot:
type: object
description: state root before current block application
$ref: '#/components/schemas/AvlTreeData'
headers:
type: array
description: fixed number of last block headers in descending order (first header is the newest one)
items:
$ref: '#/components/schemas/SigmaHeader'
preHeader:
type: object
description: fields of block header with the current `spendingTransaction`, that can be predicted by a miner before its formation
$ref: '#/components/schemas/PreHeader'
dataBoxes:
type: array
description: boxes, that corresponds to id's of `spendingTransaction.dataInputs`
items:
type: ErgoBox
$ref: '#/components/schemas/ErgoTransactionOutput'
boxesToSpend:
type: array
description: boxes, that corresponds to id's of `spendingTransaction.inputs`
items:
type: ErgoBox
$ref: '#/components/schemas/ErgoTransactionOutput'
spendingTransaction:
type: object
description: transaction that contains `self` box
$ref: '#/components/schemas/ErgoLikeTransaction'
selfIndex:
type: integer
format: int64
description: index of the box in `boxesToSpend` that contains the script we're evaluating
extension:
type: object
description: prover-defined key-value pairs, that may be used inside a script
validationSettings:
type: string
description: validation parameters passed to Interpreter.verify to detect soft-fork conditions
example: "10e8070001e9070001ea070001eb070001ec070001ed070001ee070001ef070001f0070001f1070001f2070001f3070001f4070001f5070001f6070001f7070001"
costLimit:
type: integer
format: int64
description: hard limit on accumulated execution cost, if exceeded lead to CostLimitException to be thrown
initCost:
type: integer
format: int64
description: initial value of execution cost already accumulated before Interpreter.verify is called
ExecuteScript:
type: object
required:
- script
- namedConstants
- context
properties:
script:
description: Sigma script to be executed
type: string
namedConstants:
description: Environment for compiler
type: object
nullable: true
context:
description: Interpreter context
type: object
nullable: true
$ref: '#/components/schemas/ErgoLikeContext'
SigmaBoolean:
description: Algebraic data type of sigma proposition expressions
required:
- op
properties:
op:
type: integer
description: Sigma opCode
format: int8
h:
$ref: '#/components/schemas/HexString'
g:
$ref: '#/components/schemas/HexString'
u:
$ref: '#/components/schemas/HexString'
v:
$ref: '#/components/schemas/HexString'
condition:
type: boolean
SigmaBooleanAndPredicate:
allOf:
- $ref: '#/components/schemas/SigmaBoolean'
- type: object
- required:
- args
- properties:
args:
type: array
items:
$ref: '#/components/schemas/SigmaBoolean'
SigmaBooleanOrPredicate:
allOf:
- $ref: '#/components/schemas/SigmaBoolean'
- type: object
- required:
- args
- properties:
args:
type: array
items:
$ref: '#/components/schemas/SigmaBoolean'
SigmaBooleanThresholdPredicate:
allOf:
- $ref: '#/components/schemas/SigmaBoolean'
- type: object
- required:
- args
- properties:
args:
type: array
items:
$ref: '#/components/schemas/SigmaBoolean'
CryptoResult:
description: Result of executeWithContext request (reduceToCrypto)
type: object
required:
- value
- cost
properties:
value:
description: value of SigmaProp type which represents a statement verifiable via sigma protocol
$ref: '#/components/schemas/SigmaBoolean'
cost:
description: Estimated cost of contract execution
type: integer
format: int64
example:
value:
op: -45
condition: true
cost: 10
ScanningPredicate:
type: object
required:
- predicate
properties:
predicate:
type: string
ContainsPredicate:
allOf:
- $ref: '#/components/schemas/ScanningPredicate'
- type: object
- required:
- bytes
- properties:
register:
type: string
bytes:
type: string
EqualsPredicate:
allOf:
- $ref: '#/components/schemas/ScanningPredicate'
- type: object
- required:
- bytes
- properties:
register:
type: string
bytes:
type: string
ContainsAssetPredicate:
allOf:
- $ref: '#/components/schemas/ScanningPredicate'
- type: object
- required:
- assetId
- properties:
assetId:
type: string
AndPredicate:
allOf:
- $ref: '#/components/schemas/ScanningPredicate'
- type: object
- required:
- args
- properties:
args:
type: array
items:
$ref: '#/components/schemas/ScanningPredicate'
OrPredicate:
allOf:
- $ref: '#/components/schemas/ScanningPredicate'
- type: object
- required:
- args
- properties:
args:
type: array
items:
$ref: '#/components/schemas/ScanningPredicate'
ScanRequest:
type: object
properties:
scanName:
type: string
removeOffchain:
type: boolean
walletInteraction:
type: string
enum: [off, shared, forced]
trackingRule:
$ref: '#/components/schemas/ScanningPredicate'
example:
scanName: Assets Tracker
walletInteraction: off
removeOffchain: true
trackingRule:
predicate: containsAsset
assetId: 02dada811a888cd0dc7a0a41739a3ad9b0f427741fe6ca19700cf1a51200c96bf7
Scan:
type: object
properties:
scanName:
type: string
scanId:
type: integer
walletInteraction:
type: string
enum: [off, shared, forced]
removeOffchain:
type: boolean
trackingRule:
$ref: '#/components/schemas/ScanningPredicate'
example:
scanId: 2
scanName: Assets Tracker
walletInteraction: off
removeOffchain: true
trackingRule:
predicate: containsAsset
assetId: 02dada811a888cd0dc7a0a41739a3ad9b0f427741fe6ca19700cf1a51200c96bf7
ScanId:
type: object
properties:
scanId:
type: integer
ScanIdBoxId:
type: object
required:
- scanId
- boxId
properties:
scanId:
type: integer
boxId:
$ref: '#/components/schemas/TransactionBoxId'
ScanIdsBox:
description: Ergo box with associated scans (their respective identifiers)
type: object
required:
- scanIds
- box
properties:
scanIds:
type: array
items:
type: integer
box:
$ref: '#/components/schemas/ErgoTransactionOutput'
DlogCommitment:
description: Randomness and commitment for the first step of the Schnorr protocol
type: object
required:
- r
- a
properties:
r:
description: Hex-encoded big-endian 256-bits secret exponent
type: string
example: '433080ff80d0d52d7f8bfffff47f00807f44f680000949b800007f7f7ff1017f'
a:
description: Hex-encoded "g" generator for the Diffie-Hellman tuple (secp256k1 curve point)
type: string
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
HintExtractionRequest:
description: request to extract prover hints from a transaction
type: object
required:
- tx
- real
- simulated
properties:
tx:
description: Transaction to extract prover hints from
$ref: '#/components/schemas/ErgoTransaction'
real:
description: Real signers of the transaction
type: array
items:
$ref: '#/components/schemas/SigmaBoolean'
simulated:
description: Simulated signers of the transaction
type: array
items:
$ref: '#/components/schemas/SigmaBoolean'
inputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
dataInputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
Commitment:
description: basic trait for prover commitments
type: object
required:
- hint
- pubkey
- position
- cmtType
- a
properties:
hint:
type: string
enum: [cmtWithSecret, cmtReal, cmtSimulated]
pubkey:
$ref: '#/components/schemas/SigmaBoolean'
position:
type: string
type:
type: string
enum: [dlog, dht]
a:
description: a group element of the commitment
type: string
b:
description: b group element of the commitment (needed for DHT protocol only)
type: string
CommitmentWithSecret:
description: commitment to secret along with secret (!) randomness
allOf: # Combines the Commitment and the inline model
- $ref: '#/components/schemas/Commitment'
type: object
required:
- secret
properties:
secret:
type: string
SecretProven:
type: object
required:
- hint
- challenge
- pubkey
- proof
- position
properties:
hint:
type: string
enum: [proofReal, proofSimulated]
challenge:
type: string
pubkey:
$ref: '#/components/schemas/SigmaBoolean'
proof:
type: string
position:
type: string
InputHints:
description: hints for inputs, key is input index, values is a set of hints for the input
type: object
additionalProperties:
type: array
items:
oneOf:
- $ref: '#/components/schemas/CommitmentWithSecret'
- $ref: '#/components/schemas/Commitment'
- $ref: '#/components/schemas/SecretProven'
discriminator:
propertyName: objectType
mapping:
cmtWithSecret: '#/components/schemas/CommitmentWithSecret'
cmtReal: '#/components/schemas/Commitment'
cmtSimulated: '#/components/schemas/Commitment'
proofReal: '#/components/schemas/SecretProven'
proofSimulated: '#/components/schemas/SecretProven'
example:
"01": [
{
"hint": "cmtWithSecret",
"pubkey": {
"op": -51,
"h": "0327e65711a59378c59359c3e1d0f7abe906479eccb76094e50fe79d743ccc15e6"
},
"position": "0-1",
"type": "dlog",
"a": "02924d6274d1b9132fe028a0e3ac2fdbc503a1e52d1398932fa5f1bcf71909eb4b",
"secret": "42a2a0ae6b98ee791ac9734252e8a7a08e691b92de085138e302f64a722a4300"
}]
TransactionHintsBag:
description: prover hints extracted from a transaction
type: object
properties:
secretHints:
description: Hints which contain secrets, do not share them!
type: array
items:
$ref: '#/components/schemas/InputHints'
publicHints:
description: Hints which contain public data only, share them freely!
type: array
items:
$ref: '#/components/schemas/InputHints'
GenerateCommitmentsRequest:
description: request to generate commitments to sign a transaction
type: object
required:
- tx
properties:
tx:
description: Unsigned transaction to sign
type: object
$ref: '#/components/schemas/UnsignedErgoTransaction'
secrets:
description: Optionally, external secrets used for signing
type: object
properties:
dlog:
description: Sequence of secret exponents (DLOG secrets)
type: array
items:
$ref: '#/components/schemas/DlogSecret'
dht:
description: Sequence of secret Diffie-Hellman tuple exponents (DHT secrets)
type: array
items:
$ref: '#/components/schemas/DhtSecret'
inputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
dataInputsRaw:
description: Optional list of inputs to be used in serialized form
type: array
items:
type: string
description: hex-encoded serialized box bytes
PaymentRequest:
description: Request for generation of payment transaction to a given address
type: object
required:
- address
- value
properties:
address:
$ref: '#/components/schemas/ErgoAddress'
value:
description: Payment amount
type: integer
format: int64
example: 1
assets:
description: Assets list in the transaction
type: array
items:
$ref: '#/components/schemas/Asset'
registers:
$ref: '#/components/schemas/Registers'
BurnTokensRequest:
description: Request for burning tokens in wallet
type: object
required:
- assetsToBurn
properties:
assetsToBurn:
description: Assets list to burn in the transaction
type: array
items:
$ref: '#/components/schemas/Asset'
AssetIssueRequest:
description: Request for generation of asset issue transaction
type: object
required:
- amount
- name
- description
- decimals
properties:
address:
description: Optional, first address in the wallet will be used if not defined
$ref: '#/components/schemas/ErgoAddress'
ergValue:
description: Optional, amount of ergs to be put into box with issued assets
format: int64
type: integer
amount:
description: Supply amount
type: integer
format: int64
example: 1000000
name:
description: Assets name
type: string
example: 'TST'
description:
description: Assets description
type: string
example: 'Test token'
decimals:
description: Number of decimal places
type: integer
format: int32
example: 8
registers:
description: Optional, possible values for registers R7...R9
$ref: '#/components/schemas/Registers'
FullBlock:
description: Block with header and transactions
type: object
required:
- header
- blockTransactions
- adProofs
- extension
- size
properties:
header:
$ref: '#/components/schemas/BlockHeader'
blockTransactions:
$ref: '#/components/schemas/BlockTransactions'
adProofs:
$ref: '#/components/schemas/BlockADProofs'
extension:
$ref: '#/components/schemas/Extension'
size:
description: Size in bytes
type: integer
format: int32
PowSolutions:
description: An object containing all components of pow solution
type: object
required:
- pk
- w
- n
- d
properties:
pk:
type: string
description: Base16-encoded public key
example: '0350e25cee8562697d55275c96bb01b34228f9bd68fd9933f2a25ff195526864f5'
w:
type: string
example: '0366ea253123dfdb8d6d9ca2cb9ea98629e8f34015b1e4ba942b1d88badfcc6a12'
n:
type: string
example: '0000000000000000'
d:
type: number
example: 987654321
BlockHeaderWithoutPow:
type: object
required:
- id
- timestamp
- version
- adProofsRoot
- stateRoot
- transactionsRoot
- nBits
- extensionHash
- height
- difficulty
- parentId
- votes
properties:
id:
$ref: '#/components/schemas/ModifierId'
timestamp:
$ref: '#/components/schemas/Timestamp'
version:
$ref: '#/components/schemas/Version'
adProofsRoot:
$ref: '#/components/schemas/Digest32'
stateRoot:
$ref: '#/components/schemas/ADDigest'
transactionsRoot:
$ref: '#/components/schemas/Digest32'
nBits:
type: integer
format: int64
minimum: 0
example: 19857408
extensionHash:
$ref: '#/components/schemas/Digest32'
height:
type: integer
format: int32
minimum: 0
example: 667
difficulty:
type: integer
format: int32
minimum: 0
example: 62
parentId:
$ref: '#/components/schemas/ModifierId'
votes:
$ref: '#/components/schemas/Votes'
size:
description: Size in bytes
type: integer
format: int32
extensionId:
$ref: '#/components/schemas/ModifierId'
transactionsId:
$ref: '#/components/schemas/ModifierId'
adProofsId:
$ref: '#/components/schemas/ModifierId'
PopowHeader:
type: object
required:
- header
- interlinks
properties:
header:
$ref: '#/components/schemas/BlockHeader'
interlinks:
description: Array of header interlinks
type: array
items:
$ref: '#/components/schemas/ModifierId'
NipopowProof:
type: object
required:
- m
- k
- prefix
- suffixHead
- suffixTail
properties:
m:
description: security parameter (min μ-level superchain length)
type: number
k:
description: security parameter (min suffix length, >= 1)
type: number
prefix:
description: proof prefix headers
type: array
items:
$ref: '#/components/schemas/PopowHeader'
suffixHead:
$ref: '#/components/schemas/PopowHeader'
suffixTail:
description: tail of the proof suffix headers
type: array
items:
$ref: '#/components/schemas/BlockHeader'
BlockHeader:
type: object
required:
- id
- timestamp
- version
- adProofsRoot
- stateRoot
- transactionsRoot
- nBits
- extensionHash
- powSolutions
- height
- difficulty
- parentId
- votes
properties:
id:
$ref: '#/components/schemas/ModifierId'
timestamp:
$ref: '#/components/schemas/Timestamp'
version:
$ref: '#/components/schemas/Version'
adProofsRoot:
$ref: '#/components/schemas/Digest32'
stateRoot:
$ref: '#/components/schemas/ADDigest'
transactionsRoot:
$ref: '#/components/schemas/Digest32'
nBits:
type: integer
format: int64
minimum: 0
example: 19857408
extensionHash:
$ref: '#/components/schemas/Digest32'
powSolutions:
$ref: '#/components/schemas/PowSolutions'
height:
type: integer
format: int32
minimum: 0
example: 667
difficulty:
type: string
example: '9575989248'
parentId:
$ref: '#/components/schemas/ModifierId'
votes:
$ref: '#/components/schemas/Votes'
size:
description: Size in bytes
type: integer
format: int32
extensionId:
$ref: '#/components/schemas/ModifierId'
transactionsId:
$ref: '#/components/schemas/ModifierId'
adProofsId:
$ref: '#/components/schemas/ModifierId'
BlockTransactions:
type: object
required:
- headerId
- transactions
- size
properties:
headerId:
$ref: '#/components/schemas/ModifierId'
transactions:
$ref: '#/components/schemas/Transactions'
size:
description: Size in bytes
type: integer
format: int32
BlockADProofs:
type: object
required:
- headerId
- proofBytes
- digest
- size
properties:
headerId:
$ref: '#/components/schemas/ModifierId'
proofBytes:
$ref: '#/components/schemas/SerializedAdProof'
digest:
$ref: '#/components/schemas/Digest32'
size:
description: Size in bytes
type: integer
format: int32
Extension:
type: object
required:
- headerId
- digest
- fields
properties:
headerId:
$ref: '#/components/schemas/ModifierId'
digest:
$ref: '#/components/schemas/Digest32'
fields:
description: List of key-value records
type: array
nullable: true
items:
$ref: '#/components/schemas/KeyValueItem'
KeyValueItem:
type: array
items:
$ref: '#/components/schemas/HexString'
CandidateBlock:
type: object
nullable: true
description: Can be null if node is not mining or candidate block is not ready
required:
- extensionHash
- parentId
properties:
version:
type: integer
format: int8
example: 2
extensionHash:
$ref: '#/components/schemas/Digest32'
timestamp:
$ref: '#/components/schemas/Timestamp'
stateRoot:
$ref: '#/components/schemas/ADDigest'
nBits:
type: integer
format: int64
minimum: 0
example: 19857408
adProofBytes:
$ref: '#/components/schemas/SerializedAdProof'
parentId:
$ref: '#/components/schemas/ModifierId'
transactionsNumber:
type: integer
format: int32
example: 2
transactions:
$ref: '#/components/schemas/Transactions'
votes:
$ref: '#/components/schemas/Votes'
PassphraseMatch:
type: object
required:
- matched
properties:
matched:
type: boolean
description: true if passphrase matches wallet, false otherwise
WalletStatus:
description: Status of the node wallet
type: object
required:
- isInitialized
- isUnlocked
- changeAddress
- walletHeight
- error
properties:
isInitialized:
type: boolean
description: true if wallet is initialized, false otherwise
isUnlocked:
type: boolean
description: true if wallet is unlocked, false otherwise
changeAddress:
type: string
description: address to send change to. Empty when wallet is not initialized or locked.
By default change address correponds to root key address, could be set via
/wallet/updateChangeAddress method.
example: '3WzCFq7mkykKqi4Ykdk8BK814tkh6EsPmA42pQZxU2NRwSDgd6yB'
walletHeight:
type: integer
description: last scanned height for the wallet (and external scans)
error:
type: string
description: last wallet error caught
InitWallet:
type: object
required:
- pass
properties:
pass:
type: string
description: Password to encrypt wallet file with
mnemonicPass:
type: string
description: Optional pass to password-protect mnemonic seed
InitWalletResult:
type: object
required:
- mnemonic
properties:
mnemonic:
type: string
description: Mnemonic seed phrase
RestoreWallet:
type: object
required:
- pass
- mnemonic
properties:
pass:
type: string
description: Password to encrypt wallet file with
mnemonic:
type: string
description: Mnemonic seed
mnemonicPass:
type: string
description: Optional pass to password-protect mnemonic seed
CheckWallet:
type: object
required:
- mnemonic
properties:
mnemonic:
type: string
description: Mnemonic seed (optional)
mnemonicPass:
type: string
description: Optional pass to password-protect mnemonic seed
UnlockWallet:
type: object
required:
- pass
properties:
pass:
type: string
description: Password to decrypt wallet file with
DeriveKey:
type: object
required:
- derivationPath
properties:
derivationPath:
type: string
description: Derivation path for a new secret to derive
example: 'm/1/2'
DeriveKeyResult:
type: object
required:
- address
properties:
address:
$ref: '#/components/schemas/ErgoAddress'
DeriveNextKeyResult:
type: object
required:
- derivationPath
- address
properties:
derivationPath:
type: string
description: Derivation path of the resulted secret
example: 'm/1/2'
address:
$ref: '#/components/schemas/ErgoAddress'
MerkleProof:
type: object
description: Merkle proof for a leaf, which is an array of bytes (e.g. a transaction identifier)
required:
- leaf
- levels
properties:
leaf:
type: string
description: Base16-encoded Merkle tree leaf bytes
example: 'cd665e49c834b0c25574fcb19a158d836f3f2aad8e91ac195f972534c25449b3'
levels:
type: array
items:
type: array
description: pairs of hash and side of hash
example: ['018b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337', 0]
items:
anyOf:
- description: hash
type: string
- description: side of hash
type: integer
example: [['018b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337', 0]]
ProofOfUpcomingTransactions:
type: object
description: Proof that a block corresponding to given header without PoW contains some transactions
required:
- msgPreimage
- txProofs
properties:
msgPreimage:
type: string
description: Base16-encoded serialized header without Proof-of-Work
example: '0112e03c6d39d32509855be7cee9b62ff921f7a0cf6883e232474bd5b54d816dd056f846980d34c3b23098bdcf41222f8cdee5219224aa67750055926c3a2310a483accc4f9153e7a760615ea972ac67911cff111f8c17f563d6147205f58f85133ae695d1d4157e4aecdbbb29952cfa42b75129db55bddfce3bc53b8fd5b5465f10d8be8ddda62ed3b86afb0497ff2d381ed884bdae5287d20667def224a28d2b6e3ebfc78709780702c70bd8df0e000000'
txProofs:
type: array
description: Merkle proofs of transactions included into blocks (not necessarily all the block transactions)
items:
$ref: '#/components/schemas/MerkleProof'
WorkMessage:
description: Block candidate related data for external miner to perform work
type: object
required:
- msg
- b
- pk
properties:
msg:
type: string
description: Base16-encoded block header bytes without PoW solution
example: '0350e25cee8562697d55275c96bb01b34228f9bd68fd9933f2a25ff195526864f5'
b:
type: integer
description: Work target value
example: 987654321
pk:
type: string
description: Base16-encoded miner public key
example: '0350e25cee8562697d55275c96bb01b34228f9bd68fd9933f2a25ff195526864f5'
proof:
type: object
$ref: '#/components/schemas/ProofOfUpcomingTransactions'
Peer:
type: object
required:
- address
properties:
address:
type: string
example: '127.0.0.1:5673'
name:
type: string
example: mynode
nullable: true
lastSeen:
$ref: '#/components/schemas/Timestamp'
connectionType:
type: string
nullable: true
enum:
- Incoming
- Outgoing
PeersStatus:
type: object
required:
- lastIncomingMessage
- currentNetworkTime
properties:
lastIncomingMessage:
type: integer
allOf:
- $ref: '#/components/schemas/Timestamp'
currentNetworkTime:
type: integer
allOf:
- $ref: '#/components/schemas/Timestamp'
PeerMode:
type: object
required:
- state
- verifyingTransactions
- fullBlocksSuffix
properties:
state:
type: string
example: 'utxo'
verifyingTransactions:
type: boolean
example: true
fullBlocksSuffix:
type: integer
example: 2880
SyncInfo:
type: object
required:
- address
- mode
- version
- status
- height
properties:
address:
type: string
example: '127.0.0.1:5673'
mode:
type: object
description: Peer operating mode parameters
$ref: '#/components/schemas/PeerMode'
version:
type: string
example: '4.0.16'
status:
type: string
example: 'Older'
height:
type: integer
example: 65780
RequestedInfo:
type: object
required:
- checks
properties:
address:
type: string
example: '127.0.0.1:5673'
version:
type: string
example: '4.0.26'
checks:
type: integer
description: How many times we checked for modifier delivery status
example: 4
RequestedInfoByModifierId:
type: object
additionalProperties:
$ref: '#/components/schemas/RequestedInfo'
ConnectedPeer:
type: object
required:
- address
properties:
address:
type: string
example: '127.0.0.1:5673'
version:
type: string
example: '4.0.26'
lastMessage:
$ref: '#/components/schemas/Timestamp'
ConnectedPeerByModifierId:
type: object
additionalProperties:
$ref: '#/components/schemas/ConnectedPeer'
TrackInfo:
type: object
required:
- invalidModifierApproxSize
- requested
- received
properties:
invalidModifierApproxSize:
type: integer
example: 65780
requested:
type: object
description: Currently requested modifiers
additionalProperties:
$ref: '#/components/schemas/RequestedInfoByModifierId'
received:
type: object
description: Received modifiers
additionalProperties:
$ref: '#/components/schemas/ConnectedPeerByModifierId'
BlacklistedPeers:
type: object
required:
- addresses
properties:
addresses:
type: array
items:
type: string
description: Blacklisted node address
NodeInfo:
type: object
required:
- name
- appVersion
- fullHeight
- headersHeight
- bestFullHeaderId
- previousFullHeaderId
- bestHeaderId
- headersScore
- fullBlocksScore
- stateRoot
- stateType
- stateVersion
- isMining
- peersCount
- unconfirmedCount
- difficulty
- currentTime
- launchTime
- genesisBlockId
- parameters
properties:
name:
type: string
example: my-node-1
appVersion:
type: string
example: 0.0.1
fullHeight:
type: integer
format: int32
description: Can be 'null' if state is empty (no full block is applied since node launch)
minimum: 0
example: 667
nullable: true
headersHeight:
type: integer
format: int32
description: Can be 'null' if state is empty (no header applied since node launch)
minimum: 0
example: 667
nullable: true
bestFullHeaderId:
type: string
description: Can be 'null' if no full block is applied since node launch
nullable: true
allOf:
- $ref: '#/components/schemas/ModifierId'
previousFullHeaderId:
type: string
description: Can be 'null' if no full block is applied since node launch
nullable: true
allOf:
- $ref: '#/components/schemas/ModifierId'
bestHeaderId:
type: string
description: Can be 'null' if no header applied since node launch
nullable: true
allOf:
- $ref: '#/components/schemas/ModifierId'
stateRoot:
type: string
nullable: true
description: Can be 'null' if state is empty (no full block is applied since node launch)
example: 'dab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
stateType:
type: string
enum:
- digest
- utxo
stateVersion:
description: Can be 'null' if no full block is applied since node launch
type: string
example: 'fab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
nullable: true
isMining:
type: boolean
example: true
peersCount:
type: integer
description: Number of connected peers
format: int32
minimum: 0
example: 327
unconfirmedCount:
description: Current unconfirmed transactions count
type: integer
format: int32
minimum: 0
maximum: 10000
example: 327
difficulty:
type: integer
minimum: 0
nullable: true
example: 667
description: >
Difficulty on current bestFullHeaderId. Can be 'null' if no full block is applied since node launch.
Difficulty is a BigInt integer.
currentTime:
type: integer
description: Current internal node time
allOf:
- $ref: '#/components/schemas/Timestamp'
launchTime:
type: integer
description: Time when the node was started
allOf:
- $ref: '#/components/schemas/Timestamp'
headersScore:
type: integer
description: Can be 'null' if no headers is applied since node launch. headersScore is a BigInt integer.
nullable: true
fullBlocksScore:
type: integer
description: Can be 'null' if no full block is applied since node launch. fullBlocksScore is a BigInt integer.
nullable: true
genesisBlockId:
type: string
description: Can be 'null' if genesis blocks is not produced yet
nullable: true
allOf:
- $ref: '#/components/schemas/ModifierId'
parameters:
type: object
description: current parameters
$ref: '#/components/schemas/Parameters'
Parameters:
type: object
required:
- height
- blockVersion
- storageFeeFactor
- minValuePerByte
- maxBlockSize
- maxBlockCost
- tokenAccessCost
- inputCost
- dataInputCost
- outputCost
properties:
height:
type: integer
format: int32
description: Height when current parameters were considered(not actual height). Can be '0' if state is empty
minimum: 0
example: 667
nullable: false
storageFeeFactor:
type: integer
format: int32
description: Storage fee coefficient (per byte per storage period ~4 years)
minimum: 0
example: 100000
nullable: false
minValuePerByte:
type: integer
format: int32
description: Minimum value per byte of an output
minimum: 0
example: 360
nullable: false
maxBlockSize:
type: integer
format: int32
description: Maximum block size (in bytes)
minimum: 0
example: 1048576
nullable: false
maxBlockCost:
type: integer
format: int32
description: Maximum cumulative computational cost of input scripts in block transactions
minimum: 0
example: 104876
nullable: false
blockVersion:
$ref: '#/components/schemas/Version'
nullable: false
tokenAccessCost:
type: integer
format: int32
description: Validation cost of a single token
minimum: 0
example: 100
nullable: false
inputCost:
type: integer
format: int32
description: Validation cost per one transaction input
minimum: 0
example: 100
nullable: false
dataInputCost:
type: integer
format: int32
description: Validation cost per one data input
minimum: 0
example: 100
nullable: false
outputCost:
type: integer
format: int32
description: Validation cost per one transaction output
minimum: 0
example: 100
nullable: false
Version:
description: Ergo blockchain protocol version
type: integer
format: int8
example: 2
TransactionBoxId:
description: Base16-encoded transaction box id bytes. Should be 32 bytes long
type: string
format: base16
example: '1ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
TransactionId:
description: Base16-encoded transaction id bytes
type: string
format: base16
example: '2ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
ErgoTree:
description: Base16-encoded ergo tree bytes
type: string
format: base16
example: '0008cd0336100ef59ced80ba5f89c4178ebd57b6c1dd0f3d135ee1db9f62fc634d637041'
ErgoTreeObject:
type: object
properties:
tree:
type: string
description: serialized Ergo tree
example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3'
Transactions:
description: Ergo transaction objects
type: array
items:
$ref: '#/components/schemas/ErgoTransaction'
FeeHistogramBin:
description: Fee histogram bin
type: object
properties:
nTxns:
type: integer
format: int32
totalFee:
type: integer
format: int64
FeeHistogram:
description: Fee histogram for transactions in mempool
type: array
items:
$ref: '#/components/schemas/FeeHistogramBin'
Asset:
description: Token detail in the transaction
type: object
required:
- tokenId
- amount
properties:
tokenId:
$ref: '#/components/schemas/Digest32'
amount:
description: Amount of the token
type: integer
format: int64
example: 1000
Registers:
description: Ergo box registers
type: object
additionalProperties:
$ref: '#/components/schemas/SValue'
example:
R4: '100204a00b08cd0336100ef59ced80ba5f89c4178ebd57b6c1dd0f3d135ee1db9f62fc634d637041ea02d192a39a8cc7a70173007301'
SValue:
description: Base-16 encoded serialized Sigma-state value
type: string
format: base16
example: '100204a00b08cd0336100ef59ced80ba5f89c4178ebd57b6c1dd0f3d135ee1db9f62fc634d637041ea02d192a39a8cc7a70173007301'
Votes:
description: Base16-encoded votes for a soft-fork and parameters
type: string
format: base16
example: '000000'
ModifierId:
description: Base16-encoded 32 byte modifier id
type: string
format: base16
example: '3ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
Digest32:
description: Base16-encoded 32 byte digest
type: string
format: base16
example: '4ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
HexString:
description: Base16-encoded bytes
type: string
format: base16
example: '4ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
ADDigest:
description: Base16-encoded 33 byte digest - digest with extra byte with tree height
type: string
format: base16
example: '333ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
SerializedAdProof:
description: Base16-encoded ad proofs
type: string
format: base16
example: '3ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd1173ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd1173ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
SpendingProofBytes:
description: Base16-encoded spending proofs
type: string
format: base16
example: '4ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd1173ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd1173ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
BlockSignature:
description: Base16-encoded block signature
type: string
format: base16
example: '5ab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117'
Timestamp:
description: Basic timestamp definition
type: integer
format: int64
example: 1524143059077
EmissionInfo:
description: Emission info for height
type: object
properties:
minerReward:
type: integer
format: int64
totalCoinsIssued:
type: integer
format: int64
totalRemainCoins:
type: integer
format: int64
reemitted:
type: integer
format: int64
EmissionScripts:
description: Emission related scripts
type: object
properties:
emission:
type: string
reemission:
type: string
pay2Reemission:
type: string
BalancesSnapshot:
description: Amount of Ergo tokens and assets
type: object
required:
- height
- balance
properties:
height:
type: integer
format: int32
balance:
type: integer
format: int64
assets:
type: array
items:
$ref: '#/components/schemas/Asset'
AddressValidity:
description: Validity status of Ergo address
type: object
required:
- address
- isValid
properties:
address:
$ref: '#/components/schemas/ErgoAddress'
isValid:
type: boolean
error:
type: string
ApiError:
type: object
required:
- error
- reason
- detail
properties:
error:
type: integer
description: Error code
example: 500
reason:
type: string
description: String error code
example: 'Internal server error'
detail:
type: string
nullable: true
description: Detailed error description
paths:
/blocks:
get:
summary: Get the Array of header ids
operationId: getHeaderIds
tags:
- blocks
parameters:
- in: query
name: limit
required: false
description: The number of items in list to return
schema:
type: integer
format: int32
minimum: 10
maximum: 100
default: 50
- in: query
name: offset
required: false
description: The number of items in list to skip
schema:
type: integer
format: int32
default: 0
responses:
'200':
description: Array of header ids
content:
application/json:
schema:
type: array
description: Array of header ids
items:
type: string
example: '8b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337'
example: ['8b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337']
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
post:
summary: Send a mined block
operationId: sendMinedBlock
tags:
- blocks
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FullBlock'
responses:
'200':
description: Block is valid
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/at/{blockHeight}:
get:
summary: Get the header ids at a given height
operationId: getFullBlockAt
tags:
- blocks
parameters:
- in: path
name: blockHeight
required: true
description: Height of a wanted block
schema:
type: integer
format: int32
responses:
'200':
description: Array of header ids
content:
application/json:
schema:
type: array
description: Array of header ids
example: ['8b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337']
items:
type: string
example: '8b7ae20a4acd23e3f1bf38671ce97103ad96d8f1c780b5e5e865e4873ae16337'
'404':
description: Blocks at this height doesn't exist
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/chainSlice:
get:
summary: Get headers in a specified range
operationId: getChainSlice
tags:
- blocks
parameters:
- in: query
name: fromHeight
required: false
description: Min header height
schema:
type: integer
format: int32
default: 0
- in: query
name: toHeight
required: false
description: Max header height (best header height by default)
schema:
type: integer
format: int32
default: -1
responses:
'200':
description: Array of headers
content:
application/json:
schema:
type: array
description: Array of headers
items:
$ref: '#/components/schemas/BlockHeader'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/{headerId}:
get:
summary: Get the full block info by a given signature
operationId: getFullBlockById
tags:
- blocks
parameters:
# todo move out after full support aos3.0 was added to swagger-codegen
- in: path
name: headerId
required: true
description: ID of a wanted block
schema:
type: string
responses:
'200':
description: Block object
content:
application/json:
schema:
$ref: '#/components/schemas/FullBlock'
'404':
description: Block with this id doesn't exist
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/{headerId}/header:
get:
summary: Get the block header info by a given signature
operationId: getBlockHeaderById
tags:
- blocks
parameters:
# todo move out after full support aos3.0 was added to swagger-codegen
- in: path
name: headerId
required: true
description: ID of a wanted block header
schema:
type: string
responses:
'200':
description: Block header object
content:
application/json:
schema:
$ref: '#/components/schemas/BlockHeader'
'404':
description: Block with this id doesn't exist
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/{headerId}/transactions:
get:
summary: Get the block transactions info by a given signature
operationId: getBlockTransactionsById
tags:
- blocks
parameters:
# todo move out after full support aos3.0 was added to swagger-codegen
- in: path
name: headerId
required: true
description: ID of a wanted block transactions
schema:
type: string
responses:
'200':
description: Block transaction object
content:
application/json:
schema:
$ref: '#/components/schemas/BlockTransactions'
'404':
description: Block with this id doesn't exist
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/{headerId}/proofFor/{txId}:
get:
summary: Get Merkle proof for transaction
operationId: getProofForTx
tags:
- blocks
parameters:
- in: path
name: headerId
required: true
description: ID of a wanted block transactions
schema:
type: string
- in: path
name: txId
required: true
description: ID of a wanted transaction
schema:
type: string
responses:
'200':
description: Merkle proof object
content:
application/json:
schema:
$ref: '#/components/schemas/MerkleProof'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/lastHeaders/{count}:
get:
summary: Get the last headers objects
operationId: getLastHeaders
tags:
- blocks
parameters:
# todo move out after full support aos3.0 was added to swagger-codegen
- in: path
name: count
required: true
description: count of a wanted block headers
schema:
type: number
responses:
'200':
description: Array of block headers
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BlockHeader'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/blocks/modifier/{modifierId}:
get:
summary: Get the persistent modifier by its id
operationId: getModifierById
tags:
- blocks
parameters:
- in: path
name: modifierId
required: true
description: ID of a wanted modifier
schema:
type: string
responses:
'200':
description: Persistent modifier object
'404':
description: Modifier with this id doesn't exist
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/nipopow/popowHeaderById/{headerId}:
get:
summary: Construct PoPow header according to given header id
operationId: getPopowHeaderById
tags:
- nipopow
parameters:
- in: path
name: headerId
required: true
description: ID of wanted header
schema:
type: string
responses:
'200':
description: PoPow header object
content:
application/json:
schema:
$ref: '#/components/schemas/PopowHeader'
'404':
description: Header of extension of a corresponding block are not available
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/nipopow/popowHeaderByHeight/{height}:
get:
summary: Construct PoPow header for best header at given height
operationId: getPopowHeaderByHeight
tags:
- nipopow
parameters:
- in: path
name: height
required: true
description: Height of a wanted header
schema:
type: integer
format: int32
responses:
'200':
description: PoPow header object
content:
application/json:
schema:
$ref: '#/components/schemas/PopowHeader'
'404':
description: Header of extension of a corresponding block are not available
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/nipopow/proof/{minChainLength}/{suffixLength}:
get:
summary: Construct PoPoW proof for given min superchain length and suffix length
operationId: getPopowProof
tags:
- nipopow
parameters:
- in: path
name: minChainLength
required: true
description: Minimal superchain length
schema:
type: number
- in: path
name: suffixLength
required: true
description: Suffix length
schema:
type: number
responses:
'200':
description: Nipopow proof object
content:
application/json:
schema:
$ref: '#/components/schemas/NipopowProof'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/nipopow/proof/{minChainLength}/{suffixLength}/{headerId}:
get:
summary: Construct PoPoW proof for given min superchain length, suffix length and header ID
operationId: getPopowProofByHeaderId
tags:
- nipopow
parameters:
- in: path
name: minChainLength
required: true
description: Minimal superchain length
schema:
type: number
- in: path
name: suffixLength
required: true
description: Suffix length
schema:
type: number
- in: path
name: headerId
required: true
description: ID of wanted header
schema:
type: string
responses:
'200':
description: Nipopow proof object
content:
application/json:
schema:
$ref: '#/components/schemas/NipopowProof'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/info:
get:
summary: Get the information about the Node
operationId: getNodeInfo
tags:
- info
responses:
'200':
description: Node info object
content:
application/json:
schema:
$ref: '#/components/schemas/NodeInfo'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions:
post:
summary: Submit an Ergo transaction to unconfirmed pool to send it over the network
operationId: sendTransaction
tags:
- transactions
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ErgoTransaction'
responses:
'200':
description: JSON with ID of the new transaction
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionId'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions/check:
post:
summary: Checks an Ergo transaction without sending it over the network. Checks that transaction is valid and
its inputs are in the UTXO set. Returns transaction identifier if the transaction is passing the checks.
operationId: checkTransaction
tags:
- transactions
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ErgoTransaction'
responses:
'200':
description: JSON with ID of the new transaction
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionId'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions/unconfirmed:
parameters:
- in: query
name: limit
required: false
description: The number of items in list to return
schema:
type: integer
format: int32
minimum: 10
maximum: 100
default: 50
- in: query
name: offset
required: false
description: The number of items in list to skip
schema:
type: integer
format: int32
default: 0
get:
summary: Get current pool of the unconfirmed transactions pool
operationId: getUnconfirmedTransactions
tags:
- transactions
responses:
'200':
description: Array with Ergo transactions
content:
application/json:
schema:
$ref: '#/components/schemas/Transactions'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions/poolHistogram:
parameters:
- in: query
name: bins
required: false
description: The number of bins in histogram
schema:
type: integer
format: int32
minimum: 1
default: 10
- in: query
name: maxtime
required: false
description: Maximal wait time in milliseconds
schema:
type: integer
format: int64
minimum: 0
default: 60000
get:
summary: Get histogram (waittime, (n_trans, sum(fee)) for transactions in mempool.
It contains "bins"+1 bins, where i-th elements corresponds to transaction with wait time [i*maxtime/bins, (i+1)*maxtime/bins),
and last bin corresponds to the transactions with wait time >= maxtime.
operationId: getFeeHistogram
tags:
- transactions
responses:
'200':
description: Array with fee histogram
content:
application/json:
schema:
$ref: '#/components/schemas/FeeHistogram'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions/getFee:
parameters:
- in: query
name: waitTime
required: true
description: Maximum transaction wait time in minutes
schema:
type: integer
format: int32
minimum: 1
default: 1
- in: query
name: txSize
required: true
description: Transaction size
schema:
type: integer
format: int32
minimum: 1
default: 100
get:
summary: Get recommended fee (in nanoErgs) for a transaction with specified size (in bytes) to be proceeded in specified time (in minutes)
operationId: getRecommendedFee
tags:
- transactions
responses:
'200':
description: Recommended fee for the transaction (in nanoErgs)
content:
application/json:
schema:
type: integer
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/transactions/waitTime:
parameters:
- in: query
name: fee
required: true
description: Transaction fee (in nanoErgs)
schema:
type: integer
format: int32
minimum: 1
default: 1
- in: query
name: txSize
required: true
description: Transaction size
schema:
type: integer
format: int32
minimum: 1
default: 100
get:
summary: Get expected wait time for the transaction with specified fee and size
operationId: getExpectedWaitTime
tags:
- transactions
responses:
'200':
description: Expected wait time in milliseconds
content:
application/json:
schema:
type: integer
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/peers/all:
get:
summary: Get all known peers
operationId: getAllPeers
tags:
- peers
responses:
'200':
description: Array of peer objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Peer'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/peers/connected:
get:
summary: Get current connected peers
operationId: getConnectedPeers
tags:
- peers
responses:
'200':
description: Array of peer objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Peer'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/peers/connect:
post:
summary: Add address to peers list
security:
- ApiKeyAuth: [api_key]