Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Add to the documentation that it's currently support on Node <=10 #48

Open
tomafc330 opened this issue Oct 5, 2019 · 8 comments
Open

Comments

@tomafc330
Copy link

The latest version of NodeJS (12.x.x) doesn't support some of the functions used by the library. In particular:

    "@kinecosystem/kin-base": {
      "version": "0.20.4",
      "resolved": "https://registry.npmjs.org/@kinecosystem/kin-base/-/kin-base-0.20.4.tgz",
      "integrity": "sha512-Hb5umvYV7bqAEnAawJDaSwNygx8I4tQHVHAuUWdbOESw2Y2XzhA3Csl81xvEvrPsghvkYjwsZA9F/YuKqEIWPw==",
      "requires": {
        "base32.js": "0.1.0",
        "bignumber.js": "5.0.0",
        "crc": "3.8.0",
        "ed25519": "0.0.4",
        "js-xdr": "1.1.2",
        "lodash": "4.17.14",
        "sha.js": "2.4.11",
        "tweetnacl": "1.0.1"
      },

ed25519 is the culprit, it's an encryption library but it's pretty outdated and uses removed APIs in Node version 12.

I will create a PR to update the README to add a note :)

@tomafc330
Copy link
Author

Updated the README:

#49

@beeman
Copy link

beeman commented Oct 6, 2019

I have noticed these issues using node v12 and I think the fix here should be something that works with that version. Node.js v10 will go into maintenance mode on April 2020.

There seems to be a native JavaScript implementation but they say it's much slower. Not sure if there are other options to get rid of this dependency

@chaseeb
Copy link

chaseeb commented Oct 6, 2019

Thanks @beeman I'll make sure and stay on top of this change as we'll need to make sure it's taken care of. Are you saying that there is not an updated version of ed25519?

@beeman
Copy link

beeman commented Oct 6, 2019

@chaseeb that's correct. The last version of that package is from 2015 and it seems like it's abandoned.

If you check this warning here you see a fallback is used, but it's recommended against for production use:
https://github.com/stellar/js-stellar-sdk/blob/master/README.md#stellar-sdk-vs-stellar-base

Maybe this can be used on Node 12 and up: https://github.com/spacemeshos/ed25519-WASM

@tomafc330
Copy link
Author

Just chiming in here -- looked at the stellar commits, found this gem:

stellar/js-stellar-base@bd6c268

@chaseeb
Copy link

chaseeb commented Oct 6, 2019

Nice fine, Tommy! Thanks for looking into this =)

@tomafc330
Copy link
Author

No problem -- glad to help :)

Can probably close my PR once that change has been implemented

@beeman
Copy link

beeman commented Oct 7, 2019

Nice one @tommytcchan, seems like a great fix 💯

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

No branches or pull requests

3 participants