Closed dgpv closed 5 years ago
The addresses page is a carry over from the old .org site and is potentially the one out of date. I will look into it and update accordingly. Thanks @dgpv . Also - noted your comments on multi-sig CT addresses.
The correct prefix for an unblinded address is 2.
You can validate this by creating a new address using getnewaddress and then passing that into validateaddress. That will return data similar to:
"isvalid": true,
"address": "CTEoaMTWgfUKoST1fkitVWuHHueqiL4EcUjrwJXuZW9RWKbSzYNq8ttd8KzJr3KBMzxh6HC83CgroNLR",
"scriptPubKey": "76a914f5b3992c73d1bee5844d840bbb30fe00f989c1fc88ac",
"confidential_key": "028fafda60c741b4735c9b14fc768dbda05762f0355a09ceb8fcdd4da114c415bd",
"unconfidential": "2dwpu6ECUS2NHMwwAmqCGJ6uNESr6tUmAS9",
The 'unconfidential' address is the unblinded one. I will raise aPR to change the address page and close this shortly. Thanks for spotting @dgpv
Fixed with PR #52
By the way @dgpv you can create a multi-sig using the 'createmultisig' command. This is detailed in the 'Block Signing' tutorial section. Something like:
MULTISIG=$(e1-cli createmultisig 2 '''["'''$PUBKEY1'''", "'''$PUBKEY2'''"]''')
REDEEMSCRIPT=$(echo $MULTISIG | jq '.redeemScript' | tr -d '"')
Maybe it would be worth to mention that unblinded multisig addresses start with X, and blinded start with 'Azp'
Not sure if it would be suitable info for basic introduction pages, but maybe just as a footnote...
elements-cli createmultisig 2 '["0222c31615e457119c2cb33821c150585c8b6a571a511d3cd07d27e7571e02c76e", "039bac374a8cd040ed137d0ce837708864e70012ad5766030aee1eb2f067b43d7f"]'
{
"address": "XCSVzf6jD4p3GUg1XLxTYkzZvH1CHrjvDA",
"redeemScript": "52210222c31615e457119c2cb33821c150585c8b6a571a511d3cd07d27e7571e02c76e21039bac374a8cd040ed137d0ce837708864e70012ad5766030aee1eb2f067b43d7f52ae"
}
elements-cli createblindedaddress XCSVzf6jD4p3GUg1XLxTYkzZvH1CHrjvDA 02b0d67f275cc93ca2ac507375a1112982e8b50a627c3becb66a2ff27bc4fad0ac
Azpom1jJ3mGZzLwiB1bqkvAiRn1givCZ8WhWuY2BmUQMqqjq4uzbF9SNWy5icEq2yqsQCUd8u2epStKL
elements-cli createblindedaddress XRPehBAMuGCxDTFPiJkYgrEvQXYhT7iv2x 03dfeca24e0f901639db81afbb0c1e23b0911e3cb339237ad8eb034463fb6b9e58
Azpwy5Rp2ZxwmhidtpfJstdjGwmxjJ9rDJNB3WcGXzno5iicBh7wyetjtA6GGuFizPaXPtwZabAn5i2k
PR with info on multisig blinded addrs added to confidential addresses page: #54
A little offtopic, but is the bech32 prefixes and format for blinded and unblinded addresses already decided ? (in 0.17.0 elements branch chainparams.cpp is still not changed, and googling for "elements sidechain bech32" does not give anything useful)
they have not been decided, no.
Closing - addressed with PR #54
https://elementsproject.org/elements-code-tutorial/confidential-transactions:
https://elementsproject.org/features/confidential-transactions/addresses:
Maybe the info about "2" prefix is out of date ?
Also it is not clear from the pages if it is possible to have multisignature confidential address. It would be good to include info if it is possible and if not, why.