stellar-base 0.18.0 → 0.23.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +5 -5
  2. data/{LICENSE.txt → LICENSE} +0 -0
  3. data/README.md +2 -3
  4. data/generated/stellar-base-generated.rb +45 -8
  5. data/generated/stellar/allow_trust_op.rb +5 -4
  6. data/generated/stellar/allow_trust_op/asset.rb +4 -4
  7. data/generated/stellar/asset.rb +2 -2
  8. data/generated/stellar/asset/alpha_num12.rb +2 -2
  9. data/generated/stellar/asset/alpha_num4.rb +2 -2
  10. data/generated/stellar/authenticated_message.rb +4 -4
  11. data/generated/stellar/authenticated_message/v0.rb +4 -4
  12. data/generated/stellar/bucket_entry.rb +6 -0
  13. data/generated/stellar/bucket_entry_type.rb +8 -2
  14. data/generated/stellar/bucket_metadata.rb +32 -0
  15. data/generated/stellar/bucket_metadata/ext.rb +24 -0
  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/crypto_key_type.rb +8 -4
  19. data/generated/stellar/curve25519_public.rb +1 -1
  20. data/generated/stellar/curve25519_secret.rb +1 -1
  21. data/generated/stellar/envelope_type.rb +10 -4
  22. data/generated/stellar/fee_bump_transaction.rb +39 -0
  23. data/generated/stellar/fee_bump_transaction/ext.rb +24 -0
  24. data/generated/stellar/fee_bump_transaction/inner_tx.rb +25 -0
  25. data/generated/stellar/fee_bump_transaction_envelope.rb +22 -0
  26. data/generated/stellar/hmac_sha256_key.rb +1 -1
  27. data/generated/stellar/hmac_sha256_mac.rb +1 -1
  28. data/generated/stellar/inner_transaction_result.rb +56 -0
  29. data/generated/stellar/inner_transaction_result/ext.rb +24 -0
  30. data/generated/stellar/inner_transaction_result/result.rb +52 -0
  31. data/generated/stellar/inner_transaction_result_pair.rb +20 -0
  32. data/generated/stellar/ledger_close_meta.rb +23 -0
  33. data/generated/stellar/ledger_close_meta_v0.rb +35 -0
  34. data/generated/stellar/ledger_close_value_signature.rb +20 -0
  35. data/generated/stellar/ledger_key.rb +1 -1
  36. data/generated/stellar/ledger_key/offer.rb +2 -2
  37. data/generated/stellar/manage_buy_offer_op.rb +29 -0
  38. data/generated/stellar/{manage_offer_result.rb → manage_buy_offer_result.rb} +5 -5
  39. data/generated/stellar/manage_buy_offer_result_code.rb +51 -0
  40. data/generated/stellar/{manage_offer_op.rb → manage_sell_offer_op.rb} +4 -4
  41. data/generated/stellar/manage_sell_offer_result.rb +26 -0
  42. data/generated/stellar/manage_sell_offer_result_code.rb +54 -0
  43. data/generated/stellar/message_type.rb +6 -1
  44. data/generated/stellar/muxed_account.rb +35 -0
  45. data/generated/stellar/muxed_account/med25519.rb +22 -0
  46. data/generated/stellar/offer_entry.rb +2 -2
  47. data/generated/stellar/operation.rb +13 -9
  48. data/generated/stellar/operation/body.rb +37 -29
  49. data/generated/stellar/operation_result.rb +10 -6
  50. data/generated/stellar/operation_result/tr.rb +38 -30
  51. data/generated/stellar/operation_result_code.rb +11 -7
  52. data/generated/stellar/operation_type.rb +20 -16
  53. data/generated/stellar/{path_payment_op.rb → path_payment_strict_receive_op.rb} +6 -6
  54. data/generated/stellar/path_payment_strict_receive_result.rb +38 -0
  55. data/generated/stellar/path_payment_strict_receive_result/success.rb +22 -0
  56. data/generated/stellar/path_payment_strict_receive_result_code.rb +56 -0
  57. data/generated/stellar/path_payment_strict_send_op.rb +32 -0
  58. data/generated/stellar/{path_payment_result.rb → path_payment_strict_send_result.rb} +7 -7
  59. data/generated/stellar/{path_payment_result → path_payment_strict_send_result}/success.rb +1 -1
  60. data/generated/stellar/path_payment_strict_send_result_code.rb +55 -0
  61. data/generated/stellar/payment_op.rb +4 -4
  62. data/generated/stellar/peer_stats.rb +48 -0
  63. data/generated/stellar/signed_survey_request_message.rb +20 -0
  64. data/generated/stellar/signed_survey_response_message.rb +20 -0
  65. data/generated/stellar/signer.rb +1 -1
  66. data/generated/stellar/stellar_message.rb +22 -12
  67. data/generated/stellar/stellar_value.rb +7 -5
  68. data/generated/stellar/stellar_value/ext.rb +8 -4
  69. data/generated/stellar/stellar_value_type.rb +22 -0
  70. data/generated/stellar/survey_message_command_type.rb +20 -0
  71. data/generated/stellar/survey_request_message.rb +26 -0
  72. data/generated/stellar/survey_response_body.rb +23 -0
  73. data/generated/stellar/survey_response_message.rb +26 -0
  74. data/generated/stellar/time_bounds.rb +4 -4
  75. data/generated/stellar/topology_response_body.rb +25 -0
  76. data/generated/stellar/transaction.rb +4 -4
  77. data/generated/stellar/transaction_envelope.rb +17 -8
  78. data/generated/stellar/transaction_meta.rb +4 -0
  79. data/generated/stellar/transaction_meta_v1.rb +1 -1
  80. data/generated/stellar/transaction_meta_v2.rb +24 -0
  81. data/generated/stellar/transaction_result.rb +3 -0
  82. data/generated/stellar/transaction_result/result.rb +9 -3
  83. data/generated/stellar/transaction_result_code.rb +21 -14
  84. data/generated/stellar/transaction_result_meta.rb +22 -0
  85. data/generated/stellar/transaction_signature_payload.rb +3 -1
  86. data/generated/stellar/transaction_signature_payload/tagged_transaction.rb +7 -3
  87. data/generated/stellar/transaction_v0.rb +39 -0
  88. data/generated/stellar/transaction_v0/ext.rb +24 -0
  89. data/generated/stellar/transaction_v0_envelope.rb +22 -0
  90. data/generated/stellar/transaction_v1_envelope.rb +22 -0
  91. data/generated/stellar/trust_line_flags.rb +6 -2
  92. data/generated/stellar/upgrade_entry_meta.rb +20 -0
  93. data/lib/stellar-base.rb +28 -23
  94. data/lib/stellar/account_flags.rb +2 -4
  95. data/lib/stellar/asset.rb +6 -6
  96. data/lib/stellar/base.rb +1 -1
  97. data/lib/stellar/compat.rb +21 -0
  98. data/lib/stellar/concerns/transaction.rb +49 -0
  99. data/lib/stellar/convert.rb +2 -2
  100. data/lib/stellar/factories.rb +1 -3
  101. data/lib/stellar/fee_bump_transaction.rb +21 -0
  102. data/lib/stellar/key_pair.rb +9 -6
  103. data/lib/stellar/networks.rb +5 -7
  104. data/lib/stellar/operation.rb +428 -317
  105. data/lib/stellar/{path_payment_result.rb → path_payment_strict_receive_result.rb} +2 -3
  106. data/lib/stellar/price.rb +2 -4
  107. data/lib/stellar/signer_key.rb +4 -8
  108. data/lib/stellar/thresholds.rb +5 -7
  109. data/lib/stellar/transaction.rb +154 -169
  110. data/lib/stellar/transaction_builder.rb +149 -0
  111. data/lib/stellar/transaction_envelope.rb +40 -8
  112. data/lib/stellar/transaction_v0.rb +39 -0
  113. data/lib/stellar/util/continued_fraction.rb +19 -19
  114. data/lib/stellar/util/strkey.rb +39 -14
  115. data/lib/stellar/{base/version.rb → version.rb} +1 -1
  116. metadata +69 -211
  117. data/.gitignore +0 -17
  118. data/.travis.yml +0 -14
  119. data/.yardopts +0 -8
  120. data/CHANGELOG.md +0 -120
  121. data/CONTRIBUTING.md +0 -48
  122. data/Gemfile +0 -15
  123. data/Guardfile +0 -5
  124. data/Rakefile +0 -4
  125. data/examples/create_account.rb +0 -26
  126. data/examples/low_level_transaction_post.rb +0 -46
  127. data/examples/mid_level_transaction_post.rb +0 -33
  128. data/examples/non_native_payment.rb +0 -60
  129. data/examples/offer.rb +0 -75
  130. data/examples/transaction_merge.rb +0 -23
  131. data/generated/stellar/manage_offer_result_code.rb +0 -50
  132. data/generated/stellar/path_payment_result_code.rb +0 -47
  133. data/ruby-stellar-base.gemspec +0 -34
  134. data/spec/lib/stellar/account_flags_spec.rb +0 -19
  135. data/spec/lib/stellar/asset_spec.rb +0 -45
  136. data/spec/lib/stellar/convert_spec.rb +0 -61
  137. data/spec/lib/stellar/key_pair_spec.rb +0 -251
  138. data/spec/lib/stellar/networks_spec.rb +0 -77
  139. data/spec/lib/stellar/operation_spec.rb +0 -71
  140. data/spec/lib/stellar/path_payment_result_spec.rb +0 -95
  141. data/spec/lib/stellar/price_spec.rb +0 -34
  142. data/spec/lib/stellar/signer_key_spec.rb +0 -26
  143. data/spec/lib/stellar/thresholds_spec.rb +0 -62
  144. data/spec/lib/stellar/transaction_envelope_spec.rb +0 -93
  145. data/spec/lib/stellar/transaction_spec.rb +0 -100
  146. data/spec/lib/stellar/util/strkey_spec.rb +0 -54
  147. data/spec/spec_helper.rb +0 -16
  148. data/spec/support/matchers/be_strkey.rb +0 -9
  149. data/spec/support/matchers/eq_bytes.rb +0 -5
  150. data/spec/support/matchers/have_length.rb +0 -5
  151. data/tasks/rspec.rake +0 -6
  152. data/tasks/travis.rake +0 -1
  153. data/tasks/xdr.rake +0 -50
  154. data/xdr/Stellar-SCP.x +0 -86
  155. data/xdr/Stellar-ledger-entries.x +0 -288
  156. data/xdr/Stellar-ledger.x +0 -283
  157. data/xdr/Stellar-overlay.x +0 -146
  158. data/xdr/Stellar-transaction.x +0 -777
  159. data/xdr/Stellar-types.x +0 -81
