They say a image speaks louder then 1000 words so:

enter image description here

As you can see from the image above, this should work ? What am i missing here?

This is my encode function, http://cryptocoinjs.com/modules/currency/coinstring/

I can confirm the private key spitted out is in correct format for if i do a dump i get:

$ ./src/d-cli dumpprivkey WRSybD94sWugjAQ89zyvbLsnw76ovCYEGo
  • How does your encode() function work? You probably aren't encoding it as base58 correctly or you are encoding the wrong thing (e.g. hex string instead of the bytes themselves).
    – Ava Chow
    Mar 16, 2018 at 20:18
  • sorry i edited my question to tell about my encode function, cryptocoinjs.com/modules/currency/coinstring and i can confirm the spitted out key is in correct format, the PREFIX is 100% correct as you can see by the image and code reference, really struggling with this one :(
    – scott
    Mar 16, 2018 at 20:33
  • You can see on the referenced encode() function that im sure im doing everything correct?
    – scott
    Mar 16, 2018 at 20:39
  • the issue was in the encode() function thanks kindly
    – scott
    Mar 16, 2018 at 21:00

1 Answer 1


The issue as suggest by Andrew was in the encode function. After using https://www.npmjs.com/package/wif everything worked perfectly as intended.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.