All mod/div methods return a BN instance, except modn which returns a JS Number.
I think it would make sense making the current modn internal (prefixing it with _) so that toString can keep using it the fastest way, and creating a new modn which returns a BN instance.
divmod already encapsulates a modn result as a BN instance so it should use the new method.
Comments?
All mod/div methods return a BN instance, except
modnwhich returns a JS Number.I think it would make sense making the current
modninternal (prefixing it with _) so thattoStringcan keep using it the fastest way, and creating a newmodnwhich returns a BN instance.divmodalready encapsulates amodnresult as a BN instance so it should use the new method.Comments?