@@ -24,7 +24,7 @@ require 'xdr'
24
24
  # struct
25
25
  # {
26
26
  # AccountID sellerID;
27
- # uint64 offerID;
27
+ # int64 offerID;
28
28
  # } offer;
29
29
  #
30
30
  # case DATA:
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # struct
9
9
  # {
10
10
  # AccountID sellerID;
11
- # uint64 offerID;
11
+ # int64 offerID;
12
12
  # }
13
13
  #
14
14
  # ===========================================================================
@@ -16,7 +16,7 @@ module Stellar
16
16
  class LedgerKey
17
17
  class Offer < XDR::Struct
18
18
  attribute :seller_id, AccountID
19
- attribute :offer_id, Uint64
19
+ attribute :offer_id, Int64
20
20
  end
21
21
  end
22
22
  end
@@ -0,0 +1,29 @@
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
+ # struct ManageBuyOfferOp
9
+ # {
10
+ # Asset selling;
11
+ # Asset buying;
12
+ # int64 buyAmount; // amount being bought. if set to 0, delete the offer
13
+ # Price price; // price of thing being bought in terms of what you are
14
+ # // selling
15
+ #
16
+ # // 0=create a new offer, otherwise edit an existing offer
17
+ # int64 offerID;
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class ManageBuyOfferOp < XDR::Struct
23
+ attribute :selling, Asset
24
+ attribute :buying, Asset
25
+ attribute :buy_amount, Int64
26
+ attribute :price, Price
27
+ attribute :offer_id, Int64
28
+ end
29
+ end
@@ -5,9 +5,9 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union ManageOfferResult switch (ManageOfferResultCode code)
8
+ # union ManageBuyOfferResult switch (ManageBuyOfferResultCode code)
9
9
  # {
