lnd-client 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 390eda187c9b089d9231353dde80b2ce4ac24c06623ffde24000bdd8c8581d2d
4
- data.tar.gz: 6f6aef6e66df47d1b174a7ff2b2d5f18ee2a0a062501b7c4eda1b4b006be27df
3
+ metadata.gz: e3c3a8851f40cb71b9075f722a806978f768fa926146a9750d2ff0c7461217a5
4
+ data.tar.gz: 6fc8f6d36aace0307ffb55c8aee7306b6d1bd7686fb19ed0704c19c581b310b1
5
5
  SHA512:
6
- metadata.gz: 3b0fe7dd402b9f180758df35897603a08a88042d7f024b66204508e3d09166f9a539d64a3919b1cde41696f5ebab4001a80c7278c159f7e60b09c4520a973905
7
- data.tar.gz: 169d3a0f322e22bec0e955d8ad66d4e3139e99a2677688adac2c7854cd62cec942c868d95f6eec5ecdfb48b5e441ebf561dece46fbafd7eabbcca3d115765b58
6
+ metadata.gz: 720da4b7e719632c509f93716924cd42aaef5f57b2b98005800dbea93f569d966328d2d6370f18eef3a164ceab21cdab62944c9efe683beb77f6ca424eaa115a
7
+ data.tar.gz: 2c8d5ab9896089e02ee7e9badd1bd2b5c158ed9515542db74c87f5543303e27b0d0b06a28362944396f598629c7ce64fc73bcf38f4a88e7cb5fb95cee9bf42ba
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lnd-client (0.0.6)
4
+ lnd-client (0.0.7)
5
5
  grpc (~> 1.52)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -16,13 +16,13 @@ This is a low-level client library. For a better experience, you may want to che
16
16
  Add to your `Gemfile`:
17
17
 
18
18
  ```ruby
19
- gem 'lnd-client', '~> 0.0.6'
19
+ gem 'lnd-client', '~> 0.0.7'
20
20
  ```
21
21
 
22
22
  ```ruby
23
23
  require 'lnd-client'
24
24
 
25
- puts LNDClient.version # => 0.0.6
25
+ puts LNDClient.version # => 0.0.7
26
26
 
27
27
  client = LNDClient.new(
28
28
  'lndconnect://127.0.0.1:10009?cert=MIICJz...JBEERQ&macaroon=AgEDbG...45ukJ4'
@@ -98,5 +98,5 @@ gem build lnd-client.gemspec
98
98
 
99
99
  gem signin
100
100
 
101
- gem push lnd-client-0.0.6.gem
101
+ gem push lnd-client-0.0.7.gem
102
102
  ```
@@ -11,12 +11,21 @@ require_relative '../models/errors'
11
11
  module LNDClientInternal
12
12
  class Connection
13
13
  def self.validate_params!(connection)
14
- raise LNDClient::Errors::TooManyArgumentsError if connection.key?(:address) && connection.key?(:host)
15
- raise LNDClient::Errors::TooManyArgumentsError if connection.key?(:address) && connection.key?(:port)
16
- if connection.key?(:certificate_path) && connection.key?(:certificate)
14
+ if connection.key?(:address) && !connection[:address].nil? && connection.key?(:host) && connection[:host].nil?
15
+ raise LNDClient::Errors::TooManyArgumentsError
16
+ end
17
+
18
+ if connection.key?(:address) && !connection[:address].nil? && connection.key?(:port) && !connection[:port].nil?
19
+ raise LNDClient::Errors::TooManyArgumentsError
20
+ end
21
+
22
+ if connection.key?(:certificate_path) && !connection[:certificate_path].nil? && connection.key?(:certificate) && !connection[:certificate].nil?
23
+ raise LNDClient::Errors::TooManyArgumentsError
24
+ end
25
+
26
+ if connection.key?(:macaroon_path) && !connection[:macaroon_path].nil? && connection.key?(:macaroon) && !connection[:macaroon].nil?
17
27
  raise LNDClient::Errors::TooManyArgumentsError
18
28
  end
19
- raise LNDClient::Errors::TooManyArgumentsError if connection.key?(:macaroon_path) && connection.key?(:macaroon)
20
29
  end
21
30
 
22
31
  def self.expand(*params, &vcr)
@@ -90,6 +99,7 @@ module LNDClientInternal
90
99
  certificate = "-----BEGIN CERTIFICATE-----\n#{certificate.gsub(/(.{64})/, "\\1\n")}\n-----END CERTIFICATE-----\n"
91
100
 
92
101
  {
102
+ connect: params.first,
93
103
  host: host,
94
104
  port: port,
95
105
  certificate: certificate,
data/static/spec.rb CHANGED
@@ -4,7 +4,7 @@ module LNDClientInternal
4
4
  module Static
5
5
  SPEC = {
6
6
  name: 'lnd-client',
7
- version: '0.0.6',
7
+ version: '0.0.7',
8
8
  author: 'icebaker',
9
9
  summary: 'Ruby Lightning Network Daemon (lnd) Client',
10
10
  description: 'Ruby Lightning Network Daemon (lnd) Client',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lnd-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - icebaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-15 00:00:00.000000000 Z
11
+ date: 2023-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc