-
Notifications
You must be signed in to change notification settings - Fork 172
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
How to convert JSON "address" to bech32? #36
Comments
Great question. Shortest answer: Handshake airdrop addresses are segwit p2pkh addresses in bech32 format. That means they contain a Here's an example using the first faucet address in https://github.com/handshake-org/hs-tree-data/blob/master/proof.json:
And here's the proof using hsd as a library and calling the
|
@cjb does @pinheadmz's response alleviate your issue? |
Yes! That worked. Thanks for the great answer. |
It'd be nice to be able to prove (to myself) that the JSON generated by hs-airdrop is really going to send the reward to the address I passed to hs-airdrop, and not some other address. But the formats aren't the same -- the one on the command line starts with
hs
and is 42 chars long and the one in the payload'saddress
field is 40 chars long and doesn't match it. Is there a conversion function? Or is that field not where the target address goes..?The text was updated successfully, but these errors were encountered: