stellar-sdk 0.30.0 → 0.31.0

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: 5dc8d8d67076947afebdb2065fa08387d878e4250b5604ddfb4eb32b7056507a
4
- data.tar.gz: 71b168f5ce4f97e76839d712eec86241a6839b0f93d7cd45544692703b28af22
3
+ metadata.gz: e6374a1f2407fd63aeaf4ec40ab27409bd0b187aed21ac9d34eceb19b6f0eb48
4
+ data.tar.gz: 1198273f4bea602f9d9062b1ecf143bdbd7414172680ceaaf92c89edb940bd4f
5
5
  SHA512:
6
- metadata.gz: cf1ebdc0471f3884cfe207bcfc2f1131b6efbb9e35b7b4cce75044fea3b0c2245f7219af4b04bc868b79396d01303209fdc8ce041102b124ab92e64cb30e2dcc
7
- data.tar.gz: 773d3492c23d37de50cafff1c6847aa0041136d235013e5d3526b44dc7a5e81ba18a77698eebcff3bb31f040bd958d903a803e2b9033205607cc47776c44e004
6
+ metadata.gz: 3308f77ed5f5dcaec0f83fdef87220d318466f7775e08e1f93deed41562ebb4ae307383545b621337b8f07570a387be185b3575ea16d8350a0cd9c9a5b0ac761
7
+ data.tar.gz: 2e3f360405f67c0d9a2c9e3674bb531ddfd7e8d91ef7a3975c1cf8ff19e890d0d231b16a1eaf10e6283c9d102519ddd09d183297e572a9190245f5d2676f8c29
data/CHANGELOG.md CHANGED
@@ -5,28 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
- ## [0.30.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.29.0...v0.30.0) (2021-10-14)
8
+ ## [0.31.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.30.0...v0.31.0) (2022-02-20)
9
+ ### Features
10
+ - `Stellar::SEP10` uses 5 minutes grace period for challenge tx ([#256](https://github.com/astroband/ruby-stellar-sdk/issues/256)) ([0d02663](https://github.com/astroband/ruby-stellar-sdk/commit/0d02663ff41a878f5c4d373f31988313e6ee4f46))
9
11
 
10
- ### Added
11
- * `stellar-sdk` now depends on `stellar-horizon`
12
- ### Changed
13
- * `Stellar::Amount` class moved to `stellar-base` gem
14
- * `Stellar::Horizon::Problem` class moved to `stellar-horizon` gem
15
- * `Stellar::TransactionPage` is now `Stellar::Horizon::TransactionPage` in `stellar-horizon` gem
16
- * `toml-rb` gem is replaced with `tomlrb` gem to work around [segfaults in Ruby 3.0](https://github.com/mjackson/citrus/issues/60)
12
+ ## [0.30.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.29.0...v0.30.0) (2021-10-14)
13
+ ### Features
14
+ - `stellar-sdk` now depends on `stellar-horizon`
15
+ ### Refactoring
16
+ - `Stellar::Amount` class moved to `stellar-base` gem
17
+ - `Stellar::Horizon::Problem` class moved to `stellar-horizon` gem
18
+ - `Stellar::TransactionPage` is now `Stellar::Horizon::TransactionPage` in `stellar-horizon` gem
19
+ - `toml-rb` gem is replaced with `tomlrb` gem to work around [segfaults in Ruby 3.0](https://github.com/mjackson/citrus/issues/60)
17
20
 
18
21
  ## [0.29.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.28.0...v0.29.0) (2021-09-07)
19
-
20
- ### Added
21
- * support for client domain in SEP-10
22
- ### Deprecated
23
- * `Stellar::Client` class is marked as deprecated in favour of new `stellar-horizon` gem
22
+ ### Deprecations
23
+ - `Stellar::Client` class is marked as deprecated in favour of new `stellar-horizon` gem
24
+ ### Features
25
+ - support for client domain in SEP-10
24
26
 
25
27
  ## [0.28.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.27.0...v0.28.0) (2021-07-17)
26
-
27
- ### Changed
28
- * `Stellar::Account` class is now part of `stellar-base` gem
29
- * `Stellar::Account.lookup` is deprecated, use `Stellar::Federation.lookup` instead
28
+ ### Deprecations
29
+ - `Stellar::Account.lookup` is deprecated, use `Stellar::Federation.lookup` instead
30
+ ### Refactoring
31
+ - `Stellar::Account` class is now part of `stellar-base` gem
30
32
 
31
33
  ## [0.27.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.26.0...v0.27.0) (2021-05-08)
32
34
  - No changes
data/lib/stellar/sep10.rb CHANGED
@@ -4,6 +4,10 @@ module Stellar
4
4
  class SEP10
5
5
  include Stellar::DSL
6
6
 
7
+ # We use a small grace period for the challenge transaction time bounds
8
+ # to compensate possible clock drift on client's machine
9
+ GRACE_PERIOD = 5.minutes
10
+
7
11
  # Helper method to create a valid {SEP0010}[https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md]
8
12
  # challenge transaction which you can use for Stellar Web Authentication.
9
13
  #
@@ -157,7 +161,7 @@ module Stellar
157
161
  time_bounds = transaction.time_bounds
158
162
  now = Time.now.to_i
159
163
 
160
- if time_bounds.blank? || !now.between?(time_bounds.min_time, time_bounds.max_time)
164
+ if time_bounds.blank? || !now.between?(time_bounds.min_time - GRACE_PERIOD, time_bounds.max_time + GRACE_PERIOD)
161
165
  raise InvalidSep10ChallengeError, "The transaction has expired"
162
166
  end
163
167
 
data/lib/stellar-sdk.rb CHANGED
@@ -7,7 +7,6 @@ module Stellar
7
7
  end
8
8
  Client = Horizon::Client
9
9
 
10
- autoload :Amount
11
10
  autoload :Federation
12
11
  autoload :SEP10
13
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-10-13 00:00:00.000000000 Z
13
+ date: 2022-02-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: stellar-base
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.30.0
21
+ version: 0.31.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.30.0
28
+ version: 0.31.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: stellar-horizon
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.30.0
35
+ version: 0.31.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.30.0
42
+ version: 0.31.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: activesupport
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: 5.0.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.0'
52
+ version: '8.0'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: 5.0.0
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '7.0'
62
+ version: '8.0'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: faraday
65
65
  requirement: !ruby/object:Gem::Requirement
@@ -100,48 +100,6 @@ dependencies:
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '3.0'
103
- - !ruby/object:Gem::Dependency
104
- name: bundler
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '2.2'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '2.2'
117
- - !ruby/object:Gem::Dependency
118
- name: rake
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '13'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '13'
131
- - !ruby/object:Gem::Dependency
132
- name: rspec
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '3.9'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '3.9'
145
103
  description:
146
104
  email:
147
105
  executables: []
@@ -162,11 +120,11 @@ licenses:
162
120
  - Apache-2.0
163
121
  metadata:
164
122
  bug_tracker_uri: https://github.com/astroband/ruby-stellar-sdk/issues
165
- changelog_uri: https://github.com/astroband/ruby-stellar-sdk/blob/v0.30.0/sdk/CHANGELOG.md
166
- documentation_uri: https://rubydoc.info/gems/stellar-sdk/0.30.0/
123
+ changelog_uri: https://github.com/astroband/ruby-stellar-sdk/blob/v0.31.0/sdk/CHANGELOG.md
124
+ documentation_uri: https://rubydoc.info/gems/stellar-sdk/0.31.0/
167
125
  github_repo: ssh://github.com/astroband/ruby-stellar-sdk
168
126
  homepage_uri: https://github.com/astroband/ruby-stellar-sdk/tree/main/sdk
169
- source_code_uri: https://github.com/astroband/ruby-stellar-sdk/tree/v0.30.0/sdk
127
+ source_code_uri: https://github.com/astroband/ruby-stellar-sdk/tree/v0.31.0/sdk
170
128
  post_install_message:
171
129
  rdoc_options: []
172
130
  require_paths:
@@ -182,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
140
  - !ruby/object:Gem::Version
183
141
  version: '0'
184
142
  requirements: []
185
- rubygems_version: 3.2.22
143
+ rubygems_version: 3.3.5
186
144
  signing_key:
187
145
  specification_version: 4
188
146
  summary: Stellar client library