10
- # case MANAGE_OFFER_SUCCESS:
10
+ # case MANAGE_BUY_OFFER_SUCCESS:
11
11
  # ManageOfferSuccessResult success;
12
12
  # default:
13
13
  # void;
@@ -15,10 +15,10 @@ require 'xdr'
15
15
  #
16
16
  # ===========================================================================
17
17
  module Stellar
18
- class ManageOfferResult < XDR::Union
19
- switch_on ManageOfferResultCode, :code
18
+ class ManageBuyOfferResult < XDR::Union
19
+ switch_on ManageBuyOfferResultCode, :code
20
20
 
21
- switch :manage_offer_success, :success
21
+ switch :manage_buy_offer_success, :success
22
22
  switch :default
23
23
 
24
24
  attribute :success, ManageOfferSuccessResult
@@ -0,0 +1,51 @@
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 ManageBuyOfferResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # MANAGE_BUY_OFFER_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # MANAGE_BUY_OFFER_MALFORMED = -1, // generated offer would be invalid
15
+ # MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
16
+ # MANAGE_BUY_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
17
+ # MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
18
+ # MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
19
+ # MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
20
+ # MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
21
+ # MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
22
+ # MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
23
+ # MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
24
+ #
25
+ # // update errors
26
+ # MANAGE_BUY_OFFER_NOT_FOUND =
27
+ # -11, // offerID does not match an existing offer
28
+ #
29
+ # MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
30
+ # };
31
+ #
32
+ # ===========================================================================
33
+ module Stellar
34
+ class ManageBuyOfferResultCode < XDR::Enum
35
+ member :manage_buy_offer_success, 0
36
+ member :manage_buy_offer_malformed, -1
37
+ member :manage_buy_offer_sell_no_trust, -2
38
+ member :manage_buy_offer_buy_no_trust, -3
39
+ member :manage_buy_offer_sell_not_authorized, -4
40
+ member :manage_buy_offer_buy_not_authorized, -5
41
+ member :manage_buy_offer_line_full, -6
42
+ member :manage_buy_offer_underfunded, -7
43
+ member :manage_buy_offer_cross_self, -8
44
+ member :manage_buy_offer_sell_no_issuer, -9
45
+ member :manage_buy_offer_buy_no_issuer, -10
46
+ member :manage_buy_offer_not_found, -11
47
+ member :manage_buy_offer_low_reserve, -12
48
+
49
+ seal
50
+ end
51
+ end
@@ -5,7 +5,7 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # struct ManageOfferOp
8
+ # struct ManageSellOfferOp
9
9
  # {
