alan-turing-institute / trustchain

Trustworthy decentralised PKI
https://alan-turing-institute.github.io/trustchain/
Apache License 2.0
11 stars 5 forks source link

Add locate_transaction to the CLI #182

Open thobson88 opened 4 months ago

thobson88 commented 4 months ago

Given a DID, it's sometimes useful to be able to identify the corresponding Bitcoin transaction in which it was published.

The locate_transaction in trustchain-ion already does this, so we should add a CLI command for convenience.

For instance, the root DID in our current demo network is did:ion:test:EiBJ8o9Bh-6ToxK3hVyZEHIspTEAqnURQy-7NAVFrr9_bw, for which locate_transaction returns the block hash and transaction index:

000000000000005c45c1d850efc69fd57d56b87009d539838646d3891037451c
5

(Even more convenient would be the txid.)