const routing_handler = ldk.IgnoringMessageHandler.constructor_new().as_RoutingMessageHandler();
const chan_handler = ldk.ErroringMessageHandler.constructor_new().as_ChannelMessageHandler();
const cust_handler = ldk.IgnoringMessageHandler.constructor_new().as_CustomMessageHandler();
+const onion_handler = ldk.IgnoringMessageHandler.constructor_new().as_OnionMessageHandler();
-const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, node_a_secret, rng_seed, logger_a, cust_handler);
+const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_a_secret, 0xdeadbeefn, rng_seed, logger_a, cust_handler);
const a_net_handler = new node_net.NodeLDKNet(a_pm);
var port = 10000;
for (; port < 11000; port++) {
} catch(_) {}
}
-const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, node_b_secret, rng_seed, logger_b, cust_handler);
+const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_b_secret, 0xdeadbeefn, rng_seed, logger_b, cust_handler);
const b_net_handler = new node_net.NodeLDKNet(b_pm);
await b_net_handler.connect_peer("127.0.0.1", port, node_a_pk);
const b = get_chanman();
const ignorer = ldk.IgnoringMessageHandler.constructor_new();
- const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), a.node_secret, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
- const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), b.node_secret, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
+ const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), a.node_secret, 0xdeadbeefn, a.node_secret, a.logger, ignorer.as_CustomMessageHandler());
+ const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), b.node_secret, 0xdeadbeefn, b.node_secret, b.logger, ignorer.as_CustomMessageHandler());
var sock_b: ldk.SocketDescriptor;
const sock_a = ldk.SocketDescriptor.new_impl({