lnrpc 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 076e28dc0a94e3142ceb908180dea59365aa5dc1caee369499fdcaaeda2b6ece
4
- data.tar.gz: a58e71947369db675771cec91858159a5b0fbc481cec1f1a167c425a25e7076f
3
+ metadata.gz: 7f179c17848afbfca35a585bd4175f32198d30f7eeba54430d771a17dd447b8a
4
+ data.tar.gz: aa07b410912563889eeb1dc753b52ff195364daf72d73fdecd830228cf91e380
5
5
  SHA512:
6
- metadata.gz: ee72084b683e9970e70bb45d1f4a62d71077f7fd6d64e2204d9af1ba83558380fdbbe358ae8424c2e61e1ddbecbb3124d2904b1fba1b6fc8b3bb9326aa625538
7
- data.tar.gz: fd0ae3ca2488ada61c8020f9f2c246a0da05b22f6fe5c52e3cb755b479cd77b0a3afcbdf499d5851c05b9ce1449cca7f591bda998f552817c0eb759290def573
6
+ metadata.gz: 7de6549fb6d2e38616f507a9688edab16b23813936e62ad7d77b1f9bea92c6bad4ca956baa322b1d80ca8f76326c787aa06a6dd1bf91cc9a2379500963e1a5e3
7
+ data.tar.gz: cff434503e194459df748705e635ad5685202fa347176fc8cce682e291486d079b43069ed4e62c8c446b40b63fcd8a0c81760c93493693e40a51091adc07cb10
data/README.md CHANGED
@@ -11,7 +11,7 @@ So lnrpc requires Ruby < 2.7.
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'lnrpc', '~> 0.10.0'
14
+ gem 'lnrpc', '~> 0.11.0'
15
15
  ```
16
16
  lnrpc follows the lnd versioning, thus it is recommended to specify the exact version you need for your lnd node as dependency (see [#Versioning](#Versioning)).
17
17
 
@@ -8,12 +8,19 @@ puts get_info_res.alias
8
8
  puts lnd.lightning.wallet_balance.total_balance
9
9
 
10
10
  pay_request = "lntb50u1pw9mmndpp5nvnff958pxc9eqknwntyxapjw7l5grt5e2y70cmmnu0lljfa0sdqdpsgfkx7cmtwd68yetpd5s9xct5v4kxc6t5v5s8yatz0ysxwetdcqzysxqyz5vqjkhlyn40z76gyn7dx32p9j58dftve9xrlvnqqazht7w2fdauukhyhr9y4k3ngjn8s6srglj8swk7tm70ng54wdkq47ahytpwffvaeusp500csz"
11
- lnd.pay(pay_request) # or:
11
+ lnd.pay(payment_request: pay_request) # or:
12
12
  lnd.router.send_payment_v2(payment_request: pay_request)
13
13
 
14
+ dest = Lnrpc.to_byte_array('038474ec195f497cf4036e5994bd820dd365bb0aaa7fb42bd9b536913a1a2dcc9e')
15
+ lnd.keysend(dest: dest, amt: 1000)
16
+
14
17
  invoice_res = lnd.lightning.add_invoice(value: 1000, memo: 'I :heart: ruby')
15
18
  puts invoice_res.payment_request
16
19
 
20
+ puts lnd.versioner.get_version
21
+ puts lnd.wallet_kit.estimate_fee(conf_target: 10)
22
+ puts lnd.wallet_kit.next_addr
23
+
17
24
  lnd.lightning.subscribe_invoices(settle_index: 1).each do |invoice|
18
25
  puts invoice.payment_request
19
26
  end
@@ -13,7 +13,8 @@ module Lnrpc
13
13
  self.address = options[:address] || DEFAULT_ADDRESS
14
14
 
15
15
  if options.has_key?(:credentials)
16
- self.credentials = options[:credentials]
16
+ # if there are non hex values prvided we assume it's the certificate file as string otherwise we assume it's the hex value
17
+ self.credentials = options[:credentials].match?(/\H/) ? options[:credentials] : [options[:credentials]].pack('H*')
17
18
  elsif File.exists?(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
18
19
  self.credentials = ::File.read(::File.expand_path(options[:credentials_path] || DEFAULT_CREDENTIALS_PATH))
19
20
  else
@@ -1,3 +1,3 @@
1
1
  module Lnrpc
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lnrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bumann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2020-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler