CMEONE / chia-utils

A set of JavaScript utilities to facilitate conversions for the Chia network
GNU Affero General Public License v3.0
20 stars 9 forks source link

allow alternate prefix for puzzle_hash_to_address #7

Closed dkackman closed 2 years ago

dkackman commented 2 years ago

In order to work in testnet this code needs to accept an address prefix other than "xch".

Add prefix as a parameter to puzzle_hash_to_address. Defaults to "xch" to be non-breaking.

Test included,

CMEONE commented 2 years ago

Looks great, thanks so much for this contribution!

dkackman commented 2 years ago

Would you mind publishing that to npm? I'm using a forked copy over here: https://github.com/dkackman/chia-repl.

CMEONE commented 2 years ago

Sorry, I totally forgot to publish a new release! v1.0.10 should now be available on NPM with the new prefix parameter feature.