stellar-sdk 0.5.0 → 0.9.0.rc1
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/CHANGELOG.md +19 -2
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +17 -11
- data/lib/stellar-sdk.rb +3 -4
- data/lib/stellar/account.rb +16 -18
- data/lib/stellar/amount.rb +9 -13
- data/lib/stellar/client.rb +217 -91
- data/lib/stellar/horizon/problem.rb +14 -16
- data/lib/stellar/sep10.rb +347 -0
- data/lib/stellar/transaction_page.rb +4 -6
- data/lib/stellar/version.rb +1 -1
- metadata +17 -207
- data/.gitignore +0 -16
- data/.travis.yml +0 -13
- data/.yardopts +0 -7
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -14
- data/Guardfile +0 -5
- data/Rakefile +0 -3
- data/examples/01_get_funded.rb +0 -37
- data/examples/02_payment.rb +0 -15
- data/examples/03_transaction_history.rb +0 -21
- data/examples/04_setting_trust.rb +0 -1
- data/examples/05_fiat_payment.rb +0 -13
- data/examples/06_fund_testnet_friendbot.rb +0 -15
- data/ruby-stellar-sdk.gemspec +0 -36
- data/spec/config.yml.sample +0 -7
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_404_request_when_performing_federation_lookup.yml +0 -133
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_domains_that_are_not_federation_servers.yml +0 -44
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_peforms_federation_lookup.yml +0 -85
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_account_info/returns_the_current_details_for_the_account.yml +0 -190
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_account_merge/merges_source_account_into_destination.yml +0 -714
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_change_trust/given_an_asset_described_as_an_array/creates_updates_or_deletes_a_trustline.yml +0 -1156
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_create_account/creates_the_account.yml +0 -323
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum12_asset/sends_a_alphanum12_asset_to_the_destination.yml +0 -737
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum4_asset/sends_a_alphanum4_asset_to_the_destination.yml +0 -737
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/native_asset/sends_a_native_payment_to_the_account.yml +0 -469
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/accepts_a_cursor_to_return_less_data.yml +0 -94
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/returns_a_list_of_transaction_for_an_account.yml +0 -94
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/accepts_a_cursor_to_return_less_data.yml +0 -94
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/returns_a_list_of_transactions.yml +0 -94
- data/spec/lib/stellar/account_spec.rb +0 -59
- data/spec/lib/stellar/amount_spec.rb +0 -70
- data/spec/lib/stellar/client_spec.rb +0 -302
- data/spec/spec_helper.rb +0 -14
- data/spec/support/config.rb +0 -3
- data/spec/support/vcr.rb +0 -10
- data/tasks/rspec.rake +0 -6
- data/tasks/travis.rake +0 -1
@@ -1,46 +1,44 @@
|
|
1
1
|
module Stellar
|
2
2
|
module Horizon
|
3
|
-
class Problem
|
4
|
-
include Contracts
|
5
|
-
|
3
|
+
class Problem
|
6
4
|
def initialize(attributes)
|
7
5
|
@attributes = attributes.reverse_merge({
|
8
6
|
type: "about:blank",
|
9
7
|
title: "Unknown Error",
|
10
|
-
status: 500
|
8
|
+
status: 500
|
11
9
|
})
|
12
10
|
|
13
11
|
@meta = @attributes.except!(:type, :title, :status, :detail, :instance)
|
14
12
|
end
|
15
13
|
|
16
|
-
|
14
|
+
# @return [String]
|
17
15
|
def type
|
18
|
-
@attributes[:type]
|
16
|
+
@attributes[:type]
|
19
17
|
end
|
20
18
|
|
21
|
-
|
19
|
+
# @return [String]
|
22
20
|
def title
|
23
|
-
@attributes[:title]
|
21
|
+
@attributes[:title]
|
24
22
|
end
|
25
23
|
|
26
|
-
|
24
|
+
# @return [Integer]
|
27
25
|
def status
|
28
|
-
@attributes[:status]
|
26
|
+
@attributes[:status]
|
29
27
|
end
|
30
28
|
|
31
|
-
|
29
|
+
# @return [String]
|
32
30
|
def detail
|
33
|
-
@attributes[:detail]
|
31
|
+
@attributes[:detail]
|
34
32
|
end
|
35
33
|
|
36
|
-
|
34
|
+
# @return [String]
|
37
35
|
def instance
|
38
|
-
@attributes[:instance]
|
36
|
+
@attributes[:instance]
|
39
37
|
end
|
40
38
|
|
41
|
-
|
39
|
+
# @return [{String => Object}]
|
42
40
|
def meta
|
43
|
-
@attributes[:instance]
|
41
|
+
@attributes[:instance]
|
44
42
|
end
|
45
43
|
end
|
46
44
|
end
|
@@ -0,0 +1,347 @@
|
|
1
|
+
module Stellar
|
2
|
+
class InvalidSep10ChallengeError < StandardError; end
|
3
|
+
|
4
|
+
class SEP10
|
5
|
+
# Helper method to create a valid {SEP0010}[https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md]
|
6
|
+
# challenge transaction which you can use for Stellar Web Authentication.
|
7
|
+
#
|
8
|
+
# @param server [Stellar::KeyPair] Keypair for server's signing account.
|
9
|
+
# @param client [Stellar::KeyPair] Keypair for the account whishing to authenticate with the server.
|
10
|
+
# @param anchor_name [String] Anchor's name to be used in the manage_data key.
|
11
|
+
# @param timeout [Integer] Challenge duration (default to 5 minutes).
|
12
|
+
#
|
13
|
+
# @return [String] A base64 encoded string of the raw TransactionEnvelope xdr struct for the transaction.
|
14
|
+
#
|
15
|
+
# = Example
|
16
|
+
#
|
17
|
+
# Stellar::SEP10.build_challenge_tx(server: server, client: user, anchor_name: anchor, timeout: timeout)
|
18
|
+
#
|
19
|
+
# @see {SEP0010: Stellar Web Authentication}[https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md]
|
20
|
+
def self.build_challenge_tx(server:, client:, anchor_name:, timeout: 300)
|
21
|
+
# The value must be 64 bytes long. It contains a 48 byte
|
22
|
+
# cryptographic-quality random string encoded using base64 (for a total of
|
23
|
+
# 64 bytes after encoding).
|
24
|
+
value = SecureRandom.base64(48)
|
25
|
+
|
26
|
+
now = Time.now.to_i
|
27
|
+
time_bounds = Stellar::TimeBounds.new(
|
28
|
+
min_time: now,
|
29
|
+
max_time: now + timeout
|
30
|
+
)
|
31
|
+
|
32
|
+
tx = Stellar::TransactionBuilder.new(
|
33
|
+
source_account: server,
|
34
|
+
sequence_number: 0,
|
35
|
+
time_bounds: time_bounds
|
36
|
+
).add_operation(
|
37
|
+
Stellar::Operation.manage_data(
|
38
|
+
name: "#{anchor_name} auth",
|
39
|
+
value: value,
|
40
|
+
source_account: client
|
41
|
+
)
|
42
|
+
).build
|
43
|
+
|
44
|
+
tx.to_envelope(server).to_xdr(:base64)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Reads a SEP 10 challenge transaction and returns the decoded transaction envelope and client account ID contained within.
|
48
|
+
#
|
49
|
+
# It also verifies that transaction is signed by the server.
|
50
|
+
#
|
51
|
+
# It does not verify that the transaction has been signed by the client or
|
52
|
+
# that any signatures other than the servers on the transaction are valid. Use
|
53
|
+
# one of the following functions to completely verify the transaction:
|
54
|
+
# - Stellar::SEP10.verify_challenge_tx_threshold
|
55
|
+
# - Stellar::SEP10.verify_challenge_tx_signers
|
56
|
+
#
|
57
|
+
# @param challenge_xdr [String] SEP0010 transaction challenge in base64.
|
58
|
+
# @param server [Stellar::KeyPair] keypair for server where the challenge was generated.
|
59
|
+
#
|
60
|
+
# @return [Stellar::TransactionEnvelope, String]
|
61
|
+
#
|
62
|
+
# = Example
|
63
|
+
#
|
64
|
+
# sep10 = Stellar::SEP10
|
65
|
+
# challenge = sep10.build_challenge_tx(server: server, client: user, anchor_name: anchor, timeout: timeout)
|
66
|
+
# envelope, client_address = sep10.read_challenge_tx(challenge: challenge, server: server)
|
67
|
+
#
|
68
|
+
def self.read_challenge_tx(challenge_xdr:, server:)
|
69
|
+
envelope = Stellar::TransactionEnvelope.from_xdr(challenge_xdr, "base64")
|
70
|
+
transaction = envelope.tx
|
71
|
+
|
72
|
+
if transaction.seq_num != 0
|
73
|
+
raise InvalidSep10ChallengeError.new(
|
74
|
+
"The transaction sequence number should be zero"
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
78
|
+
if transaction.source_account != server.raw_public_key
|
79
|
+
raise InvalidSep10ChallengeError.new(
|
80
|
+
"The transaction source account is not equal to the server's account"
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
if transaction.operations.size != 1
|
85
|
+
raise InvalidSep10ChallengeError.new(
|
86
|
+
"The transaction should contain only one operation"
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
operation = transaction.operations.first
|
91
|
+
client_account_id = operation.source_account
|
92
|
+
|
93
|
+
if client_account_id.nil?
|
94
|
+
raise InvalidSep10ChallengeError.new(
|
95
|
+
"The transaction's operation should contain a source account"
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
if operation.body.arm != :manage_data_op
|
100
|
+
raise InvalidSep10ChallengeError.new(
|
101
|
+
"The transaction's operation should be manageData"
|
102
|
+
)
|
103
|
+
end
|
104
|
+
|
105
|
+
if operation.body.value.data_value.unpack1("m").size != 48
|
106
|
+
raise InvalidSep10ChallengeError.new(
|
107
|
+
"The transaction's operation value should be a 64 bytes base64 random string"
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
unless verify_tx_signed_by(tx_envelope: envelope, keypair: server)
|
112
|
+
raise InvalidSep10ChallengeError.new(
|
113
|
+
"The transaction is not signed by the server"
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
time_bounds = transaction.time_bounds
|
118
|
+
now = Time.now.to_i
|
119
|
+
|
120
|
+
if time_bounds.nil? || !now.between?(time_bounds.min_time, time_bounds.max_time)
|
121
|
+
raise InvalidSep10ChallengeError.new("The transaction has expired")
|
122
|
+
end
|
123
|
+
|
124
|
+
# Mirror the return type of the other SDK's and return a string
|
125
|
+
client_kp = Stellar::KeyPair.from_public_key(client_account_id.ed25519!)
|
126
|
+
|
127
|
+
[envelope, client_kp.address]
|
128
|
+
end
|
129
|
+
|
130
|
+
# Verifies that for a SEP 10 challenge transaction all signatures on the transaction are accounted for.
|
131
|
+
#
|
132
|
+
# A transaction is verified if it is signed by the server account, and all other signatures match a signer
|
133
|
+
# that has been provided as an argument. Additional signers can be provided that do not have a signature,
|
134
|
+
# but all signatures must be matched to a signer for verification to succeed.
|
135
|
+
#
|
136
|
+
# If verification succeeds a list of signers that were found is returned, excluding the server account ID.
|
137
|
+
#
|
138
|
+
# @param challenge_xdr [String] SEP0010 transaction challenge transaction in base64.
|
139
|
+
# @param server [Stellar::Keypair] keypair for server's account.
|
140
|
+
# @param signers [SetOf[String]] The signers of client account.
|
141
|
+
#
|
142
|
+
# @return [SetOf[String]]
|
143
|
+
#
|
144
|
+
# Raises a InvalidSep10ChallengeError if:
|
145
|
+
# - The transaction is invalid according to Stellar::SEP10.read_challenge_tx.
|
146
|
+
# - One or more signatures in the transaction are not identifiable as the server account or one of the
|
147
|
+
# signers provided in the arguments.
|
148
|
+
def self.verify_challenge_tx_signers(
|
149
|
+
challenge_xdr:,
|
150
|
+
server:,
|
151
|
+
signers:
|
152
|
+
)
|
153
|
+
if signers.empty?
|
154
|
+
raise InvalidSep10ChallengeError.new("No signers provided.")
|
155
|
+
end
|
156
|
+
|
157
|
+
te, _ = read_challenge_tx(
|
158
|
+
challenge_xdr: challenge_xdr, server: server
|
159
|
+
)
|
160
|
+
|
161
|
+
# deduplicate signers and ignore non-G addresses
|
162
|
+
client_signers = Set.new
|
163
|
+
signers.each do |signer|
|
164
|
+
# ignore server kp if passed
|
165
|
+
if signer == server.address
|
166
|
+
next
|
167
|
+
end
|
168
|
+
begin
|
169
|
+
Stellar::Util::StrKey.check_decode(:account_id, signer)
|
170
|
+
rescue
|
171
|
+
next
|
172
|
+
else
|
173
|
+
client_signers.add(signer)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
if client_signers.empty?
|
178
|
+
raise InvalidSep10ChallengeError.new("At least one signer with a G... address must be provied")
|
179
|
+
end
|
180
|
+
|
181
|
+
# verify all signatures in one pass
|
182
|
+
all_signers = client_signers + Set[server.address]
|
183
|
+
signers_found = verify_tx_signatures(
|
184
|
+
tx_envelope: te, signers: all_signers
|
185
|
+
)
|
186
|
+
|
187
|
+
# ensure server signed transaction and remove it
|
188
|
+
unless signers_found.delete?(server.address)
|
189
|
+
raise InvalidSep10ChallengeError.new("Transaction not signed by server: #{server.address}")
|
190
|
+
end
|
191
|
+
|
192
|
+
# Confirm we matched signatures to the client signers.
|
193
|
+
if signers_found.empty?
|
194
|
+
raise InvalidSep10ChallengeError.new("Transaction not signed by any client signer.")
|
195
|
+
end
|
196
|
+
|
197
|
+
# Confirm all signatures were consumed by a signer.
|
198
|
+
if signers_found.length != te.signatures.length - 1
|
199
|
+
raise InvalidSep10ChallengeError.new("Transaction has unrecognized signatures.")
|
200
|
+
end
|
201
|
+
|
202
|
+
signers_found
|
203
|
+
end
|
204
|
+
|
205
|
+
# Verifies that for a SEP 10 challenge transaction all signatures on the transaction
|
206
|
+
# are accounted for and that the signatures meet a threshold on an account. A
|
207
|
+
# transaction is verified if it is signed by the server account, and all other
|
208
|
+
# signatures match a signer that has been provided as an argument, and those
|
209
|
+
# signatures meet a threshold on the account.
|
210
|
+
#
|
211
|
+
# @param challenge_xdr [String] SEP0010 transaction challenge transaction in base64.
|
212
|
+
# @param server [Stellar::KeyPair] keypair for server's account.
|
213
|
+
# @param threshold [Integer] The medThreshold on the client account.
|
214
|
+
# @param signers [SetOf[::Hash]]The signers of client account.
|
215
|
+
#
|
216
|
+
# @return [SetOf[::Hash]]
|
217
|
+
#
|
218
|
+
# Raises a InvalidSep10ChallengeError if:
|
219
|
+
# - The transaction is invalid according to Stellar::SEP10.read_challenge_transaction.
|
220
|
+
# - One or more signatures in the transaction are not identifiable as the server
|
221
|
+
# account or one of the signers provided in the arguments.
|
222
|
+
# - The signatures are all valid but do not meet the threshold.
|
223
|
+
def self.verify_challenge_tx_threshold(
|
224
|
+
challenge_xdr:,
|
225
|
+
server:,
|
226
|
+
threshold:,
|
227
|
+
signers:
|
228
|
+
)
|
229
|
+
signer_str_set = signers.map { |s| s["key"] }.to_set
|
230
|
+
signer_strs_found = verify_challenge_tx_signers(
|
231
|
+
challenge_xdr: challenge_xdr,
|
232
|
+
server: server,
|
233
|
+
signers: signer_str_set
|
234
|
+
)
|
235
|
+
|
236
|
+
weight = 0
|
237
|
+
signers_found = Set.new
|
238
|
+
signers.each do |s|
|
239
|
+
unless signer_strs_found.include?(s["key"])
|
240
|
+
next
|
241
|
+
end
|
242
|
+
signer_strs_found.delete(s["key"])
|
243
|
+
signers_found.add(s)
|
244
|
+
weight += s["weight"]
|
245
|
+
end
|
246
|
+
|
247
|
+
if weight < threshold
|
248
|
+
raise InvalidSep10ChallengeError.new(
|
249
|
+
"signers with weight #{weight} do not meet threshold #{threshold}."
|
250
|
+
)
|
251
|
+
end
|
252
|
+
|
253
|
+
signers_found
|
254
|
+
end
|
255
|
+
|
256
|
+
# DEPRECATED: Use verify_challenge_tx_signers instead.
|
257
|
+
# This function does not support multiple client signatures.
|
258
|
+
#
|
259
|
+
# Verifies if a transaction is a valid per SEP-10 challenge transaction, if the validation
|
260
|
+
# fails, an exception will be thrown.
|
261
|
+
#
|
262
|
+
# This function performs the following checks:
|
263
|
+
# 1. verify that transaction sequenceNumber is equal to zero;
|
264
|
+
# 2. verify that transaction source account is equal to the server's signing key;
|
265
|
+
# 3. verify that transaction has time bounds set, and that current time is between the minimum and maximum bounds;
|
266
|
+
# 4. verify that transaction contains a single Manage Data operation and it's source account is not null;
|
267
|
+
# 5. verify that transaction envelope has a correct signature by server's signing key;
|
268
|
+
# 6. verify that transaction envelope has a correct signature by the operation's source account;
|
269
|
+
#
|
270
|
+
# @param challenge_xdr [String] SEP0010 transaction challenge transaction in base64.
|
271
|
+
# @param server [Stellar::KeyPair] keypair for server's account.
|
272
|
+
#
|
273
|
+
# Raises a InvalidSep10ChallengeError if the validation fails
|
274
|
+
def self.verify_challenge_tx(
|
275
|
+
challenge_xdr: String, server: Stellar::KeyPair
|
276
|
+
)
|
277
|
+
transaction_envelope, client_address = read_challenge_tx(
|
278
|
+
challenge_xdr: challenge_xdr, server: server
|
279
|
+
)
|
280
|
+
client_keypair = Stellar::KeyPair.from_address(client_address)
|
281
|
+
unless verify_tx_signed_by(tx_envelope: transaction_envelope, keypair: client_keypair)
|
282
|
+
raise InvalidSep10ChallengeError.new(
|
283
|
+
"Transaction not signed by client: %s" % [client_keypair.address]
|
284
|
+
)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# Verifies every signer passed matches a signature on the transaction exactly once,
|
289
|
+
# returning a list of unique signers that were found to have signed the transaction.
|
290
|
+
#
|
291
|
+
# @param tx_envelope [Stellar::TransactionEnvelope] SEP0010 transaction challenge transaction envelope.
|
292
|
+
# @param signers [SetOf[String]] The signers of client account.
|
293
|
+
#
|
294
|
+
# @return [SetOf[String]]
|
295
|
+
def self.verify_tx_signatures(
|
296
|
+
tx_envelope:,
|
297
|
+
signers:
|
298
|
+
)
|
299
|
+
signatures = tx_envelope.signatures
|
300
|
+
if signatures.empty?
|
301
|
+
raise InvalidSep10ChallengeError.new("Transaction has no signatures.")
|
302
|
+
end
|
303
|
+
|
304
|
+
tx_hash = tx_envelope.tx.hash
|
305
|
+
signatures_used = Set.new
|
306
|
+
signers_found = Set.new
|
307
|
+
signers.each do |signer|
|
308
|
+
kp = Stellar::KeyPair.from_address(signer)
|
309
|
+
tx_envelope.signatures.each_with_index do |sig, i|
|
310
|
+
if signatures_used.include?(i)
|
311
|
+
next
|
312
|
+
end
|
313
|
+
if sig.hint != kp.signature_hint
|
314
|
+
next
|
315
|
+
end
|
316
|
+
if kp.verify(sig.signature, tx_hash)
|
317
|
+
signatures_used.add(i)
|
318
|
+
signers_found.add(signer)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
signers_found
|
324
|
+
end
|
325
|
+
|
326
|
+
# Verifies if a Stellar::TransactionEnvelope was signed by the given Stellar::KeyPair
|
327
|
+
#
|
328
|
+
# @param tx_envelope [Stellar::TransactionEnvelope]
|
329
|
+
# @param keypair [Stellar::KeyPair]
|
330
|
+
#
|
331
|
+
# @return [Boolean]
|
332
|
+
#
|
333
|
+
# = Example
|
334
|
+
#
|
335
|
+
# Stellar::SEP10.verify_tx_signed_by(tx_envelope: envelope, keypair: keypair)
|
336
|
+
#
|
337
|
+
def self.verify_tx_signed_by(tx_envelope:, keypair:)
|
338
|
+
tx_hash = tx_envelope.tx.hash
|
339
|
+
tx_envelope.signatures.any? do |sig|
|
340
|
+
if sig.hint != keypair.signature_hint
|
341
|
+
next
|
342
|
+
end
|
343
|
+
keypair.verify(sig.signature, tx_hash)
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
@@ -1,9 +1,8 @@
|
|
1
1
|
module Stellar
|
2
2
|
class TransactionPage
|
3
|
-
include Contracts
|
4
3
|
include Enumerable
|
5
4
|
|
6
|
-
|
5
|
+
# @param [Hyperclient::Link] resource
|
7
6
|
def initialize(resource)
|
8
7
|
@resource = resource
|
9
8
|
end
|
@@ -11,10 +10,10 @@ module Stellar
|
|
11
10
|
def each
|
12
11
|
@resource.records.each do |tx|
|
13
12
|
yield tx if block_given?
|
14
|
-
end
|
13
|
+
end
|
15
14
|
end
|
16
15
|
|
17
|
-
|
16
|
+
# @return [Stellar::TransactionPage]
|
18
17
|
def next_page
|
19
18
|
self.class.new(@resource.next)
|
20
19
|
end
|
@@ -22,6 +21,5 @@ module Stellar
|
|
22
21
|
def next_page!
|
23
22
|
@resource = @resource.next
|
24
23
|
end
|
25
|
-
|
26
24
|
end
|
27
|
-
end
|
25
|
+
end
|
data/lib/stellar/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stellar-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Fleckenstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stellar-base
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.23.0.rc1
|
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.23.0.rc1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hyperclient
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,48 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 0.44.4
|
47
|
+
version: '0.71'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
version: '0.
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 0.44.4
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: contracts
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.16'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0.16'
|
54
|
+
version: '0.71'
|
75
55
|
- !ruby/object:Gem::Dependency
|
76
56
|
name: activesupport
|
77
57
|
requirement: !ruby/object:Gem::Requirement
|
78
58
|
requirements:
|
79
59
|
- - ">="
|
80
60
|
- !ruby/object:Gem::Version
|
81
|
-
version: 5.
|
61
|
+
version: '5.0'
|
82
62
|
type: :runtime
|
83
63
|
prerelease: false
|
84
64
|
version_requirements: !ruby/object:Gem::Requirement
|
85
65
|
requirements:
|
86
66
|
- - ">="
|
87
67
|
- !ruby/object:Gem::Version
|
88
|
-
version: 5.
|
68
|
+
version: '5.0'
|
89
69
|
- !ruby/object:Gem::Dependency
|
90
70
|
name: toml-rb
|
91
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,118 +86,6 @@ dependencies:
|
|
106
86
|
- - ">="
|
107
87
|
- !ruby/object:Gem::Version
|
108
88
|
version: 1.1.1
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: bundler
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: '1.16'
|
116
|
-
type: :development
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: '1.16'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: rake
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '10.0'
|
130
|
-
type: :development
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '10.0'
|
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.1'
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - "~>"
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '3.1'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: guard-rspec
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - ">="
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0'
|
158
|
-
type: :development
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - ">="
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: '0'
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: simplecov
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - ">="
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '0'
|
172
|
-
type: :development
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - ">="
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: '0'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: yard
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - ">="
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: vcr
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '3.0'
|
200
|
-
type: :development
|
201
|
-
prerelease: false
|
202
|
-
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
requirements:
|
204
|
-
- - "~>"
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: '3.0'
|
207
|
-
- !ruby/object:Gem::Dependency
|
208
|
-
name: webmock
|
209
|
-
requirement: !ruby/object:Gem::Requirement
|
210
|
-
requirements:
|
211
|
-
- - "~>"
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: '2.3'
|
214
|
-
type: :development
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
requirements:
|
218
|
-
- - "~>"
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
version: '2.3'
|
221
89
|
description:
|
222
90
|
email:
|
223
91
|
- scott@stellar.org
|
@@ -225,56 +93,20 @@ executables: []
|
|
225
93
|
extensions: []
|
226
94
|
extra_rdoc_files: []
|
227
95
|
files:
|
228
|
-
- ".gitignore"
|
229
|
-
- ".travis.yml"
|
230
|
-
- ".yardopts"
|
231
96
|
- CHANGELOG.md
|
232
|
-
-
|
233
|
-
- Gemfile
|
234
|
-
- Guardfile
|
235
|
-
- LICENSE.txt
|
97
|
+
- LICENSE
|
236
98
|
- README.md
|
237
|
-
- Rakefile
|
238
|
-
- examples/01_get_funded.rb
|
239
|
-
- examples/02_payment.rb
|
240
|
-
- examples/03_transaction_history.rb
|
241
|
-
- examples/04_setting_trust.rb
|
242
|
-
- examples/05_fiat_payment.rb
|
243
|
-
- examples/06_fund_testnet_friendbot.rb
|
244
99
|
- lib/stellar-sdk.rb
|
245
100
|
- lib/stellar/account.rb
|
246
101
|
- lib/stellar/amount.rb
|
247
102
|
- lib/stellar/client.rb
|
248
103
|
- lib/stellar/horizon/problem.rb
|
104
|
+
- lib/stellar/sep10.rb
|
249
105
|
- lib/stellar/transaction_page.rb
|
250
106
|
- lib/stellar/version.rb
|
251
|
-
- ruby-stellar-sdk.gemspec
|
252
|
-
- spec/config.yml.sample
|
253
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_404_request_when_performing_federation_lookup.yml
|
254
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_domains_that_are_not_federation_servers.yml
|
255
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_peforms_federation_lookup.yml
|
256
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_account_info/returns_the_current_details_for_the_account.yml
|
257
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_account_merge/merges_source_account_into_destination.yml
|
258
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_change_trust/given_an_asset_described_as_an_array/creates_updates_or_deletes_a_trustline.yml
|
259
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_create_account/creates_the_account.yml
|
260
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum12_asset/sends_a_alphanum12_asset_to_the_destination.yml
|
261
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum4_asset/sends_a_alphanum4_asset_to_the_destination.yml
|
262
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/native_asset/sends_a_native_payment_to_the_account.yml
|
263
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/accepts_a_cursor_to_return_less_data.yml
|
264
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/returns_a_list_of_transaction_for_an_account.yml
|
265
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/accepts_a_cursor_to_return_less_data.yml
|
266
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/returns_a_list_of_transactions.yml
|
267
|
-
- spec/lib/stellar/account_spec.rb
|
268
|
-
- spec/lib/stellar/amount_spec.rb
|
269
|
-
- spec/lib/stellar/client_spec.rb
|
270
|
-
- spec/spec_helper.rb
|
271
|
-
- spec/support/config.rb
|
272
|
-
- spec/support/vcr.rb
|
273
|
-
- tasks/rspec.rake
|
274
|
-
- tasks/travis.rake
|
275
107
|
homepage: http://github.com/stellar/ruby-stellar-sdk
|
276
108
|
licenses:
|
277
|
-
- Apache
|
109
|
+
- Apache-2.0
|
278
110
|
metadata: {}
|
279
111
|
post_install_message:
|
280
112
|
rdoc_options: []
|
@@ -287,34 +119,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
119
|
version: '0'
|
288
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
121
|
requirements:
|
290
|
-
- - "
|
122
|
+
- - ">"
|
291
123
|
- !ruby/object:Gem::Version
|
292
|
-
version:
|
124
|
+
version: 1.3.1
|
293
125
|
requirements: []
|
294
|
-
|
295
|
-
rubygems_version: 2.7.6
|
126
|
+
rubygems_version: 3.1.3
|
296
127
|
signing_key:
|
297
128
|
specification_version: 4
|
298
129
|
summary: Stellar client library
|
299
|
-
test_files:
|
300
|
-
- spec/config.yml.sample
|
301
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_404_request_when_performing_federation_lookup.yml
|
302
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_domains_that_are_not_federation_servers.yml
|
303
|
-
- spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_peforms_federation_lookup.yml
|
304
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_account_info/returns_the_current_details_for_the_account.yml
|
305
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_account_merge/merges_source_account_into_destination.yml
|
306
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_change_trust/given_an_asset_described_as_an_array/creates_updates_or_deletes_a_trustline.yml
|
307
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_create_account/creates_the_account.yml
|
308
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum12_asset/sends_a_alphanum12_asset_to_the_destination.yml
|
309
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum4_asset/sends_a_alphanum4_asset_to_the_destination.yml
|
310
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/native_asset/sends_a_native_payment_to_the_account.yml
|
311
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/accepts_a_cursor_to_return_less_data.yml
|
312
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/account_transactions/returns_a_list_of_transaction_for_an_account.yml
|
313
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/accepts_a_cursor_to_return_less_data.yml
|
314
|
-
- spec/fixtures/vcr_cassettes/Stellar_Client/_transactions/all_transactions/returns_a_list_of_transactions.yml
|
315
|
-
- spec/lib/stellar/account_spec.rb
|
316
|
-
- spec/lib/stellar/amount_spec.rb
|
317
|
-
- spec/lib/stellar/client_spec.rb
|
318
|
-
- spec/spec_helper.rb
|
319
|
-
- spec/support/config.rb
|
320
|
-
- spec/support/vcr.rb
|
130
|
+
test_files: []
|