signatureToString function
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';
}
}