Mazzaroth API (0.8.0)
Download OpenAPI specification:Download
This API describes how to interact with a Mazzaroth Node.
Retrieve the channel contract object
path Parameters
channelId required | string Channel to retrieve contract for. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/contract' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 8,
- "data": {
- "owner": "string",
- "abi": {
- "version": "string",
- "functions": [
- {
- "functionType": 0,
- "functionName": "string",
- "parameters": [
- {
- "parameterName": "string",
- "parameterType": "string"
}
]
}
]
}
}
}
Retrieve the channel contract abi
path Parameters
channelId required | string Channel to retrieve abi for. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/abi' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 10,
- "data": {
- "version": "string",
- "functions": [
- {
- "functionType": 0,
- "functionName": "string",
- "parameters": [
- {
- "parameterName": "string",
- "parameterType": "string"
}
]
}
]
}
}
Submit a transaction to a node
path Parameters
channelId required | string Channel to target. |
Request Body schema: application/json
Transaction to submit
signature | string The 128 character hex representation of a 64 byte Ed25519 signature created by signing the action XDR object. |
sender | string The 64 character hex representation of a 32 byte Ed25519 public key of the sender for the transaction. |
object |
Responses
Request samples
- Payload
{- "signature": "string",
- "sender": "string",
- "data": {
- "channelID": "string",
- "nonce": 0,
- "blockExpirationNumber": 0,
- "category": {
- "enum": 0,
- "value": {
- "function": "string",
- "parameters": [
- "string"
]
}
}
}
}
Response samples
- 200
{- "type": 1,
- "data": "string"
}
Get information about a specific Transaction
path Parameters
channelId required | string Channel to retrieve contract for. |
transactionId required | string ID of the transaction to receive. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/transactions/0000000000000000000000000000000000000000000000000000000000000000' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 2,
- "data": {
- "signature": "string",
- "sender": "string",
- "data": {
- "channelID": "string",
- "nonce": 0,
- "blockExpirationNumber": 0,
- "category": {
- "enum": 0,
- "value": {
- "function": "string",
- "parameters": [
- "string"
]
}
}
}
}
}
Retrieve the Receipt for a given Transaction
path Parameters
channelId required | string Channel to retrieve contract for. |
transactionId required | string ID of the transaction to receive receipt for. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/receipts/0000000000000000000000000000000000000000000000000000000000000000' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 3,
- "data": {
- "transactionID": "string",
- "status": 0,
- "stateRoot": "string",
- "statusInfo": "string",
- "result": "string"
}
}
Get block information from a node
path Parameters
channelId required | string Channel to retrieve block for. |
blockID required | string ID of the block to retrieve. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/blocks/0000000000000000000000000000000000000000000000000000000000000000' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 4,
- "data": {
- "header": {
- "blockHeight": "string",
- "transactionHeight": "string",
- "consensusSequenceNumber": "string",
- "txMerkleRoot": "string",
- "txReceiptRoot": "string",
- "stateRoot": "string",
- "previousHeader": "string",
- "status": 0
}, - "transactions": [
- {
- "signature": "string",
- "sender": "string",
- "data": {
- "channelID": "string",
- "nonce": 0,
- "blockExpirationNumber": 0,
- "category": {
- "enum": 0,
- "value": {
- "function": "string",
- "parameters": [
- "string"
]
}
}
}
}
]
}
}
Get blocks from a node
path Parameters
channelId required | string Channel to retrieve blocks for. |
query Parameters
number | integer The number of blocks to return. |
height | integer The lowest block height to start block list from. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/blocks?number=1&height=0' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 5,
- "data": [
- {
- "header": {
- "blockHeight": "string",
- "transactionHeight": "string",
- "consensusSequenceNumber": "string",
- "txMerkleRoot": "string",
- "txReceiptRoot": "string",
- "stateRoot": "string",
- "previousHeader": "string",
- "status": 0
}, - "transactions": [
- {
- "signature": "string",
- "sender": "string",
- "data": {
- "channelID": "string",
- "nonce": 0,
- "blockExpirationNumber": 0,
- "category": {
- "enum": 0,
- "value": {
- "function": "string",
- "parameters": [
- "string"
]
}
}
}
}
]
}
]
}
Get block height from a node
path Parameters
channelId required | string Channel to retrieve block height for. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/blocks/height' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 9,
- "data": {
- "height": 0
}
}
Get block header information from a node
path Parameters
channelId required | string Channel to retrieve block header for. |
blockID required | string ID of the block to retrieve header for. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/blockheaders/0000000000000000000000000000000000000000000000000000000000000000' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 6,
- "data": {
- "blockHeight": "string",
- "transactionHeight": "string",
- "consensusSequenceNumber": "string",
- "txMerkleRoot": "string",
- "txReceiptRoot": "string",
- "stateRoot": "string",
- "previousHeader": "string",
- "status": 0
}
}
Get block headers from a node
path Parameters
channelId required | string Channel to retrieve blocks for. |
query Parameters
number | integer The number of block headers to return. |
height | integer The lowest block height to start block header list from. |
Responses
Request samples
- CLI
curl --request GET \ --url 'http://localhost:6299/v1/channels/0000000000000000000000000000000000000000000000000000000000000000/blockheaders?number=1&height=0' \ --header 'content-type: application/json'
Response samples
- 200
{- "type": 7,
- "data": [
- {
- "blockHeight": "string",
- "transactionHeight": "string",
- "consensusSequenceNumber": "string",
- "txMerkleRoot": "string",
- "txReceiptRoot": "string",
- "stateRoot": "string",
- "previousHeader": "string",
- "status": 0
}
]
}