Explorer API

JSON API

The explorer has JSON api. For the API, it uses conventions defined by JSend.

api/transaction/<tx_hash>

curl  -w "\n" -X GET "https://api.tuske.network/api/transaction/14aded89a283155356f3f558648c7dd5bca1c7d07ec23cae939c885aea043a37"

Partial results shown:

{
  "data": {
    "block_height": 1000,
    "coinbase": true,
    "confirmations": 5660,
    "current_height": 6660,
    "extra": "0184d97abc9228cb9457586e8b3e6f59657fb0bc26bc98df39fbe02de977e652930211000001757a3c938a000000000000000000",
    "inputs": null,
    "mixin": 0,
    "outputs": [
      {
        "amount": 8528148826404,
        "public_key": "5f530072fbb1d9f0fb38b23eafa1173344dd18a6eb2d9adb2e6ee8dfe589194d"
      }
    ],
    "payment_id": "",
    "payment_id8": "",
    "rct_type": 0,
    "timestamp": 1715567385,
    "timestamp_utc": "2024-05-13 02:29:45",
    "tx_fee": 0,
    "tx_hash": "14aded89a283155356f3f558648c7dd5bca1c7d07ec23cae939c885aea043a37",
    "tx_size": 103,
    "tx_version": 2,
    "xmr_inputs": 0,
    "xmr_outputs": 8528148826404
  },
  "status": "success"
}

api/transactions

Transactions in last 25 blocks

curl  -w "\n" -X GET "https://api.tuske.network/api/transactions"

Partial results shown:

