Currently, the only type of exponentiation supported, is for raising a BN object to the power of a a BN object.
Every other binary operation supports the 2nd operand being both a BN object and a plain JavaScript Number:
bn1.add(bn2) and bn.addn(num)
bn1.sub(bn2) and bn.subn(num)
bn1.mul(bn2) and bn.muln(num)
bn1.div(bn2) and bn.divn(num)
bn1.mod(bn2) and bn.modn(num)
So it seems a bit odd that function pow is provided, but function pown is not provided.
Currently, the only type of exponentiation supported, is for raising a
BNobject to the power of a aBNobject.Every other binary operation supports the 2nd operand being both a
BNobject and a plain JavaScript Number:bn1.add(bn2)andbn.addn(num)bn1.sub(bn2)andbn.subn(num)bn1.mul(bn2)andbn.muln(num)bn1.div(bn2)andbn.divn(num)bn1.mod(bn2)andbn.modn(num)So it seems a bit odd that function
powis provided, but functionpownis not provided.