Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TxRef Magic Code for testnet no longer X? #3

Closed
ChristopherA opened this issue Aug 6, 2019 · 2 comments

Comments

@ChristopherA
Copy link
Member

commented Aug 6, 2019

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

  • TRANSACTION:
  • TIP:

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

-- Christopher Allen

@danpape

This comment has been minimized.

Copy link
Collaborator

commented Aug 6, 2019

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

This comment has been minimized.

Copy link
Collaborator

commented Aug 6, 2019

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


@danpape danpape closed this Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.