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

Add support for STX (Blockstack) address #299

Merged
merged 5 commits into from
Sep 3, 2021
Merged

Conversation

vinhbhn
Copy link
Contributor

@vinhbhn vinhbhn commented Jul 4, 2021

Issue number

#295

Description

Add support for STX (Blockstack) address

Reference to the specification

Reference to the test address.

List of features added/changed

  • STX encoder, decoder

NOTE: If you are adding new coin address support, please make sure to add a reference link to README so that reviewer can verify.

How much has the filesize increased?

21kB

How Has This Been Tested?

STX address has the format: S + P or M (p2pkh or p2sh version) + hex_payload + hex_checksum
hex_checksum = sha256(sha256(p2pkh or p2sh version + hex_payload)).substring(0, 4)
Info

According to the 3 links I sent above, the hex_payload is a46ff88886c2ef9762d970b4d2c63678835bd39d which can be used both SP or SM addresses (if not using hex_checksum), so I decided to keep hex_payload and hex_checksum after that so I can use used for encoder

Checklist:

  • My code follows the code style of this project.
  • My code implements all the required features.
  • I have specified correct coinTypes specified at Slip 44
  • I have provided the reference link to the specification I implemented.
  • I have provided enough explanation about how I provided the test address

@makoto
Copy link
Member

makoto commented Aug 31, 2021

There is a size increase from 370k to 438k

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Aug 31, 2021

There is a size increase from 370k to 438k

After editing, the file size increased by 21kb from 387kb to 408kb.

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Sep 3, 2021

Hey @makoto, can you review it?

@makoto makoto merged commit c2466a9 into ensdomains:master Sep 3, 2021
@makoto
Copy link
Member

makoto commented Sep 3, 2021

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants