stellar-base 0.19.0 → 0.23.0.rc1

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 +4 -4
  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 +68 -210
  117. data/.gitignore +0 -17
  118. data/.travis.yml +0 -13
  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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9599bb2ea3b55e55516019cbe4afaa3905d8791eb807cfa3f8e7d1fd45c8cc
4
- data.tar.gz: 61f3f0d3b1627831ef9a386083963a88a3ab93df1e0d7c2ea949a02213e8b905
3
+ metadata.gz: b0374689ad0aea387b1a9364e4a4008767fee2e654434d7ed83034c183e77015
4
+ data.tar.gz: 46642a42072f2f7ad5e2ce5e8ccb9e4cff2d8991173adc1d7627b2bfa8660e5e
5
5
  SHA512:
6
- metadata.gz: 27ff0126aed943226f8b8c27e947de7d064ff1811b869b2a35366aa97a045cd964a98ba1e6651e70c8d2faf38cf9c798dd2f920f22ae91e2ebfb557cab4eef1f
7
- data.tar.gz: d4708f217a557fb3a393186dab70fbf2b2bbcf4cf0102e216339ab89a0aba3dc83e90bcaf9f6263dc330f0b5fc97dcbe5148638e60bd259c221153badcfe02fb
6
+ metadata.gz: b928d1453197e01d277f26cefec2176dd54ec7cce1d558fd4c8b828021ddec9daf2be6dc597a9836a14c6b8f88381798632894c64b098324a1b168d8650ab53e
7
+ data.tar.gz: 8fc5fdb48d02bb67e18123038a592e321fe24689ed4fb44c7913b0fb8357fc6e1b675d6e3fb96acecc1a7de512ce0cf947aaddd95ffebdd3d62a07cd0ff587f8
File without changes
data/README.md CHANGED
@@ -12,15 +12,14 @@ Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
14
  gem 'stellar-base'
