1
0
mirror of https://github.com/bumi/lnrpc synced 2026-02-20 01:27:48 +00:00

1 Commits

Author SHA1 Message Date
dependabot[bot]
437e4f9e28 Bump grpc from 1.52.0 to 1.56.2
Bumps [grpc](https://github.com/google/grpc) from 1.52.0 to 1.56.2.
- [Release notes](https://github.com/google/grpc/releases)
- [Changelog](https://github.com/grpc/grpc/blob/master/doc/grpc_release_schedule.md)
- [Commits](https://github.com/google/grpc/compare/v1.52.0...v1.56.2)

---
updated-dependencies:
- dependency-name: grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 05:50:35 +00:00
2 changed files with 4 additions and 18 deletions

View File

@@ -9,11 +9,11 @@ GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.0)
google-protobuf (3.22.1)
googleapis-common-protos-types (1.5.0)
google-protobuf (3.23.4)
googleapis-common-protos-types (1.7.0)
google-protobuf (~> 3.14)
grpc (1.52.0)
google-protobuf (~> 3.21)
grpc (1.56.2)
google-protobuf (~> 3.23)
googleapis-common-protos-types (~> 1.0)
rake (13.0.6)
rspec (3.11.0)

View File

@@ -84,17 +84,3 @@ response = lnd.lightning.connect_peer(addr: address)
# note: Lnrpc needs to connect with an admin macaroon, and the node needs to be an existing peer.
pubkey = Lnrpc.to_byte_array("031f2669adab71548fad4432277a0d90233e3bc07ac29cfb0b3e01bd3fb26cb9fa")
response = lnd.lightning.open_channel({node_pubkey: pubkey, local_funding_amount: 21000})
# extract details from a lightning invoice
lightning_invoice = "lnbc990..." # created by payee
invoice_details = lnd.lightning.decode_pay_req({pay_req: lightning_invoice})
puts invoice_details.inspect
puts "Destination: " + invoice_details.destination.to_s
puts "Amount Sats: " + invoice_details.num_satoshis.to_s
puts "Description: " + invoice_details.description.to_s
puts "Created At: " + Time.at(invoice_details.timestamp).to_s
puts "Expiry Hours: " + (invoice_details.expiry/3600).to_s
puts "Payment Hash: " + invoice_details.payment_hash.to_s
# Payment hash should match a hashed version of the preimage
preimage = "f2a3a..." # known by payee, and revealed to the payer only if payment is successful
puts "Payment verified!" if invoice_details.payment_hash == Digest::SHA256.hexdigest([preimage].pack("H*"))