Solana Anchor: src.toTwos or src.toArrayLike is not a function
This is a quick debugging post for development with https://github.com/project-serum/anchor
If you’re getting the error message
TypeError: src.toTwos is not a function
TypeError: src.toArrayLike is not a function
then you might have forgotten to turn your number into a Big Number
new anchor.BN() to parse your existing number into a Big Number, and the error should go away.