stellar-base 0.0.1 → 0.0.2

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/CONTRIBUTING.md +48 -0
  4. data/Gemfile +2 -2
  5. data/README.md +5 -6
  6. data/examples/offer.rb +76 -0
  7. data/generated/stellar-base-generated.rb +1 -1
  8. data/generated/stellar/account_entry.rb +1 -1
  9. data/generated/stellar/account_flags.rb +1 -1
  10. data/generated/stellar/account_merge_result.rb +1 -1
  11. data/generated/stellar/account_merge_result_code.rb +9 -9
  12. data/generated/stellar/allow_trust_op.rb +1 -1
  13. data/generated/stellar/allow_trust_op/currency.rb +1 -1
  14. data/generated/stellar/allow_trust_result.rb +1 -1
  15. data/generated/stellar/allow_trust_result_code.rb +7 -7
  16. data/generated/stellar/bucket_entry.rb +1 -1
  17. data/generated/stellar/bucket_entry_type.rb +1 -1
  18. data/generated/stellar/change_trust_op.rb +1 -1
  19. data/generated/stellar/change_trust_result.rb +1 -1
  20. data/generated/stellar/change_trust_result_code.rb +9 -7
  21. data/generated/stellar/claim_offer_atom.rb +1 -1
  22. data/generated/stellar/create_offer_effect.rb +1 -1
  23. data/generated/stellar/create_offer_op.rb +1 -1
  24. data/generated/stellar/create_offer_result.rb +1 -1
  25. data/generated/stellar/create_offer_result_code.rb +19 -20
  26. data/generated/stellar/create_offer_success_result.rb +1 -1
  27. data/generated/stellar/create_offer_success_result/offer.rb +1 -1
  28. data/generated/stellar/currency.rb +1 -1
  29. data/generated/stellar/currency_type.rb +1 -1
  30. data/generated/stellar/decorated_signature.rb +1 -1
  31. data/generated/stellar/dont_have.rb +1 -1
  32. data/generated/stellar/error.rb +1 -1
  33. data/generated/stellar/hello.rb +1 -1
  34. data/generated/stellar/inflation_payout.rb +1 -1
  35. data/generated/stellar/inflation_result.rb +1 -1
  36. data/generated/stellar/inflation_result_code.rb +3 -3
  37. data/generated/stellar/iso_currency_issuer.rb +1 -1
  38. data/generated/stellar/ledger_entry.rb +1 -1
  39. data/generated/stellar/ledger_entry_type.rb +1 -1
  40. data/generated/stellar/ledger_header.rb +1 -1
  41. data/generated/stellar/ledger_header_history_entry.rb +1 -1
  42. data/generated/stellar/ledger_key.rb +1 -1
  43. data/generated/stellar/ledger_key/account.rb +1 -1
  44. data/generated/stellar/ledger_key/offer.rb +1 -1
  45. data/generated/stellar/ledger_key/trust_line.rb +1 -1
  46. data/generated/stellar/message_type.rb +1 -1
  47. data/generated/stellar/offer_entry.rb +1 -1
  48. data/generated/stellar/operation.rb +1 -1
  49. data/generated/stellar/operation/body.rb +1 -1
  50. data/generated/stellar/operation_result.rb +1 -1
  51. data/generated/stellar/operation_result/tr.rb +1 -1
  52. data/generated/stellar/operation_result_code.rb +5 -5
  53. data/generated/stellar/operation_type.rb +1 -1
  54. data/generated/stellar/payment_op.rb +1 -1
  55. data/generated/stellar/payment_result.rb +1 -1
  56. data/generated/stellar/payment_result_code.rb +19 -17
  57. data/generated/stellar/payment_success_multi_result.rb +1 -1
  58. data/generated/stellar/peer_address.rb +1 -1
  59. data/generated/stellar/price.rb +1 -1
  60. data/generated/stellar/scp_ballot.rb +1 -1
  61. data/generated/stellar/scp_envelope.rb +1 -1
  62. data/generated/stellar/scp_quorum_set.rb +1 -1
  63. data/generated/stellar/scp_statement.rb +1 -1
  64. data/generated/stellar/scp_statement/pledges.rb +1 -1
  65. data/generated/stellar/scp_statement/pledges/prepare.rb +1 -1
  66. data/generated/stellar/scp_statement_type.rb +1 -1
  67. data/generated/stellar/set_options_op.rb +1 -1
  68. data/generated/stellar/set_options_result.rb +1 -1
  69. data/generated/stellar/set_options_result_code.rb +10 -8
  70. data/generated/stellar/signer.rb +1 -1
  71. data/generated/stellar/simple_payment_result.rb +1 -1
  72. data/generated/stellar/stellar_ballot.rb +1 -1
  73. data/generated/stellar/stellar_ballot_value.rb +1 -1
  74. data/generated/stellar/stellar_message.rb +1 -1
  75. data/generated/stellar/transaction.rb +1 -1
  76. data/generated/stellar/transaction_envelope.rb +1 -1
  77. data/generated/stellar/transaction_history_entry.rb +1 -1
  78. data/generated/stellar/transaction_history_result_entry.rb +1 -1
  79. data/generated/stellar/transaction_meta.rb +1 -1
  80. data/generated/stellar/transaction_result.rb +1 -1
  81. data/generated/stellar/transaction_result/result.rb +1 -1
  82. data/generated/stellar/transaction_result_code.rb +23 -23
  83. data/generated/stellar/transaction_result_pair.rb +1 -1
  84. data/generated/stellar/transaction_result_set.rb +1 -1
  85. data/generated/stellar/transaction_set.rb +1 -1
  86. data/generated/stellar/trust_line_entry.rb +1 -1
  87. data/lib/stellar-base.rb +2 -0
  88. data/lib/stellar/base/version.rb +1 -1
  89. data/lib/stellar/create_offer_op.rb +10 -0
  90. data/lib/stellar/price.rb +28 -0
  91. data/lib/stellar/transaction.rb +22 -0
  92. data/ruby-stellar-base.gemspec +1 -1
  93. data/xdr/Stellar-transaction.x +47 -45
  94. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e96c6ed22128b9697abddfe5d7af892a34998eef
