@@ -92,6 +92,7 @@ enum class LdkCallbackResponses {
9292 fees_updated,
9393 log_level_updated,
9494 log_path_updated,
95+ log_write_success,
9596 chain_monitor_init_success,
9697 keys_manager_init_success,
9798 channel_manager_init_success,
@@ -200,6 +201,13 @@ class LdkModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMod
200201 handleResolve(promise, LdkCallbackResponses .log_path_updated)
201202 }
202203
204+ @ReactMethod
205+ fun writeToLogFile (line : String , promise : Promise ) {
206+ LogFile .write(line)
207+
208+ handleResolve(promise, LdkCallbackResponses .log_write_success)
209+ }
210+
203211 @ReactMethod
204212 fun initChainMonitor (promise : Promise ) {
205213 if (chainMonitor != = null ) {
@@ -338,9 +346,9 @@ class LdkModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMod
338346 body.putInt(" node_count" , networkGraph!! .read_only().list_nodes().count())
339347 LdkEventEmitter .send(EventTypes .network_graph_updated, body)
340348 }
341-
342- handleResolve(promise, LdkCallbackResponses .network_graph_init_success)
343349 }
350+
351+ handleResolve(promise, LdkCallbackResponses .network_graph_init_success)
344352 }
345353
346354 @ReactMethod
@@ -794,7 +802,7 @@ class LdkModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMod
794802 }
795803
796804 @ReactMethod
797- fun networkGraphListNodes (promise : Promise ) {
805+ fun networkGraphListNodeIds (promise : Promise ) {
798806 val graph = networkGraph?.read_only() ? : return handleReject(promise, LdkErrors .init_network_graph)
799807
800808 val total = graph.list_nodes().count()
@@ -809,11 +817,13 @@ class LdkModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaMod
809817 }
810818
811819 @ReactMethod
812- fun networkGraphNode ( nodeId : String , promise : Promise ) {
820+ fun networkGraphNodes ( nodeIds : ReadableArray , promise : Promise ) {
813821 val graph = networkGraph?.read_only() ? : return handleReject(promise, LdkErrors .init_network_graph)
814822
815- val id = NodeId .from_pubkey(nodeId.hexa())
816- promise.resolve(graph.node(id)?.asJson)
823+ val list = Arguments .createArray()
824+ // TODO
825+ // val id = NodeId.from_pubkey(nodeId.hexa())
826+ promise.resolve(list)
817827 }
818828
819829 @ReactMethod
0 commit comments