toMap method
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(),
}
};
}