Class: Node::Payments
Instance Method Summary collapse
- #add_invoice(value, memo = "") ⇒ Object
- #decode_pay_req(pay_req) ⇒ Object
- #list_invoices ⇒ Object
- #list_payments ⇒ Object
- #lookup_invoice(payment_hash) ⇒ Object
- #send_payment(payment_request) ⇒ Object
Instance Method Details
#add_invoice(value, memo = "") ⇒ Object
29 30 31 |
# File 'lib/node.rb', line 29 def add_invoice(value, memo="") stub.add_invoice(Lnrpc::Invoice.new(value: value, memo: memo)) end |
#decode_pay_req(pay_req) ⇒ Object
19 20 21 |
# File 'lib/node.rb', line 19 def decode_pay_req(pay_req) stub.decode_pay_req(Lnrpc::PayReqString.new(pay_req: pay_req)) end |
#list_invoices ⇒ Object
7 8 9 10 |
# File 'lib/node.rb', line 7 def list_invoices response = stub.list_invoices(Lnrpc::ListInvoiceRequest.new()) response.invoices end |
#list_payments ⇒ Object
12 13 14 15 |
# File 'lib/node.rb', line 12 def list_payments response = stub.list_payments(Lnrpc::ListPaymentRequest.new()) response.payments end |
#lookup_invoice(payment_hash) ⇒ Object
23 24 25 |
# File 'lib/node.rb', line 23 def lookup_invoice(payment_hash) stub.lookup_invoice(Lnrpc::PaymentHash.new(payment_hash)) end |
#send_payment(payment_request) ⇒ Object
33 34 35 |
# File 'lib/node.rb', line 33 def send_payment(payment_request) r = stub.send_payment_sync(Lnrpc::SendRequest.new(payment_request: payment_request)) end |