stellar-base 0.25.0 → 0.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -31
  3. data/README.md +3 -3
  4. data/generated/stellar/account_flags.rb +9 -4
  5. data/generated/stellar/account_merge_result.rb +1 -1
  6. data/generated/stellar/allow_trust_op.rb +3 -18
  7. data/generated/stellar/asset_code.rb +30 -0
  8. data/generated/stellar/begin_sponsoring_future_reserves_result.rb +2 -1
  9. data/generated/stellar/claimable_balance_entry/ext.rb +4 -0
  10. data/generated/stellar/claimable_balance_entry.rb +2 -0
  11. data/generated/stellar/claimable_balance_entry_extension_v1/ext.rb +24 -0
  12. data/generated/stellar/claimable_balance_entry_extension_v1.rb +30 -0
  13. data/generated/stellar/claimable_balance_flags.rb +22 -0
  14. data/generated/stellar/clawback_claimable_balance_op.rb +18 -0
  15. data/generated/stellar/clawback_claimable_balance_result.rb +26 -0
  16. data/generated/stellar/clawback_claimable_balance_result_code.rb +29 -0
  17. data/generated/stellar/clawback_op.rb +22 -0
  18. data/generated/stellar/clawback_result.rb +25 -0
  19. data/generated/stellar/clawback_result_code.rb +31 -0
  20. data/generated/stellar/create_passive_sell_offer_op.rb +1 -1
  21. data/generated/stellar/end_sponsoring_future_reserves_result.rb +2 -1
  22. data/generated/stellar/operation/body.rb +12 -0
  23. data/generated/stellar/operation.rb +6 -0
  24. data/generated/stellar/operation_id/id.rb +2 -2
  25. data/generated/stellar/operation_id.rb +1 -1
  26. data/generated/stellar/operation_result/tr.rb +12 -0
  27. data/generated/stellar/operation_result.rb +6 -0
  28. data/generated/stellar/operation_type.rb +7 -1
  29. data/generated/stellar/payment_result_code.rb +1 -1
  30. data/generated/stellar/revoke_sponsorship_op.rb +1 -2
  31. data/generated/stellar/set_options_result_code.rb +14 -11
  32. data/generated/stellar/set_trust_line_flags_op.rb +25 -0
  33. data/generated/stellar/set_trust_line_flags_result.rb +25 -0
  34. data/generated/stellar/set_trust_line_flags_result_code.rb +31 -0
  35. data/generated/stellar/transaction_result_code.rb +1 -1
  36. data/generated/stellar/trust_line_flags.rb +5 -1
  37. data/generated/stellar-base-generated.rb +15 -0
  38. data/lib/stellar/account.rb +59 -0
  39. data/lib/stellar/compat.rb +6 -3
  40. data/lib/stellar/concerns/transaction.rb +4 -2
  41. data/lib/stellar/dsl.rb +23 -0
  42. data/lib/stellar/operation.rb +85 -16
  43. data/lib/stellar/transaction_builder.rb +20 -7
  44. data/lib/stellar/trust_line_flags.rb +53 -0
  45. data/lib/stellar/util/strkey.rb +15 -7
  46. data/lib/stellar/version.rb +3 -0
  47. data/lib/stellar-base.rb +3 -2
  48. metadata +28 -12
  49. data/generated/stellar/allow_trust_op/asset.rb +0 -33
  50. data/lib/stellar/base/version.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06de7ab1f501228afa8b011a494da83f9a75c9723f2612868bb7e324ee309794
4
- data.tar.gz: 9a0f29f6b55bf4e508dc54a3fb131b411799022c2bf87fd5246119e681efaf99
3
+ metadata.gz: e34d24d567ded9c3e2a6f8b5c043d905b1606d954b9c1e0f9d06cb1bccf07d22
4
+ data.tar.gz: 2fc5f03bc44df1adb28c136f72261be94a7cd1bf668358150f2d477dcd4187da
5
5
  SHA512:
