You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing LNDK locally for development requires a fair amount of setup. This discussion outlines possilbe ways of testing new features locally, with a specific focus on onion messaging related features. Ths guide assumes that you have bitcoind running in regtest mode and have setup LND and LND as described in README.
// Directory and port *MUST* be unique for each node!
cargo run {bitcoin_user}:{bitcoin_password}@{bitcoin_host:port} ~/.ldk 19777 regtest
cargo run {bitcoin_user}:{bitcoin_password}@{bitcoin_host:port} ~/.ldk1 19778 regtest
Each node will startup and log their node id: Local Node ID is {pubkey}.
Do not connect the LDK nodes, as they may not choose to forward onion messages through LND if they are directly connected.
3. Send an Onion Message
In the command prompt for LDK, send an onion message with the following command: sendonionmessage {lnd_pubkey},{ldk_1_pubkey} 513 74657374
Note that the node pubkeys must be comma seprated (with no spaces) and the final value is just a junk hex payload.
You should be able to see logs in LDK's logs (~/.ldk/.ldk/logs/logs.txt) indicating that a message has been received (though it will error, because the payload is junk), and LND will log Custom message received peer={peer} type=513 and Sending <unknown>(type=513) to {peer}.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Testing LNDK locally for development requires a fair amount of setup. This discussion outlines possilbe ways of testing new features locally, with a specific focus on onion messaging related features. Ths guide assumes that you have
bitcoind
running in regtest mode and have setup LND and LND as described in README.1. Setup LDK Nodes
Setup two LDK sample nodes, per the installation guide provided.
Each node will startup and log their node id:
Local Node ID is {pubkey}.
2. Connect LND to LDK
Connect:
LDK -- LND -- LDK1
:lncli connect {node_id_1}@localhost:19777
lncli connect {node_id_2}@localhost:19778
Do not connect the LDK nodes, as they may not choose to forward onion messages through LND if they are directly connected.
3. Send an Onion Message
In the command prompt for LDK, send an onion message with the following command:
sendonionmessage {lnd_pubkey},{ldk_1_pubkey} 513 74657374
Note that the node pubkeys must be comma seprated (with no spaces) and the final value is just a junk hex payload.
You should be able to see logs in
LDK
's logs (~/.ldk/.ldk/logs/logs.txt
) indicating that a message has been received (though it will error, because the payload is junk), and LND will logCustom message received peer={peer} type=513
andSending <unknown>(type=513) to {peer}
.Beta Was this translation helpful? Give feedback.
All reactions