Suggested speed up #2 for Tokenized

To get tx status during Zero Confirmation stage, why not simply query https://api.whatsonchain.com/v1/bsv/main/tx/hash/

Example:
At 2:39AM:
https://api.whatsonchain.com/v1/bsv/main/tx/hash/1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81

{“hex”:"",“txid”:“1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81”,“hash”:“1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81”,“version”:2,“size”:192,“locktime”:0,“vin”:[{“coinbase”:"",“txid”:“4e1bdd828036ad468a33790f6aa060402154e643124627ab8af946c9b9233f9f”,“vout”:0,“scriptSig”:{“asm”:“3045022100e20be0d52e7bb2ab6dba1780db5ba6d27ab44c0c0c42fff3f0fcad96ced80eab02200dfea5e3c19fd9599bbc27926c8f088367f10d2b0afb0d6d0ab9fc0eee7ce224[ALL|FORKID] 023b58d9ca40260da3bfefba923441ee18631f86a783fe422d364e340dc16af5a7”,“hex”:“483045022100e20be0d52e7bb2ab6dba1780db5ba6d27ab44c0c0c42fff3f0fcad96ced80eab02200dfea5e3c19fd9599bbc27926c8f088367f10d2b0afb0d6d0ab9fc0eee7ce2244121023b58d9ca40260da3bfefba923441ee18631f86a783fe422d364e340dc16af5a7”},“sequence”:4294967295}],“vout”:[{“value”:0.00003098,“n”:0,“scriptPubKey”:{“asm”:“OP_DUP OP_HASH160 a9d299c695ebd32960ba5df8502c9522aac5601b OP_EQUALVERIFY OP_CHECKSIG”,“hex”:“76a914a9d299c695ebd32960ba5df8502c9522aac5601b88ac”,“reqSigs”:1,“type”:“pubkeyhash”,“addresses”:[“1GUwVDGhewzYgSujuXP1ZmBmsKR8cfCQKZ”],“opReturn”:null,“isTruncated”:false}}]}

NOTE this has Zero Confirmations (ZERO Conf State) because
there is no “,“confirmations”:nn” on the end of it

Then by around 3:04 AM it was CONFIRMED! So confirmation took from 2020/06/07 02:39:01 to 3:04AM approx so 25 minutes for 1st Confirmation

https://api.whatsonchain.com/v1/bsv/main/tx/hash/1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81

{“hex”:"",“txid”:“1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81”,“hash”:“1d10276e844866509edfae726c57d5ce1e8258b0b9a9f05921c0889039f8fa81”,“version”:2,“size”:192,“locktime”:0,“vin”:[{“coinbase”:"",“txid”:“4e1bdd828036ad468a33790f6aa060402154e643124627ab8af946c9b9233f9f”,“vout”:0,“scriptSig”:{“asm”:“3045022100e20be0d52e7bb2ab6dba1780db5ba6d27ab44c0c0c42fff3f0fcad96ced80eab02200dfea5e3c19fd9599bbc27926c8f088367f10d2b0afb0d6d0ab9fc0eee7ce224[ALL|FORKID] 023b58d9ca40260da3bfefba923441ee18631f86a783fe422d364e340dc16af5a7”,“hex”:“483045022100e20be0d52e7bb2ab6dba1780db5ba6d27ab44c0c0c42fff3f0fcad96ced80eab02200dfea5e3c19fd9599bbc27926c8f088367f10d2b0afb0d6d0ab9fc0eee7ce2244121023b58d9ca40260da3bfefba923441ee18631f86a783fe422d364e340dc16af5a7”},“sequence”:4294967295}],“vout”:[{“value”:0.00003098,“n”:0,“scriptPubKey”:{“asm”:“OP_DUP OP_HASH160 a9d299c695ebd32960ba5df8502c9522aac5601b OP_EQUALVERIFY OP_CHECKSIG”,“hex”:“76a914a9d299c695ebd32960ba5df8502c9522aac5601b88ac”,“reqSigs”:1,“type”:“pubkeyhash”,“addresses”:[“1GUwVDGhewzYgSujuXP1ZmBmsKR8cfCQKZ”],“opReturn”:null,“isTruncated”:false}}],“blockhash”:“000000000000000002d3e369107be7e3ad42a6d335f981a4f1d8bce74a37b754”,“confirmations”:1,“time”:1591513111,“blocktime”:1591513111}

I am not sure what you are looking to solve here. Tokenized doesn’t require confirmations and none of these services provide faster confirmations. Spynode is designed to communicate directly with the Bitcoin P2P network and not require any third party services. We might build a version that is more advanced, but it will likely use a service directly from a miner.

api.whatsonchain.com takes advantage of special indexes maintained by whatsonchain.com.
So it already does all the low level api calls for us to get all the info about every tx.
So the ZeroConf state is seen right away after the build --tx --send.

So it seems a good idea to use it instead of doing the api calls locally in code.

Again, it would be interesting to have an option in Tokenzied to use it instead of the local golang code.

We do plan on extracting spynode into an external service, so it will be possible to implement it to use whatever data you want. But right now it is much more efficient and fast to talk directly to the Bitcoin network than to go through an API.

Sure. That is very cool what you are planning. I hope you instrument it with lots of micropayments and generate good revenue for yourselves.