EOSIO / eosjs-ecc

Elliptic curve cryptography functions: Private Key, Public Key, Signature, AES, Encryption, Decryption
288 stars 119 forks source link

explicit dependencies hotfixed #27

Closed andriytyurnikov closed 6 years ago

andriytyurnikov commented 6 years ago

This one is not for merge, but for reference.

For whatever reason library can not be used (imported) in simple way from node.js ecosystem, as many dependencies are not inlined into dist package or not visible to consuming packages, which may be caused by babel pipeline.

assert usualy fails first, to reproduce try not to use local environment with dependencies installed globally. also, looks like CI and test are not adequate for this problem. Also it looks like node LTS version is not covered by CI.

jcalfee commented 6 years ago

I just added documentation .. Please give this a try and see if it does what you need: https://github.com/EOSIO/eosjs-ecc#include

andriytyurnikov commented 6 years ago

@jcalfee , docs you referring are not about npm - I've failed to use npm package in few toolchains (react-native and weex) , and while it is totally possible that issue is with those toolchains - keeping you notified ;)

chris-allnutt commented 6 years ago

I'm going to close this PR to avoid accidental merging, please feel free to continue this discussion in an issue if necessary.

jcalfee commented 6 years ago

@andriytyurnikov please do keep me notified. From what I understand react native may be missing some of the crypto libraries. Let me know if you make any progress.

andriytyurnikov commented 6 years ago

@jcalfee , weex got up and running after adding stream package to dependencies, no success with react-native though.

chris-allnutt commented 6 years ago

@andriantolie my recommendation would be to implement native signing and packing/unpacking on the devices. Android since 6.0 should support hardware signing, and iPhone 6 devices and newer support it as well.

andriytyurnikov commented 6 years ago

just used minified code from CDN in react-native app - works fine, looks like npm/babel/metro issue now