toMap method

Map<String, dynamic> toMap()

Implementation

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