10
10
  # Asset selling;
11
11
  # Asset buying;
@@ -13,16 +13,16 @@ require 'xdr'
13
13
  # Price price; // price of thing being sold in terms of what you are buying
14
14
  #
15
15
  # // 0=create a new offer, otherwise edit an existing offer
16
- # uint64 offerID;
16
+ # int64 offerID;
17
17
  # };
18
18
  #
19
19
  # ===========================================================================
20
20
  module Stellar
21
- class ManageOfferOp < XDR::Struct
21
+ class ManageSellOfferOp < XDR::Struct
22
22
  attribute :selling, Asset
23
23
  attribute :buying, Asset
24
24
  attribute :amount, Int64
25
25
  attribute :price, Price
26
- attribute :offer_id, Uint64
26
+ attribute :offer_id, Int64
27
27
  end
28
28
  end
@@ -0,0 +1,26 @@
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
+ # union ManageSellOfferResult switch (ManageSellOfferResultCode code)
9
+ # {
10
+ # case MANAGE_SELL_OFFER_SUCCESS:
11
+ # ManageOfferSuccessResult success;
12
+ # default:
13
+ # void;
14
+ # };
15
+ #
16
+ # ===========================================================================
17
+ module Stellar
18
+ class ManageSellOfferResult < XDR::Union
19
+ switch_on ManageSellOfferResultCode, :code
20
+
21
+ switch :manage_sell_offer_success, :success
22
+ switch :default
23
+
24
+ attribute :success, ManageOfferSuccessResult
25
+ end
26
+ end
@@ -0,0 +1,54 @@
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 ManageSellOfferResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # MANAGE_SELL_OFFER_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
15
+ # MANAGE_SELL_OFFER_SELL_NO_TRUST =
16
+ # -2, // no trust line for what we're selling
17
+ # MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
18
+ # MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
19
+ # MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
20
+ # MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
21
+ # MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
22
+ # MANAGE_SELL_OFFER_CROSS_SELF =
23
+ # -8, // would cross an offer from the same user
24
+ # MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
25
+ # MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
26
+ #
27
+ # // update errors
28
+ # MANAGE_SELL_OFFER_NOT_FOUND =
29
+ # -11, // offerID does not match an existing offer
30
+ #
31
+ # MANAGE_SELL_OFFER_LOW_RESERVE =
32
+ # -12 // not enough funds to create a new Offer
33
+ # };
34
+ #
35
+ # ===========================================================================
36
+ module Stellar
37
+ class ManageSellOfferResultCode < XDR::Enum
38
+ member :manage_sell_offer_success, 0
39
+ member :manage_sell_offer_malformed, -1
40
+ member :manage_sell_offer_sell_no_trust, -2
41
+ member :manage_sell_offer_buy_no_trust, -3
42
+ member :manage_sell_offer_sell_not_authorized, -4
43
+ member :manage_sell_offer_buy_not_authorized, -5
44
+ member :manage_sell_offer_line_full, -6
45
+ member :manage_sell_offer_underfunded, -7
46
+ member :manage_sell_offer_cross_self, -8
47
+ member :manage_sell_offer_sell_no_issuer, -9
48
+ member :manage_sell_offer_buy_no_issuer, -10
49
+ member :manage_sell_offer_not_found, -11
50
+ member :manage_sell_offer_low_reserve, -12
51
+
52
+ seal
53
+ end
54
+ end
@@ -26,7 +26,10 @@ require 'xdr'
26
26
  # GET_SCP_STATE = 12,
