paulmillr / noble-curves

Audited & minimal JS implementation of elliptic curve cryptography.
https://paulmillr.com/noble
MIT License
623 stars 56 forks source link

Allow numberToBytes to take a number #51

Closed madeken closed 1 year ago

paulmillr commented 1 year ago

Is that actually useful to you?

madeken commented 1 year ago

lol, slightly. Right now I have: numberToVarBytesBE(BigInt(nonce)) which isn't a big deal. But seems kinda pointless to convert to a BigInt just to satisfy the type-checker, when numberToHexUnpadded already supports number 👯‍♀️

paulmillr commented 1 year ago

tests seem to fail

paulmillr commented 1 year ago

added by myself