Working with QEDIT Nodes

A node is a deployment of QEDIT. It usually servers a single business customer and all its users. A node exponses a web service API that is used to interact with it and with the wallets it contains. This section will focus on the API calls that are used to monitor and maintain the QEDIT node.

Checking the node health

The QEDIT API provides an endpoint that allows querying whether the QEDIT node is operating properly. When called the endpoint returns the version of the node, the status of its Blockchain connector, the status of the connection to its database, and the status of the connection to its messaging queue.

Request

POST /health

Response

 {
    "blockchain_connector": {
       "error": "",
       "passing": true
    },
    "database": {
       "error": "",
       "passing": true
    },
    "message_queue": {
       "error": "",
       "passing": true
    },
    "passing": true,
    "version": "v1.6.0"
}

Checking the node sync status

When deploying a new node or when importing a wallet the node needs to scan past Blockchain transactions to accumulate the accurate current state of the Blockchain. This process may take a while depending on the amount of transactions that exist on for the smart contract that is used by the QEDIT Blockchain connector. The QEDIT API provides an endpoint to query whether the node is synched with the Blockchain.

Request

POST /analytics/get_sync_status

Response

{
   "blockchain_block_height": 278527,
   "in_sync": true,
   "last_processed_block_height": 278527
}

Browsing the network activity

A QEDIT node is connected via the Blockchain to other QEDIT nodes. All these nodes communicate through the Blockchain by a defined smart contract that commits to blocks zero-knowledge proofs and data commitments. These proofs and commitments enable each node to construst an accurate state but without revealing the details of each transaction. The QEDIT API provides an endpoint for browsing all the zero-knowledge proofs and data commitments that were written to blocks.

Request

POST /analytics/get_network_activity
{
   "start_index": 0,
   "number_of_results": 1
 }

Response

{
  "transactions": [
    {
      "content": {
        "transfers": [
          {
            "binding_sig": "a3e442990add4022738294ee7ae1c7472d4d4bb9d41b86c2829abff898f8fce498d5c542110299b5ab9d88a4757ebc05657dd634d9a3ceffd9bd73e48b827708",
            "outputs": [
              {
                "cm": "f8841915e6af56b3b61cbf1f922f730d81d080874719ba7120b1ae5d2531166b",
                "cv": "301960589fc6f29933ae6cf47e3b7c48e9fc7015566912c346b2a466b89dcc28",
                "enc_note": "bab8b0189ba920901db9b1f85c86c7be4d8bf0a3bbc74443e9eb6bd78c658882b929409fced6f1c48cb45a4c791e2222939fca58347b07f75209a35e74f6088d7b85ef03bff0209ed476922bb372609677f49a8578721de3e2f4bd374bddbef116f936cae6e636caf814d0a033a6b4734263de80459bf909950f03597cef895f08a79bc1e30c01b1fd10fab5753d2955f1f28cc1e749bca34b624b38a14ac36daa1b111b3cec5185f747c4f19e02765b212bfde7e45985f281a03d55fe7f08aab41f71943f9a06026d4fbf2a86b1dbc8f9048c48701d1e75747aa7e1384b2949006f4dc9aceee74bdbea44ca684cbec023ab910a67413763730d059fee13eb00e22169e3e329aa18a777f560626f19317ef806680b3aba7ec7ab79abc2c413222363f7f985d93af8d0c3b402a404158a1bb53b0ac6b5170130787bd9a825056a329a8cf66e1806c3bdf5f062f5714c4afa9c3e89004754bda6c581d4727d8cd6d3e962",
                "enc_sender": "375f047db29c92cdb2c4539bdd014741266fb608ed7362717997fb720747bf00ea9d14fc069c9719e069face1660b78a0c5da610354e4ad3fc2d064aedcc379b805c3f9dc446b02ef9e4bbe3bf429c76",
                "epk": "0d52b40e6fff978226eed8a5e8439e057c71572eabe02f189207171f71c2596b",
                "zkproof": "b6651f8215d288dbdbcb814a00300d043377101e2f99a25eea42009e7c31ce05e22643d816c7f9f1d70c2e759396214691aeccea2aa158c85194339579a47219d13bb399d52780916978d54adf488fef0fe0c8e76ecf731f20006b2ab5a348bf0a8b2f57de1ed9990a490614edae62fbfb8c73ed337535f5ff4db94493a517852ec6bb1c363ab222368a9839df3e622e846d738e89e9ab2ba97fc53d8faeecfb0b2b01717ff381b1e27047a05176faaf7f5d166acee0caae5ee1a3422997c51a"
              }
            ],
            "rk": "10769d6ed05f2458de2589bbf7ee2a864c4b422c2515bed982f9dda466835f2c",
            "spend_auth_sig": "a11092e93bf68aa7ec9b2ec8bda75e89697350e2c6fabe9d510572edc190795b42f7098818ed319aa91530b7d2ba0050bffbf6ac62ae0c4fbcd747d825cfec0d",
            "spends": [
              {
                "anchor": "d0da46137a9707430f34dde34a6ed8f8f530c85270ee99210377e39b2015b20f",
                "cv": "526c8d22f4582737b17caea35f14773e85b0fe12889bf54907eb9211f9de1bbc",
                "nullifier": "2b698bd43ea61c23b0158a173d2cd0c76b0d878d14cbeb0d2ead765613a1b169",
                "zkproof": "b5af59e07b23c9c0208b3e156a47c83130e6496ba17332c9e226157895b61a6830dbb3698cd0845356a1debc382e6062912a247580e4bb18f7e255fe1087b01c138a8f3ee7219f4c1f7a8e79cdd97150d6bd34264cdcef8f6cdd690b8ad64a4810ce411220d96c825d5bd2028af0e51cb9acbb442d747e92d264b8ba85431db73b0dd25611b8de786e3509d2740a59bd911ff1e09864a1bf66839c60a70a6b2a6d9b03cbad6b5303f5bf7661fae185154851dd17e1825982b6efa57e9e98babd"
              }
            ]
          }
        ]
      },
      "metadata": {
        "block_hash": "dc60f258febc69ed6ed1b08c5ea798758320ebd5acdf3a8174ae04bac102c8fc",
        "block_height": 278216,
        "index_in_block": 0,
        "timestamp": "2019-11-03T13:28:20Z",
        "tx_hash": "93635776cd43b4d2f58ec8f819db3edfb26b3c68e678a6c22fb8ba0005ff7a9f",
        "type": "Transfer"
      }
    }
  ]
}

Listing all the wallets in a node

A QEDIT node can contain many wallets. The QEDIT API provides an endpoint to list all the wallets that exist in a node.

Request

POST /node/get_all_wallets

Response

{
  "wallet_ids": [
    "Jane",
    "John",
    "Marty"
  ]
}