27
27
  #
28
28
  # // new messages
29
- # HELLO = 13
29
+ # HELLO = 13,
30
+ #
31
+ # SURVEY_REQUEST = 14,
32
+ # SURVEY_RESPONSE = 15
30
33
  # };
31
34
  #
32
35
  # ===========================================================================
@@ -45,6 +48,8 @@ module Stellar
45
48
  member :scp_message, 11
46
49
  member :get_scp_state, 12
47
50
  member :hello, 13
51
+ member :survey_request, 14
52
+ member :survey_response, 15
48
53
 
49
54
  seal
50
55
  end
@@ -0,0 +1,35 @@
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
+ # union MuxedAccount switch (CryptoKeyType type)
9
+ # {
10
+ # case KEY_TYPE_ED25519:
11
+ # uint256 ed25519;
12
+ # case KEY_TYPE_MUXED_ED25519:
13
+ # struct
14
+ # {
15
+ # uint64 id;
16
+ # uint256 ed25519;
17
+ # } med25519;
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class MuxedAccount < XDR::Union
23
+ include XDR::Namespace
24
+
25
+ autoload :Med25519
26
+
27
+ switch_on CryptoKeyType, :type
28
+
29
+ switch :key_type_ed25519, :ed25519
30
+ switch :key_type_muxed_ed25519, :med25519
31
+
32
+ attribute :ed25519, Uint256
33
+ attribute :med25519, Med25519
34
+ end
35
+ end
@@ -0,0 +1,22 @@
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
+ # struct
9
+ # {
10
+ # uint64 id;
11
+ # uint256 ed25519;
12
+ # }
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class MuxedAccount
17
+ class Med25519 < XDR::Struct
18
+ attribute :id, Uint64
19
+ attribute :ed25519, Uint256
20
+ end
21
+ end
22
+ end
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # struct OfferEntry
9
9
  # {
10
10
  # AccountID sellerID;
