diff --git a/src/main/java/io/zksync/signer/SigningUtils.java b/src/main/java/io/zksync/signer/SigningUtils.java index 8045e6a..ec158ba 100644 --- a/src/main/java/io/zksync/signer/SigningUtils.java +++ b/src/main/java/io/zksync/signer/SigningUtils.java @@ -254,21 +254,21 @@ private static byte[] packAmountChecked(BigInteger amount) { return packAmount(amount); } - private static BigInteger closestPackableTransactionFee(BigInteger fee) { + public static BigInteger closestPackableTransactionFee(BigInteger fee) { final byte[] packedFee = packFee(fee); return decimalByteArrayToInteger(packedFee, FEE_EXPONENT_BIT_WIDTH, FEE_MANTISSA_BIT_WIDTH, 10); } - private static BigInteger closestPackableTransactionAmount(BigInteger amount) { + public static BigInteger closestPackableTransactionAmount(BigInteger amount) { final byte[] packedAmount = packAmount(amount); return decimalByteArrayToInteger(packedAmount, AMOUNT_EXPONENT_BIT_WIDTH, AMOUNT_MANTISSA_BIT_WIDTH, 10); } - private static byte[] packFee(BigInteger fee) { + public static byte[] packFee(BigInteger fee) { return reverseBits(integerToDecimalByteArray(fee, FEE_EXPONENT_BIT_WIDTH, FEE_MANTISSA_BIT_WIDTH, 10)); } - private static byte[] packAmount(BigInteger amount) { + public static byte[] packAmount(BigInteger amount) { return reverseBits(integerToDecimalByteArray(amount, AMOUNT_EXPONENT_BIT_WIDTH, AMOUNT_MANTISSA_BIT_WIDTH, 10)); }