stellar-sdk 0.9.0.rc1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +0 -3
- data/lib/stellar-sdk.rb +1 -1
- data/lib/stellar/account.rb +4 -0
- data/lib/stellar/client.rb +17 -18
- data/lib/stellar/sdk/version.rb +5 -0
- data/lib/stellar/sep10.rb +1 -1
- metadata +103 -36
- data/lib/stellar/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f79d3c2af3b2cee00a5a7fd4f7ce698bf250c349afa72f9a310b5f101326d168
|
4
|
+
data.tar.gz: 85b75a06c450fb09c07383dbd0606f72d5b83e5f5ac73f51692302ab27237bd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba9a3d5d81b4e5b55af6cb5c14f33001744feea77b706b1b7204189ac638d0c617dcab2e8364822a9a6d4bb0bb222218b4c73da35ae9e18ee649eccab0abd3dc
|
7
|
+
data.tar.gz: 761d9db6452124b38568ea390ba70ddd98ad307cc4304df1bd5abb12e303398661de13ac3fd8320352db657899aef86b3ace18393254782f28ae33a1d868a138
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.23.0) - 2020-06-18
|
10
|
+
- Fix SEP10, considering muxed accounts
|
11
|
+
|
12
|
+
## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.9.0)
|
13
|
+
- No changes. We bumped this version to sync `stellar-sdk` and `stellar-base` versions
|
14
|
+
|
15
|
+
## [0.9.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.9.0...v0.8.0)
|
16
|
+
### Added
|
17
|
+
- Stellar Protocol 13 support
|
18
|
+
- Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
|
19
|
+
- Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
|
20
|
+
- Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))
|
21
|
+
|
7
22
|
## [0.8.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.7.0...v0.8.0)
|
8
23
|
### Added
|
9
24
|
- SEP-10 Multisig Support [#69](https://github.com/stellar/ruby-stellar-sdk/pull/69)
|
data/README.md
CHANGED
@@ -11,14 +11,11 @@ Add this lines to your application's Gemfile:
|
|
11
11
|
|
12
12
|
```ruby
|
13
13
|
gem 'stellar-sdk'
|
14
|
-
gem 'xdr', git: 'https://github.com/stellar/ruby-xdr.git', tag: 'v3.0.1'
|
15
14
|
```
|
16
15
|
|
17
16
|
And then execute:
|
18
17
|
|
19
18
|
$ bundle
|
20
|
-
|
21
|
-
**Note** we need to add such explicit `xdr` dependency, because version 3.0.1 is not on RubyGems yet. When it's published, you can remove this line
|
22
19
|
|
23
20
|
Also requires libsodium. Installable via `brew install libsodium` on OS X.
|
24
21
|
|
data/lib/stellar-sdk.rb
CHANGED
data/lib/stellar/account.rb
CHANGED
data/lib/stellar/client.rb
CHANGED
@@ -78,12 +78,11 @@ module Stellar
|
|
78
78
|
destination = options[:destination]
|
79
79
|
sequence = options[:sequence] || (account_info(account).sequence.to_i + 1)
|
80
80
|
|
81
|
-
transaction = Stellar::TransactionBuilder.
|
81
|
+
transaction = Stellar::TransactionBuilder.account_merge(
|
82
82
|
source_account: destination.keypair,
|
83
|
-
sequence_number: sequence
|
84
|
-
|
85
|
-
|
86
|
-
).set_timeout(0).build
|
83
|
+
sequence_number: sequence,
|
84
|
+
destination: destination.keypair
|
85
|
+
)
|
87
86
|
|
88
87
|
envelope = transaction.to_envelope(account.keypair)
|
89
88
|
submit_transaction(tx_envelope: envelope)
|
@@ -105,17 +104,13 @@ module Stellar
|
|
105
104
|
# instead of using a hard-coded default value.
|
106
105
|
fee = options[:fee] || DEFAULT_FEE
|
107
106
|
|
108
|
-
payment = Stellar::TransactionBuilder.
|
107
|
+
payment = Stellar::TransactionBuilder.create_account(
|
109
108
|
source_account: funder.keypair,
|
110
109
|
sequence_number: sequence,
|
111
|
-
base_fee: fee
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
starting_balance: options[:starting_balance]
|
116
|
-
})
|
117
|
-
).set_timeout(0).build
|
118
|
-
|
110
|
+
base_fee: fee,
|
111
|
+
destination: options[:account].keypair,
|
112
|
+
starting_balance: options[:starting_balance]
|
113
|
+
)
|
119
114
|
envelope = payment.to_envelope(funder.keypair)
|
120
115
|
submit_transaction(tx_envelope: envelope)
|
121
116
|
end
|
@@ -180,14 +175,18 @@ module Stellar
|
|
180
175
|
)
|
181
176
|
sequence ||= (account_info(source).sequence.to_i + 1)
|
182
177
|
|
183
|
-
|
178
|
+
op_args = {
|
184
179
|
account: source.keypair,
|
185
180
|
sequence: sequence,
|
186
181
|
line: asset
|
187
182
|
}
|
188
|
-
|
183
|
+
op_args[:limit] = limit unless limit.nil?
|
189
184
|
|
190
|
-
tx = Stellar::
|
185
|
+
tx = Stellar::TransactionBuilder.change_trust(
|
186
|
+
source_account: source.keypair,
|
187
|
+
sequence_number: sequence,
|
188
|
+
**op_args
|
189
|
+
)
|
191
190
|
|
192
191
|
envelope = tx.to_envelope(source.keypair)
|
193
192
|
submit_transaction(tx_envelope: envelope)
|
@@ -199,7 +198,7 @@ module Stellar
|
|
199
198
|
unless options[:skip_memo_required_check]
|
200
199
|
check_memo_required(tx_envelope)
|
201
200
|
end
|
202
|
-
@horizon.transactions._post(tx:
|
201
|
+
@horizon.transactions._post(tx: tx_envelope.to_xdr(:base64))
|
203
202
|
end
|
204
203
|
|
205
204
|
# Required by SEP-0029
|
data/lib/stellar/sep10.rb
CHANGED
@@ -75,7 +75,7 @@ module Stellar
|
|
75
75
|
)
|
76
76
|
end
|
77
77
|
|
78
|
-
if transaction.source_account != server.
|
78
|
+
if transaction.source_account != server.muxed_account
|
79
79
|
raise InvalidSep10ChallengeError.new(
|
80
80
|
"The transaction source account is not equal to the server's account"
|
81
81
|
)
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stellar-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Fleckenstein
|
8
|
-
|
9
|
-
|
8
|
+
- Sergey Nebolsin
|
9
|
+
- Timur Ramazanov
|
10
|
+
autorequire:
|
11
|
+
bindir: exe
|
10
12
|
cert_chain: []
|
11
|
-
date: 2020-
|
13
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: stellar-base
|
@@ -16,82 +18,144 @@ dependencies:
|
|
16
18
|
requirements:
|
17
19
|
- - '='
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
21
|
+
version: 0.24.0
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
26
|
- - '='
|
25
27
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
28
|
+
version: 0.24.0
|
27
29
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
30
|
+
name: activesupport
|
29
31
|
requirement: !ruby/object:Gem::Requirement
|
30
32
|
requirements:
|
31
|
-
- - "
|
33
|
+
- - ">="
|
32
34
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
35
|
+
version: 5.0.0
|
36
|
+
- - "<"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '7.0'
|
34
39
|
type: :runtime
|
35
40
|
prerelease: false
|
36
41
|
version_requirements: !ruby/object:Gem::Requirement
|
37
42
|
requirements:
|
38
|
-
- - "
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 5.0.0
|
46
|
+
- - "<"
|
39
47
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
48
|
+
version: '7.0'
|
41
49
|
- !ruby/object:Gem::Dependency
|
42
50
|
name: excon
|
43
51
|
requirement: !ruby/object:Gem::Requirement
|
44
52
|
requirements:
|
45
|
-
- - "
|
53
|
+
- - ">="
|
46
54
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
55
|
+
version: 0.71.0
|
56
|
+
- - "<"
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '1.0'
|
48
59
|
type: :runtime
|
49
60
|
prerelease: false
|
50
61
|
version_requirements: !ruby/object:Gem::Requirement
|
51
62
|
requirements:
|
52
|
-
- - "
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.71.0
|
66
|
+
- - "<"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
68
|
+
version: '1.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: hyperclient
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
75
|
+
version: 0.7.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '1.0'
|
62
79
|
type: :runtime
|
63
80
|
prerelease: false
|
64
81
|
version_requirements: !ruby/object:Gem::Requirement
|
65
82
|
requirements:
|
66
83
|
- - ">="
|
67
84
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
85
|
+
version: 0.7.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: toml-rb
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
72
92
|
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.1'
|
76
93
|
- - ">="
|
77
94
|
- !ruby/object:Gem::Version
|
78
95
|
version: 1.1.1
|
96
|
+
- - "<"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '3.0'
|
79
99
|
type: :runtime
|
80
100
|
prerelease: false
|
81
101
|
version_requirements: !ruby/object:Gem::Requirement
|
82
102
|
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '1.1'
|
86
103
|
- - ">="
|
87
104
|
- !ruby/object:Gem::Version
|
88
105
|
version: 1.1.1
|
89
|
-
|
106
|
+
- - "<"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '3.0'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: bundler
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '2.0'
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '2.0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rake
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '13'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '13'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: rspec
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '3.9'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '3.9'
|
151
|
+
description:
|
90
152
|
email:
|
91
|
-
- scott@stellar.org
|
92
153
|
executables: []
|
93
154
|
extensions: []
|
94
|
-
extra_rdoc_files:
|
155
|
+
extra_rdoc_files:
|
156
|
+
- README.md
|
157
|
+
- LICENSE
|
158
|
+
- CHANGELOG.md
|
95
159
|
files:
|
96
160
|
- CHANGELOG.md
|
97
161
|
- LICENSE
|
@@ -101,14 +165,17 @@ files:
|
|
101
165
|
- lib/stellar/amount.rb
|
102
166
|
- lib/stellar/client.rb
|
103
167
|
- lib/stellar/horizon/problem.rb
|
168
|
+
- lib/stellar/sdk/version.rb
|
104
169
|
- lib/stellar/sep10.rb
|
105
170
|
- lib/stellar/transaction_page.rb
|
106
|
-
|
107
|
-
homepage: http://github.com/stellar/ruby-stellar-sdk
|
171
|
+
homepage: https://github.com/stellar/ruby-stellar-sdk/tree/master/sdk
|
108
172
|
licenses:
|
109
173
|
- Apache-2.0
|
110
|
-
metadata:
|
111
|
-
|
174
|
+
metadata:
|
175
|
+
documentation_uri: https://rubydoc.info/gems/stellar-sdk/0.24.0/
|
176
|
+
changelog_uri: https://github.com/astroband/ruby-stellar-sdk/blob/v0.24.0/sdk/CHANGELOG.md
|
177
|
+
source_code_uri: https://github.com/astroband/ruby-stellar-sdk/tree/v0.24.0/sdk
|
178
|
+
post_install_message:
|
112
179
|
rdoc_options: []
|
113
180
|
require_paths:
|
114
181
|
- lib
|
@@ -116,15 +183,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
183
|
requirements:
|
117
184
|
- - ">="
|
118
185
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
186
|
+
version: 2.5.0
|
120
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
188
|
requirements:
|
122
|
-
- - "
|
189
|
+
- - ">="
|
123
190
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
191
|
+
version: '0'
|
125
192
|
requirements: []
|
126
|
-
rubygems_version: 3.
|
127
|
-
signing_key:
|
193
|
+
rubygems_version: 3.2.0.rc.2
|
194
|
+
signing_key:
|
128
195
|
specification_version: 4
|
129
196
|
summary: Stellar client library
|
130
197
|
test_files: []
|
data/lib/stellar/version.rb
DELETED