Any JS dev who wants to play with libsecp256k1 (the bitcoin ECC curve) and Cashu?

Trying to reproduce the crypto test vectors from the Cashu python client (https://github.com/cashubtc/cashu/blob/main/tests/test_crypto.py) in the Cashu JS wallet lib but it's not working for all vectors https://github.com/cashubtc/cashu-js/blob/main/test/test_crypto.js

Reply to this note

Please Login to reply.

Discussion

Please join us :) https://t.me/CashuBTC

```

const r = bytesToNumber(r_bytes);

const P = Point.fromPrivateKey(r);

```

I'm not sure if this is where your bug is happening, but you don't need r because r_bytes is fine as a parameter for Point.fromPrivateKey so it is an unnecessary calculation.

I suggest using Typescript as having stricter types helps find bugs.

I am looking further to see if I can find anything wrong...