decodeSignatures static method

List<SignatureContainer> decodeSignatures(
  1. Map<String, dynamic> signatures
)

Implementation

static List<SignatureContainer> decodeSignatures(
    Map<String, dynamic> signatures) {
  final formattedSignatures = <SignatureContainer>[];
  signatures.forEach((k, v) {
    final proposition = Proposition.fromString(k);
    final value =
        Signature(Base58Data.validated(v as String).value.sublist(1));
    final signatureContainer = SignatureContainer(proposition, value);
    formattedSignatures.add(signatureContainer);
  });
  return formattedSignatures;
}