class BridgeSerializationUtils {

    public static byte[] serializeOneOffLockWhitelist(Pair<List<OneOffWhiteListEntry>, Integer> data) {
        List<OneOffWhiteListEntry> entries = data.getLeft();
        Integer disableBlockHeight = data.getRight();
        int serializationSize = entries.size() * 2 + 1;
        byte[][] serializedLockWhitelist = new byte[serializationSize][];
        for (int i = 0; i < entries.size(); i++) {
            OneOffWhiteListEntry entry = entries.get(i);
            serializedLockWhitelist[2 * i] = RLP.encodeElement(entry.address().getHash160());
            serializedLockWhitelist[2 * i + 1] = RLP.encodeBigInteger(BigInteger.valueOf(entry.maxTransferValue().longValue()));
        }
        serializedLockWhitelist[serializationSize - 1] = RLP.encodeBigInteger(BigInteger.valueOf(disableBlockHeight));
        return RLP.encodeList(serializedLockWhitelist);
    }

    private  BridgeSerializationUtils();

}