sign method

String sign(
  1. SVPrivateKey privateKey
)

Sign the message using the private key

privateKey - The private key to use in signing the message

Implementation

String sign(SVPrivateKey privateKey) {
    SVSignature signature = SVSignature.fromPrivateKey(privateKey);
    signature.sign(HEX.encode(this.magicHash()), forCompact : true);

    List<int> compactSig = signature.toCompact();

    return base64Encode(compactSig);
}