stellar-base 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -6
  3. data/CHANGELOG.md +17 -2
  4. data/examples/allow_trust.rb +51 -0
  5. data/generated/stellar-base-generated.rb +14 -4
  6. data/generated/stellar/allow_trust_op.rb +2 -2
  7. data/generated/stellar/allow_trust_op/asset.rb +4 -4
  8. data/generated/stellar/asset.rb +2 -2
  9. data/generated/stellar/asset/alpha_num12.rb +2 -2
  10. data/generated/stellar/asset/alpha_num4.rb +2 -2
  11. data/generated/stellar/bucket_entry.rb +6 -0
  12. data/generated/stellar/bucket_entry_type.rb +8 -2
  13. data/generated/stellar/bucket_metadata.rb +32 -0
  14. data/generated/stellar/bucket_metadata/ext.rb +24 -0
  15. data/generated/stellar/change_trust_result_code.rb +1 -1
  16. data/generated/stellar/claim_offer_atom.rb +2 -2
  17. data/generated/stellar/{create_passive_offer_op.rb → create_passive_sell_offer_op.rb} +2 -2
  18. data/generated/stellar/envelope_type.rb +6 -4
  19. data/generated/stellar/ledger_close_value_signature.rb +20 -0
  20. data/generated/stellar/ledger_key.rb +1 -1
  21. data/generated/stellar/ledger_key/offer.rb +2 -2
  22. data/generated/stellar/manage_buy_offer_op.rb +29 -0
  23. data/generated/stellar/{manage_offer_result.rb → manage_buy_offer_result.rb} +5 -5
  24. data/generated/stellar/manage_buy_offer_result_code.rb +50 -0
  25. data/generated/stellar/{manage_offer_op.rb → manage_sell_offer_op.rb} +4 -4
  26. data/generated/stellar/manage_sell_offer_result.rb +26 -0
  27. data/generated/stellar/manage_sell_offer_result_code.rb +50 -0
  28. data/generated/stellar/offer_entry.rb +2 -2
  29. data/generated/stellar/operation.rb +6 -4
  30. data/generated/stellar/operation/body.rb +30 -26
  31. data/generated/stellar/operation_result.rb +6 -4
  32. data/generated/stellar/operation_result/tr.rb +32 -28
  33. data/generated/stellar/operation_result_code.rb +9 -5
  34. data/generated/stellar/operation_type.rb +17 -15
  35. data/generated/stellar/signer.rb +1 -1
  36. data/generated/stellar/stellar_value.rb +7 -5
  37. data/generated/stellar/stellar_value/ext.rb +8 -4
  38. data/generated/stellar/stellar_value_type.rb +22 -0
  39. data/generated/stellar/time_bounds.rb +4 -4
  40. data/generated/stellar/transaction.rb +2 -2
  41. data/generated/stellar/transaction_meta_v1.rb +1 -1
  42. data/lib/stellar-base.rb +2 -0
  43. data/lib/stellar/base/compat.rb +22 -0
  44. data/lib/stellar/base/version.rb +1 -1
  45. data/lib/stellar/operation.rb +27 -7
  46. data/lib/stellar/transaction.rb +12 -6
  47. data/spec/lib/stellar/price_spec.rb +3 -3
  48. data/tasks/xdr.rake +34 -39
  49. data/xdr/Stellar-ledger-entries.x +13 -6
  50. data/xdr/Stellar-ledger.x +45 -10
  51. data/xdr/Stellar-transaction.x +103 -46
  52. metadata +16 -7
  53. data/generated/stellar/manage_offer_result_code.rb +0 -50
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xdr
@@ -223,6 +223,7 @@ files:
223
223
  - LICENSE.txt
224
224
  - README.md
225
225
  - Rakefile
226
+ - examples/allow_trust.rb
226
227
  - examples/create_account.rb
227
228
  - examples/low_level_transaction_post.rb
228
229
  - examples/mid_level_transaction_post.rb
@@ -251,6 +252,8 @@ files:
251
252
  - generated/stellar/authenticated_message/v0.rb
252
253
  - generated/stellar/bucket_entry.rb
253
254
  - generated/stellar/bucket_entry_type.rb
255
+ - generated/stellar/bucket_metadata.rb
256
+ - generated/stellar/bucket_metadata/ext.rb
254
257
  - generated/stellar/bump_sequence_op.rb
255
258
  - generated/stellar/bump_sequence_result.rb
256
259
  - generated/stellar/bump_sequence_result_code.rb
@@ -261,7 +264,7 @@ files:
261
264
  - generated/stellar/create_account_op.rb
262
265
  - generated/stellar/create_account_result.rb
263
266
  - generated/stellar/create_account_result_code.rb
264
- - generated/stellar/create_passive_offer_op.rb
267
+ - generated/stellar/create_passive_sell_offer_op.rb
265
268
  - generated/stellar/crypto_key_type.rb
266
269
  - generated/stellar/curve25519_public.rb
