toMap method

  1. @override
Map<String, dynamic> toMap()
override

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    ...super.toMap(),
    'params': {
      'amount': amountSat * 1000,
      'pubkey': pubkey,
      if (preimage != null) 'preimage': preimage,
      'tlv_records': tlvRecords?.map((e) => e.toMap()).toList(),
    }
  };
}