WebOfTrustInfo / btcr-hackathon-2019

BTCR Hackathon 2019
https://weboftrustinfo.github.io/btcr-hackathon-2019/
MIT License
2 stars 0 forks source link

TxRef Magic Code for testnet no longer X? #3

Closed ChristopherA closed 5 years ago

ChristopherA commented 5 years ago

to: @danpape cc: @mattcollier @kimdhamilton @rxgrant

Daniel,

I thought the txref magic code for testnet would mean that it would always begin with x. How does one differentiate between mainnet and testnet now? Is this a bug in the playground txref code?

You have my testnet DID in the playground now as: 

DID: did:btcr:8yv2-xzpq-qqqq-9yce-nk

This should eventually our canonical DID reference from things like our implicit DID Document, and ultimately our Extended DID Document.

-- Christopher Allen

danpape commented 5 years ago

A major change in the final BIP 136 is that there are now 4 magic codes, one for each of mainnet, testnet, mainnet with utxo bits and testnet with utxo bits. This corresponds to prefix chars of 'r', 'x', 'y', and '8', respectively. That's why your above DID starts with "did:btcr:8yv2..."

danpape commented 5 years ago

As discussed offline, if you want a DID that refers to the above transaction with a "short" txref (one that assumes the utxo index is 0) then you can use did:btcr:xyv2-xzpq-q9wa-p7t