11
- # uint64 offerID;
11
+ # int64 offerID;
12
12
  # Asset selling; // A
13
13
  # Asset buying; // B
14
14
  # int64 amount; // amount of A
@@ -38,7 +38,7 @@ module Stellar
38
38
  autoload :Ext
39
39
 
40
40
  attribute :seller_id, AccountID
41
- attribute :offer_id, Uint64
41
+ attribute :offer_id, Int64
42
42
  attribute :selling, Asset
43
43
  attribute :buying, Asset
44
44
  attribute :amount, Int64
@@ -10,7 +10,7 @@ require 'xdr'
10
10
  # // sourceAccount is the account used to run the operation
11
11
  # // if not set, the runtime defaults to "sourceAccount" specified at
12
12
  # // the transaction level
13
- # AccountID* sourceAccount;
13
+ # MuxedAccount* sourceAccount;
14
14
  #
15
15
  # union switch (OperationType type)
16
16
  # {
@@ -18,12 +18,12 @@ require 'xdr'
18
18
  # CreateAccountOp createAccountOp;
19
19
  # case PAYMENT:
20
20
  # PaymentOp paymentOp;
21
- # case PATH_PAYMENT:
22
- # PathPaymentOp pathPaymentOp;
23
- # case MANAGE_OFFER:
24
- # ManageOfferOp manageOfferOp;
25
- # case CREATE_PASSIVE_OFFER:
26
- # CreatePassiveOfferOp createPassiveOfferOp;
21
+ # case PATH_PAYMENT_STRICT_RECEIVE:
22
+ # PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
23
+ # case MANAGE_SELL_OFFER:
24
+ # ManageSellOfferOp manageSellOfferOp;
25
+ # case CREATE_PASSIVE_SELL_OFFER:
26
+ # CreatePassiveSellOfferOp createPassiveSellOfferOp;
27
27
  # case SET_OPTIONS:
28
28
  # SetOptionsOp setOptionsOp;
29
29
  # case CHANGE_TRUST:
@@ -31,13 +31,17 @@ require 'xdr'
31
31
  # case ALLOW_TRUST:
32
32
  # AllowTrustOp allowTrustOp;
33
33
  # case ACCOUNT_MERGE:
34
- # AccountID destination;
34
+ # MuxedAccount destination;
35
35
  # case INFLATION:
36
36
  # void;
37
37
  # case MANAGE_DATA:
38
38
  # ManageDataOp manageDataOp;
39
39
  # case BUMP_SEQUENCE:
40
40
  # BumpSequenceOp bumpSequenceOp;
41
+ # case MANAGE_BUY_OFFER:
42
+ # ManageBuyOfferOp manageBuyOfferOp;
43
+ # case PATH_PAYMENT_STRICT_SEND:
44
+ # PathPaymentStrictSendOp pathPaymentStrictSendOp;
41
45
  # }
42
46
  # body;
43
47
  # };
@@ -49,7 +53,7 @@ module Stellar
49
53
 
50
54
  autoload :Body
51
55
 
52
- attribute :source_account, XDR::Option[AccountID]
56
+ attribute :source_account, XDR::Option[MuxedAccount]
53
57
  attribute :body, Body
54
58
  end
55
59
  end
@@ -11,12 +11,12 @@ require 'xdr'
11
11
  # CreateAccountOp createAccountOp;
12
12
  # case PAYMENT:
13
13
  # PaymentOp paymentOp;
14
- # case PATH_PAYMENT:
15
- # PathPaymentOp pathPaymentOp;
16
- # case MANAGE_OFFER:
17
- # ManageOfferOp manageOfferOp;
18
- # case CREATE_PASSIVE_OFFER:
19
- # CreatePassiveOfferOp createPassiveOfferOp;
14
+ # case PATH_PAYMENT_STRICT_RECEIVE:
15
+ # PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
16
+ # case MANAGE_SELL_OFFER:
17
+ # ManageSellOfferOp manageSellOfferOp;
18
+ # case CREATE_PASSIVE_SELL_OFFER:
19
+ # CreatePassiveSellOfferOp createPassiveSellOfferOp;
20
20
  # case SET_OPTIONS:
