code: private static byte[] formatMessageForSigning(String message) {
          try {
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              bos.write(BITCOIN_SIGNED_MESSAGE_HEADER_BYTES.length);
              bos.write(BITCOIN_SIGNED_MESSAGE_HEADER_BYTES);
              byte[] messageBytes = message.getBytes(StandardCharsets.UTF_8);
              VarInt size = new VarInt(messageBytes.length);
              bos.write(size.encode());
              bos.write(messageBytes);
              return bos.toByteArray();
          } catch (IOException e) {
              throw new RuntimeException(e);  // Cannot happen.
          }
      }
docs: <p>Given a textual message, returns a byte buffer formatted as follows:</p>
  <p>{@code [24] "Bitcoin Signed Message:\n" [message.length as a varint] message}</p>