CommercioDoc constructor

CommercioDoc({
  1. required String senderDid,
  2. required List<String> recipientDids,
  3. required String uuid,
  4. required CommercioDocMetadata metadata,
  5. String? contentUri,
  6. CommercioDocChecksum? checksum,
  7. CommercioDocEncryptionData? encryptionData,
  8. CommercioDoSign? doSign,
})

Implementation

CommercioDoc({
  required this.senderDid,
  required this.recipientDids,
  required this.uuid,
  required this.metadata,
  this.contentUri,
  this.checksum,
  this.encryptionData,
  this.doSign,
})  : assert(matchBech32Format(senderDid)),
      assert(recipientDids.isNotEmpty &&
          recipientDids.every((e) => matchBech32Format(e))),
      assert(matchUuidv4(uuid)),
      assert(contentUri == null || checkStringBytesLen(contentUri, 512)),
      assert(_checksumMustBePresentIfDoSign(checksum, doSign));