@@ -27,47 +27,47 @@ func handleReject(_ reject: RCTPromiseRejectBlock, _ ldkError: LdkErrors, _ erro
2727extension Invoice {
2828 var asJson : Any {
2929 return [
30- " amount_milli_satoshis " : self . amount_milli_satoshis ( ) . getValue ( ) as Any ,
31- " description " : self . into_signed_raw ( ) . raw_invoice ( ) . description ( ) ,
32- " check_signature " : self . check_signature ( ) . isOk ( ) ,
33- " is_expired " : self . is_expired ( ) ,
34- " duration_since_epoch " : self . duration_since_epoch ( ) ,
35- " expiry_time " : self . expiry_time ( ) ,
36- " min_final_cltv_expiry " : self . min_final_cltv_expiry ( ) ,
37- " payee_pub_key " : Data ( self . payee_pub_key ( ) ) . hexEncodedString ( ) ,
38- " recover_payee_pub_key " : Data ( self . recover_payee_pub_key ( ) ) . hexEncodedString ( ) ,
39- " payment_hash " : Data ( self . payment_hash ( ) ) . hexEncodedString ( ) ,
40- " payment_secret " : Data ( self . payment_secret ( ) ) . hexEncodedString ( ) ,
41- " timestamp " : self . timestamp ( ) ,
42- " features " : Data ( self . features ( ) . write ( ) ) . hexEncodedString ( ) ,
43- " currency " : self . currency ( ) . rawValue,
44- " to_str " : self . to_str ( )
30+ " amount_milli_satoshis " : amount_milli_satoshis ( ) . getValue ( ) as Any ,
31+ " description " : into_signed_raw ( ) . raw_invoice ( ) . description ( ) ,
32+ " check_signature " : check_signature ( ) . isOk ( ) ,
33+ " is_expired " : is_expired ( ) ,
34+ " duration_since_epoch " : duration_since_epoch ( ) ,
35+ " expiry_time " : expiry_time ( ) ,
36+ " min_final_cltv_expiry " : min_final_cltv_expiry ( ) ,
37+ " payee_pub_key " : Data ( payee_pub_key ( ) ) . hexEncodedString ( ) ,
38+ " recover_payee_pub_key " : Data ( recover_payee_pub_key ( ) ) . hexEncodedString ( ) ,
39+ " payment_hash " : Data ( payment_hash ( ) ) . hexEncodedString ( ) ,
40+ " payment_secret " : Data ( payment_secret ( ) ) . hexEncodedString ( ) ,
41+ " timestamp " : timestamp ( ) ,
42+ " features " : Data ( features ( ) . write ( ) ) . hexEncodedString ( ) ,
43+ " currency " : currency ( ) . rawValue,
44+ " to_str " : to_str ( )
4545 ]
4646 }
4747}
4848
4949extension ChannelDetails {
5050 var asJson : Any {
5151 return [
52- " channel_id " : Data ( self . get_channel_id ( ) ) . hexEncodedString ( ) ,
53- " is_public " : self . get_is_public ( ) ,
54- " is_usable " : self . get_is_usable ( ) ,
55- " is_outbound " : self . get_is_outbound ( ) ,
56- " balance_msat " : self . get_balance_msat ( ) ,
57- " counterparty " : Data ( self . get_counterparty ( ) . write ( ) ) . hexEncodedString ( ) ,
58- " funding_txo " : Data ( self . get_funding_txo ( ) ? . write ( ) ?? [ ] ) . hexEncodedString ( ) ,
59- " channel_type " : Data ( self . get_channel_type ( ) . write ( ) ) . hexEncodedString ( ) ,
60- " user_channel_id " : self . get_user_channel_id ( ) , //Number
61- " confirmations_required " : self . get_confirmations_required ( ) . getValue ( ) as Any , // Optional number
62- " short_channel_id " : self . get_short_channel_id ( ) . getValue ( ) as Any , //Optional number
63- " is_funding_locked " : self . get_is_funding_locked ( ) , //Bool
64- " inbound_scid_alias " : self . get_inbound_scid_alias ( ) . getValue ( ) as Any , //Optional number
65- " get_inbound_payment_scid " : self . get_inbound_payment_scid ( ) . getValue ( ) as Any , //Optional number,
66- " inbound_capacity_msat " : self . get_inbound_capacity_msat ( ) ,
67- " channel_value_satoshis " : self . get_channel_value_satoshis ( ) ,
68- " outbound_capacity_msat " : self . get_outbound_capacity_msat ( ) ,
69- " force_close_spend_delay " : self . get_force_close_spend_delay ( ) . getValue ( ) as Any , //Optional number
70- " unspendable_punishment_reserve " : self . get_unspendable_punishment_reserve ( ) . getValue ( ) as Any //Optional number
52+ " channel_id " : Data ( get_channel_id ( ) ) . hexEncodedString ( ) ,
53+ " is_public " : get_is_public ( ) ,
54+ " is_usable " : get_is_usable ( ) ,
55+ " is_outbound " : get_is_outbound ( ) ,
56+ " balance_msat " : get_balance_msat ( ) ,
57+ " counterparty " : Data ( get_counterparty ( ) . write ( ) ) . hexEncodedString ( ) ,
58+ " funding_txo " : Data ( get_funding_txo ( ) ? . write ( ) ?? [ ] ) . hexEncodedString ( ) ,
59+ " channel_type " : Data ( get_channel_type ( ) . write ( ) ) . hexEncodedString ( ) ,
60+ " user_channel_id " : get_user_channel_id ( ) , //Number
61+ " confirmations_required " : get_confirmations_required ( ) . getValue ( ) as Any , // Optional number
62+ " short_channel_id " : get_short_channel_id ( ) . getValue ( ) as Any , //Optional number
63+ " is_funding_locked " : get_is_funding_locked ( ) , //Bool
64+ " inbound_scid_alias " : get_inbound_scid_alias ( ) . getValue ( ) as Any , //Optional number
65+ " inbound_payment_scid " : get_inbound_payment_scid ( ) . getValue ( ) as Any , //Optional number,
66+ " inbound_capacity_msat " : get_inbound_capacity_msat ( ) ,
67+ " outbound_capacity_msat " : get_outbound_capacity_msat ( ) ,
68+ " channel_value_satoshis " : get_channel_value_satoshis ( ) ,
69+ " force_close_spend_delay " : get_force_close_spend_delay ( ) . getValue ( ) as Any , //Optional number
70+ " unspendable_punishment_reserve " : get_unspendable_punishment_reserve ( ) . getValue ( ) as Any //Optional number
7171 ]
7272 }
7373}
0 commit comments