{
  "data": {
    "blocks": [
      {
        "age": "00:02:05",
        "hash": "82961ad2d219e3b327ce2718b5d2a578d9b2fed2c7f12422f8248ef3ce4b9d35",
        "height": 6659,
        "size": 70930,
        "timestamp": 1716252359,
        "timestamp_utc": "2024-05-21 00:45:59",
        "txs": [
          {
            "coinbase": true,
            "extra": "0105ba697330899c56b93b0350cd3ecde66dbe22e03d89b18e720968cbadabf81102089b4a9a32b7caa56d",
            "mixin": 0,
            "payment_id": "",
            "payment_id8": "",
            "rct_type": 0,
            "tx_fee": 0,
            "tx_hash": "c8759a4916fb72f2e78be763e20ea730a2aa0528c8f09c67bba128941195bb75",
            "tx_size": 94,
            "tx_version": 2,
            "xmr_inputs": 0,
            "xmr_outputs": 8525710323374
          },
          {
            "coinbase": false,
            "extra": "018c5f6792b00de116b4f6f968f2d88854d6e6ef9130eca0483c95f519a1df0f01",
            "mixin": 16,
            "payment_id": "",
            "payment_id8": "",
            "rct_type": 6,
            "tx_fee": 1151010000,
            "tx_hash": "dd2e8e3992fdcc30596c6f6be0207646ea5b6e885464bbe23213a7a52afce861",
            "tx_size": 2534,
            "tx_version": 2,
            "xmr_inputs": 0,
            "xmr_outputs": 0
          },
          ...

api/transactions?page=<page_no>&limit=<tx_per_page>

curl  -w "\n" -X GET "https://api.tuske.network/api/transactions?page=2&limit=10"

Result analogical to the one above.

api/block/<block_number|block_hash>

curl  -w "\n" -X GET "https://api.tuske.network/api/block/1000"

Partial results shown:

{
  "data": {
    "block_height": 1000,
    "current_height": 6662,
    "hash": "0f0f649456045535bfbba86b6960f7c7c5e0f63e85230c46f1624db848483d2b",
    "size": 103,
    "timestamp": 1715567385,
    "timestamp_utc": "2024-05-13 02:29:45",
    "txs": [
      {
        "coinbase": true,
        "extra": "0184d97abc9228cb9457586e8b3e6f59657fb0bc26bc98df39fbe02de977e652930211000001757a3c938a000000000000000000",
        "mixin": 0,
        "payment_id": "",
        "payment_id8": "",
        "rct_type": 0,
        "tx_fee": 0,
        "tx_hash": "14aded89a283155356f3f558648c7dd5bca1c7d07ec23cae939c885aea043a37",
        "tx_size": 103,
        "tx_version": 2,
        "xmr_inputs": 0,
        "xmr_outputs": 8528148826404
      }
    ]
  },
  "status": "success"
}

api/mempool

Return all txs in the mempool.

curl  -w "\n" -X GET "https://api.tuske.network/api/mempool"

Partial results shown:

{
  "data": {
    "limit": 100000000,
    "page": 0,
    "total_page_no": 0,
    "txs": [
      {
        "coinbase": false,
        "extra": "015e8a3a59bb3688e9b4e541dcbef5276e67dfb176fb4e46b9f548b6689157c79a020901ec8ee8e864daad45",
        "mixin": 16,
        "payment_id": "",
        "payment_id8": "ec8ee8e864daad45",
        "rct_type": 6,
        "timestamp": 1716254268,
        "timestamp_utc": "2024-05-21 01:17:48",
        "tx_fee": 2001870000,
        "tx_hash": "75c230f1315b8142e9efce9a0fb90cf0433b4814c549fac595462de8b8f00ab4",
        "tx_size": 6903,
        "tx_version": 2,
        "xmr_inputs": 0,
        "xmr_outputs": 0
      }
    ],
    "txs_no": 1
  },
  "status": "success"
}

Limit of 100000000 is just default value above to ensure that all mempool txs are fetched if no specific limit given.

api/mempool?limit=<no_of_top_txs>

Return number of newest mempool txs, e.g., only 10.

curl  -w "\n" -X GET "https://api.tuske.network/api/mempool?limit=10"

Result analogical to the one above.

api/search/<block_number|tx_hash|block_hash>

curl  -w "\n" -X GET "https://api.tuske.network/api/search/1000"

Partial results shown:

{
  "data": {
    "block_height": 1000,
    "current_height": 6662,
    "hash": "0f0f649456045535bfbba86b6960f7c7c5e0f63e85230c46f1624db848483d2b",
    "size": 103,
    "timestamp": 1715567385,
    "timestamp_utc": "2024-05-13 02:29:45",
    "title": "block",
    "txs": [
      {
        "coinbase": true,
        "extra": "0184d97abc9228cb9457586e8b3e6f59657fb0bc26bc98df39fbe02de977e652930211000001757a3c938a000000000000000000",
        "mixin": 0,
        "payment_id": "",
        "payment_id8": "",
        "rct_type": 0,
        "tx_fee": 0,
        "tx_hash": "14aded89a283155356f3f558648c7dd5bca1c7d07ec23cae939c885aea043a37",
        "tx_size": 103,
        "tx_version": 2,
        "xmr_inputs": 0,
        "xmr_outputs": 8528148826404
      }
    ]
  },
  "status": "success"
}

api/outputs?txhash=<tx_hash>&address=&viewkey=&txprove=<0|1>

For txprove=0 we check which outputs belong to given address and corresponding viewkey. For txprove=1 we use to prove to the recipient that we sent them founds. For this, we use recipient's address and our tx private key as a viewkey value, i.e., viewkey=<tx_private_key>

Proving transfer:

We use recipient's address (i.e. not our address from which we sent xmr to recipient). For the viewkey, we use tx_private_key (although the GET variable is still called viewkey) that we obtained by sending this txs.

api/networkinfo

curl  -w "\n" -X GET "https://api.tuske.network/api/networkinfo"
{
  "data": {
    "alt_blocks_count": 6,
    "block_size_limit": 600000,
    "block_size_median": 300000,
    "cumulative_difficulty": "20061376052744",
    "current": true,
    "current_hf_version": 16,
    "difficulty": "2634871090",
    "fee_estimate": 0,
    "fee_per_kb": 0,
    "grey_peerlist_size": 0,
    "hash_rate": 21957259,
    "height": 6662,
    "incoming_connections_count": 57,
    "outgoing_connections_count": 12,
    "stagenet": false,
    "start_time": 1715474376,
    "status": true,
    "target": 120,
    "target_height": 0,
    "testnet": false,
    "top_block_hash": "3c1f7b3808145ac57afdf35a5094579a1660cf3c4321dff1fbcdb60d37164346",
    "tx_count": 3561,
    "tx_pool_size": 0,
    "tx_pool_size_kbytes": 0,
    "white_peerlist_size": 237
  },
  "message": "Cant get per kb dynamic fee esimate",
  "status": "success"
}

api/outputsblocks

Search for our outputs in last few blocks (up to 5 blocks), using provided address and viewkey.

# testnet address
curl  -w "\n" -X GET https://api.tuske.network/api/outputsblocks?address=9sDyNU82ih1gdhDgrqHbEcfSDFASjFgxL9B9v5f1AytFUrYsVEj7bD9Pyx5Sw2qLk8HgGdFM8qj5DNecqGhm24Ce6QwEGDi&viewkey=807079280293998634d66e745562edaaca45c0a75c8290603578b54e9397e90a&limit=5&mempool=1

api/version

curl  -w "\n" -X GET "https://api.tuske.network/api/version"
{
  "data": {
    "api": 65538,
    "blockchain_height": 6662,
    "git_branch_name": "master",
    "last_git_commit_date": "2024-04-15",
    "last_git_commit_hash": "3fd602b",
    "monero_version_full": "1.0.0.0-1d74b580a"
  },
  "status": "success"
}

api number is store as uint32_t. In this case 65536 represents major version 1 and minor version 0. In JavaScript to get these numbers, one can do as follows:

var api_major = response.data.api >> 16;
var api_minor = response.data.api & 0xffff;

api/rawblock/<block_number|block_hash>

Return raw json block data, as represented in Tuske.

curl  -w "\n" -X GET "https://api.tuske.network/api/rawblock/1000"

Example result not shown.

api/rawtransaction/<tx_hash>

Return raw json tx data, as represented in Tuske.

curl  -w "\n" -X GET "https://api.tuske.network/api/rawtransaction/14aded89a283155356f3f558648c7dd5bca1c7d07ec23cae939c885aea043a37"

Last updated