Update examples.rb

This commit is contained in:
bumi 2020-08-29 16:38:51 +02:00 committed by GitHub
parent f31a499e49
commit b42d640767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -11,9 +11,16 @@ pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljf
lnd.pay(pay_request) # or:
lnd.router.send_payment_v2(payment_request: pay_request)
dest = Lnrpc.to_byte_array('038474ec195f497cf4036e5994bd820dd365bb0aaa7fb42bd9b536913a1a2dcc9e')
lnd.keysend(dest: dest, amt: 1000)
invoice_res = lnd.lightning.add_invoice(value: 1000, memo: 'I :heart: ruby')
puts invoice_res.payment_request
puts lnd.versioner.get_version
puts lnd.wallet_kit.estimate_fee(conf_target: 10)
puts lnd.wallet_kit.next_addr
lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice|
puts invoice.payment_request
end