Test bxid/txid API server

Written by

Qsilver

Jan 9, 2024

I made a dual txid and bxid archival service that is accessible using curl or even a web browser. txid data from epoch 83 and bxid data from epoch 90 are in the archive. Both txid and bxid data are being updated every minute.

This will allow for much easier integration of qubic into existing crypto services as it becomes much easier to determine if a transaction succeeded. WARNING: this is just a test server and not for production usage, but it should be sufficient to get deposit/withdraw logic debugged.

If you have the important tx details you can directly calculate the bxid with the calcbxid command of the bxid utility. qubic-cli/bxid.cpp at main · Qsilver97/qubic-cli (github.com)

./bxid calcbxid epoch tick source dest amount

Alternatively, once you have a txid, you can get its data after it is included in the specified tick with:

curl 93.190.139.223:9200/txid/_doc/(txid) or just use browser.

Assuming the transaction was included in the tick it will appear and have a “bxid” field. Search for that bxid with:

curl 93.190.139.223:9200/bxid/_doc/(bxid)

If you get a valid return that means the transaction completed with success. If it is not found then assuming the archive is current, that means the transaction was included in a tick but failed, ie. you sent more QU than was in the balance.

That is all you need to do make sure your tx “confirmed”. There is no actual concept of confirmations in qubic, as it becomes instantly final, so as soon as the bxid is available then it is safe to assume the funds were transferred by the txid.

While not needed for transaction validation you can search for any field in either txid or bxid dataset using the _search: Search — OpenSearch Documentation

93.190.139.223:9200/txid/_search?q=AFZPUAIYVPNUYGJRQVLUKOPPVLHAZQTGLYAAUUNBXFTVTAMSBKQBLEIEPCVJ

93.190.139.223:9200/bxid/_search?q=AFZPUAIYVPNUYGJRQVLUKOPPVLHAZQTGLYAAUUNBXFTVTAMSBKQBLEIEPCVJ

93.190.139.223:9200/txid/_search?q=11919361

93.190.139.223:9200/bxid/_search?q=11919361

Different results might be returned as you can have txid that do not transfer any value in addition to transaction failure. A lot of transactions are using zero value with extradata, and that can be seen in the txid output.

© 2024 Qubic.

Qubic is a decentralized, open-source network for experimental technology. Nothing on this site should be construed as investment, legal, or financial advice. Qubic does not offer securities, and participation in the network may involve risks. Users are responsible for complying with local regulations. Please consult legal and financial professionals before engaging with the platform.

© 2024 Qubic.

Qubic is a decentralized, open-source network for experimental technology. Nothing on this site should be construed as investment, legal, or financial advice. Qubic does not offer securities, and participation in the network may involve risks. Users are responsible for complying with local regulations. Please consult legal and financial professionals before engaging with the platform.

© 2024 Qubic.

Qubic is a decentralized, open-source network for experimental technology. Nothing on this site should be construed as investment, legal, or financial advice. Qubic does not offer securities, and participation in the network may involve risks. Users are responsible for complying with local regulations. Please consult legal and financial professionals before engaging with the platform.