BaseReceiptCommand.from constructor

BaseReceiptCommand.from(
  1. String text,
  2. Mapping? origin
)

Implementation

BaseReceiptCommand.from(String text, Mapping? origin) : super.fromCmd(Command.RECEIPT) {
  // text message
  this['text'] = text;
  // original envelope of message responding to,
  // includes 'sn' and 'signature'
  if (origin != null) {
    assert(!(origin.isEmpty ||
        origin.containsKey('data') ||
        origin.containsKey('keys') ||
        origin.containsKey('meta') ||
        origin.containsKey('visa')), 'impure envelope: $origin');
    this['origin'] = origin;
  }
}