openapi: "3.0.2" info: version: "5.0.22" 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' SnapshotsInfo: type: object required: - availableManifests properties: availableManifests: description: Map of available manifests height -> manifestId type: array items: type: object 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 BalanceInfo: type: object description: Balance information required: - nanoErgs - tokens properties: nanoErgs: type: integer format: int64 description: Balance of nanoERGs tokens: type: array description: Balance of tokens items: type: object properties: tokenId: $ref: '#/components/schemas/ModifierId' description: Identifier of the token amount: type: integer format: int64 description: Amount of the token decimals: type: integer description: Number of decimals of the token name: type: string description: Name of the token, if any IndexedErgoBox: allOf: - $ref: '#/components/schemas/ErgoTransactionOutput' - type: object description: Box indexed with extra information required: - address - spentTransactionId - spendingHeight - inclusionHeight - globalIndex properties: address: $ref: '#/components/schemas/ErgoAddress' spentTransactionId: description: Transaction which spent 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 globalIndex: description: Global index of the output in the blockchain type: integer format: int64 minimum: 0 example: 83927 IndexedToken: type: object description: Token indexed with extra information required: - id - boxId - emissionAmount - name - description - decimals properties: id: description: Id of the token $ref: '#/components/schemas/ModifierId' boxId: description: Id of the box that created the token $ref: '#/components/schemas/ModifierId' emissionAmount: description: The total supply of the token type: integer format: int64 minimum: 1 example: 3500000 name: description: The name of the token type: string description: description: The description of the token type: string decimals: description: The number of decimals the token supports type: integer format: int32 minimum: 0 example: 8 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: ErgoTransaction is an atomic operation which changes UTXO state. required: - inputs - dataInputs - outputs properties: id: description: Id of the transaction $ref: '#/components/schemas/TransactionId' inputs: description: Inputs, that will be spent by this transaction type: array items: $ref: '#/components/schemas/ErgoTransactionInput' dataInputs: description: Read-only inputs, that are not going to be spent by transaction. type: array items: $ref: '#/components/schemas/ErgoTransactionDataInput' outputs: description: Outputs of the transaction, i.e. box candidates to be created by this transaction. type: array items: $ref: '#/components/schemas/ErgoTransactionOutput' size: description: Size of ErgoTransaction 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 IndexedErgoTransaction: type: object description: Transaction indexed with extra information required: - id - inputs - dataInputs - outputs - inclusionHeight - numConfirmations - blockId - timestamp - index - globalIndex - size 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 blockId: description: Id of the block the transaction was included in allOf: - $ref: '#/components/schemas/ModifierId' timestamp: $ref: '#/components/schemas/Timestamp' index: description: index of the transaction in the block it was included in type: integer format: int32 example: 3 globalIndex: description: Global index of the transaction in the blockchain type: integer format: int64 example: 3565445 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: description: Header of a block. It authenticates link to a previous block, other block sections (transactions, UTXO set transformation proofs, extension), UTXO set, votes for blockchain parameters to be changed and proof-of-work related data. type: object required: - id - timestamp - version - adProofsRoot - stateRoot - transactionsRoot - nBits - extensionHash - powSolutions - height - difficulty - parentId - votes properties: id: description: Block id $ref: '#/components/schemas/ModifierId' timestamp: description: Block generation time reported by a miner $ref: '#/components/schemas/Timestamp' version: description: Protocol version used to generate the block $ref: '#/components/schemas/Version' adProofsRoot: description: Digest of UTXO set transformation proofs $ref: '#/components/schemas/Digest32' stateRoot: description: AVL+ tree digest of UTXO set (after the block is applied) $ref: '#/components/schemas/ADDigest' transactionsRoot: description: Merkle tree digest of transactions in the block (BlockTransactions section) $ref: '#/components/schemas/Digest32' nBits: description: Proof-of-work target (difficulty encoded) type: integer format: int64 minimum: 0 example: 19857408 extensionHash: description: Merkle tree digest of the extension section of the block $ref: '#/components/schemas/Digest32' powSolutions: description: Solution for the proof-of-work puzzle $ref: '#/components/schemas/PowSolutions' height: description: Height of the block (genesis block height == 1) type: integer format: int32 minimum: 0 example: 667 difficulty: type: string example: '9575989248' parentId: $ref: '#/components/schemas/ModifierId' votes: description: Votes for changing system parameters $ref: '#/components/schemas/Votes' size: description: Size of the header in bytes type: integer format: int32 extensionId: description: Hash of the extension section of the block == hash(modifier type id, header id, extensionHash) $ref: '#/components/schemas/ModifierId' transactionsId: description: Hash of the transactions section of the block == hash(modifier type id, header id, transactionsRoot) $ref: '#/components/schemas/ModifierId' adProofsId: description: Hash of the UTXO set transformation proofs section of the block == hash(modifier type id, header id, adProofsRoot) $ref: '#/components/schemas/ModifierId' BlockTransactions: description: Section of a block which contains transactions. type: object required: - headerId - transactions - size properties: headerId: description: Identifier of a header of a corresponding block $ref: '#/components/schemas/ModifierId' transactions: description: Transactions of the block $ref: '#/components/schemas/Transactions' size: description: Size in bytes of all block transactions type: integer format: int32 BlockADProofs: type: object required: - headerId - proofBytes - digest - size properties: headerId: description: Identifier of a header of the block which contains the proofs $ref: '#/components/schemas/ModifierId' proofBytes: description: Serialized bytes of the authenticated dictionary proof $ref: '#/components/schemas/SerializedAdProof' digest: description: Hash of the proofBytes $ref: '#/components/schemas/Digest32' size: description: Size in bytes type: integer format: int32 Extension: description: Section of a block which contains extension data. type: object required: - headerId - digest - fields properties: headerId: description: Identifier of a header of a corresponding block $ref: '#/components/schemas/ModifierId' digest: description: Root hash (aka digest) merkelized list of key-value records $ref: '#/components/schemas/Digest32' fields: description: List of key-value records type: array nullable: true items: $ref: '#/components/schemas/KeyValueItem' KeyValueItem: description: Key-value record represented as a pair of hex strings in an array. 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 - usePre1627KeyDerivation 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 usePre1627KeyDerivation: type: boolean description: use incorrect(previous) BIP32 key derivation (see https://github.com/ergoplatform/ergo/issues/1627 for details). It's recommended to set to 'true' if the original wallet was created by ergo node before v4.0.105. 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' restApiUrl: type: string example: 'https://example.com' nullable: true 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: description: Data container for /info API request output. Contains information about node's state and configuration. Contains data about best block, best header, state, etc. Best block is the block with the maximum height. type: object required: - name - appVersion - fullHeight - headersHeight - maxPeerHeight - bestFullHeaderId - previousFullHeaderId - bestHeaderId - headersScore - fullBlocksScore - stateRoot - stateType - stateVersion - isMining - peersCount - unconfirmedCount - difficulty - currentTime - launchTime - genesisBlockId - parameters properties: name: description: Node's (peer) self-chosen name from config type: string example: my-node-1 appVersion: description: Node's application version type: string example: 0.0.1 fullHeight: type: integer format: int32 description: Height of the best block known to the node. 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: The height of the best header (i.e. the one with the maximum height). Can be 'null' if state is empty (no header applied since node launch) minimum: 0 example: 667 nullable: true maxPeerHeight: type: integer format: int32 description: Maximum block height of connected peers. Can be 'null' if state is empty (no peer connected since node launch) minimum: 0 example: 706162 nullable: true bestFullHeaderId: type: string description: Best full-block id (header id of such block). Can be 'null' if no full block is applied since node launch. nullable: true allOf: - $ref: '#/components/schemas/ModifierId' previousFullHeaderId: type: string description: Header id of the parent block of the best full-block (i.e. previous block in the blockchain). Can be 'null' if no full block is applied since node launch nullable: true allOf: - $ref: '#/components/schemas/ModifierId' bestHeaderId: type: string description: Best header ID (hex representation). Can be 'null' if no header applied since node launch. nullable: true allOf: - $ref: '#/components/schemas/ModifierId' stateRoot: type: string nullable: true description: Current UTXO set digest. Can be 'null' if state is empty (no full block is applied since node launch) example: 'dab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117' stateType: description: Whether the node is storing UTXO set or only its digest. Equals `digest` if only digest is stored, `utxo` if full UTXO set is stored. type: string enum: - digest - utxo stateVersion: description: Id of a block where UTXO set digest is taken from. Can be 'null' if no full block is applied since node launch. type: string example: 'fab9da11fc216660e974842cc3b7705e62ebb9e0bf5ff78e53f9cd40abadd117' nullable: true isMining: description: Whether the node is mining (i.e. generating blocks). type: boolean example: true peersCount: type: integer description: Number of peers this node is connected with. format: int32 minimum: 0 example: 327 unconfirmedCount: description: Number of unconfirmed transactions in the mempool. 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: When the node was launched (in Java time format, UNIX time * 1000). allOf: - $ref: '#/components/schemas/Timestamp' headersScore: type: integer description: Cumulative difficulty of best headers-chain. Can be 'null' if no headers is applied since node launch. headersScore is a BigInt integer. nullable: true fullBlocksScore: type: integer description: Cumulative difficulty of best full blocks chain. Can be 'null' if no full block is applied since node launch. fullBlocksScore is a BigInt integer. nullable: true genesisBlockId: type: string description: Header id of genesis block. Can be 'null' if genesis blocks is not produced yet. nullable: true allOf: - $ref: '#/components/schemas/ModifierId' parameters: type: object description: System parameters which could be readjusted via collective miners decision. $ref: '#/components/schemas/Parameters' eip27Supported: type: boolean example: true description: Whether EIP-27 locked in restApiUrl: type: string example: 'https://example.com' description: Publicly accessible url of node which exposes restApi in firewall Parameters: description: System parameters which could be readjusted via collective miners decision. 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: List of ErgoTransaction 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: description: Error response from API type: object required: - error - reason - detail properties: error: type: integer description: Error code example: 500 reason: type: string description: Error message explaining the reason of the error example: 'Internal server error' detail: type: string nullable: true description: Detailed error description paths: /blocks: get: summary: Get an array of header ids (hex encoded) for the given range of blockchain block heights. Returns a page of the whole list starting from `offset` and containing `limit` items. 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 first block height to include in the list 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 header ids at the given height operationId: getFullBlockAt tags: - blocks parameters: - in: path name: blockHeight required: true description: Height of a block to retrieve header ids 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 of heights operationId: getChainSlice tags: - blocks parameters: - in: query name: fromHeight required: false description: Min header height (start of the range) schema: type: integer format: int32 default: 0 - in: query name: toHeight required: false description: Max header height of the range (last header height then omitted) 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 header id 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 the header the wanted block schema: type: string responses: '200': description: Block object representing the full block data 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/headerIds: post: summary: Get full blocks by given header ids operationId: getFullBlockByIds tags: - blocks requestBody: required: true content: application/json: schema: type: array items: type: string responses: '200': description: Full blocks corresponding to ids provided content: application/json: schema: type: array items: $ref: '#/components/schemas/FullBlock' '404': description: No block exist for every id provided 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 header id 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: a number of block headers to return 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/bytes: post: summary: Submit an Ergo transaction given as hex-encoded transaction bytes to unconfirmed pool to send it over the network operationId: sendTransactionAsBytes tags: - transactions requestBody: required: true content: application/json: schema: type: string example: '"02c9e71790399816b3e40b2207e9ade19a9b7fe0600186cfb8e2b115bfdb34b57f38cd3c9f2890d11720eb3bb993993f00ededf812a590d2993df094a7ca4f0213e4820e1ab831eed5dc5c72665396d3a01d2a12900f1c3ab77700b284ae24fa8e8f7754f86f2282c795db6b0b17df1c29cc0552e59d01f7d777c638a813333277271c2f8b4d99d01ff0e6ee8695697bdd5b568089395620d7198c6093ce8bc59b928611b1b12452c05addaa42f4beff6a0a6fe90000000380d0dbc3f40210090402040005c801040205c8010500040004000e2003faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04d807d601e4c6a70408d602b2a5730000d603e4c6a70601d604e4c6a7080ed605e4c6a70505d606e4c6a70705d60795720399c1a7c1720299c17202c1a7eb027201d1ededededededededed93c27202c2a793e4c672020408720193e4c6720205059572039d9c72057eb272047301000573029d9c72057eb2720473030005730494e4c672020601720393e4c672020705720693e4c67202080e720493e4c67202090ec5a79572039072079c720672059272079c72067205917207730595ef720393b1db630872027306d801d608b2db63087202730700ed938c7208017308938c7208027206c8df35000508cd030c8f9c4dc08f3c006fa85a47c9156dedbede000a8b764c6e374fd097e873ba0405c8a8c105010105dc8b020e0266608cdea8baf0380008cd030c8f9c4dc08f3c006fa85a47c9156dedbede000a8b764c6e374fd097e873ba04c8df350000c0843d1005040004000e36100204a00b08cd0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ea02d192a39a8cc7a701730073011001020402d19683030193a38cc7b2a57300000193c2b2a57301007473027303830108cdeeac93b1a57304c8df350000"' 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/checkBytes: post: summary: Checks an Ergo transaction without sending it over the network given in form of hex-encoded transaction bytes. Checks that transaction is valid and its inputs are in the UTXO set. Returns transaction identifier if the transaction is passing the checks. operationId: checkTransactionAsBytes tags: - transactions requestBody: required: true content: application/json: schema: type: string example: '"02c9e71790399816b3e40b2207e9ade19a9b7fe0600186cfb8e2b115bfdb34b57f38cd3c9f2890d11720eb3bb993993f00ededf812a590d2993df094a7ca4f0213e4820e1ab831eed5dc5c72665396d3a01d2a12900f1c3ab77700b284ae24fa8e8f7754f86f2282c795db6b0b17df1c29cc0552e59d01f7d777c638a813333277271c2f8b4d99d01ff0e6ee8695697bdd5b568089395620d7198c6093ce8bc59b928611b1b12452c05addaa42f4beff6a0a6fe90000000380d0dbc3f40210090402040005c801040205c8010500040004000e2003faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04d807d601e4c6a70408d602b2a5730000d603e4c6a70601d604e4c6a7080ed605e4c6a70505d606e4c6a70705d60795720399c1a7c1720299c17202c1a7eb027201d1ededededededededed93c27202c2a793e4c672020408720193e4c6720205059572039d9c72057eb272047301000573029d9c72057eb2720473030005730494e4c672020601720393e4c672020705720693e4c67202080e720493e4c67202090ec5a79572039072079c720672059272079c72067205917207730595ef720393b1db630872027306d801d608b2db63087202730700ed938c7208017308938c7208027206c8df35000508cd030c8f9c4dc08f3c006fa85a47c9156dedbede000a8b764c6e374fd097e873ba0405c8a8c105010105dc8b020e0266608cdea8baf0380008cd030c8f9c4dc08f3c006fa85a47c9156dedbede000a8b764c6e374fd097e873ba04c8df350000c0843d1005040004000e36100204a00b08cd0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ea02d192a39a8cc7a701730073011001020402d19683030193a38cc7b2a57300000193c2b2a57301007473027303830108cdeeac93b1a57304c8df350000"' 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/unconfirmed/{txId}: parameters: - in: path name: txId required: true description: ID of a transaction in question schema: type: string head: summary: Check if given transaction is unconfirmed in pool operationId: checkUnconfirmedTransaction tags: - transactions responses: '200': description: Transaction is in pool '404': description: Transaction is not in pool /transactions/unconfirmed/byTransactionId/{txId}: parameters: - in: path name: txId required: true description: ID of a transaction in question schema: type: string get: summary: Get unconfirmed transaction from pool operationId: getUnconfirmedTransactionById tags: - transactions responses: '200': description: Ergo transaction content: application/json: schema: $ref: '#/components/schemas/ErgoTransaction' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/byErgoTree: 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 post: summary: Finds unconfirmed transactions by ErgoTree hex of one of its output or input boxes (if present in UtxoState) operationId: getUnconfirmedTransactionsByErgoTree tags: - transactions requestBody: required: true content: application/json: schema: type: string example: '"100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301"' responses: '200': description: Ergo transaction content: application/json: schema: $ref: '#/components/schemas/Transactions' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/inputs/byBoxId/{boxId}: parameters: - in: path name: boxId required: true description: ID of an input box in question schema: type: string get: summary: Get input box from unconfirmed transactions in pool operationId: getUnconfirmedTransactionInputBoxById tags: - inputs responses: '200': description: Unspent Ergo Box that is to be used as Input in unconfirmed tx content: application/json: schema: $ref: '#/components/schemas/ErgoTransactionOutput' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/outputs/byBoxId/{boxId}: parameters: - in: path name: boxId required: true description: ID of an output box in question schema: type: string get: summary: Get output box from unconfirmed transactions in pool operationId: getUnconfirmedTransactionOutputBoxById tags: - outputs responses: '200': description: Unspent Ergo Box that is to be created by unconfirmed tx content: application/json: schema: $ref: '#/components/schemas/ErgoTransactionOutput' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/outputs/byErgoTree: 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 post: summary: Finds all output boxes by ErgoTree hex among unconfirmed transactions operationId: getUnconfirmedTransactionOutputBoxesByErgoTree tags: - outputs requestBody: required: true content: application/json: schema: type: string example: '"100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301"' responses: '200': description: Unconfirmed transaction output boxes that correspond to given ErgoTree hex content: application/json: schema: type: array items: type: ErgoBox $ref: '#/components/schemas/ErgoTransactionOutput' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/outputs/byTokenId/{tokenId}: parameters: - in: path name: tokenId required: true description: ID of a token in question schema: type: string get: summary: Get output box from unconfirmed transactions in pool by tokenId operationId: getUnconfirmedTransactionOutputBoxesByTokenId tags: - outputs responses: '200': description: Unspent Ergo Boxes that are to be created by unconfirmed tx and contain given token content: application/json: schema: type: array items: type: ErgoBox $ref: '#/components/schemas/ErgoTransactionOutput' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /transactions/unconfirmed/outputs/byRegisters: 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 post: summary: Finds all output boxes among unconfirmed transactions that contain given registers operationId: getUnconfirmedTransactionOutputBoxesByRegisters tags: - outputs requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Registers' responses: '200': description: Unconfirmed transaction output boxes that contain given registers content: application/json: schema: type: array items: type: ErgoBox $ref: '#/components/schemas/ErgoTransactionOutput' 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] operationId: connectToPeer tags: - peers requestBody: required: true content: application/json: schema: type: string example: '"127.0.0.1:5673"' responses: '200': description: Attempt to connect to the peer default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /peers/blacklisted: get: summary: Get blacklisted peers operationId: getBlacklistedPeers tags: - peers responses: '200': description: Array of the addresses content: application/json: schema: $ref: '#/components/schemas/BlacklistedPeers' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /peers/status: get: summary: Get last incoming message timestamp and current network time operationId: getPeersStatus tags: - peers responses: '200': description: Network status content: application/json: schema: type: array items: $ref: '#/components/schemas/PeersStatus' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /peers/syncInfo: get: summary: Get sync info reported by peers, including versions, current status and height (if available) operationId: getPeersSyncInfo tags: - peers responses: '200': description: Network status content: application/json: schema: type: array items: $ref: '#/components/schemas/SyncInfo' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /peers/trackInfo: get: summary: Get track info reported by peers, including count of invalid modifiers and details of requested and received modifiers operationId: getPeersTrackInfo tags: - peers responses: '200': description: Network status content: application/json: schema: type: array items: $ref: '#/components/schemas/TrackInfo' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/seed: get: summary: Get random seed of 32 bytes operationId: getRandomSeed tags: - utils responses: '200': description: Base16-encoded 32 byte seed content: application/json: schema: type: string example: '"7e1e79dd4936bdc7d09f4ba9212849136b589fba4bcf4263a0961a95b65d08cb16"' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/address/{address}: get: summary: Check address validity (prefer POST request as addresses can be too big) operationId: CheckAddressValidityWithGet tags: - utils parameters: - in: path name: address required: true description: address to check schema: $ref: '#/components/schemas/ErgoAddress' responses: '200': description: Address validity with validation error content: application/json: schema: $ref: '#/components/schemas/AddressValidity' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/address: post: summary: Checks address validity operationId: CheckAddressValidity tags: - utils requestBody: required: true description: address to check content: application/json: schema: description: Encoded Ergo Address type: string example: '"3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt"' responses: '200': description: Address validity with validation error content: application/json: schema: $ref: '#/components/schemas/AddressValidity' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/addressToRaw/{address}: get: summary: Convert Pay-To-Public-Key Address to raw representation (hex-encoded serialized curve point) operationId: AddressToRaw tags: - utils parameters: - in: path name: address required: true description: address to extract public key from schema: $ref: '#/components/schemas/ErgoAddress' responses: '200': description: hex-encoded public key (serialized secp256k1 element) content: application/json: schema: type: string example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/rawToAddress/{pubkeyHex}: get: summary: Generate Pay-To-Public-Key address from hex-encoded raw pubkey (secp256k1 serialized point) operationId: RawToAddress tags: - utils parameters: - in: path name: pubkeyHex required: true description: public key to get address from schema: type: string example: '02a7955281885bf0f0ca4a48678848cad8dc5b328ce8bc1d4481d041c98e891ff3' responses: '200': description: Pay-to-public-key (P2PK) address content: application/json: schema: $ref: '#/components/schemas/ErgoAddress' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/ergoTreeToAddress/{ergoTreeHex}: get: summary: Generate Ergo address from hex-encoded ErgoTree (prefer POST request as ErgoTree can be too big) operationId: ErgoTreeToAddressWithGet tags: - utils parameters: - in: path name: ergoTreeHex required: true description: ErgoTree to derive an address from schema: type: string example: '100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301' responses: '200': description: Ergo address content: application/json: schema: $ref: '#/components/schemas/ErgoAddress' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/ergoTreeToAddress: post: summary: Generate Ergo address from hex-encoded ErgoTree operationId: ErgoTreeToAddress tags: - utils requestBody: required: true description: ErgoTree hex to derive an address from content: application/json: schema: type: string example: '"100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301"' responses: '200': description: Ergo address content: application/json: schema: $ref: '#/components/schemas/ErgoAddress' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/seed/{length}: get: summary: Generate random seed of specified length in bytes operationId: getRandomSeedWithLength tags: - utils parameters: - in: path name: length required: true description: seed length in bytes schema: type: string responses: '200': description: Base16-encoded N byte seed content: application/json: schema: type: string example: '"83375fd213cfd7dfd984ce1901d62c302a1db53160b416674c8da1a393a6bbc316"' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utils/hash/blake2b: post: summary: Return Blake2b hash of specified message operationId: hashBlake2b tags: - utils requestBody: required: true content: application/json: schema: type: string example: '"7yaASMijGEGTbttYHg1MrXnWB8EbzjJnFLSWvmNoHrXV"' responses: '200': description: Base16-encoded 32 byte hash content: application/json: schema: type: string example: '"6ed54addddaf10fe8fcda330bd443a57914fbce38a9fa27248b07e361cc76a41"' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/init: post: security: - ApiKeyAuth: [api_key] summary: Initialize new wallet with randomly generated seed operationId: walletInit tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InitWallet' responses: '200': description: New wallet with randomly generated seed created successfully content: application/json: schema: $ref: '#/components/schemas/InitWalletResult' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/restore: post: security: - ApiKeyAuth: [api_key] summary: Create new wallet from existing mnemonic seed operationId: walletRestore tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RestoreWallet' responses: '200': description: Wallet restored successfully default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/check: post: security: - ApiKeyAuth: [api_key] summary: Check whether mnemonic phrase is corresponding to the wallet seed operationId: checkSeed tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CheckWallet' responses: '200': description: Whether passphrase match wallet content: application/json: schema: $ref: '#/components/schemas/PassphraseMatch' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/unlock: post: security: - ApiKeyAuth: [api_key] summary: Unlock wallet operationId: walletUnlock tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UnlockWallet' responses: '200': description: Wallet unlocked successfully default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/lock: get: security: - ApiKeyAuth: [api_key] summary: Lock wallet operationId: walletLock tags: - wallet responses: '200': description: Wallet locked successfully default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/rescan: post: security: - ApiKeyAuth: [api_key] summary: Rescan wallet (all the available full blocks). When fromHeight is set wallet would not see any boxes below it. operationId: walletRescan tags: - wallet requestBody: required: false content: application/json: schema: type: object required: - fromHeight properties: fromHeight: type: integer format: int32 minimum: 0 responses: '200': description: Wallet rescanned default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/status: get: security: - ApiKeyAuth: [api_key] summary: Get wallet status operationId: getWalletStatus tags: - wallet responses: '200': description: Wallet status content: application/json: schema: $ref: '#/components/schemas/WalletStatus' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/updateChangeAddress: post: security: - ApiKeyAuth: [api_key] summary: Update address to be used to send change to operationId: walletUpdateChangeAddress tags: - wallet requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ErgoAddress" responses: '200': description: Change address updated successfully default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/deriveKey: post: security: - ApiKeyAuth: [api_key] summary: Derive new key according to a provided path operationId: walletDeriveKey tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeriveKey' responses: '200': description: Resulted address content: application/json: schema: $ref: '#/components/schemas/DeriveKeyResult' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/deriveNextKey: get: security: - ApiKeyAuth: [api_key] summary: Derive next key operationId: walletDeriveNextKey tags: - wallet responses: '200': description: Resulted secret path and address content: application/json: schema: $ref: '#/components/schemas/DeriveNextKeyResult' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/balances: get: security: - ApiKeyAuth: [api_key] summary: Get total amount of confirmed Ergo tokens and assets operationId: walletBalances tags: - wallet responses: '200': description: Get total amount of confirmed Ergo tokens and assets content: application/json: schema: $ref: '#/components/schemas/BalancesSnapshot' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transactions: parameters: - in: query name: minInclusionHeight required: false description: Minimal tx inclusion height schema: type: integer format: int32 minimum: 0 - in: query name: maxInclusionHeight required: false description: Maximal tx inclusion height schema: type: integer format: int32 minimum: 0 - in: query name: minConfirmations required: false description: Minimal confirmations number schema: type: integer format: int32 minimum: 0 - in: query name: maxConfirmations required: false description: Maximal confirmations number schema: type: integer format: int32 minimum: 0 get: security: - ApiKeyAuth: [api_key] summary: Get a list of all wallet-related transactions operationId: walletTransactions tags: - wallet responses: '200': description: A list of all wallet-related transactions content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletTransaction' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transactionById: parameters: - in: query name: id required: true description: Transaction id schema: type: string get: security: - ApiKeyAuth: [api_key] summary: Get wallet-related transaction by id operationId: walletGetTransaction tags: - wallet responses: '200': description: Wallet-related transaction content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletTransaction' '404': description: Transaction with specified id not found in wallet content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transactionsByScanId/{scanId}: parameters: - in: query name: minInclusionHeight required: false description: Minimal tx inclusion height schema: type: integer format: int32 minimum: 0 - in: query name: maxInclusionHeight required: false description: Maximal tx inclusion height schema: type: integer format: int32 minimum: 0 - in: query name: minConfirmations required: false description: Minimal confirmations number schema: type: integer format: int32 minimum: 0 - in: query name: maxConfirmations required: false description: Maximal confirmations number schema: type: integer format: int32 minimum: 0 - in: query name: includeUnconfirmed required: false description: Include transactions from mempool schema: type: boolean default: false get: security: - ApiKeyAuth: [ api_key ] summary: Get scan-related transactions by scan id operationId: walletTransactionsByScanId tags: - wallet parameters: - in: path name: scanId required: true description: identifier of a scan schema: type: integer format: int32 responses: '200': description: Scan-related transactions content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletTransaction' '404': description: Transactions with related scan id not found in wallet content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/boxes: parameters: - in: query name: minConfirmations required: false description: Minimal number of confirmations, -1 means we consider unconfirmed schema: type: integer format: int32 minimum: -1 default: 0 - in: query name: maxConfirmations required: false description: Maximum number of confirmations, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: minInclusionHeight required: false description: Minimal box inclusion height schema: type: integer format: int32 minimum: 0 default: 0 - in: query name: maxInclusionHeight required: false description: Maximum box inclusion height, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 minimum: 1 default: 500 maximum: 2500 - in: query name: offset required: false description: The number of items in list to skip schema: type: integer format: int32 minimum: 0 default: 0 get: security: - ApiKeyAuth: [api_key] summary: Get a list of all wallet-related boxes, both spent and unspent. Set minConfirmations to -1 to get mempool boxes included. operationId: walletBoxes tags: - wallet responses: '200': description: A list of all wallet-related boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletBox' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/boxes/collect: post: security: - ApiKeyAuth: [ api_key ] summary: Get a list of collected boxes. operationId: walletBoxesCollect tags: - wallet requestBody: description: This API method recieves balance and assets, according to which, it's collecting result required: true content: application/json: schema: $ref: '#/components/schemas/BoxesRequestHolder' responses: '200': description: A list of all collected boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletBox' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/boxes/unspent: parameters: - in: query name: minConfirmations required: false description: Minimal number of confirmations, -1 means we consider unconfirmed schema: type: integer format: int32 minimum: -1 default: 0 - in: query name: maxConfirmations required: false description: Maximum number of confirmations, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: minInclusionHeight required: false description: Minimal box inclusion height schema: type: integer format: int32 minimum: 0 default: 0 - in: query name: maxInclusionHeight required: false description: Maximum box inclusion height, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 minimum: 1 default: 500 maximum: 2500 - in: query name: offset required: false description: The number of items in list to skip schema: type: integer format: int32 minimum: 0 default: 0 get: security: - ApiKeyAuth: [api_key] summary: Get a list of unspent boxes. Set minConfirmations to -1 to have mempool boxes considered. operationId: walletUnspentBoxes tags: - wallet responses: '200': description: A list of unspent boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletBox' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/balances/withUnconfirmed: get: security: - ApiKeyAuth: [api_key] summary: Get summary amount of confirmed plus unconfirmed Ergo tokens and assets operationId: walletBalancesUnconfirmed tags: - wallet responses: '200': description: Get summary amount of confirmed plus unconfirmed Ergo tokens and assets content: application/json: schema: $ref: '#/components/schemas/BalancesSnapshot' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/addresses: get: security: - ApiKeyAuth: [api_key] summary: Get wallet addresses operationId: walletAddresses tags: - wallet responses: '200': description: String with encoded wallet addresses content: application/json: schema: type: array items: $ref: '#/components/schemas/ErgoAddress' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transaction/generate: post: security: - ApiKeyAuth: [api_key] summary: Generate arbitrary transaction from array of requests. operationId: walletTransactionGenerate tags: - wallet requestBody: description: This API method receives a sequence of requests as an input. Each request will produce an output of the resulting transaction (with fee output created automatically). Currently supported types of requests are payment and asset issuance requests. An example for a transaction with requests of both kinds is provided below. Please note that for the payment request "assets" and "registers" fields are not needed. For asset issuance request, "registers" field is not needed. You may specify boxes to spend by providing them in "inputsRaw". Please note you need to have strict equality between input and output total amounts of Ergs in this case. If you want wallet to pick up the boxes, leave "inputsRaw" empty. required: true content: application/json: schema: $ref: '#/components/schemas/RequestsHolder' responses: '200': description: Generated Ergo transaction content: application/json: schema: $ref: '#/components/schemas/ErgoTransaction' '400': description: Bad transaction request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transaction/generateUnsigned: post: security: - ApiKeyAuth: [api_key] summary: Generate unsigned transaction from array of requests. operationId: walletUnsignedTransactionGenerate tags: - wallet requestBody: description: The same as /wallet/transaction/generate but generates unsigned transaction. required: true content: application/json: schema: $ref: '#/components/schemas/RequestsHolder' responses: '200': description: Generated unsigned Ergo transaction content: application/json: schema: $ref: '#/components/schemas/UnsignedErgoTransaction' '400': description: Bad transaction request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transaction/sign: post: security: - ApiKeyAuth: [api_key] summary: Sign arbitrary unsigned transaction with wallet secrets and also secrets provided. operationId: walletTransactionSign tags: - wallet requestBody: description: With this API method an arbitrary unsigned transaction can be signed with secrets provided or stored in the wallet. Both DLOG and Diffie-Hellman tuple secrets are supported. Please note that the unsigned transaction contains only identifiers of inputs and data inputs. If the node holds UTXO set, it is able to extract boxes needed. Otherwise, input (and data-input) boxes can be provided in "inputsRaw" and "dataInputsRaw" fields. required: true content: application/json: schema: $ref: '#/components/schemas/TransactionSigningRequest' responses: '200': description: Generated Ergo transaction content: application/json: schema: $ref: '#/components/schemas/ErgoTransaction' '400': description: Bad transaction request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/transaction/send: post: security: - ApiKeyAuth: [api_key] summary: Generate and send arbitrary transaction operationId: walletTransactionGenerateAndSend tags: - wallet requestBody: description: See description of /wallet/transaction/generate required: true content: application/json: schema: $ref: '#/components/schemas/RequestsHolder' responses: '200': description: Identifier of an Ergo transaction generated content: application/json: schema: $ref: '#/components/schemas/TransactionId' '400': description: Bad transaction request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/payment/send: post: security: - ApiKeyAuth: [api_key] summary: Generate and send payment transaction (default fee of 0.001 Erg is used) operationId: walletPaymentTransactionGenerateAndSend tags: - wallet requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/PaymentRequest' responses: '200': description: Identifier of an Ergo transaction generated content: application/json: schema: $ref: '#/components/schemas/TransactionId' '400': description: Bad payment request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/getPrivateKey: post: security: - ApiKeyAuth: [api_key] summary: Get the private key corresponding to a known address operationId: walletGetPrivateKey tags: - wallet requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ErgoAddress" responses: '200': description: Successfully retrieved secret key content: application/json: schema: $ref: '#/components/schemas/DlogSecret' '404': description: Address not found in wallet database content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /mining/candidate: get: security: - ApiKeyAuth: [api_key] summary: Request block candidate operationId: miningRequestBlockCandidate tags: - mining responses: '200': description: External candidate content: application/json: schema: $ref: '#/components/schemas/WorkMessage' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /mining/candidateWithTxs: post: security: - ApiKeyAuth: [api_key] summary: Request block candidate operationId: miningRequestBlockCandidateWithMandatoryTransactions tags: - mining requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Transactions' responses: '200': description: External candidate content: application/json: schema: $ref: '#/components/schemas/WorkMessage' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /mining/rewardAddress: get: security: - ApiKeyAuth: [api_key] summary: Read miner reward address operationId: miningReadMinerRewardAddress tags: - mining responses: '200': description: Miner Reward Script (in P2S format) content: application/json: schema: $ref: '#/components/schemas/RewardAddress' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /mining/rewardPublicKey: get: security: - ApiKeyAuth: [api_key] summary: Read public key associated with miner rewards operationId: miningReadMinerRewardPubkey tags: - mining responses: '200': description: Public key for miner rewards (as hex-encoded secp256k1 point) content: application/json: schema: $ref: '#/components/schemas/RewardPubKey' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /mining/solution: post: security: - ApiKeyAuth: [api_key] summary: Submit solution for current candidate operationId: miningSubmitSolution tags: - mining requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PowSolutions' responses: '200': description: Solution is valid '400': description: Solution is invalid content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utxo/getBoxesBinaryProof: post: security: - ApiKeyAuth: [api_key] summary: Get serialized batch proof for given set of boxes operationId: getBoxesBinaryProof tags: - utxo requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/TransactionBoxId' responses: '200': description: Serialized batch proof content: application/json: schema: $ref: '#/components/schemas/SerializedAdProof' '400': description: Prove error content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utxo/byId/{boxId}: get: summary: Get box contents for a box by a unique identifier. operationId: getBoxById tags: - utxo parameters: - in: path name: boxId required: true description: ID of a wanted box schema: type: string responses: '200': description: Box object content: application/json: schema: $ref: '#/components/schemas/ErgoTransactionOutput' '404': description: Box 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' /utxo/byIdBinary/{boxId}: get: summary: Get serialized box from UTXO pool in Base16 encoding by an identifier. operationId: getBoxByIdBinary tags: - utxo parameters: - in: path name: boxId required: true description: ID of a wanted box schema: type: string responses: '200': description: Json containing box identifier and hex-encoded box bytes content: application/json: schema: $ref: '#/components/schemas/SerializedBox' '404': description: Box 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' /utxo/withPool/byId/{boxId}: get: summary: Get box contents for a box by a unique identifier, from UTXO set and also the mempool. operationId: getBoxWithPoolById tags: - utxo parameters: - in: path name: boxId required: true description: ID of a box to obtain schema: type: string responses: '200': description: Box object content: application/json: schema: $ref: '#/components/schemas/ErgoTransactionOutput' '404': description: Box 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' /utxo/withPool/byIds: post: summary: Get boxes for ids provided, from UTXO or the mempool. operationId: getBoxWithPoolByIds tags: - utxo requestBody: required: true content: application/json: schema: type: array items: type: string responses: '200': description: Box object content: application/json: schema: type: array items: $ref: '#/components/schemas/ErgoTransactionOutput' '404': description: No any box exists for every id provided content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utxo/withPool/byIdBinary/{boxId}: get: summary: Get serialized box in Base16 encoding by an identifier, considering also the mempool. operationId: getBoxWithPoolByIdBinary tags: - utxo parameters: - in: path name: boxId required: true description: ID of a wanted box schema: type: string responses: '200': description: Json containing box identifier and hex-encoded box bytes content: application/json: schema: $ref: '#/components/schemas/SerializedBox' '404': description: Box 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' /utxo/getSnapshotsInfo: get: summary: Get information about locally stored UTXO snapshots operationId: getSnapshotsInfo tags: - utxo responses: '200': description: A list of saved snapshots content: application/json: schema: $ref: '#/components/schemas/SnapshotsInfo' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /utxo/genesis: get: summary: Get genesis boxes (boxes existed before the very first block) operationId: genesisBoxes tags: - utxo responses: '200': description: A list of all the genesis boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/ErgoTransactionOutput' '404': description: Box 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' /script/p2sAddress: post: security: - ApiKeyAuth: [api_key] summary: Create P2SAddress from Sigma source operationId: scriptP2SAddress tags: - script requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SourceHolder' responses: '200': description: Ergo address derived from source content: application/json: schema: $ref: '#/components/schemas/AddressHolder' '400': description: Bad source content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /script/p2shAddress: post: security: - ApiKeyAuth: [api_key] summary: Create P2SHAddress from Sigma source operationId: scriptP2SHAddress tags: - script requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SourceHolder' responses: '200': description: P2SH address derived from source content: application/json: schema: $ref: '#/components/schemas/AddressHolder' '400': description: Bad source content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /script/addressToTree/{address}: get: summary: Convert an address to hex-encoded serialized ErgoTree (script) operationId: addressToTree tags: - script parameters: - in: path name: address required: true description: address to get a script from schema: $ref: '#/components/schemas/ErgoAddress' responses: '200': description: Base16-encoded ErgoTree (script) content: application/json: schema: $ref: '#/components/schemas/ErgoTreeObject' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /script/addressToBytes/{address}: get: summary: Convert an address to hex-encoded Sigma byte array constant which contains script bytes operationId: addressToBytes tags: - script parameters: - in: path name: address required: true description: address to get a script from schema: $ref: '#/components/schemas/ErgoAddress' responses: '200': description: Base16-encoded Sigma byte array constant which contains script bytes content: application/json: schema: $ref: '#/components/schemas/ScriptBytes' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /script/executeWithContext: post: security: - ApiKeyAuth: [api_key] summary: Execute script with context operationId: executeWithContext tags: - script requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExecuteScript' responses: '200': description: Result of reduceToCrypto content: application/json: schema: $ref: '#/components/schemas/CryptoResult' '400': description: Compiler error content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/register: post: security: - ApiKeyAuth: [api_key] summary: Register a scan operationId: registerScan tags: - scan requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScanRequest' responses: '200': description: Identifier of a scan generated content: application/json: schema: $ref: '#/components/schemas/ScanId' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/deregister: post: security: - ApiKeyAuth: [api_key] summary: Stop tracking and deregister scan operationId: deregisterScan tags: - scan requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScanId' responses: '200': description: Identifier of a scan removed content: application/json: schema: $ref: '#/components/schemas/ScanId' '400': description: No scan found content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/listAll: get: security: - ApiKeyAuth: [api_key] summary: List all the registered scans operationId: listAllScans tags: - scan responses: '200': description: List of scans registered content: application/json: schema: type: array items: $ref: '#/components/schemas/Scan' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/unspentBoxes/{scanId}: parameters: - in: query name: minConfirmations required: false description: Minimal number of confirmations, -1 means we consider unconfirmed schema: type: integer format: int32 minimum: -1 default: 0 - in: query name: maxConfirmations required: false description: Maximum number of confirmations, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: minInclusionHeight required: false description: Minimal box inclusion height schema: type: integer format: int32 minimum: 0 default: 0 - in: query name: maxInclusionHeight required: false description: Maximum box inclusion height, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 minimum: 1 default: 500 maximum: 2500 - in: query name: offset required: false description: The number of items in list to skip schema: type: integer format: int32 minimum: 0 default: 0 get: security: - ApiKeyAuth: [api_key] summary: List boxes which are not spent. operationId: listUnspentScans tags: - scan parameters: - in: path name: scanId required: true description: identifier of a scan schema: type: integer format: int32 responses: '200': description: List of unspent boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletBox' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/spentBoxes/{scanId}: parameters: - in: query name: minConfirmations required: false description: Minimal number of confirmations, -1 means we consider unconfirmed schema: type: integer format: int32 minimum: -1 default: 0 - in: query name: maxConfirmations required: false description: Maximum number of confirmations, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: minInclusionHeight required: false description: Minimal box inclusion height schema: type: integer format: int32 minimum: 0 default: 0 - in: query name: maxInclusionHeight required: false description: Maximum box inclusion height, -1 means unlimited schema: type: integer format: int32 default: -1 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 minimum: 1 default: 500 maximum: 2500 - in: query name: offset required: false description: The number of items in list to skip schema: type: integer format: int32 minimum: 0 default: 0 get: security: - ApiKeyAuth: [api_key] summary: List boxes which are spent. operationId: listSpentScans tags: - scan parameters: - in: path name: scanId required: true description: identifier of a scan schema: type: integer format: int32 responses: '200': description: List of spent boxes content: application/json: schema: type: array items: $ref: '#/components/schemas/WalletBox' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/stopTracking: post: security: - ApiKeyAuth: [api_key] summary: Stop scan-related box tracking operationId: scanStopTracking tags: - scan requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScanIdBoxId' responses: '200': description: The box is not tracked anymore content: application/json: schema: $ref: '#/components/schemas/ScanIdBoxId' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/p2sRule: post: security: - ApiKeyAuth: [api_key] summary: Create and register a scan to track P2S address provided operationId: scriptP2SRule tags: - scan requestBody: required: true content: application/json: schema: type: string example: '4MQyML64GnzMxZgm' responses: '200': description: Id of custom scan generated and registered content: application/json: schema: $ref: '#/components/schemas/ScanId' '400': description: Bad source content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/generateCommitments: post: security: - ApiKeyAuth: [api_key] summary: Generate signature commitments for inputs of an unsigned transaction operationId: generateCommitments tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GenerateCommitmentsRequest' responses: '200': description: Transaction-related hints content: application/json: schema: $ref: '#/components/schemas/TransactionHintsBag' '400': description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /wallet/extractHints: post: security: - ApiKeyAuth: [api_key] summary: Extract hints from a transaction operationId: extractHints tags: - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/HintExtractionRequest' responses: '200': description: Hints for the transaction content: application/json: schema: $ref: '#/components/schemas/TransactionHintsBag' '400': description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /scan/addBox: post: security: - ApiKeyAuth: [api_key] summary: Adds a box to scans, writes box to database if it is not there. You can use scan number 10 to add a box to the wallet. operationId: addBox tags: - scan - wallet requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScanIdsBox' responses: '200': description: It the box is added successfully, then its id is returned content: application/json: schema: $ref: '#/components/schemas/TransactionId' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /node/shutdown: post: security: - ApiKeyAuth: [ api_key ] summary: Shuts down the node operationId: nodeShutdown tags: - node responses: '200': description: The node will be shut down in 5 seconds default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /emission/at/{blockHeight}: get: summary: Get emission data for a given height operationId: emissionAt tags: - emission parameters: - in: path name: blockHeight required: true description: Height to get emission data for schema: type: integer format: int32 responses: '200': description: Emission data content: application/json: schema: $ref: '#/components/schemas/EmissionInfo' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /emission/scripts: get: summary: Print emission-related scripts operationId: emissionScripts tags: - emission responses: '200': description: Emission-related scripts content: application/json: schema: $ref: '#/components/schemas/EmissionScripts' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/indexedHeight: get: summary: Get current indexed block height. (The indexer has processed all blocks up to this height.) operationId: getIndexedHeight tags: - blockchain responses: '200': description: height of the indexer and full height content: application/json: schema: properties: indexedHeight: type: integer default: 0 description: number of blocks indexed fullHeight: type: integer description: number of all known blocks /blockchain/transaction/byId/{txId}: get: summary: Retrieve a transaction by its id operationId: getTxById tags: - blockchain parameters: - in: path name: txId required: true description: id of the wanted transaction schema: type: string responses: '200': description: transaction with wanted id content: application/json: schema: $ref: '#/components/schemas/IndexedErgoTransaction' '404': description: Transaction 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' /blockchain/transaction/byIndex/{txIndex}: get: summary: Retrieve a transaction by global index number operationId: getTxByIndex tags: - blockchain parameters: - in: path name: txIndex required: true description: index of the wanted transaction schema: type: number responses: '200': description: transaction with wanted index content: application/json: schema: $ref: '#/components/schemas/IndexedErgoTransaction' '404': description: Transaction with this index doesn't exist content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/transaction/byAddress: post: summary: Retrieve transactions by their associated address operationId: getTxsByAddress tags: - blockchain requestBody: required: true content: application/json: description: adderess associated with transactions schema: type: string example: '"3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt"' parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: transactions associated with wanted address content: application/json: schema: type: object properties: items: type: array description: Array of transactions items: $ref: '#/components/schemas/IndexedErgoTransaction' total: type: integer description: Total count of retreived transactions '404': description: No transactions found for wanted address content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/transaction/range: get: summary: Get a range of transaction ids operationId: getTxRange tags: - blockchain parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: transactions ids in wanted range content: application/json: schema: type: array description: Array of transaction ids items: $ref: '#/components/schemas/ModifierId' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/byId/{boxId}: get: summary: Retrieve a box by its id operationId: getBoxById tags: - blockchain parameters: - in: path name: boxId required: true description: id of the wanted box schema: type: string responses: '200': description: box with wanted id content: application/json: schema: $ref: '#/components/schemas/IndexedErgoBox' '404': description: No box found with wanted id content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/byIndex/{boxIndex}: get: summary: Retrieve a box by global index number operationId: getBoxByIndex tags: - blockchain parameters: - in: path name: boxIndex required: true description: index of the wanted box schema: type: number responses: '200': description: box with wanted index content: application/json: schema: $ref: '#/components/schemas/IndexedErgoBox' '404': description: Box with this index doesn't exist content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/byTokenId/{tokenId}: get: summary: Retrieve boxes by an associated token id operationId: getBoxesByTokenId tags: - blockchain parameters: - in: path name: tokenId required: true description: id of the token schema: $ref: '#/components/schemas/ModifierId' - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: boxes associated with wanted token content: application/json: schema: type: object properties: items: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' total: type: integer description: Total number of retreived boxes '404': description: No boxes found for wanted token content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/unspent/byTokenId/{tokenId}: get: summary: Retrieve unspent boxes by an associated token id operationId: getBoxesByTokenIdUnspent tags: - blockchain parameters: - in: path name: tokenId required: true description: id of the token schema: $ref: '#/components/schemas/ModifierId' - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 - in: query name: sortDirection required: false description: desc = new boxes first ; asc = old boxes first schema: type: string default: desc - in: query name: includeUnconfirmed required: false description: if true include unconfirmed transactions from mempool schema: type: boolean default: false responses: '200': description: unspent boxes associated with wanted token content: application/json: schema: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' '404': description: No unspent boxes found for wanted token content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/byAddress: post: summary: Retrieve boxes by their associated address operationId: getBoxesByAddress tags: - blockchain requestBody: required: true content: application/json: description: adderess associated with boxes schema: type: string example: '"3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt"' parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: boxes associated with wanted address content: application/json: schema: type: object properties: items: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' total: type: integer description: Total number of retreived boxes '404': description: No boxes found for wanted address content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/unspent/byAddress: post: summary: Retrieve unspent boxes by their associated address operationId: getBoxesByAddressUnspent tags: - blockchain requestBody: required: true content: application/json: description: adderess associated with unspent boxes schema: type: string example: '"3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt"' parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 - in: query name: sortDirection required: false description: desc = new boxes first ; asc = old boxes first schema: type: string default: desc - in: query name: includeUnconfirmed required: false description: if true include unconfirmed transactions from mempool schema: type: boolean default: false - in: query name: excludeMempoolSpent required: false description: if true exclude spent inputs from mempool schema: type: boolean default: false responses: '200': description: unspent boxes associated with wanted address content: application/json: schema: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' '404': description: No unspent boxes found for wanted address content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/range: get: summary: Get a range of box ids operationId: getBoxRange tags: - blockchain parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: box ids in wanted range content: application/json: schema: type: array description: Array of box ids items: $ref: '#/components/schemas/ModifierId' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/byErgoTree: post: summary: Retrieve boxes by their associated ergotree operationId: getBoxesByErgoTree tags: - blockchain requestBody: required: true content: application/json: description: hex encoded ergotree schema: type: string example: '"100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301"' parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 responses: '200': description: boxes with wanted ergotree content: application/json: schema: type: object properties: items: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' total: type: integer description: Total number of retreived boxes default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/box/unspent/byErgoTree: post: summary: Retrieve unspent boxes by their associated ergotree operationId: getBoxesByErgoTreeUnspent tags: - blockchain requestBody: required: true content: application/json: description: hex encoded ergotree schema: type: string example: '"100204a00b08cd021cf943317b0fdb50f60892a46b9132b9ced337c7de79248b104b293d9f1f078eea02d192a39a8cc7a70173007301"' parameters: - in: query name: offset required: false description: amount of elements to skip from the start schema: type: integer format: int32 default: 0 - in: query name: limit required: false description: amount of elements to retrieve schema: type: integer format: int32 default: 5 - in: query name: sortDirection required: false description: desc = new boxes first ; asc = old boxes first schema: type: string default: desc - in: query name: includeUnconfirmed required: false description: if true include unconfirmed transactions from mempool schema: type: boolean default: false responses: '200': description: unspent boxes with wanted ergotree content: application/json: schema: type: object properties: items: type: array description: Array of boxes items: $ref: '#/components/schemas/IndexedErgoBox' total: type: integer description: Total number of retreived boxes '404': description: No unspent box found with wanted ergotree content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/token/byId/{tokenId}: get: summary: Retrieve minting information about a token operationId: getTokenById tags: - blockchain parameters: - in: path name: tokenId required: true description: id of the wanted token schema: type: string responses: '200': description: token with wanted id content: application/json: schema: $ref: '#/components/schemas/IndexedToken' '404': description: No token found with wanted id content: application/json: schema: $ref: '#/components/schemas/ApiError' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError' /blockchain/balance: post: summary: Retrieve confirmed and unconfirmed balance of an address operationId: getAddressBalanceTotal tags: - blockchain requestBody: required: true content: application/json: description: adderess with balance schema: type: string example: '"3WwbzW6u8hKWBcL1W7kNVMr25s2UHfSBnYtwSHvrRQt7DdPuoXrt"' responses: '200': description: balance information content: application/json: schema: type: object properties: confirmed: $ref: '#/components/schemas/BalanceInfo' unconfirmed: $ref: '#/components/schemas/BalanceInfo' default: description: Error content: application/json: schema: $ref: '#/components/schemas/ApiError'