267
270
  - generated/stellar/curve25519_secret.rb
@@ -279,6 +282,7 @@ files:
279
282
  - generated/stellar/inflation_result.rb
280
283
  - generated/stellar/inflation_result_code.rb
281
284
  - generated/stellar/ip_addr_type.rb
285
+ - generated/stellar/ledger_close_value_signature.rb
282
286
  - generated/stellar/ledger_entry.rb
283
287
  - generated/stellar/ledger_entry/data.rb
284
288
  - generated/stellar/ledger_entry/ext.rb
@@ -298,15 +302,18 @@ files:
298
302
  - generated/stellar/ledger_upgrade.rb
299
303
  - generated/stellar/ledger_upgrade_type.rb
300
304
  - generated/stellar/liabilities.rb
305
+ - generated/stellar/manage_buy_offer_op.rb
306
+ - generated/stellar/manage_buy_offer_result.rb
307
+ - generated/stellar/manage_buy_offer_result_code.rb
301
308
  - generated/stellar/manage_data_op.rb
302
309
  - generated/stellar/manage_data_result.rb
303
310
  - generated/stellar/manage_data_result_code.rb
304
311
  - generated/stellar/manage_offer_effect.rb
305
- - generated/stellar/manage_offer_op.rb
306
- - generated/stellar/manage_offer_result.rb
307
- - generated/stellar/manage_offer_result_code.rb
308
312
  - generated/stellar/manage_offer_success_result.rb
309
313
  - generated/stellar/manage_offer_success_result/offer.rb
314
+ - generated/stellar/manage_sell_offer_op.rb
315
+ - generated/stellar/manage_sell_offer_result.rb
316
+ - generated/stellar/manage_sell_offer_result_code.rb
310
317
  - generated/stellar/memo.rb
311
318
  - generated/stellar/memo_type.rb
312
319
  - generated/stellar/message_type.rb
@@ -354,6 +361,7 @@ files:
354
361
  - generated/stellar/stellar_message.rb
355
362
  - generated/stellar/stellar_value.rb
356
363
  - generated/stellar/stellar_value/ext.rb
364
+ - generated/stellar/stellar_value_type.rb
357
365
  - generated/stellar/threshold_indexes.rb
358
366
  - generated/stellar/time_bounds.rb
359
367
  - generated/stellar/transaction.rb
@@ -383,6 +391,7 @@ files:
383
391
  - lib/stellar/account_flags.rb
384
392
  - lib/stellar/asset.rb
385
393
  - lib/stellar/base.rb
394
+ - lib/stellar/base/compat.rb
386
395
  - lib/stellar/base/version.rb
387
396
  - lib/stellar/convert.rb
388
397
  - lib/stellar/factories.rb
@@ -445,7 +454,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
445
454
  version: '0'
446
455
  requirements: []
447
456
  rubyforge_project:
448
- rubygems_version: 2.7.8
457
+ rubygems_version: 2.7.7
449
458
  signing_key:
450
459
  specification_version: 4
451
460
  summary: 'Stellar client library: XDR'
@@ -1,50 +0,0 @@
1
- # This code was automatically generated using xdrgen
2
- # DO NOT EDIT or your changes may be overwritten
3
-
4
- require 'xdr'
5
-
6
- # === xdr source ============================================================
7
- #
8
- # enum ManageOfferResultCode
9
- # {
10
- # // codes considered as "success" for the operation
11
- # MANAGE_OFFER_SUCCESS = 0,
12
- #
13
- # // codes considered as "failure" for the operation
14
- # MANAGE_OFFER_MALFORMED = -1, // generated offer would be invalid
15
- # MANAGE_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
16
- # MANAGE_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
17
- # MANAGE_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
18
- # MANAGE_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
19
- # MANAGE_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
20
- # MANAGE_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
21
- # MANAGE_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
22
- # MANAGE_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
23
- # MANAGE_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
24
- #
25
- # // update errors
26
- # MANAGE_OFFER_NOT_FOUND = -11, // offerID does not match an existing offer
27
- #
28
- # MANAGE_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
29
- # };
30
- #
31
- # ===========================================================================
32
- module Stellar
33
- class ManageOfferResultCode < XDR::Enum
34
- member :manage_offer_success, 0
35
- member :manage_offer_malformed, -1
36
- member :manage_offer_sell_no_trust, -2
37
- member :manage_offer_buy_no_trust, -3
38
- member :manage_offer_sell_not_authorized, -4
39
- member :manage_offer_buy_not_authorized, -5
40
- member :manage_offer_line_full, -6
41
- member :manage_offer_underfunded, -7
42
- member :manage_offer_cross_self, -8
43
- member :manage_offer_sell_no_issuer, -9
44
- member :manage_offer_buy_no_issuer, -10
45
- member :manage_offer_not_found, -11
46
- member :manage_offer_low_reserve, -12
47
-
48
- seal
49
- end
50
- end