did-jwt icon indicating copy to clipboard operation
did-jwt copied to clipboard

Target ES2020

Open oed opened this issue 2 years ago • 7 comments

So that we can use noble-secp256k1 which is an order of magnitude smaller than elliptic.

oed avatar Dec 13 '21 18:12 oed

would that be enough to use this in react native without too much setup?

mirceanis avatar Dec 13 '21 19:12 mirceanis

Looks like there's a shim for BigInt which this package uses (unless RN started supporting BigInt).

oed avatar Dec 13 '21 20:12 oed

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 21 '22 20:02 stale[bot]

Not stale!

oed avatar Feb 22 '22 09:02 oed

Already using @noble/secp256k1, it is 100% without dependencies so works great in for example Angular. Not sure about React Native though...

sondreb avatar Jun 17 '22 19:06 sondreb

React native supports bigints now.

paulmillr avatar Jul 24 '22 11:07 paulmillr

I also suggest to replace:

    "@stablelib/ed25519": "^1.0.2",
    "@stablelib/random": "^1.0.1",
    "@stablelib/sha256": "^1.0.1",
    "@stablelib/x25519": "^1.0.2",
    "bech32": "^2.0.0",
    "js-sha3": "^0.8.0",

with @noble/hashes and @noble/ed25519, both of which passed independent security audit. bech32 can be replaced with @scure/base, which also passed the audit.

The packages support tree shaking, so you can use just whatever is needed e.g. just sha3, not ripemd160.

paulmillr avatar Jul 24 '22 11:07 paulmillr

this was fixed in #284

mirceanis avatar Sep 27 '23 18:09 mirceanis