siwe 0.1.4 → 0.1.5
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 +4 -4
- data/.rubocop.yml +2 -2
- data/Gemfile.lock +28 -20
- data/lib/siwe/message.rb +3 -3
- data/lib/siwe/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6672768ccc989b67fd335a571585a7bbae2f88ccd8c095f7332a308f39037dab
|
|
4
|
+
data.tar.gz: 3612d9b498a36fa37e0cb70e81e2ae64450baf34d7ef9d75cc666957957c15de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f42e272519ac16310a8ee9bf75139e121acaf52b446b0ed35e8868bb17bfcb816caced089dc7e342e5a686a1ab532cab6a9d385a3b80cbc7b6a15c668e019aa
|
|
7
|
+
data.tar.gz: 93c9e1a87a4dae94562f89b44de590f03a23c673dfb30962f2cd47c52aa4547f3b8c0a0b0a3263773b4113783dcfcd97154de7d9401b689935dfa3da671b001a
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
siwe (0.1.
|
|
5
|
-
eth (~> 0.
|
|
4
|
+
siwe (0.1.4)
|
|
5
|
+
eth (~> 0.5.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
@@ -10,35 +10,42 @@ GEM
|
|
|
10
10
|
ast (2.4.2)
|
|
11
11
|
backport (1.2.0)
|
|
12
12
|
benchmark (0.2.0)
|
|
13
|
-
diff-lcs (1.
|
|
13
|
+
diff-lcs (1.5.0)
|
|
14
14
|
e2mmap (0.1.0)
|
|
15
|
-
eth (0.
|
|
16
|
-
ffi (~> 1.15)
|
|
15
|
+
eth (0.5.0)
|
|
17
16
|
keccak (~> 1.3)
|
|
18
|
-
|
|
17
|
+
konstructor (~> 1.0)
|
|
18
|
+
openssl (~> 3.0)
|
|
19
|
+
rbsecp256k1 (~> 5.1)
|
|
19
20
|
rlp (~> 0.7)
|
|
20
21
|
scrypt (~> 3.0)
|
|
21
|
-
ffi (1.15.
|
|
22
|
+
ffi (1.15.5)
|
|
22
23
|
ffi-compiler (1.0.1)
|
|
23
24
|
ffi (>= 1.0.0)
|
|
24
25
|
rake
|
|
25
26
|
jaro_winkler (1.5.4)
|
|
26
27
|
keccak (1.3.0)
|
|
28
|
+
konstructor (1.0.2)
|
|
27
29
|
kramdown (2.3.1)
|
|
28
30
|
rexml
|
|
29
31
|
kramdown-parser-gfm (1.1.0)
|
|
30
32
|
kramdown (~> 2.0)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
nokogiri (1.12.5-x86_64-linux)
|
|
33
|
+
mini_portile2 (2.7.1)
|
|
34
|
+
nokogiri (1.13.1-x86_64-linux)
|
|
34
35
|
racc (~> 1.4)
|
|
36
|
+
openssl (3.0.0)
|
|
35
37
|
parallel (1.21.0)
|
|
36
|
-
parser (3.0.
|
|
38
|
+
parser (3.1.0.0)
|
|
37
39
|
ast (~> 2.4.1)
|
|
40
|
+
pkg-config (1.4.7)
|
|
38
41
|
racc (1.6.0)
|
|
39
|
-
rainbow (3.
|
|
42
|
+
rainbow (3.1.1)
|
|
40
43
|
rake (13.0.6)
|
|
41
|
-
|
|
44
|
+
rbsecp256k1 (5.1.0)
|
|
45
|
+
mini_portile2 (~> 2.7)
|
|
46
|
+
pkg-config (~> 1.4)
|
|
47
|
+
rubyzip (~> 2.3)
|
|
48
|
+
regexp_parser (2.2.0)
|
|
42
49
|
reverse_markdown (2.1.1)
|
|
43
50
|
nokogiri
|
|
44
51
|
rexml (3.2.5)
|
|
@@ -49,28 +56,29 @@ GEM
|
|
|
49
56
|
rspec-mocks (~> 3.10.0)
|
|
50
57
|
rspec-core (3.10.1)
|
|
51
58
|
rspec-support (~> 3.10.0)
|
|
52
|
-
rspec-expectations (3.10.
|
|
59
|
+
rspec-expectations (3.10.2)
|
|
53
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
54
61
|
rspec-support (~> 3.10.0)
|
|
55
62
|
rspec-mocks (3.10.2)
|
|
56
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
57
64
|
rspec-support (~> 3.10.0)
|
|
58
65
|
rspec-support (3.10.3)
|
|
59
|
-
rubocop (1.
|
|
66
|
+
rubocop (1.25.0)
|
|
60
67
|
parallel (~> 1.10)
|
|
61
|
-
parser (>= 3.
|
|
68
|
+
parser (>= 3.1.0.0)
|
|
62
69
|
rainbow (>= 2.2.2, < 4.0)
|
|
63
70
|
regexp_parser (>= 1.8, < 3.0)
|
|
64
71
|
rexml
|
|
65
|
-
rubocop-ast (>= 1.
|
|
72
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
|
66
73
|
ruby-progressbar (~> 1.7)
|
|
67
74
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
68
|
-
rubocop-ast (1.
|
|
75
|
+
rubocop-ast (1.15.1)
|
|
69
76
|
parser (>= 3.0.1.1)
|
|
70
77
|
ruby-progressbar (1.11.0)
|
|
78
|
+
rubyzip (2.3.2)
|
|
71
79
|
scrypt (3.0.7)
|
|
72
80
|
ffi-compiler (>= 1.0, < 2.0)
|
|
73
|
-
solargraph (0.44.
|
|
81
|
+
solargraph (0.44.3)
|
|
74
82
|
backport (~> 1.2)
|
|
75
83
|
benchmark
|
|
76
84
|
bundler (>= 1.17.2)
|
|
@@ -85,7 +93,7 @@ GEM
|
|
|
85
93
|
thor (~> 1.0)
|
|
86
94
|
tilt (~> 2.0)
|
|
87
95
|
yard (~> 0.9, >= 0.9.24)
|
|
88
|
-
thor (1.1
|
|
96
|
+
thor (1.2.1)
|
|
89
97
|
tilt (2.0.10)
|
|
90
98
|
unicode-display_width (2.1.0)
|
|
91
99
|
webrick (1.7.0)
|
data/lib/siwe/message.rb
CHANGED
|
@@ -168,9 +168,9 @@ module Siwe
|
|
|
168
168
|
unless skip_signature
|
|
169
169
|
raise "Missing signature field." if @signature.empty?
|
|
170
170
|
|
|
171
|
-
pub_key = Eth::
|
|
172
|
-
signature_address = Eth::
|
|
173
|
-
raise "Signature doesn't match message." unless signature_address.downcase.eql? @address.downcase
|
|
171
|
+
pub_key = Eth::Signature.personal_recover personal_sign, @signature
|
|
172
|
+
signature_address = Eth::Util.public_key_to_address pub_key
|
|
173
|
+
raise "Signature doesn't match message." unless signature_address.to_s.downcase.eql? @address.to_s.downcase
|
|
174
174
|
end
|
|
175
175
|
|
|
176
176
|
true
|
data/lib/siwe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: siwe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Spruce Systems Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: eth
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.5.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: 0.5.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
117
117
|
requirements:
|
|
118
118
|
- - ">="
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: 2.
|
|
120
|
+
version: '2.5'
|
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
|
123
123
|
- - ">="
|