4
- data.tar.gz: fb6a8ef744c27cfe43fcc58958f3ec0b802b3671
3
+ metadata.gz: be220a6f1b2170167a2d882bbe31bc1ea1b663fd
4
+ data.tar.gz: 3078d50d5aa5eebfce79687c3ed7dc99f56a2920
5
5
  SHA512:
6
- metadata.gz: 0e4d7b0ed101c1522a5b319c098ea3c23134e6128d4ef88c392149cb4f9036367ab677da8ac3c7b4cb9da93b8c60223b89b696220508937e7598160dc82d589d
7
- data.tar.gz: 9f1c3844cacd4a7baa49cc92add9ea973bed8448aa86149de5e44953a37898ba6f6da7d4c841e98b89b8dbec944cfaaec49d1dc0ac2ea4fe2fec8d5baa27d054
6
+ metadata.gz: 27a122fd0f53a8d0b3d187017f56a6ae712c10b9d51721c65c97fdee55f3fc37c33bc0910fbe62edb8216ec2390237747d2ac473b7488976081918b1163dcdfa
7
+ data.tar.gz: d87e8a4bd376b25cb66c8c517403769e1ba3ac95944d473c7725b4fb5ccd3f072fe814ede7ce926fda1291b23ac867e8d2a41b812db1ab81cf1bee6ba27ed69d
data/.travis.yml CHANGED
@@ -9,7 +9,7 @@ rvm:
9
9
  script: LD_LIBRARY_PATH=lib bundle exec rake travis
10
10
  notifications:
11
11
  slack:
