encodeSignatures static method

Map<String, String> encodeSignatures(
  1. List<SignatureContainer> signatures,
  2. PropositionType proposition
)

Implementation

static Map<String, String> encodeSignatures(
    List<SignatureContainer> signatures, PropositionType proposition) {
  final encodedSignatures = <String, String>{};
  signatures.forEach((value) {
    final newKey = Base58Data(Uint8List.fromList(
        [pubKeyHashByte, ...value.proposition.buffer.asUint8List()])).show;
    final outputValue = Uint8List.fromList(
        [pubKeyHashByte, ...value.proof.buffer.asUint8List()]);
    final newValue = Base58Data(outputValue).show;
    encodedSignatures[newKey] = newValue;
  });
  return encodedSignatures;
}