stellar-sdk 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -9
- data/CHANGELOG.md +13 -0
- data/README.md +7 -1
- data/lib/stellar/account.rb +48 -1
- data/lib/stellar/amount.rb +6 -6
- data/lib/stellar/client.rb +12 -10
- data/lib/stellar/version.rb +1 -1
- data/ruby-stellar-sdk.gemspec +5 -2
- data/spec/config.yml.sample +10 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_404_request_when_performing_federation_lookup.yml +133 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_handle_domains_that_are_not_federation_servers.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Account/_lookup/should_peforms_federation_lookup.yml +85 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_create_account/creates_the_account.yml +323 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum12_asset/sends_a_alphanum12_asset_to_the_destination.yml +448 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/alphanum4_asset/sends_a_alphanum4_asset_to_the_destination.yml +448 -0
- data/spec/fixtures/vcr_cassettes/Stellar_Client/_send_payment/native_asset/sends_a_native_payment_to_the_account.yml +469 -0
- data/spec/lib/stellar/account_spec.rb +22 -0
- data/spec/lib/stellar/amount_spec.rb +70 -0
- data/spec/lib/stellar/client_spec.rb +115 -4
- data/spec/spec_helper.rb +2 -1
- data/spec/support/config.rb +3 -0
- data/spec/support/vcr.rb +10 -0
- data/tasks/travis.rake +1 -9
- metadata +75 -7
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://stellarfed.org/.well-known/stellar.toml
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.14.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.13.8
|
23
|
+
Date:
|
24
|
+
- Tue, 20 Feb 2018 18:58:57 GMT
|
25
|
+
Content-Type:
|
26
|
+
- text/plain; charset=utf-8
|
27
|
+
Last-Modified:
|
28
|
+
- Thu, 08 Feb 2018 03:32:08 GMT
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Etag:
|
34
|
+
- W/"5a7bc4b8-63"
|
35
|
+
Access-Control-Allow-Origin:
|
36
|
+
- "*"
|
37
|
+
body:
|
38
|
+
encoding: ASCII-8BIT
|
39
|
+
string: |
|
40
|
+
# Federation service provided by stellarfed.org
|
41
|
+
FEDERATION_SERVER="https://stellarfed.org/federation/"
|
42
|
+
http_version:
|
43
|
+
recorded_at: Tue, 20 Feb 2018 18:58:57 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://stellarfed.org/federation/?q=john@email.com*stellarfed.org&type=name
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
User-Agent:
|
52
|
+
- Faraday v0.14.0
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
Accept:
|
56
|
+
- "*/*"
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx/1.13.8
|
64
|
+
Date:
|
65
|
+
- Tue, 20 Feb 2018 18:58:58 GMT
|
66
|
+
Content-Type:
|
67
|
+
- application/json
|
68
|
+
Content-Length:
|
69
|
+
- '114'
|
70
|
+
Connection:
|
71
|
+
- keep-alive
|
72
|
+
X-Content-Type-Options:
|
73
|
+
- nosniff
|
74
|
+
X-Frame-Options:
|
75
|
+
- DENY
|
76
|
+
X-Xss-Protection:
|
77
|
+
- 1; mode=block
|
78
|
+
Strict-Transport-Security:
|
79
|
+
- max-age=7776000; includeSubdomains
|
80
|
+
body:
|
81
|
+
encoding: UTF-8
|
82
|
+
string: '{"stellar_address": "john@email.com*stellarfed.org", "account_id": "GDSRO6H2YM6MC6ZO7KORPJXSTUMBMT3E7MZ66CFVNMUAULFG6G2OP32I"}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Tue, 20 Feb 2018 18:58:58 GMT
|
85
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,323 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://horizon-testnet.stellar.org/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept:
|
13
|
+
- application/hal+json,application/problem+json,application/json
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/hal+json; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 26 Mar 2017 07:28:39 GMT
|
23
|
+
X-Ratelimit-Limit:
|
24
|
+
- '72000'
|
25
|
+
X-Ratelimit-Remaining:
|
26
|
+
- '71950'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '2166'
|
29
|
+
Content-Length:
|
30
|
+
- '1366'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"_links": {
|
38
|
+
"account": {
|
39
|
+
"href": "https://horizon-testnet.stellar.org/accounts/{account_id}",
|
40
|
+
"templated": true
|
41
|
+
},
|
42
|
+
"account_transactions": {
|
43
|
+
"href": "https://horizon-testnet.stellar.org/accounts/{account_id}/transactions{?cursor,limit,order}",
|
44
|
+
"templated": true
|
45
|
+
},
|
46
|
+
"friendbot": {
|
47
|
+
"href": "https://horizon-testnet.stellar.org/friendbot{?addr}",
|
48
|
+
"templated": true
|
49
|
+
},
|
50
|
+
"metrics": {
|
51
|
+
"href": "https://horizon-testnet.stellar.org/metrics"
|
52
|
+
},
|
53
|
+
"order_book": {
|
54
|
+
"href": "https://horizon-testnet.stellar.org/order_book{?selling_asset_type,selling_asset_code,selling_issuer,buying_asset_type,buying_asset_code,buying_issuer}",
|
55
|
+
"templated": true
|
56
|
+
},
|
57
|
+
"self": {
|
58
|
+
"href": "https://horizon-testnet.stellar.org/"
|
59
|
+
},
|
60
|
+
"transaction": {
|
61
|
+
"href": "https://horizon-testnet.stellar.org/transactions/{hash}",
|
62
|
+
"templated": true
|
63
|
+
},
|
64
|
+
"transactions": {
|
65
|
+
"href": "https://horizon-testnet.stellar.org/transactions{?cursor,limit,order}",
|
66
|
+
"templated": true
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"horizon_version": "v0.10.0-3-g50eda21",
|
70
|
+
"core_version": "v0.6.1-2-g12a1603",
|
71
|
+
"history_latest_ledger": 124857,
|
72
|
+
"history_elder_ledger": 1,
|
73
|
+
"core_latest_ledger": 124857,
|
74
|
+
"core_elder_ledger": 1,
|
75
|
+
"network_passphrase": "Test SDF Network ; September 2015",
|
76
|
+
"protocol_version": 4
|
77
|
+
}
|
78
|
+
http_version:
|
79
|
+
recorded_at: Sun, 26 Mar 2017 07:28:38 GMT
|
80
|
+
- request:
|
81
|
+
method: get
|
82
|
+
uri: https://horizon-testnet.stellar.org/accounts/[source_address]
|
83
|
+
body:
|
84
|
+
encoding: US-ASCII
|
85
|
+
string: ''
|
86
|
+
headers:
|
87
|
+
User-Agent:
|
88
|
+
- Faraday v0.9.2
|
89
|
+
Accept:
|
90
|
+
- application/hal+json,application/problem+json,application/json
|
91
|
+
response:
|
92
|
+
status:
|
93
|
+
code: 200
|
94
|
+
message: OK
|
95
|
+
headers:
|
96
|
+
Content-Type:
|
97
|
+
- application/hal+json; charset=utf-8
|
98
|
+
Date:
|
99
|
+
- Sun, 26 Mar 2017 07:28:40 GMT
|
100
|
+
X-Ratelimit-Limit:
|
101
|
+
- '72000'
|
102
|
+
X-Ratelimit-Remaining:
|
103
|
+
- '71949'
|
104
|
+
X-Ratelimit-Reset:
|
105
|
+
- '2165'
|
106
|
+
Connection:
|
107
|
+
- keep-alive
|
108
|
+
body:
|
109
|
+
encoding: UTF-8
|
110
|
+
string: |-
|
111
|
+
{
|
112
|
+
"_links": {
|
113
|
+
"self": {
|
114
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]"
|
115
|
+
},
|
116
|
+
"transactions": {
|
117
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/transactions{?cursor,limit,order}",
|
118
|
+
"templated": true
|
119
|
+
},
|
120
|
+
"operations": {
|
121
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/operations{?cursor,limit,order}",
|
122
|
+
"templated": true
|
123
|
+
},
|
124
|
+
"payments": {
|
125
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/payments{?cursor,limit,order}",
|
126
|
+
"templated": true
|
127
|
+
},
|
128
|
+
"effects": {
|
129
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/effects{?cursor,limit,order}",
|
130
|
+
"templated": true
|
131
|
+
},
|
132
|
+
"offers": {
|
133
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/offers{?cursor,limit,order}",
|
134
|
+
"templated": true
|
135
|
+
},
|
136
|
+
"trades": {
|
137
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/trades{?cursor,limit,order}",
|
138
|
+
"templated": true
|
139
|
+
},
|
140
|
+
"data": {
|
141
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/data/{key}",
|
142
|
+
"templated": true
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"id": "[source_address]",
|
146
|
+
"paging_token": "",
|
147
|
+
"account_id": "[source_address]",
|
148
|
+
"sequence": "346973227974693",
|
149
|
+
"subentry_count": 0,
|
150
|
+
"thresholds": {
|
151
|
+
"low_threshold": 0,
|
152
|
+
"med_threshold": 0,
|
153
|
+
"high_threshold": 0
|
154
|
+
},
|
155
|
+
"flags": {
|
156
|
+
"auth_required": false,
|
157
|
+
"auth_revocable": false
|
158
|
+
},
|
159
|
+
"balances": [
|
160
|
+
{
|
161
|
+
"balance": "4949.9998600",
|
162
|
+
"asset_type": "native"
|
163
|
+
}
|
164
|
+
],
|
165
|
+
"signers": [
|
166
|
+
{
|
167
|
+
"public_key": "[source_address]",
|
168
|
+
"weight": 1,
|
169
|
+
"key": "[source_address]",
|
170
|
+
"type": "ed25519_public_key"
|
171
|
+
}
|
172
|
+
],
|
173
|
+
"data": {}
|
174
|
+
}
|
175
|
+
http_version:
|
176
|
+
recorded_at: Sun, 26 Mar 2017 07:28:39 GMT
|
177
|
+
- request:
|
178
|
+
method: post
|
179
|
+
uri: https://horizon-testnet.stellar.org/transactions
|
180
|
+
body:
|
181
|
+
encoding: UTF-8
|
182
|
+
string: tx=AAAAAKEiSt7wL8zHIfwsJF5PvoI%2FqW7Epb2ihhiW7lxPpHJCO5rKAAABO5IAAAAmAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA3thuBcDVJ%2B1nsrzNBZUsTXSzLqe%2F1uSLB3pCUNbLLccAAAAAO5rKAAAAAAAAAAABT6RyQgAAAED%2F4yyK21dzG2s7fEVNMeqQ%2FIjH12yPb%2FokUABPH3l%2FDxzTYgkWMC1V2MD4pV%2FpcqAbRrwWp6AUoTvjiE%2BhqF4C
|
183
|
+
headers:
|
184
|
+
User-Agent:
|
185
|
+
- Faraday v0.9.2
|
186
|
+
Accept:
|
187
|
+
- application/hal+json,application/problem+json,application/json
|
188
|
+
Content-Type:
|
189
|
+
- application/x-www-form-urlencoded
|
190
|
+
response:
|
191
|
+
status:
|
192
|
+
code: 200
|
193
|
+
message: OK
|
194
|
+
headers:
|
195
|
+
Content-Type:
|
196
|
+
- application/hal+json; charset=utf-8
|
197
|
+
Date:
|
198
|
+
- Sun, 26 Mar 2017 07:28:46 GMT
|
199
|
+
X-Ratelimit-Limit:
|
200
|
+
- '72000'
|
201
|
+
X-Ratelimit-Remaining:
|
202
|
+
- '71948'
|
203
|
+
X-Ratelimit-Reset:
|
204
|
+
- '2164'
|
205
|
+
Content-Length:
|
206
|
+
- '915'
|
207
|
+
Connection:
|
208
|
+
- keep-alive
|
209
|
+
body:
|
210
|
+
encoding: UTF-8
|
211
|
+
string: |-
|
212
|
+
{
|
213
|
+
"_links": {
|
214
|
+
"transaction": {
|
215
|
+
"href": "https://horizon-testnet.stellar.org/transactions/c56288996ef30a6677716d1c12879911076cd49984b997226b7d6e85105bb792"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"hash": "c56288996ef30a6677716d1c12879911076cd49984b997226b7d6e85105bb792",
|
219
|
+
"ledger": 124860,
|
220
|
+
"envelope_xdr": "AAAAAKEiSt7wL8zHIfwsJF5PvoI/qW7Epb2ihhiW7lxPpHJCO5rKAAABO5IAAAAmAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA3thuBcDVJ+1nsrzNBZUsTXSzLqe/1uSLB3pCUNbLLccAAAAAO5rKAAAAAAAAAAABT6RyQgAAAED/4yyK21dzG2s7fEVNMeqQ/IjH12yPb/okUABPH3l/DxzTYgkWMC1V2MD4pV/pcqAbRrwWp6AUoTvjiE+hqF4C",
|
221
|
+
"result_xdr": "AAAAADuaygAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=",
|
222
|
+
"result_meta_xdr": "AAAAAAAAAAEAAAACAAAAAAAB57wAAAAAAAAAAN7YbgXA1SftZ7K8zQWVLE10sy6nv9bkiwd6QlDWyy3HAAAAADuaygAAAee8AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAB57wAAAAAAAAAAKEiSt7wL8zHIfwsJF5PvoI/qW7Epb2ihhiW7lxPpHJCAAAACw84dYgAATuSAAAAJgAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA"
|
223
|
+
}
|
224
|
+
http_version:
|
225
|
+
recorded_at: Sun, 26 Mar 2017 07:28:45 GMT
|
226
|
+
- request:
|
227
|
+
method: get
|
228
|
+
uri: https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC
|
229
|
+
body:
|
230
|
+
encoding: US-ASCII
|
231
|
+
string: ''
|
232
|
+
headers:
|
233
|
+
User-Agent:
|
234
|
+
- Faraday v0.9.2
|
235
|
+
Accept:
|
236
|
+
- application/hal+json,application/problem+json,application/json
|
237
|
+
response:
|
238
|
+
status:
|
239
|
+
code: 200
|
240
|
+
message: OK
|
241
|
+
headers:
|
242
|
+
Content-Type:
|
243
|
+
- application/hal+json; charset=utf-8
|
244
|
+
Date:
|
245
|
+
- Sun, 26 Mar 2017 07:28:47 GMT
|
246
|
+
X-Ratelimit-Limit:
|
247
|
+
- '72000'
|
248
|
+
X-Ratelimit-Remaining:
|
249
|
+
- '71947'
|
250
|
+
X-Ratelimit-Reset:
|
251
|
+
- '2158'
|
252
|
+
Connection:
|
253
|
+
- keep-alive
|
254
|
+
body:
|
255
|
+
encoding: UTF-8
|
256
|
+
string: |-
|
257
|
+
{
|
258
|
+
"_links": {
|
259
|
+
"self": {
|
260
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC"
|
261
|
+
},
|
262
|
+
"transactions": {
|
263
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/transactions{?cursor,limit,order}",
|
264
|
+
"templated": true
|
265
|
+
},
|
266
|
+
"operations": {
|
267
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/operations{?cursor,limit,order}",
|
268
|
+
"templated": true
|
269
|
+
},
|
270
|
+
"payments": {
|
271
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/payments{?cursor,limit,order}",
|
272
|
+
"templated": true
|
273
|
+
},
|
274
|
+
"effects": {
|
275
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/effects{?cursor,limit,order}",
|
276
|
+
"templated": true
|
277
|
+
},
|
278
|
+
"offers": {
|
279
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/offers{?cursor,limit,order}",
|
280
|
+
"templated": true
|
281
|
+
},
|
282
|
+
"trades": {
|
283
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/trades{?cursor,limit,order}",
|
284
|
+
"templated": true
|
285
|
+
},
|
286
|
+
"data": {
|
287
|
+
"href": "https://horizon-testnet.stellar.org/accounts/GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC/data/{key}",
|
288
|
+
"templated": true
|
289
|
+
}
|
290
|
+
},
|
291
|
+
"id": "GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC",
|
292
|
+
"paging_token": "",
|
293
|
+
"account_id": "GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC",
|
294
|
+
"sequence": "536269616578560",
|
295
|
+
"subentry_count": 0,
|
296
|
+
"thresholds": {
|
297
|
+
"low_threshold": 0,
|
298
|
+
"med_threshold": 0,
|
299
|
+
"high_threshold": 0
|
300
|
+
},
|
301
|
+
"flags": {
|
302
|
+
"auth_required": false,
|
303
|
+
"auth_revocable": false
|
304
|
+
},
|
305
|
+
"balances": [
|
306
|
+
{
|
307
|
+
"balance": "100.0000000",
|
308
|
+
"asset_type": "native"
|
309
|
+
}
|
310
|
+
],
|
311
|
+
"signers": [
|
312
|
+
{
|
313
|
+
"public_key": "GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC",
|
314
|
+
"weight": 1,
|
315
|
+
"key": "GDPNQ3QFYDKSP3LHWK6M2BMVFRGXJMZOU675NZELA55EEUGWZMW4OGMC",
|
316
|
+
"type": "ed25519_public_key"
|
317
|
+
}
|
318
|
+
],
|
319
|
+
"data": {}
|
320
|
+
}
|
321
|
+
http_version:
|
322
|
+
recorded_at: Sun, 26 Mar 2017 07:28:46 GMT
|
323
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,448 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://horizon-testnet.stellar.org/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept:
|
13
|
+
- application/hal+json,application/problem+json,application/json
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/hal+json; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 26 Mar 2017 07:29:42 GMT
|
23
|
+
X-Ratelimit-Limit:
|
24
|
+
- '72000'
|
25
|
+
X-Ratelimit-Remaining:
|
26
|
+
- '71932'
|
27
|
+
X-Ratelimit-Reset:
|
28
|
+
- '2103'
|
29
|
+
Content-Length:
|
30
|
+
- '1366'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |-
|
36
|
+
{
|
37
|
+
"_links": {
|
38
|
+
"account": {
|
39
|
+
"href": "https://horizon-testnet.stellar.org/accounts/{account_id}",
|
40
|
+
"templated": true
|
41
|
+
},
|
42
|
+
"account_transactions": {
|
43
|
+
"href": "https://horizon-testnet.stellar.org/accounts/{account_id}/transactions{?cursor,limit,order}",
|
44
|
+
"templated": true
|
45
|
+
},
|
46
|
+
"friendbot": {
|
47
|
+
"href": "https://horizon-testnet.stellar.org/friendbot{?addr}",
|
48
|
+
"templated": true
|
49
|
+
},
|
50
|
+
"metrics": {
|
51
|
+
"href": "https://horizon-testnet.stellar.org/metrics"
|
52
|
+
},
|
53
|
+
"order_book": {
|
54
|
+
"href": "https://horizon-testnet.stellar.org/order_book{?selling_asset_type,selling_asset_code,selling_issuer,buying_asset_type,buying_asset_code,buying_issuer}",
|
55
|
+
"templated": true
|
56
|
+
},
|
57
|
+
"self": {
|
58
|
+
"href": "https://horizon-testnet.stellar.org/"
|
59
|
+
},
|
60
|
+
"transaction": {
|
61
|
+
"href": "https://horizon-testnet.stellar.org/transactions/{hash}",
|
62
|
+
"templated": true
|
63
|
+
},
|
64
|
+
"transactions": {
|
65
|
+
"href": "https://horizon-testnet.stellar.org/transactions{?cursor,limit,order}",
|
66
|
+
"templated": true
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"horizon_version": "v0.10.0-3-g50eda21",
|
70
|
+
"core_version": "v0.6.1-2-g12a1603",
|
71
|
+
"history_latest_ledger": 124871,
|
72
|
+
"history_elder_ledger": 1,
|
73
|
+
"core_latest_ledger": 124872,
|
74
|
+
"core_elder_ledger": 1,
|
75
|
+
"network_passphrase": "Test SDF Network ; September 2015",
|
76
|
+
"protocol_version": 4
|
77
|
+
}
|
78
|
+
http_version:
|
79
|
+
recorded_at: Sun, 26 Mar 2017 07:29:41 GMT
|
80
|
+
- request:
|
81
|
+
method: get
|
82
|
+
uri: https://horizon-testnet.stellar.org/accounts/[destination_address]
|
83
|
+
body:
|
84
|
+
encoding: US-ASCII
|
85
|
+
string: ''
|
86
|
+
headers:
|
87
|
+
User-Agent:
|
88
|
+
- Faraday v0.9.2
|
89
|
+
Accept:
|
90
|
+
- application/hal+json,application/problem+json,application/json
|
91
|
+
response:
|
92
|
+
status:
|
93
|
+
code: 200
|
94
|
+
message: OK
|
95
|
+
headers:
|
96
|
+
Content-Type:
|
97
|
+
- application/hal+json; charset=utf-8
|
98
|
+
Date:
|
99
|
+
- Sun, 26 Mar 2017 07:29:43 GMT
|
100
|
+
X-Ratelimit-Limit:
|
101
|
+
- '72000'
|
102
|
+
X-Ratelimit-Remaining:
|
103
|
+
- '71931'
|
104
|
+
X-Ratelimit-Reset:
|
105
|
+
- '2102'
|
106
|
+
Connection:
|
107
|
+
- keep-alive
|
108
|
+
body:
|
109
|
+
encoding: UTF-8
|
110
|
+
string: |-
|
111
|
+
{
|
112
|
+
"_links": {
|
113
|
+
"self": {
|
114
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]"
|
115
|
+
},
|
116
|
+
"transactions": {
|
117
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/transactions{?cursor,limit,order}",
|
118
|
+
"templated": true
|
119
|
+
},
|
120
|
+
"operations": {
|
121
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/operations{?cursor,limit,order}",
|
122
|
+
"templated": true
|
123
|
+
},
|
124
|
+
"payments": {
|
125
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/payments{?cursor,limit,order}",
|
126
|
+
"templated": true
|
127
|
+
},
|
128
|
+
"effects": {
|
129
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/effects{?cursor,limit,order}",
|
130
|
+
"templated": true
|
131
|
+
},
|
132
|
+
"offers": {
|
133
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/offers{?cursor,limit,order}",
|
134
|
+
"templated": true
|
135
|
+
},
|
136
|
+
"trades": {
|
137
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/trades{?cursor,limit,order}",
|
138
|
+
"templated": true
|
139
|
+
},
|
140
|
+
"data": {
|
141
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/data/{key}",
|
142
|
+
"templated": true
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"id": "[destination_address]",
|
146
|
+
"paging_token": "",
|
147
|
+
"account_id": "[destination_address]",
|
148
|
+
"sequence": "534727723319299",
|
149
|
+
"subentry_count": 2,
|
150
|
+
"thresholds": {
|
151
|
+
"low_threshold": 0,
|
152
|
+
"med_threshold": 0,
|
153
|
+
"high_threshold": 0
|
154
|
+
},
|
155
|
+
"flags": {
|
156
|
+
"auth_required": false,
|
157
|
+
"auth_revocable": false
|
158
|
+
},
|
159
|
+
"balances": [
|
160
|
+
{
|
161
|
+
"balance": "0.0000000",
|
162
|
+
"limit": "922337203685.4775807",
|
163
|
+
"asset_type": "credit_alphanum12",
|
164
|
+
"asset_code": "LONGNAME",
|
165
|
+
"asset_issuer": "[source_address]"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"balance": "450.0000000",
|
169
|
+
"limit": "922337203685.4775807",
|
170
|
+
"asset_type": "credit_alphanum4",
|
171
|
+
"asset_code": "BTC",
|
172
|
+
"asset_issuer": "[source_address]"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"balance": "9999.9999700",
|
176
|
+
"asset_type": "native"
|
177
|
+
}
|
178
|
+
],
|
179
|
+
"signers": [
|
180
|
+
{
|
181
|
+
"public_key": "[destination_address]",
|
182
|
+
"weight": 1,
|
183
|
+
"key": "[destination_address]",
|
184
|
+
"type": "ed25519_public_key"
|
185
|
+
}
|
186
|
+
],
|
187
|
+
"data": {}
|
188
|
+
}
|
189
|
+
http_version:
|
190
|
+
recorded_at: Sun, 26 Mar 2017 07:29:42 GMT
|
191
|
+
- request:
|
192
|
+
method: get
|
193
|
+
uri: https://horizon-testnet.stellar.org/accounts/[source_address]
|
194
|
+
body:
|
195
|
+
encoding: US-ASCII
|
196
|
+
string: ''
|
197
|
+
headers:
|
198
|
+
User-Agent:
|
199
|
+
- Faraday v0.9.2
|
200
|
+
Accept:
|
201
|
+
- application/hal+json,application/problem+json,application/json
|
202
|
+
response:
|
203
|
+
status:
|
204
|
+
code: 200
|
205
|
+
message: OK
|
206
|
+
headers:
|
207
|
+
Content-Type:
|
208
|
+
- application/hal+json; charset=utf-8
|
209
|
+
Date:
|
210
|
+
- Sun, 26 Mar 2017 07:29:45 GMT
|
211
|
+
X-Ratelimit-Limit:
|
212
|
+
- '72000'
|
213
|
+
X-Ratelimit-Remaining:
|
214
|
+
- '71930'
|
215
|
+
X-Ratelimit-Reset:
|
216
|
+
- '2100'
|
217
|
+
Connection:
|
218
|
+
- keep-alive
|
219
|
+
body:
|
220
|
+
encoding: UTF-8
|
221
|
+
string: |-
|
222
|
+
{
|
223
|
+
"_links": {
|
224
|
+
"self": {
|
225
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]"
|
226
|
+
},
|
227
|
+
"transactions": {
|
228
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/transactions{?cursor,limit,order}",
|
229
|
+
"templated": true
|
230
|
+
},
|
231
|
+
"operations": {
|
232
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/operations{?cursor,limit,order}",
|
233
|
+
"templated": true
|
234
|
+
},
|
235
|
+
"payments": {
|
236
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/payments{?cursor,limit,order}",
|
237
|
+
"templated": true
|
238
|
+
},
|
239
|
+
"effects": {
|
240
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/effects{?cursor,limit,order}",
|
241
|
+
"templated": true
|
242
|
+
},
|
243
|
+
"offers": {
|
244
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/offers{?cursor,limit,order}",
|
245
|
+
"templated": true
|
246
|
+
},
|
247
|
+
"trades": {
|
248
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/trades{?cursor,limit,order}",
|
249
|
+
"templated": true
|
250
|
+
},
|
251
|
+
"data": {
|
252
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[source_address]/data/{key}",
|
253
|
+
"templated": true
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"id": "[source_address]",
|
257
|
+
"paging_token": "",
|
258
|
+
"account_id": "[source_address]",
|
259
|
+
"sequence": "346973227974697",
|
260
|
+
"subentry_count": 0,
|
261
|
+
"thresholds": {
|
262
|
+
"low_threshold": 0,
|
263
|
+
"med_threshold": 0,
|
264
|
+
"high_threshold": 0
|
265
|
+
},
|
266
|
+
"flags": {
|
267
|
+
"auth_required": false,
|
268
|
+
"auth_revocable": false
|
269
|
+
},
|
270
|
+
"balances": [
|
271
|
+
{
|
272
|
+
"balance": "4399.9998400",
|
273
|
+
"asset_type": "native"
|
274
|
+
}
|
275
|
+
],
|
276
|
+
"signers": [
|
277
|
+
{
|
278
|
+
"public_key": "[source_address]",
|
279
|
+
"weight": 1,
|
280
|
+
"key": "[source_address]",
|
281
|
+
"type": "ed25519_public_key"
|
282
|
+
}
|
283
|
+
],
|
284
|
+
"data": {}
|
285
|
+
}
|
286
|
+
http_version:
|
287
|
+
recorded_at: Sun, 26 Mar 2017 07:29:44 GMT
|
288
|
+
- request:
|
289
|
+
method: post
|
290
|
+
uri: https://horizon-testnet.stellar.org/transactions
|
291
|
+
body:
|
292
|
+
encoding: UTF-8
|
293
|
+
string: tx=AAAAAKEiSt7wL8zHIfwsJF5PvoI%2FqW7Epb2ihhiW7lxPpHJCAAAAZAABO5IAAAAqAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAA8RA%2BPteVWFSF0ebzR9MQD1xUygu9t%2BQcKZWQYBZAumAAAAACTE9OR05BTUUAAAAAAAAAAKEiSt7wL8zHIfwsJF5PvoI%2FqW7Epb2ihhiW7lxPpHJCAAAAAFloLwAAAAAAAAAAAU%2BkckIAAABAQx5DHEnThKdnt7he%2Fp%2B8TihB8dzmC95FCP73AyRugyf6OG5M5fRm%2BklDF5kAc786sTG1CwTyNN8Yv8qY9E3HDw%3D%3D
|
294
|
+
headers:
|
295
|
+
User-Agent:
|
296
|
+
- Faraday v0.9.2
|
297
|
+
Accept:
|
298
|
+
- application/hal+json,application/problem+json,application/json
|
299
|
+
Content-Type:
|
300
|
+
- application/x-www-form-urlencoded
|
301
|
+
response:
|
302
|
+
status:
|
303
|
+
code: 200
|
304
|
+
message: OK
|
305
|
+
headers:
|
306
|
+
Content-Type:
|
307
|
+
- application/hal+json; charset=utf-8
|
308
|
+
Date:
|
309
|
+
- Sun, 26 Mar 2017 07:29:51 GMT
|
310
|
+
X-Ratelimit-Limit:
|
311
|
+
- '72000'
|
312
|
+
X-Ratelimit-Remaining:
|
313
|
+
- '71929'
|
314
|
+
X-Ratelimit-Reset:
|
315
|
+
- '2099'
|
316
|
+
Content-Length:
|
317
|
+
- '1075'
|
318
|
+
Connection:
|
319
|
+
- keep-alive
|
320
|
+
body:
|
321
|
+
encoding: UTF-8
|
322
|
+
string: |-
|
323
|
+
{
|
324
|
+
"_links": {
|
325
|
+
"transaction": {
|
326
|
+
"href": "https://horizon-testnet.stellar.org/transactions/39a1bf57589f1cc37e3303238b5d3ad7aade9d5996a6a0370ccdb336cb3fca0f"
|
327
|
+
}
|
328
|
+
},
|
329
|
+
"hash": "39a1bf57589f1cc37e3303238b5d3ad7aade9d5996a6a0370ccdb336cb3fca0f",
|
330
|
+
"ledger": 124875,
|
331
|
+
"envelope_xdr": "AAAAAKEiSt7wL8zHIfwsJF5PvoI/qW7Epb2ihhiW7lxPpHJCAAAAZAABO5IAAAAqAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAA8RA+PteVWFSF0ebzR9MQD1xUygu9t+QcKZWQYBZAumAAAAACTE9OR05BTUUAAAAAAAAAAKEiSt7wL8zHIfwsJF5PvoI/qW7Epb2ihhiW7lxPpHJCAAAAAFloLwAAAAAAAAAAAU+kckIAAABAQx5DHEnThKdnt7he/p+8TihB8dzmC95FCP73AyRugyf6OG5M5fRm+klDF5kAc786sTG1CwTyNN8Yv8qY9E3HDw==",
|
332
|
+
"result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
|
333
|
+
"result_meta_xdr": "AAAAAAAAAAEAAAACAAAAAwAB52oAAAABAAAAAPEQPj7XlVhUhdHm80fTEA9cVMoLvbfkHCmVkGAWQLpgAAAAAkxPTkdOQU1FAAAAAAAAAAChIkre8C/MxyH8LCReT76CP6luxKW9ooYYlu5cT6RyQgAAAAAAAAAAf/////////8AAAABAAAAAAAAAAAAAAABAAHnywAAAAEAAAAA8RA+PteVWFSF0ebzR9MQD1xUygu9t+QcKZWQYBZAumAAAAACTE9OR05BTUUAAAAAAAAAAKEiSt7wL8zHIfwsJF5PvoI/qW7Epb2ihhiW7lxPpHJCAAAAAFloLwB//////////wAAAAEAAAAAAAAAAA=="
|
334
|
+
}
|
335
|
+
http_version:
|
336
|
+
recorded_at: Sun, 26 Mar 2017 07:29:50 GMT
|
337
|
+
- request:
|
338
|
+
method: get
|
339
|
+
uri: https://horizon-testnet.stellar.org/accounts/[destination_address]
|
340
|
+
body:
|
341
|
+
encoding: US-ASCII
|
342
|
+
string: ''
|
343
|
+
headers:
|
344
|
+
User-Agent:
|
345
|
+
- Faraday v0.9.2
|
346
|
+
Accept:
|
347
|
+
- application/hal+json,application/problem+json,application/json
|
348
|
+
response:
|
349
|
+
status:
|
350
|
+
code: 200
|
351
|
+
message: OK
|
352
|
+
headers:
|
353
|
+
Content-Type:
|
354
|
+
- application/hal+json; charset=utf-8
|
355
|
+
Date:
|
356
|
+
- Sun, 26 Mar 2017 07:29:52 GMT
|
357
|
+
X-Ratelimit-Limit:
|
358
|
+
- '72000'
|
359
|
+
X-Ratelimit-Remaining:
|
360
|
+
- '71928'
|
361
|
+
X-Ratelimit-Reset:
|
362
|
+
- '2093'
|
363
|
+
Connection:
|
364
|
+
- keep-alive
|
365
|
+
body:
|
366
|
+
encoding: UTF-8
|
367
|
+
string: |-
|
368
|
+
{
|
369
|
+
"_links": {
|
370
|
+
"self": {
|
371
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]"
|
372
|
+
},
|
373
|
+
"transactions": {
|
374
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/transactions{?cursor,limit,order}",
|
375
|
+
"templated": true
|
376
|
+
},
|
377
|
+
"operations": {
|
378
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/operations{?cursor,limit,order}",
|
379
|
+
"templated": true
|
380
|
+
},
|
381
|
+
"payments": {
|
382
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/payments{?cursor,limit,order}",
|
383
|
+
"templated": true
|
384
|
+
},
|
385
|
+
"effects": {
|
386
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/effects{?cursor,limit,order}",
|
387
|
+
"templated": true
|
388
|
+
},
|
389
|
+
"offers": {
|
390
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/offers{?cursor,limit,order}",
|
391
|
+
"templated": true
|
392
|
+
},
|
393
|
+
"trades": {
|
394
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/trades{?cursor,limit,order}",
|
395
|
+
"templated": true
|
396
|
+
},
|
397
|
+
"data": {
|
398
|
+
"href": "https://horizon-testnet.stellar.org/accounts/[destination_address]/data/{key}",
|
399
|
+
"templated": true
|
400
|
+
}
|
401
|
+
},
|
402
|
+
"id": "[destination_address]",
|
403
|
+
"paging_token": "",
|
404
|
+
"account_id": "[destination_address]",
|
405
|
+
"sequence": "534727723319299",
|
406
|
+
"subentry_count": 2,
|
407
|
+
"thresholds": {
|
408
|
+
"low_threshold": 0,
|
409
|
+
"med_threshold": 0,
|
410
|
+
"high_threshold": 0
|
411
|
+
},
|
412
|
+
"flags": {
|
413
|
+
"auth_required": false,
|
414
|
+
"auth_revocable": false
|
415
|
+
},
|
416
|
+
"balances": [
|
417
|
+
{
|
418
|
+
"balance": "450.0000000",
|
419
|
+
"limit": "922337203685.4775807",
|
420
|
+
"asset_type": "credit_alphanum4",
|
421
|
+
"asset_code": "BTC",
|
422
|
+
"asset_issuer": "[source_address]"
|
423
|
+
},
|
424
|
+
{
|
425
|
+
"balance": "150.0000000",
|
426
|
+
"limit": "922337203685.4775807",
|
427
|
+
"asset_type": "credit_alphanum12",
|
428
|
+
"asset_code": "LONGNAME",
|
429
|
+
"asset_issuer": "[source_address]"
|
430
|
+
},
|
431
|
+
{
|
432
|
+
"balance": "9999.9999700",
|
433
|
+
"asset_type": "native"
|
434
|
+
}
|
435
|
+
],
|
436
|
+
"signers": [
|
437
|
+
{
|
438
|
+
"public_key": "[destination_address]",
|
439
|
+
"weight": 1,
|
440
|
+
"key": "[destination_address]",
|
441
|
+
"type": "ed25519_public_key"
|
442
|
+
}
|
443
|
+
],
|
444
|
+
"data": {}
|
445
|
+
}
|
446
|
+
http_version:
|
447
|
+
recorded_at: Sun, 26 Mar 2017 07:29:51 GMT
|
448
|
+
recorded_with: VCR 3.0.3
|