addPreimage method

  1. @override
void addPreimage(
  1. Preimage preimage,
  2. Proposition_Digest digestProposition
)

Add a preimage secret associated to a digest proposition.

preimage THe preimage secret to add digestProposition The digest proposition for which the preimage is derived from.

Implementation

@override
void addPreimage(
    m.Preimage preimage, m.Proposition_Digest digestProposition) {
  digestsStore.add(
    _instance,
    Digest(
      digestEvidence: Encoding().encodeToBase58Check(
          Uint8List.fromList(digestProposition.sizedEvidence.digest.value)),
      preimageInput:
          Encoding().encodeToBase58Check(Uint8List.fromList(preimage.input)),
      preimageSalt:
          Encoding().encodeToBase58Check(Uint8List.fromList(preimage.salt)),
    ).toSembast,
  );
}