Confused about address formats
oleganza opened this issue · 2 comments
The main spec defines Asset Address as Base58Check encoding of the hash of the script. However, this spec defines some other kind of address. Is it a deprecated format, or both are proposed?
Personally, it seems to me that wallets capable of managing assets wouldn't need any P2PKH addresses, they can (and should) operate on pure Asset IDs and provide their own mechanism of storing the assets on the user's keys (that could be P2PKH/P2SH/raw multisig or something else). Current spec for addresses based on P2PKH seems very limited to me. I'd expect multisig P2SH to be used by default as the safest option. (Or does the spec allow P2SH, just does not articulate it?)
The OA-capable app maybe does not need any special address format to store assets. It may just know which inputs are cash and which are assets, so it will do the right thing without depending on user-provided string.
What do you think?
These are actually two different things. The main spec defines the "asset ID" format as Base58Check encoding of the hash of the script.
This spec is a spec for representing addresses in a different way to ensure colored coins wallets don't send colored coins to wallets that can't interpret them correctly. This is more or less equivalent to using a different version byte for wallets capable of interpreting and spending colored coins in the right way.
Does this answer your question?
Yeah, after posting this I have actually figured this. Thanks for a reply. I'll add an example with P2SH address to show that the Asset Address could wrap any Bitcoin address, not only P2PKH.