signatureToString function

String signatureToString(
  1. IKey signature
)

Convert signature to string (base-58) form */

Implementation

String signatureToString(IKey signature) {
  if (signature.type == KeyType.k1) {
    return keyToString(signature, 'K1', 'SIG_K1_');
  } else if (signature.type == KeyType.r1) {
    return keyToString(signature, 'R1', 'SIG_R1_');
  } else {
    throw 'unrecognized signature format';
  }
}