12
- secure: KM3guRjiX+LAjmALKtPvHBRbEaGdP2tjJOKymNDzl/+LpKME3sqkWnjNTyitgkpfmE66y7Dct9+NyNhzQfZ6iX0qN2i4sVr1WbGy90Duj+PyBf2t2juL0hIY3uQLBLt850TzlHgtTOQtTv0XsmpKLSa3bb00MHtD2TJ0zO66oc8=
12
+ secure: V/6a8KFe067uukrbCJA2R1HPO4xy0YSQ1pwmHVRi5StX+yl+lYsWWJdjdBdT0j3iJBYyPRqU4bQYck+OloxtELnrHCX+OkodxcxW8W/ACc914iIf0FyY9pnusK7ck2awmt4Iuf94YPgi0XTm1aCcm+f0yU7wiIVFpftoXSk1EDY=
13
13
  matrix:
14
14
  allow_failures:
15
- - rvm: jruby-head
15
+ - rvm: jruby-head
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,48 @@
1
+ # How to contribute
2
+
3
+ Your contributions to the Stellar network will help improve the world’s financial
4
+ infrastructure, faster.
5
+
6
+ We want to make it as easy as possible to contribute changes that
7
+ help the Stellar network grow and thrive. There are a few guidelines that we
8
+ ask contributors to follow so that we can merge your changes quickly.
9
+
10
+ ## Getting Started
11
+
12
+ * Create a GitHub issue for your contribution, assuming one does not already exist.
13
+ * Clearly describe the issue including steps to reproduce if it is a bug.
14
+ * Fork the repository on GitHub
15
+
16
+ ## Making Changes
17
+
18
+ * Create a topic branch from where you want to base your work.
19
+ * This is usually the master branch.
20
+ * Please avoid working directly on the `master` branch.
21
+ * Make sure you have added the necessary tests for your changes, and make sure all tests pass.
22
+
23
+ ## Submitting Changes
24
+
25
+ * <a href="https://docs.google.com/forms/d/1g7EF6PERciwn7zfmfke5Sir2n10yddGGSXyZsq98tVY/viewform?usp=send_form">Sign the Contributor License Agreement</a>
26
+ * Push your changes to a topic branch in your fork of the repository.
27
+ * Submit a pull request to the corresponding repository in the Stellar organization.
28
+ * Include a descriptive [commit message](https://github.com/erlang/otp/wiki/Writing-good-commit-messages).
29
+ * Changes contributed via pull request should focus on a single issue at a time.
30
+ * Rebase your local changes against the master branch. Resolve any conflicts that arise.
31
+
32
+ At this point you're waiting on us. We like to at least comment on pull requests within three
33
+ business days. We may suggest some changes or improvements or alternatives.
34
+
35
+ # Additional Resources
36
+
37
+ * [Bug tracker (Github)](https://github.com/stellar/ruby-stellar-base/issues)
38
+ * <a href="https://docs.google.com/forms/d/1g7EF6PERciwn7zfmfke5Sir2n10yddGGSXyZsq98tVY/viewform?usp=send_form">Contributor License Agreement</a>
39
+ * #stellar-dev IRC channel on freenode.org and Slack chat on stellar-public.slack.com
40
+
41
+
42
+ This document is inspired by:
43
+
44
+ https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md
45
+
46
+ https://github.com/thoughtbot/factory_girl_rails/blob/master/CONTRIBUTING.md
47
+
48
+ https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
data/Gemfile CHANGED
@@ -2,11 +2,11 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem "xdr", git: "git@github.com:stellar/ruby-xdr.git"
5
+ # gem "xdr", git: "https://github.com/stellar/ruby-xdr.git"
6
6
  # gem "xdr", path: "../ruby-xdr"
7
7
 
8
8
  group :development do
9
- gem "xdrgen", git: "git@github.com:stellar/xdrgen.git"
9
+ gem "xdrgen", git: "https://github.com/stellar/xdrgen.git"
10
10
  # gem "xdrgen", path: "../xdrgen"
11
11
  gem "pry"
12
12
  gem "faraday"
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Stellar::Base
2
2
 
3
+ [![Build Status](https://travis-ci.org/stellar/ruby-stellar-base.svg)](https://travis-ci.org/stellar/ruby-stellar-base)
4
+ [![Code Climate](https://codeclimate.com/github/stellar/ruby-stellar-base/badges/gpa.svg)](https://codeclimate.com/github/stellar/ruby-stellar-base)
5
+
3
6
  The stellar-base library is the lowest-level stellar helper library. It consists of classes
4
7
  to read, write, hash, and sign the xdr structures that are used in stellard.
5
8
 
@@ -71,9 +74,5 @@ The current integration of user-written code with auto-generated classes is to p
71
74
 
72
75
  ## Contributing
73
76
 
74
- 1. Sign the [Contributor License Agreement](https://docs.google.com/forms/d/1g7EF6PERciwn7zfmfke5Sir2n10yddGGSXyZsq98tVY/viewform?usp=send_form)
75
- 2. Fork it ( https://github.com/stellar/ruby-stellar-base/fork )
76
- 2. Create your feature branch (`git checkout -b my-new-feature`)
77
- 3. Commit your changes (`git commit -am 'Add some feature'`)
78
- 4. Push to the branch (`git push origin my-new-feature`)
79
- 5. Create a new Pull Request
77
+ Please [see CONTRIBUTING.md for details](CONTRIBUTING.md).
78
+
data/examples/offer.rb ADDED
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This is an example of using the higher level "payment" wrapper. Notice
4
+ # that we are using KeyPair instead of the raw rbnacl keys and that we need
5
+ # not build the entire heirarchy of xdr object manually.
6
+ #
7
+ # You can see where these helpers are defined in the files underneath /lib,
8
+ # which is where we extend the xdrgen generated source files with our higher
9
+ # level api.
10
+ #
11
+ # NOTE: due to the way that sequence number for a new account are set, this
12
+ # example is pretty cumbersome to run. It is only used for illustrative purposes
13
+ # of the flow
14
+
15
+ require 'stellar-base'
16
+ require 'faraday'
17
+ require 'faraday_middleware'
18
+
19
+ $server = Faraday.new(url: "http://localhost:39132") do |conn|
20
+ conn.response :json
21
+ conn.adapter Faraday.default_adapter
22
+ end
23
+
24
+ def submit(key, tx)
25
+ hex = tx.to_envelope(key).to_xdr(:hex)
26
+ response = $server.get('tx', blob: hex)
27
+ raw = [response.body["result"]].pack("H*")
28
+ p Stellar::TransactionResult.from_xdr(raw)
29
+ end
30
+
31
+ master = Stellar::KeyPair.from_raw_seed("allmylifemyhearthasbeensearching")
32
+ destination = Stellar::KeyPair.from_raw_seed("allmylifemyhearthasbeensearching")
33
+
34
+ submit master, Stellar::Transaction.payment({
35
+ account: master,
36
+ destination: destination,
37
+ sequence: 1,
38
+ amount: [:native, 2000_000000]
39
+ })
40
+
41
+ # NOTE: after this step, you need to get the sequence number for destination
42
+ # Which is based off of the ledger sequence number it was funded in.
43
+ gets # pause to get the account's sequence from the hayashi db
44
+
45
+ destination_sequence = FILL_ME_IN
46
+ # destination_sequence = 17179869185
47
+
48
+ submit destination, Stellar::Transaction.change_trust({
49
+ account: destination,
50
+ sequence: destination_sequence,
51
+ line: [:iso4217, "USD\x00", master],
52
+ limit: 1000
53
+ })
54
+
55
+ submit destination, Stellar::Transaction.change_trust({
56
+ account: destination,
57
+ sequence: destination_sequence + 1,
58
+ line: [:iso4217, "EUR\x00", master],
59
+ limit: 1000
60
+ })
61
+
62
+ submit master, Stellar::Transaction.payment({
63
+ account: master,
64
+ destination: destination,
65
+ sequence: destination_sequence + 2,
66
+ amount: [:iso4217, "USD\x00", master, 1000]
67
+ })
68
+
69
+ submit master, Stellar::Transaction.create_offer({
70
+ account: destination,
71
+ sequence: destination_sequence + 3
72
+ taker_gets: [:iso4217, "USD\x00", usd_gateway],
73
+ taker_pays: [:iso4217, "EUR\x00", eur_gateway],
74
+ amount: 100,
75
+ price: 2.0,
76
+ })
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T11:38:37-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -10,20 +10,20 @@ require 'xdr'
10
10
  # // codes considered as "success" for the operation
11
11
  # ACCOUNT_MERGE_SUCCESS = 0,
12
12
  # // codes considered as "failure" for the operation
13
- # ACCOUNT_MERGE_MALFORMED = 1, // can't merge onto itself
14
- # ACCOUNT_MERGE_NO_ACCOUNT = 2, // destination does not exist
15
- # ACCOUNT_MERGE_HAS_CREDIT = 3, // account has active trust lines
16
- # ACCOUNT_MERGE_CREDIT_HELD = 4 // an issuer cannot be merged if used
13
+ # ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself
14
+ # ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
15
+ # ACCOUNT_MERGE_HAS_CREDIT = -3, // account has active trust lines
16
+ # ACCOUNT_MERGE_CREDIT_HELD = -4 // an issuer cannot be merged if used
17
17
  # };
18
18
  #
19
19
  # ===========================================================================
20
20
  module Stellar
21
21
  class AccountMergeResultCode < XDR::Enum
22
22
  member :account_merge_success, 0
23
- member :account_merge_malformed, 1
24
- member :account_merge_no_account, 2
25
- member :account_merge_has_credit, 3
26
- member :account_merge_credit_held, 4
23
+ member :account_merge_malformed, -1
24
+ member :account_merge_no_account, -2
25
+ member :account_merge_has_credit, -3
26
+ member :account_merge_credit_held, -4
27
27
 
28
28
  seal
29
29
  end
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -10,18 +10,18 @@ require 'xdr'
10
10
  # // codes considered as "success" for the operation
11
11
  # ALLOW_TRUST_SUCCESS = 0,
12
12
  # // codes considered as "failure" for the operation
13
- # ALLOW_TRUST_MALFORMED = 1, // currency is not ISO4217
14
- # ALLOW_TRUST_NO_TRUST_LINE = 2, // trustor does not have a trustline
15
- # ALLOW_TRUST_TRUST_NOT_REQUIRED = 3 // source account does not require trust
13
+ # ALLOW_TRUST_MALFORMED = -1, // currency is not ISO4217
14
+ # ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline
15
+ # ALLOW_TRUST_TRUST_NOT_REQUIRED = -3 // source account does not require trust
16
16
  # };
17
17
  #
18
18
  # ===========================================================================
19
19
  module Stellar
20
20
  class AllowTrustResultCode < XDR::Enum
21
21
  member :allow_trust_success, 0
22
- member :allow_trust_malformed, 1
23
- member :allow_trust_no_trust_line, 2
24
- member :allow_trust_trust_not_required, 3
22
+ member :allow_trust_malformed, -1
23
+ member :allow_trust_no_trust_line, -2
24
+ member :allow_trust_trust_not_required, -3
25
25
 
26
26
  seal
27
27
  end
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -10,18 +10,20 @@ require 'xdr'
10
10
  # // codes considered as "success" for the operation
11
11
  # CHANGE_TRUST_SUCCESS = 0,
12
12
  # // codes considered as "failure" for the operation
13
- # CHANGE_TRUST_NO_ISSUER = 1, // could not find issuer
14
- # CHANGE_TRUST_INVALID_LIMIT = 2, // cannot drop limit below balance
15
- # CHANGE_TRUST_LOW_RESERVE = 3 // not enough funds to create a new trust line
13
+ # CHANGE_TRUST_MALFORMED = -1, // bad input
14
+ # CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer
15
+ # CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance
16
+ # CHANGE_TRUST_LOW_RESERVE = -4 // not enough funds to create a new trust line
16
17
  # };
17
18
  #
18
19
  # ===========================================================================
19
20
  module Stellar
20
21
  class ChangeTrustResultCode < XDR::Enum
21
22
  member :change_trust_success, 0
22
- member :change_trust_no_issuer, 1
23
- member :change_trust_invalid_limit, 2
24
- member :change_trust_low_reserve, 3
23
+ member :change_trust_malformed, -1
24
+ member :change_trust_no_issuer, -2
25
+ member :change_trust_invalid_limit, -3
26
+ member :change_trust_low_reserve, -4
25
27
 
26
28
  seal
27
29
  end
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-04-07T10:52:07-07:00
1
+ # Automatically generated on 2015-04-26T19:13:29-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -11,34 +11,33 @@ require 'xdr'
11
11
  # CREATE_OFFER_SUCCESS = 0,
12
12
  #
13
13
  # // codes considered as "failure" for the operation
14
- # CREATE_OFFER_NO_TRUST = 1, // can't hold what it's buying
15
- # CREATE_OFFER_NOT_AUTHORIZED = 2, // not authorized to hold what it's buying
16
- # CREATE_OFFER_LINE_FULL = 3, // can't receive more of what it's buying
17
- # CREATE_OFFER_MALFORMED = 4, // generated offer would be invalid
18
- # CREATE_OFFER_UNDERFUNDED = 5, // doesn't hold what it's trying to sell
19
- # CREATE_OFFER_CROSS_SELF = 6, // would cross an offer from the same user
14
+ # CREATE_OFFER_MALFORMED = -1, // generated offer would be invalid
15
+ # CREATE_OFFER_NO_TRUST = -2, // can't hold what it's buying
16
+ # CREATE_OFFER_NOT_AUTHORIZED = -3, // not authorized to hold what it's buying
17
+ # CREATE_OFFER_LINE_FULL = -4, // can't receive more of what it's buying
18
+ # CREATE_OFFER_UNDERFUNDED = -5, // doesn't hold what it's trying to sell
19
+ # CREATE_OFFER_CROSS_SELF = -6, // would cross an offer from the same user
20
20
  #
21
21
  # // update errors
22
- # CREATE_OFFER_NOT_FOUND = 7, // offerID does not match an existing offer
23
- # CREATE_OFFER_MISMATCH = 8, // currencies don't match offer
24
- #
25
- # CREATE_OFFER_LOW_RESERVE = 9 // not enough funds to create a new Offer
22
+ # CREATE_OFFER_NOT_FOUND = -7, // offerID does not match an existing offer
23
+ # CREATE_OFFER_MISMATCH = -8, // currencies don't match offer
26
24
  #
25
+ # CREATE_OFFER_LOW_RESERVE = -9 // not enough funds to create a new Offer
27
26
  # };
28
27
  #
29
28
  # ===========================================================================
30
29
  module Stellar
31
30
  class CreateOfferResultCode < XDR::Enum
32
31
  member :create_offer_success, 0
33
- member :create_offer_no_trust, 1
34
- member :create_offer_not_authorized, 2
35
- member :create_offer_line_full, 3
36
- member :create_offer_malformed, 4
37
- member :create_offer_underfunded, 5
38
- member :create_offer_cross_self, 6
39
- member :create_offer_not_found, 7
40
- member :create_offer_mismatch, 8
41
- member :create_offer_low_reserve, 9
32
+ member :create_offer_malformed, -1
33
+ member :create_offer_no_trust, -2
34
+ member :create_offer_not_authorized, -3
35
+ member :create_offer_line_full, -4
36
+ member :create_offer_underfunded, -5
37
+ member :create_offer_cross_self, -6
38
+ member :create_offer_not_found, -7
39
+ member :create_offer_mismatch, -8
40
+ member :create_offer_low_reserve, -9
42
41
 
43
42
  seal
44
43
  end