I am trying to build an exercise. I want to produce a random 256-bit seed to give as an input for creating a Monero stealth address.
1) What are the restrictions on this seed in practice? I know it must be a legitimate scalar, but is that satisfied by it being 256-bit length? Can it be any random 256-bit number? If not, is there a javascript library for that calculation?
2) I have to write this exercise's grading program in nodejs (it is part of a bigger project). Does anyone know where I can find a javascript library that supports the needed calculations? (e.g. keccak, bytes_to_words, words_to_bytes, sc_reduce32, private_key_to_public_key).
For reference, the process for the calculation of a Monero stealth address is explained here very well.