15
+ gem 'xdr', git: 'https://github.com/stellar/ruby-xdr.git', tag: 'v3.0.1'
15
16
  ```
16
17
 
17
18
  And then execute:
18
19
 
19
20
  $ bundle
20
21
 
21
- Or install it yourself as:
22
-
23
- $ gem install stellar-base
22
+ **Note** we need to add such explicit xdr dependency, because version 3.0.1 is not on RubyGems yet. When it's published, you can remove this line
24
23
 
25
24
  Also requires libsodium. Installable via `brew install libsodium` on OS X.
26
25
 
@@ -33,7 +33,10 @@ module Stellar
33
33
  String32 = XDR::String[32]
34
34
  String64 = XDR::String[64]
35
35
  SequenceNumber = Int64
36
+ TimePoint = Uint64
36
37
  DataValue = XDR::VarOpaque[64]
38
+ AssetCode4 = XDR::Opaque[4]
39
+ AssetCode12 = XDR::Opaque[12]
37
40
  autoload :AssetType
38
41
  autoload :Asset
39
42
  autoload :Price
@@ -46,6 +49,7 @@ module Stellar
46
49
  autoload :AccountEntry
47
50
  autoload :TrustLineFlags
48
51
  MASK_TRUSTLINE_FLAGS = 1
52
+ MASK_TRUSTLINE_FLAGS_V13 = 3
49
53
  autoload :TrustLineEntry
50
54
  autoload :OfferEntryFlags
51
55
  MASK_OFFERENTRY_FLAGS = 1
@@ -57,13 +61,16 @@ end
57
61
  module Stellar
58
62
  include XDR::Namespace
59
63
 
64
+ autoload :MuxedAccount
60
65
  autoload :DecoratedSignature
61
66
  autoload :OperationType
62
67
  autoload :CreateAccountOp
63
68
  autoload :PaymentOp
64
- autoload :PathPaymentOp
65
- autoload :ManageOfferOp
66
- autoload :CreatePassiveOfferOp
69
+ autoload :PathPaymentStrictReceiveOp
70
+ autoload :PathPaymentStrictSendOp
71
+ autoload :ManageSellOfferOp
72
+ autoload :ManageBuyOfferOp
73
+ autoload :CreatePassiveSellOfferOp
67
74
  autoload :SetOptionsOp
68
75
  autoload :ChangeTrustOp
69
76
  autoload :AllowTrustOp
@@ -73,21 +80,31 @@ module Stellar
73
80
  autoload :MemoType
74
81
  autoload :Memo
75
82
  autoload :TimeBounds
83
+ MAX_OPS_PER_TX = 100
84
+ autoload :TransactionV0
85
+ autoload :TransactionV0Envelope
76
86
  autoload :Transaction
77
- autoload :TransactionSignaturePayload
87
+ autoload :TransactionV1Envelope
88
+ autoload :FeeBumpTransaction
89
+ autoload :FeeBumpTransactionEnvelope
78
90
  autoload :TransactionEnvelope
91
+ autoload :TransactionSignaturePayload
79
92
  autoload :ClaimOfferAtom
80
93
  autoload :CreateAccountResultCode
81
94
  autoload :CreateAccountResult
82
95
  autoload :PaymentResultCode
83
96
  autoload :PaymentResult
84
- autoload :PathPaymentResultCode
97
+ autoload :PathPaymentStrictReceiveResultCode
85
98
  autoload :SimplePaymentResult
86
- autoload :PathPaymentResult
87
- autoload :ManageOfferResultCode
99
+ autoload :PathPaymentStrictReceiveResult
100
+ autoload :PathPaymentStrictSendResultCode
101
+ autoload :PathPaymentStrictSendResult
102
+ autoload :ManageSellOfferResultCode
88
103
  autoload :ManageOfferEffect
89
104
  autoload :ManageOfferSuccessResult
90
- autoload :ManageOfferResult
105
+ autoload :ManageSellOfferResult
106
+ autoload :ManageBuyOfferResultCode
107
+ autoload :ManageBuyOfferResult
91
108
  autoload :SetOptionsResultCode
92
109
  autoload :SetOptionsResult
93
110
  autoload :ChangeTrustResultCode
@@ -106,18 +123,23 @@ module Stellar
106
123
  autoload :OperationResultCode
107
124
  autoload :OperationResult
108
125
  autoload :TransactionResultCode
126
+ autoload :InnerTransactionResult
127
+ autoload :InnerTransactionResultPair
109
128
  autoload :TransactionResult
110
129
  end
111
130
  module Stellar
112
131
  include XDR::Namespace
113
132
 
114
133
  UpgradeType = XDR::VarOpaque[128]
134
+ autoload :StellarValueType
135
+ autoload :LedgerCloseValueSignature
115
136
  autoload :StellarValue
116
137
  autoload :LedgerHeader
117
138
  autoload :LedgerUpgradeType
118
139
  autoload :LedgerUpgrade
119
140
  autoload :LedgerKey
120
141
  autoload :BucketEntryType
142
+ autoload :BucketMetadata
121
143
  autoload :BucketEntry
122
144
  autoload :TransactionSet
123
145
  autoload :TransactionResultPair
@@ -133,7 +155,12 @@ module Stellar
133
155
  LedgerEntryChanges = XDR::VarArray[LedgerEntryChange]
134
156
  autoload :OperationMeta
135
157
  autoload :TransactionMetaV1
158
+ autoload :TransactionMetaV2
136
159
  autoload :TransactionMeta
160
+ autoload :TransactionResultMeta
161
+ autoload :UpgradeEntryMeta
162
+ autoload :LedgerCloseMetaV0
163
+ autoload :LedgerCloseMeta
137
164
  end
138
165
  module Stellar
139
166
  include XDR::Namespace
@@ -147,6 +174,16 @@ module Stellar
147
174
  autoload :PeerAddress
148
175
  autoload :MessageType
149
176
  autoload :DontHave
177
+ autoload :SurveyMessageCommandType
178
+ autoload :SurveyRequestMessage
179
+ autoload :SignedSurveyRequestMessage
180
+ EncryptedBody = XDR::VarOpaque[64000]
181
+ autoload :SurveyResponseMessage
182
+ autoload :SignedSurveyResponseMessage
183
+ autoload :PeerStats
184
+ PeerStatList = XDR::VarArray[PeerStats, 25]
185
+ autoload :TopologyResponseBody
186
+ autoload :SurveyResponseBody
150
187
  autoload :StellarMessage
151
188
  autoload :AuthenticatedMessage
152
189
  end
@@ -12,16 +12,17 @@ require 'xdr'
12
12
  # {
13
13
  # // ASSET_TYPE_NATIVE is not allowed
14
14
  # case ASSET_TYPE_CREDIT_ALPHANUM4:
15
- # opaque assetCode4[4];
15
+ # AssetCode4 assetCode4;
16
16
  #
17
17
  # case ASSET_TYPE_CREDIT_ALPHANUM12:
18
- # opaque assetCode12[12];
18
+ # AssetCode12 assetCode12;
19
19
  #
20
20
  # // add other asset types here in the future
21
21
  # }
22
22
  # asset;
23
23
  #
24
- # bool authorize;
24
+ # // 0, or any bitwise combination of TrustLineFlags
25
+ # uint32 authorize;
25
26
  # };
26
27
  #
27
28
  # ===========================================================================
@@ -33,6 +34,6 @@ module Stellar
33
34
 
34
35
  attribute :trustor, AccountID
35
36
  attribute :asset, Asset
36
- attribute :authorize, XDR::Bool
37
+ attribute :authorize, Uint32
37
38
  end
38
39
  end
@@ -9,10 +9,10 @@ require 'xdr'
9
9
  # {
10
10
  # // ASSET_TYPE_NATIVE is not allowed
11
11
  # case ASSET_TYPE_CREDIT_ALPHANUM4:
12
- # opaque assetCode4[4];
12
+ # AssetCode4 assetCode4;
13
13
  #
14
14
  # case ASSET_TYPE_CREDIT_ALPHANUM12:
15
- # opaque assetCode12[12];
15
+ # AssetCode12 assetCode12;
16
16
  #
17
17
  # // add other asset types here in the future
18
18
  # }
@@ -26,8 +26,8 @@ module Stellar
26
26
  switch :asset_type_credit_alphanum4, :asset_code4
27
27
  switch :asset_type_credit_alphanum12, :asset_code12
28
28
 
29
- attribute :asset_code4, XDR::Opaque[4]
30
- attribute :asset_code12, XDR::Opaque[12]
29
+ attribute :asset_code4, AssetCode4
30
+ attribute :asset_code12, AssetCode12
31
31
  end
32
32
  end
33
33
  end
@@ -13,14 +13,14 @@ require 'xdr'
13
13
  # case ASSET_TYPE_CREDIT_ALPHANUM4:
14
14
  # struct
15
15
  # {
16
- # opaque assetCode[4]; // 1 to 4 characters
16
+ # AssetCode4 assetCode;
17
17
  # AccountID issuer;
18
18
  # } alphaNum4;
19
19
  #
20
20
  # case ASSET_TYPE_CREDIT_ALPHANUM12:
21
21
  # struct
22
22
  # {
23
- # opaque assetCode[12]; // 5 to 12 characters
23
+ # AssetCode12 assetCode;
24
24
  # AccountID issuer;
25
25
  # } alphaNum12;
26
26
  #
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct
9
9
  # {
10
- # opaque assetCode[12]; // 5 to 12 characters
10
+ # AssetCode12 assetCode;
11
11
  # AccountID issuer;
12
12
  # }
13
13
  #
@@ -15,7 +15,7 @@ require 'xdr'
15
15
  module Stellar
16
16
  class Asset
17
17
  class AlphaNum12 < XDR::Struct
18
- attribute :asset_code, XDR::Opaque[12]
18
+ attribute :asset_code, AssetCode12
19
19
  attribute :issuer, AccountID
20
20
  end
21
21
  end
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct
9
9
  # {
10
- # opaque assetCode[4]; // 1 to 4 characters
10
+ # AssetCode4 assetCode;
11
11
  # AccountID issuer;
12
12
  # }
13
13
  #
@@ -15,7 +15,7 @@ require 'xdr'
15
15
  module Stellar
16
16
  class Asset
17
17
  class AlphaNum4 < XDR::Struct
18
- attribute :asset_code, XDR::Opaque[4]
18
+ attribute :asset_code, AssetCode4
19
19
  attribute :issuer, AccountID
20
20
  end
21
21
  end
@@ -9,10 +9,10 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # struct
12
- # {
13
- # uint64 sequence;
14
- # StellarMessage message;
15
- # HmacSha256Mac mac;
12
+ # {
13
+ # uint64 sequence;
14
+ # StellarMessage message;
15
+ # HmacSha256Mac mac;
16
16
  # } v0;
17
17
  # };
18
18
  #
@@ -6,10 +6,10 @@ require 'xdr'
6
6
  # === xdr source ============================================================
7
7
  #
8
8
  # struct
9
- # {
10
- # uint64 sequence;
11
- # StellarMessage message;
12
- # HmacSha256Mac mac;
9
+ # {
10
+ # uint64 sequence;
11
+ # StellarMessage message;
12
+ # HmacSha256Mac mac;
13
13
  # }
14
14
  #
15
15
  # ===========================================================================
@@ -8,10 +8,13 @@ require 'xdr'
8
8
  # union BucketEntry switch (BucketEntryType type)
9
9
  # {
10
10
  # case LIVEENTRY:
11
+ # case INITENTRY:
11
12
  # LedgerEntry liveEntry;
12
13
  #
13
14
  # case DEADENTRY:
14
15
  # LedgerKey deadEntry;
16
+ # case METAENTRY:
17
+ # BucketMetadata metaEntry;
15
18
  # };
16
19
  #
17
20
  # ===========================================================================
@@ -20,9 +23,12 @@ module Stellar
20
23
  switch_on BucketEntryType, :type
21
24
 
22
25
  switch :liveentry, :live_entry
26
+ switch :initentry, :live_entry
23
27
  switch :deadentry, :dead_entry
28
+ switch :metaentry, :meta_entry
24
29
 
25
30
  attribute :live_entry, LedgerEntry
26
31
  attribute :dead_entry, LedgerKey
32
+ attribute :meta_entry, BucketMetadata
27
33
  end
28
34
  end
@@ -7,15 +7,21 @@ require 'xdr'
7
7
  #
8
8
  # enum BucketEntryType
9
9
  # {
10
- # LIVEENTRY = 0,
11
- # DEADENTRY = 1
10
+ # METAENTRY =
11
+ # -1, // At-and-after protocol 11: bucket metadata, should come first.
12
+ # LIVEENTRY = 0, // Before protocol 11: created-or-updated;
13
+ # // At-and-after protocol 11: only updated.
14
+ # DEADENTRY = 1,
15
+ # INITENTRY = 2 // At-and-after protocol 11: only created.
12
16
  # };
13
17
  #
14
18
  # ===========================================================================
15
19
  module Stellar
16
20
  class BucketEntryType < XDR::Enum
21
+ member :metaentry, -1
17
22
  member :liveentry, 0
18
23
  member :deadentry, 1
24
+ member :initentry, 2
19
25
 
20
26
  seal
21
27
  end
@@ -0,0 +1,32 @@
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 BucketMetadata
9
+ # {
10
+ # // Indicates the protocol version used to create / merge this bucket.
11
+ # uint32 ledgerVersion;
12
+ #
13
+ # // reserved for future use
14
+ # union switch (int v)
15
+ # {
16
+ # case 0:
17
+ # void;
18
+ # }
19
+ # ext;
20
+ # };
21
+ #
22
+ # ===========================================================================
23
+ module Stellar
24
+ class BucketMetadata < XDR::Struct
25
+ include XDR::Namespace
26
+
27
+ autoload :Ext
28
+
29
+ attribute :ledger_version, Uint32
30
+ attribute :ext, Ext
31
+ end
32
+ end
@@ -0,0 +1,24 @@
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 switch (int v)
9
+ # {
10
+ # case 0:
11
+ # void;
12
+ # }
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class BucketMetadata
17
+ class Ext < XDR::Union
18
+ switch_on XDR::Int, :v
19
+
20
+ switch 0
21
+
22
+ end
23
+ end
24
+ end
@@ -9,7 +9,7 @@ require 'xdr'
9
9
  # {
10
10
  # // emitted to identify the offer
11
11
  # AccountID sellerID; // Account that owns the offer
12
- # uint64 offerID;
12
+ # int64 offerID;
13
13
  #
14
14
  # // amount and asset taken from the owner
15
15
  # Asset assetSold;
@@ -24,7 +24,7 @@ require 'xdr'
24
24
  module Stellar
25
25
  class ClaimOfferAtom < XDR::Struct
26
26
  attribute :seller_id, AccountID
27
- attribute :offer_id, Uint64
27
+ attribute :offer_id, Int64
28
28
  attribute :asset_sold, Asset
29
29
  attribute :amount_sold, Int64
30
30
  attribute :asset_bought, Asset
@@ -5,7 +5,7 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # struct CreatePassiveOfferOp
8
+ # struct CreatePassiveSellOfferOp
9
9
  # {
10
10
  # Asset selling; // A
11
11
  # Asset buying; // B
@@ -15,7 +15,7 @@ require 'xdr'
15
15
  #
16
16
  # ===========================================================================
17
17
  module Stellar
18
- class CreatePassiveOfferOp < XDR::Struct
18
+ class CreatePassiveSellOfferOp < XDR::Struct
19
19
  attribute :selling, Asset
20
20
  attribute :buying, Asset
21
21
  attribute :amount, Int64