21
21
  # SetOptionsOp setOptionsOp;
22
22
  # case CHANGE_TRUST:
@@ -24,13 +24,17 @@ require 'xdr'
24
24
  # case ALLOW_TRUST:
25
25
  # AllowTrustOp allowTrustOp;
26
26
  # case ACCOUNT_MERGE:
27
- # AccountID destination;
27
+ # MuxedAccount destination;
28
28
  # case INFLATION:
29
29
  # void;
30
30
  # case MANAGE_DATA:
31
31
  # ManageDataOp manageDataOp;
32
32
  # case BUMP_SEQUENCE:
33
33
  # BumpSequenceOp bumpSequenceOp;
34
+ # case MANAGE_BUY_OFFER:
35
+ # ManageBuyOfferOp manageBuyOfferOp;
36
+ # case PATH_PAYMENT_STRICT_SEND:
37
+ # PathPaymentStrictSendOp pathPaymentStrictSendOp;
34
38
  # }
35
39
  #
36
40
  # ===========================================================================
@@ -39,30 +43,34 @@ module Stellar
39
43
  class Body < XDR::Union
40
44
  switch_on OperationType, :type
41
45
 
42
- switch :create_account, :create_account_op
43
- switch :payment, :payment_op
44
- switch :path_payment, :path_payment_op
45
- switch :manage_offer, :manage_offer_op
46
- switch :create_passive_offer, :create_passive_offer_op
47
- switch :set_options, :set_options_op
48
- switch :change_trust, :change_trust_op
49
- switch :allow_trust, :allow_trust_op
50
- switch :account_merge, :destination
46
+ switch :create_account, :create_account_op
47
+ switch :payment, :payment_op
48
+ switch :path_payment_strict_receive, :path_payment_strict_receive_op
49
+ switch :manage_sell_offer, :manage_sell_offer_op
50
+ switch :create_passive_sell_offer, :create_passive_sell_offer_op
51
+ switch :set_options, :set_options_op
52
+ switch :change_trust, :change_trust_op
53
+ switch :allow_trust, :allow_trust_op
54
+ switch :account_merge, :destination
51
55
  switch :inflation
52
- switch :manage_data, :manage_data_op
53
- switch :bump_sequence, :bump_sequence_op
56
+ switch :manage_data, :manage_data_op
57
+ switch :bump_sequence, :bump_sequence_op
58
+ switch :manage_buy_offer, :manage_buy_offer_op
59
+ switch :path_payment_strict_send, :path_payment_strict_send_op
54
60
 
55
- attribute :create_account_op, CreateAccountOp
56
- attribute :payment_op, PaymentOp
57
- attribute :path_payment_op, PathPaymentOp
58
- attribute :manage_offer_op, ManageOfferOp
59
- attribute :create_passive_offer_op, CreatePassiveOfferOp
60
- attribute :set_options_op, SetOptionsOp
61
- attribute :change_trust_op, ChangeTrustOp
62
- attribute :allow_trust_op, AllowTrustOp
63
- attribute :destination, AccountID
64
- attribute :manage_data_op, ManageDataOp
65
- attribute :bump_sequence_op, BumpSequenceOp
61
+ attribute :create_account_op, CreateAccountOp
62
+ attribute :payment_op, PaymentOp
63
+ attribute :path_payment_strict_receive_op, PathPaymentStrictReceiveOp
64
+ attribute :manage_sell_offer_op, ManageSellOfferOp
65
+ attribute :create_passive_sell_offer_op, CreatePassiveSellOfferOp
66
+ attribute :set_options_op, SetOptionsOp
67
+ attribute :change_trust_op, ChangeTrustOp
68
+ attribute :allow_trust_op, AllowTrustOp
69
+ attribute :destination, MuxedAccount
70
+ attribute :manage_data_op, ManageDataOp
71
+ attribute :bump_sequence_op, BumpSequenceOp
72
+ attribute :manage_buy_offer_op, ManageBuyOfferOp
73
+ attribute :path_payment_strict_send_op, PathPaymentStrictSendOp
66
74
  end
67
75
  end
68
76
  end