lnurl 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +38 -0
  3. data/lib/lnurl.rb +3 -3
  4. data/lnurl.gemspec +1 -1
  5. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fea4fd9e77664afe507942dc5617bae6c49a04a606112b42a23a9f97dd66df51
4
- data.tar.gz: b2372cedd6cb920bf267ef6334e42ad4129f5573151c481874ac14f9cef50433
3
+ metadata.gz: d576622de24d8f1ed23c5b91359bbdda2baba77ec45c7cf0fb75f4ecc2f1a438
4
+ data.tar.gz: ab19bea6f40250cd7dbc094dadeb5107d36cfcc7d8c08211b651f086b36519fc
5
5
  SHA512:
6
- metadata.gz: bda02e84e7604f33f4266bdf67805b8b531c9b2d6a0cd72f11cfaa6c7e813cd3b4e83f27fb53dd6023acddf1ec3c47c0216a32e5f0450ab54d0623121e9dd841
7
- data.tar.gz: b34597fc4635bd7cdeac6a1a02e32427297a0eed8127e788b4566d81f181d255ba526b2b3c54bebf751db06f1a40f6233d172f795a32a1b345462815927ad3a3
6
+ metadata.gz: 8bf871e746f0c8285987c347b7fa6af4c8000753e750f3e7d40327e710308e72fbf2b3e2936635e11734462a6008d9754cd2e40ae8d7821fe06905e7dfff1f81
7
+ data.tar.gz: 9a0bc6a54b49261ba146e3c348d85b1886cec3779cc2a5c4cd6ccc44ee3c2cd6e62432c85620640eb9741ba2e2f510b6cfecfa6cef7fa944991caec91f89ec65
data/Gemfile.lock ADDED
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lnurl (0.1.1)
5
+ bech32 (~> 1.2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ bech32 (1.2.1)
11
+ thor (>= 1.1.0)
12
+ diff-lcs (1.4.4)
13
+ rake (12.3.3)
14
+ rspec (3.10.0)
15
+ rspec-core (~> 3.10.0)
16
+ rspec-expectations (~> 3.10.0)
17
+ rspec-mocks (~> 3.10.0)
18
+ rspec-core (3.10.1)
19
+ rspec-support (~> 3.10.0)
20
+ rspec-expectations (3.10.1)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.10.0)
23
+ rspec-mocks (3.10.2)
24
+ diff-lcs (>= 1.2.0, < 2.0)
25
+ rspec-support (~> 3.10.0)
26
+ rspec-support (3.10.2)
27
+ thor (1.1.0)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ lnurl!
34
+ rake (~> 12.0)
35
+ rspec (~> 3.0)
36
+
37
+ BUNDLED WITH
38
+ 2.2.23
data/lib/lnurl.rb CHANGED
@@ -4,7 +4,7 @@ require 'json'
4
4
  require 'ostruct'
5
5
 
6
6
  class Lnurl
7
- VERSION = '0.1.1'.freeze
7
+ VERSION = '1.0.0'.freeze
8
8
 
9
9
  InvoiceResponse = Class.new(OpenStruct)
10
10
  LnurlResponse = Class.new(OpenStruct) do
@@ -30,7 +30,7 @@ class Lnurl
30
30
  end
31
31
 
32
32
  def to_bech32
33
- Bech32.encode(HRP, data).upcase
33
+ Bech32.encode(HRP, data, Bech32::Encoding::BECH32).upcase
34
34
  end
35
35
  alias encode to_bech32
36
36
 
@@ -67,7 +67,7 @@ class Lnurl
67
67
 
68
68
  def self.decode_raw(lnurl)
69
69
  lnurl = lnurl.gsub(/^lightning:/, '')
70
- hrp, data = Bech32.decode(lnurl, lnurl.length)
70
+ hrp, data, sepc = Bech32.decode(lnurl)
71
71
  # raise 'no lnurl' if hrp != HRP
72
72
  convert_bits(data, 5, 8, false).pack('C*').force_encoding('utf-8')
73
73
  end
data/lnurl.gemspec CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_runtime_dependency 'bech32'
30
+ spec.add_runtime_dependency 'bech32', '~> 1.2.0'
31
31
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lnurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
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-05-09 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bech32
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.2.0
27
27
  description: A collection of tools to work with LNURLs - the protocol for interaction
28
28
  between Lightning wallets and third-party services.
29
29
  email:
@@ -36,6 +36,7 @@ files:
36
36
  - ".rspec"
37
37
  - ".travis.yml"
38
38
  - Gemfile
39
+ - Gemfile.lock
39
40
  - LICENSE.txt
40
41
  - README.md
41
42
  - Rakefile
@@ -65,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  - !ruby/object:Gem::Version
66
67
  version: '0'
67
68
  requirements: []
68
- rubygems_version: 3.0.3
69
+ rubygems_version: 3.2.23
69
70
  signing_key:
70
71
  specification_version: 4
71
72
  summary: LNURL implementation for ruby