6
- metadata.gz: fb09428b1c5c96b291a114132c989b9cd5aa602a2e67989748c014de1bc6179fad881449e5dcaeb956b3ae5dc2c259f740d9223d822e35da29831c6a62465c73
7
- data.tar.gz: 5a31dee71d5d6dd1140eebc06f8ae353d6a63e7678e4be220e8f572b6d77268b77948303d62ec4d2b06dc2e3896e0eda0a41995436a82525fb481ace9ca16241
6
+ metadata.gz: a50f950abc85606cea2077cabc92e32f4734a5bd336945a8718b30c5766c0ebee562351fbaaa85cb0602851504b7edf41e0f9560f96570a86b9b5a7fd5500c30
7
+ data.tar.gz: 87b85c15be138718404efdc6e738d3577117f4cdf9e9b0d26dbd2ff6c9e5ff58c05e5f47ba966d462494304f632c485ab52870e078988a3c40801aa44a8c8875
data/CHANGELOG.md CHANGED
@@ -1,22 +1,38 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this
4
- file. The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
- and this project adheres to [Semantic Versioning](http://semver.org/).
4
+ file. The format is based on [Keep a Changelog](https://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  As this project is pre 1.0, breaking changes may happen for minor version
8
8
  bumps. A breaking change will get clearly notified in this log.
9
9
 
10
- ## [Unreleased](https://github.com/stellar/ruby-stellar-sdk/compare/v0.25.0...master)
10
+ ## [0.29.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.28.0...v0.29.0) (2021-09-07)
11
+ - No changes
11
12
 
12
- ## [0.25.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
13
+ ## [0.28.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.27.0...v0.28.0) (2021-07-17)
14
+
15
+ ### Features
16
+
17
+ * support muxed accounts in tx builder ([#162](https://www.github.com/astroband/ruby-stellar-sdk/issues/162)) ([37cd954](https://www.github.com/astroband/ruby-stellar-sdk/commit/37cd954f92c7999a74ca779e795dde74a3d71aad))
18
+
19
+ ## [0.27.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.26.0...v0.27.0) (2021-05-08)
20
+
21
+ ### Features
22
+
23
+ * **protocol:** support Stellar protocol 17 ([#137](https://www.github.com/astroband/ruby-stellar-sdk/issues/137)) ([5fea84d](https://www.github.com/astroband/ruby-stellar-sdk/commit/5fea84d8c3b10b7afc00a10415e8fea01c25eec7))
24
+
25
+ ## [0.26.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.25.0...v0.26.0) - 2021-02-05
26
+ - No changes
27
+
28
+ ## [0.25.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
13
29
  ### Added
14
30
  - `MuxedAccount` implements `#to_keypair` conversion protocol
15
31
  - `MuxedAccount` correctly responds to `#address` with strkey encoded public key
16
32
  ### Fixed
17
33
  - `Transaction::V0#source_account` now properly returns `MuxedAccount` instead of raw bytes
18
34
 
19
- ## [0.24.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
35
+ ## [0.24.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
20
36
  ### Added
21
37
  - Add conversion methods for KeyPair and Asset
22
38
  - Stellar Protocol 14 support
@@ -104,33 +120,33 @@ bumps. A breaking change will get clearly notified in this log.
104
120
  - `Operation.revoke_sponsorship(account_id:, signer:)`
105
121
 
106
122
 
107
- ## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
123
+ ## [0.23.1](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
108
124
  ### Added
109
125
  - Transaction builder now builds V1 transactions
110
126
  - FeeBumpTransaction can wrap V0 transaction
111
127
 
112
- ## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.22.0...v0.23.0) - 2020-06-11
128
+ ## [0.23.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.22.0...v0.23.0) - 2020-06-11
113
129
  ### Added
114
130
  - Stellar Protocol 13 support
115
131
  - Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
116
132
  - Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
117
133
  - Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))
118
134
 
119
- ## [0.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
135
+ ## [0.22.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.21.0...base-v0.22.0) - 2020-03-26
120
136
  ### Added
121
- - Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
137
+ - Add TransactionBuilder ([#54](https://github.com/astroband/ruby-stellar-base/issues/54))
122
138
 
123
139
  ### Changed
124
- - Regenerate XDR files ([#57](https://github.com/stellar/ruby-stellar-base/issues/57))
125
- - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/stellar/ruby-stellar-base/issues/59))
140
+ - Regenerate XDR files ([#57](https://github.com/astroband/ruby-stellar-base/issues/57))
141
+ - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/astroband/ruby-stellar-base/issues/59))
126
142
 
127
- ## [0.21.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.20.0...v0.21.0) - 2019-10-04
143
+ ## [0.21.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.20.0...base-v0.21.0) - 2019-10-04
128
144
  ### Changed
129
- - [Stellar Protocol 12 compatibility](https://github.com/bloom-solutions/ruby-stellar-base/pull/51).
145
+ - [Stellar Protocol 12 compatibility](https://github.com/astroband/ruby-stellar-base/pull/51).
130
146
  - XDR changes for path payment
131
147
  - constant renames, which may cause breaking changes if referred to directly
132
148
 
133
- ## [0.20.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.19.0...v0.20.0) - 2019-05-22
149
+ ## [0.20.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.19.0...base-v0.20.0) - 2019-05-22
134
150
  ### Added
135
151
  - Stellar Protocol 11 compatibility (#48)
136
152
  - XDR changes for [CAP-0006 Buy Offers](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0006.md)
@@ -141,11 +157,11 @@ bumps. A breaking change will get clearly notified in this log.
141
157
  - Deprecate `manage_offer` and `create_passive_offer` factory methods in `Stellar::Transaction` and `Stellar::Operation`
142
158
  - Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
143
159
 
144
- ## [0.19.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.18.0...v0.19.0)
160
+ ## [0.19.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.18.0...base-v0.19.0)
145
161
  ### Changed
146
162
  - Loosen ActiveSupport to >= 5.0.0
147
163
 
148
- ## [0.18.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.17.0...v0.18.0)
164
+ ## [0.18.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.17.0...base-v0.18.0)
149
165
  ### Added
150
166
  - Update XDR definitions for stellar-core v10.0.0 (introduces Liabilities and other changes to support asset-backed offers as per [CAP-0003 Specification](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0003.md#specification))
151
167
  - Add factories for ledger, transaction, operation.
@@ -153,11 +169,11 @@ bumps. A breaking change will get clearly notified in this log.
153
169
  ### Changed
154
170
  - Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
155
171
 
156
- ## [0.17.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.16.0...v0.17.0)
172
+ ## [0.17.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.16.0...base-v0.17.0)
157
173
  ### Fixed
158
174
  - Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
159
175
 
160
- ## [0.16.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.15.0...v0.16.0)
176
+ ## [0.16.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.15.0...base-v0.16.0)
161
177
  ### Added
162
178
  - Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
163
179
  - Merge two transactions with `Stellar::TransactionEnvelope#merge`
@@ -165,14 +181,14 @@ bumps. A breaking change will get clearly notified in this log.
165
181
  ### Fixed
166
182
  - Source account overriding in Stellar::Transaction#to_operations
167
183
 
168
- ## [0.15.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.14.0...v0.15.0)
184
+ ## [0.15.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.14.0...base-v0.15.0)
169
185
  ### Added
170
186
  - `Stellar::Operation.change_trust` can accept `Stellar::Asset` instance for `line`
171
187
 
172
188
  ### Fixed
173
189
  - Protect `Stellar::Operation.change_trust` against malicious arguments, in the event that developers pass this argument directly from user input
174
190
 
175
- ## [0.14.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.13.0...v0.14.0)
191
+ ## [0.14.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.13.0...base-v0.14.0)
176
192
 
177
193
  ### Added
178
194
  - We now support the bump sequence operation with `Operation.bump_sequence`.
@@ -182,7 +198,7 @@ bumps. A breaking change will get clearly notified in this log.
182
198
  - `Operation.change_trust` learned how to use a default for the `:limit` parameter
183
199
  - `StrKey` learned about new version bytes `pre_auth_tx` and `hash_x`
184
200
 
185
- ## [0.13.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.12.0...v0.13.0)
201
+ ## [0.13.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.12.0...base-v0.13.0)
186
202
 
187
203
  ### Changed
188
204
  - Update XDR definitions for stellar-core 0.9.1 support
@@ -190,7 +206,7 @@ bumps. A breaking change will get clearly notified in this log.
190
206
  ### Added
191
207
  - Added `#signer_key` helper to `KeyPair`
192
208
 
193
- ## [0.12.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.11.0...v0.12.0)
209
+ ## [0.12.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.11.0...base-v0.12.0)
194
210
 
195
211
  ### Changed
196
212
  - Avoid modifying $LOAD_PATH to fix load order issues
@@ -200,7 +216,7 @@ bumps. A breaking change will get clearly notified in this log.
200
216
 
201
217
  - BREAKING CHANGE: Removed support for JRuby.
202
218
 
203
- ## [0.11.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.10.0...v0.11.0)
219
+ ## [0.11.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.10.0...base-v0.11.0)
204
220
 
205
221
  ### Added
206
222
  - Added support for `manage_data` operations
@@ -208,48 +224,48 @@ bumps. A breaking change will get clearly notified in this log.
208
224
  ### Changed
209
225
  - `Stellar::Transaction#to_envelope` can now be used without arguments, returning a `Stellar::TransactionEnvelope` with zero signatures.
210
226
 
211
- ## [0.10.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.9.0...v0.10.0)
227
+ ## [0.10.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.9.0...base-v0.10.0)
212
228
 
213
229
  - Added memo helpers to `Stellar::Transaction.for_account`, allowing any operation builder (such as `Stellar::Transaction.payment) to provide a custom memo using the `:memo` attribute.
214
230
 
215
- ## [0.9.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.8.0...v0.9.0)
231
+ ## [0.9.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.8.0...base-v0.9.0)
216
232
 
217
233
  ### Changed
218
234
  - XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
219
235
 
220
- ## [0.8.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.7.0...v0.8.0)
236
+ ## [0.8.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.7.0...base-v0.8.0)
221
237
 
222
238
  ### Changed
223
239
  - BREAKING CHANGE: The default network for this library is now the stellar test network.
224
240
  To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
225
241
  at the head of your script or in your configuration function.
226
242
 
227
- ## [0.7.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.1...v0.7.0)
243
+ ## [0.7.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.1...base-v0.7.0)
228
244
 
229
245
  ### Changed
230
246
 
231
247
  - Bump xdr dependency to 1.0.0
232
248
 
233
- ## [0.6.1](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.0...v0.6.1)
249
+ ## [0.6.1](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.0...base-v0.6.1)
234
250
 
235
251
  ### Changed
236
252
 
237
253
  - Update default fee for transactions to new minimum of 100 stroops
238
254
 
239
255
 
240
- ## [0.6.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.5.0...v0.6.0)
256
+ ## [0.6.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.5.0...base-v0.6.0)
241
257
 
242
258
  ### Changed
243
259
 
244
260
  - Update to latest xdr (stellar-core commit ad22bccafbbc14a358f05a989f7b95714dc9d4c6)
245
261
 
246
- ## [0.5.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.4.0...v0.5.0)
262
+ ## [0.5.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.4.0...base-v0.5.0)
247
263
 
248
264
  ### Changed
249
265
 
250
266
  - Update to latest xdr
251
267
 
252
- ## [0.4.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.3.0...v0.4.0)
268
+ ## [0.4.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.3.0...base-v0.4.0)
253
269
 
254
270
  ### Changed
255
271
  - BREAKING CHANGE: "Amounts", that is, input parameters that represent a
data/README.md CHANGED
@@ -22,7 +22,7 @@ Also requires libsodium. Installable via `brew install libsodium` on OS X.
22
22
 
23
23
  ## Supported Ruby Versions
24
24
 
25
- Please see [travis.yml](.travis.yml) for what versions of ruby are currently tested by our continuous integration system. Any ruby in that list is officially supported.
25
+ Please see [CI Workflow](https://github.com/astroband/ruby-stellar-sdk/actions/workflows/ci.yml) for what versions of ruby are currently tested by our continuous integration system. Any ruby in that list is officially supported.
26
26
 
27
27
  ### JRuby
28
28
 
@@ -32,7 +32,7 @@ It seems as though jruby is particularly slow when it comes to BigDecimal math;
32
32
 
33
33
  [Examples are here](examples)
34
34
 
35
- In addition to the code generated from the XDR definition files (see [ruby-xdr](https://github.com/stellar/ruby-xdr) for example usage), this library also provides some stellar specific features. Let's look at some of them.
35
+ In addition to the code generated from the XDR definition files (see [ruby-xdr](https://github.com/astroband/ruby-xdr) for example usage), this library also provides some stellar specific features. Let's look at some of them.
36
36
 
37
37
  We wrap rbnacl with `Stellar::KeyPair`, providing some stellar specific functionality as seen below:
38
38
 
@@ -84,4 +84,4 @@ The current integration of user-written code with auto-generated classes is to p
84
84
 
85
85
  ## Contributing
86
86
 
87
- Please [see CONTRIBUTING.md for details](CONTRIBUTING.md).
87
+ Please [see CONTRIBUTING.md for details](../CONTRIBUTING.md).
@@ -16,15 +16,20 @@ require 'xdr'
16
16
  # // otherwise, authorization cannot be revoked
17
17
  # AUTH_REVOCABLE_FLAG = 0x2,
18
18
  # // Once set, causes all AUTH_* flags to be read-only
19
- # AUTH_IMMUTABLE_FLAG = 0x4
19
+ # AUTH_IMMUTABLE_FLAG = 0x4,
20
+ # // Trustlines are created with clawback enabled set to "true",
21
+ # // and claimable balances created from those trustlines are created
22
+ # // with clawback enabled set to "true"
23
+ # AUTH_CLAWBACK_ENABLED_FLAG = 0x8
20
24
  # };
21
25
  #
22
26
  # ===========================================================================
23
27
  module Stellar
24
28
  class AccountFlags < XDR::Enum
25
- member :auth_required_flag, 1
26
- member :auth_revocable_flag, 2
27
- member :auth_immutable_flag, 4
29
+ member :auth_required_flag, 1
30
+ member :auth_revocable_flag, 2
31
+ member :auth_immutable_flag, 4
32
+ member :auth_clawback_enabled_flag, 8
28
33
 
29
34
  seal
30
35
  end
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # union AccountMergeResult switch (AccountMergeResultCode code)
9
9
  # {
10
10
  # case ACCOUNT_MERGE_SUCCESS:
11
- # int64 sourceAccountBalance; // how much got transfered from source account
11
+ # int64 sourceAccountBalance; // how much got transferred from source account
12
12
  # default:
13
13
  # void;
14
14
  # };
@@ -8,32 +8,17 @@ require 'xdr'
8
8
  # struct AllowTrustOp
9
9
  # {
10
10
  # AccountID trustor;
11
- # union switch (AssetType type)
12
- # {
13
- # // ASSET_TYPE_NATIVE is not allowed
14
- # case ASSET_TYPE_CREDIT_ALPHANUM4:
15
- # AssetCode4 assetCode4;
11
+ # AssetCode asset;
16
12
  #
17
- # case ASSET_TYPE_CREDIT_ALPHANUM12:
18
- # AssetCode12 assetCode12;
19
- #
20
- # // add other asset types here in the future
21
- # }
22
- # asset;
23
- #
24
- # // 0, or any bitwise combination of TrustLineFlags
13
+ # // One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG
25
14
  # uint32 authorize;
26
15
  # };
27
16
  #
28
17
  # ===========================================================================
29
18
  module Stellar
30
19
  class AllowTrustOp < XDR::Struct
31
- include XDR::Namespace
32
-
33
- autoload :Asset
34
-
35
20
  attribute :trustor, AccountID
36
- attribute :asset, Asset
21
+ attribute :asset, AssetCode
37
22
  attribute :authorize, Uint32
38
23
  end
39
24
  end
@@ -0,0 +1,30 @@
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 AssetCode switch (AssetType type)
9
+ # {
10
+ # case ASSET_TYPE_CREDIT_ALPHANUM4:
11
+ # AssetCode4 assetCode4;
12
+ #
13
+ # case ASSET_TYPE_CREDIT_ALPHANUM12:
14
+ # AssetCode12 assetCode12;
15
+ #
16
+ # // add other asset types here in the future
17
+ # };
18
+ #
19
+ # ===========================================================================
20
+ module Stellar
21
+ class AssetCode < XDR::Union
22
+ switch_on AssetType, :type
23
+
24
+ switch :asset_type_credit_alphanum4, :asset_code4
25
+ switch :asset_type_credit_alphanum12, :asset_code12
26
+
27
+ attribute :asset_code4, AssetCode4
28
+ attribute :asset_code12, AssetCode12
29
+ end
30
+ end
@@ -5,7 +5,8 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union BeginSponsoringFutureReservesResult switch (BeginSponsoringFutureReservesResultCode code)
8
+ # union BeginSponsoringFutureReservesResult switch (
9
+ # BeginSponsoringFutureReservesResultCode code)
9
10
  # {
10
11
  # case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS:
11
12
  # void;
@@ -9,6 +9,8 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 1:
13
+ # ClaimableBalanceEntryExtensionV1 v1;
12
14
  # }
13
15
  #
14
16
  # ===========================================================================
@@ -18,7 +20,9 @@ module Stellar
18
20
  switch_on XDR::Int, :v
19
21
 
20
22
  switch 0
23
+ switch 1, :v1
21
24
 
25
+ attribute :v1, ClaimableBalanceEntryExtensionV1
22
26
  end
23
27
  end
24
28
  end
@@ -24,6 +24,8 @@ require 'xdr'
24
24
  # {
25
25
  # case 0:
26
26
  # void;
27
+ # case 1:
28
+ # ClaimableBalanceEntryExtensionV1 v1;
27
29
  # }
28
30
  # ext;
29
31
  # };
@@ -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 ClaimableBalanceEntryExtensionV1
17
+ class Ext < XDR::Union
18
+ switch_on XDR::Int, :v
19
+
20
+ switch 0
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,30 @@
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 ClaimableBalanceEntryExtensionV1
9
+ # {
10
+ # union switch (int v)
11
+ # {
12
+ # case 0:
13
+ # void;
14
+ # }
15
+ # ext;
16
+ #
17
+ # uint32 flags; // see ClaimableBalanceFlags
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class ClaimableBalanceEntryExtensionV1 < XDR::Struct
23
+ include XDR::Namespace
24
+
25
+ autoload :Ext
26
+
27
+ attribute :ext, Ext
28
+ attribute :flags, Uint32
29
+ end
30
+ end