util.toBase64
`bn.toArrayLike` is used instead of `bn.toBuffer`, to ensure compatibility with browserify.