From 4bd2cded6cad8dc3c022f19afd2e4ac4205cdf0f Mon Sep 17 00:00:00 2001 From: Conor Okus Date: Fri, 24 Mar 2023 21:46:55 +0000 Subject: [PATCH] Start sending payments page --- docs/.vuepress/config.js | 3 +- .../sending-payments.md | 169 ++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 docs/tutorials/building-a-node-with-ldk/sending-payments.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index bd3135196..c8c02bbc7 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -101,7 +101,8 @@ const tutorialSidebar = [ ['/tutorials/building-a-node-with-ldk/handling-events', 'Handling Events'], ['/tutorials/building-a-node-with-ldk/setting-up-a-peer-manager', 'Setting up a Peer Manager'], ['/tutorials/building-a-node-with-ldk/connect-to-peers', 'Connect to Peers'], - ['/tutorials/building-a-node-with-ldk/opening-a-channel', 'Opening a Channel'] + ['/tutorials/building-a-node-with-ldk/opening-a-channel', 'Opening a Channel'], + ['/tutorials/building-a-node-with-ldk/sending-payments', 'Sending Payments'] ] }, ], diff --git a/docs/tutorials/building-a-node-with-ldk/sending-payments.md b/docs/tutorials/building-a-node-with-ldk/sending-payments.md new file mode 100644 index 000000000..f12d8544a --- /dev/null +++ b/docs/tutorials/building-a-node-with-ldk/sending-payments.md @@ -0,0 +1,169 @@ +# Sending Payments + +Lightning payments are used to pay invoices, which are typically encoded as a +string in accordance with BOLT 11. After parsing the invoice, you'll need to +find a route from your node to the recipient and then make the payment using +`ChannelManager`. + + + + + + + +An event is generated once a payment has completed. Successful payments result +in a `PaymentSent` event with the preimage of the payment hash. Be sure to look +out for a `PaymentFailed` event, if the payment fails for some reason, and act +accordingly. + + + + +