stellar-base 0.26.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -32
  3. data/README.md +3 -3
  4. data/generated/stellar-base-generated.rb +15 -0
  5. data/generated/stellar/account_flags.rb +9 -4
  6. data/generated/stellar/account_merge_result.rb +1 -1
  7. data/generated/stellar/allow_trust_op.rb +3 -18
  8. data/generated/stellar/asset_code.rb +30 -0
  9. data/generated/stellar/begin_sponsoring_future_reserves_result.rb +2 -1
  10. data/generated/stellar/claimable_balance_entry.rb +2 -0
  11. data/generated/stellar/claimable_balance_entry/ext.rb +4 -0
  12. data/generated/stellar/claimable_balance_entry_extension_v1.rb +30 -0
  13. data/generated/stellar/claimable_balance_entry_extension_v1/ext.rb +24 -0
  14. data/generated/stellar/claimable_balance_flags.rb +22 -0
  15. data/generated/stellar/clawback_claimable_balance_op.rb +18 -0
  16. data/generated/stellar/clawback_claimable_balance_result.rb +26 -0
  17. data/generated/stellar/clawback_claimable_balance_result_code.rb +29 -0
  18. data/generated/stellar/clawback_op.rb +22 -0
  19. data/generated/stellar/clawback_result.rb +25 -0
  20. data/generated/stellar/clawback_result_code.rb +31 -0
  21. data/generated/stellar/create_passive_sell_offer_op.rb +1 -1
  22. data/generated/stellar/end_sponsoring_future_reserves_result.rb +2 -1
  23. data/generated/stellar/operation.rb +6 -0
  24. data/generated/stellar/operation/body.rb +12 -0
  25. data/generated/stellar/operation_result.rb +6 -0
  26. data/generated/stellar/operation_result/tr.rb +12 -0
  27. data/generated/stellar/operation_type.rb +7 -1
  28. data/generated/stellar/payment_result_code.rb +1 -1
  29. data/generated/stellar/revoke_sponsorship_op.rb +1 -2
  30. data/generated/stellar/set_options_result_code.rb +14 -11
  31. data/generated/stellar/set_trust_line_flags_op.rb +25 -0
  32. data/generated/stellar/set_trust_line_flags_result.rb +25 -0
  33. data/generated/stellar/set_trust_line_flags_result_code.rb +31 -0
  34. data/generated/stellar/transaction_result_code.rb +1 -1
  35. data/generated/stellar/trust_line_flags.rb +5 -1
  36. data/lib/stellar-base.rb +2 -2
  37. data/lib/stellar/compat.rb +2 -1
  38. data/lib/stellar/concerns/transaction.rb +4 -2
  39. data/lib/stellar/dsl.rb +4 -0
  40. data/lib/stellar/operation.rb +85 -16
  41. data/lib/stellar/trust_line_flags.rb +53 -0
  42. data/lib/stellar/version.rb +3 -0
  43. metadata +27 -12
  44. data/generated/stellar/allow_trust_op/asset.rb +0 -33
  45. data/lib/stellar/base/version.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b29836900dbce5c01176c3b92c7c3ef365dbca086d700258e00299edf3edbd61
4
- data.tar.gz: 0c17163d8d41dc0c7847ea888d5e2650b715dc43ecd552f292dc1090fce6e786
3
+ metadata.gz: f3f2262b18e995857495f0209dff368bf75d5ca0fb946a77c890a859e816f916
4
+ data.tar.gz: ef32817bb66be06efe55f7da2ef204837895f4f6966c4fd55b91e2f1bbff8bb9
5
5
  SHA512:
6
- metadata.gz: d2470776823bd7581c6b0985756001fbfb796368aa8ecb2f6c0ead49c13b776dad0405a37b3f3f9c33c3765b84103a16cd4854a3122e1a4e9ef6712ffa1b12fe
7
- data.tar.gz: 1c13e6d755225adc62c22f9e917e74ec178d85df6bfd440ab9ae65d757830c393bab00bb63fb9c8abac34af6c0044a738dea0a1acad03969dda754a627022875
6
+ metadata.gz: d6a82d8306b2c62d57b4467fcbfef426d276b7c11612dfed13fb2db13b43c6aa9091f7cfd1c7d6c464b3d93f6faf7d72b7262fdfd9d6dc9dfb7ca7557c9b5254
7
+ data.tar.gz: ab279d7660378ed94d5d1fdfd2367714c10d78bd7f109dba50dafbcd186de0de97de0893b4b50620029a9189a0ad5d0e98604769ec4a4b0e82c1ceaa8c99278a
data/CHANGELOG.md CHANGED
@@ -1,25 +1,29 @@
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.26.0...master)
10
+ ## [0.27.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.26.0...v0.27.0) (2021-05-08)
11
11
 
12
- ## [0.26.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.25.0...0.26.0) - 2021-02-05
12
+ ### Features
13
+
14
+ * **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))
15
+
16
+ ## [0.26.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.25.0...v0.26.0) - 2021-02-05
13
17
  - No changes
14
18
 
15
- ## [0.25.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
19
+ ## [0.25.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
16
20
  ### Added
17
21
  - `MuxedAccount` implements `#to_keypair` conversion protocol
18
22
  - `MuxedAccount` correctly responds to `#address` with strkey encoded public key
19
23
  ### Fixed
20
24
  - `Transaction::V0#source_account` now properly returns `MuxedAccount` instead of raw bytes
21
25
 
22
- ## [0.24.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
26
+ ## [0.24.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
23
27
  ### Added
24
28
  - Add conversion methods for KeyPair and Asset
25
29
  - Stellar Protocol 14 support
@@ -107,33 +111,33 @@ bumps. A breaking change will get clearly notified in this log.
107
111
  - `Operation.revoke_sponsorship(account_id:, signer:)`
108
112
 
109
113
 
110
- ## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
114
+ ## [0.23.1](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
111
115
  ### Added
112
116
  - Transaction builder now builds V1 transactions
113
117
  - FeeBumpTransaction can wrap V0 transaction
114
118
 
115
- ## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.22.0...v0.23.0) - 2020-06-11
119
+ ## [0.23.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.22.0...v0.23.0) - 2020-06-11
116
120
  ### Added
117
121
  - Stellar Protocol 13 support
118
122
  - Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
119
123
  - Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
120
124
  - Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))
121
125
 
122
- ## [0.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
126
+ ## [0.22.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.21.0...base-v0.22.0) - 2020-03-26
123
127
  ### Added
124
- - Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
128
+ - Add TransactionBuilder ([#54](https://github.com/astroband/ruby-stellar-base/issues/54))
125
129
 
126
130
  ### Changed
127
- - Regenerate XDR files ([#57](https://github.com/stellar/ruby-stellar-base/issues/57))
128
- - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/stellar/ruby-stellar-base/issues/59))
131
+ - Regenerate XDR files ([#57](https://github.com/astroband/ruby-stellar-base/issues/57))
132
+ - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/astroband/ruby-stellar-base/issues/59))
129
133
 
130
- ## [0.21.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.20.0...v0.21.0) - 2019-10-04
134
+ ## [0.21.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.20.0...base-v0.21.0) - 2019-10-04
131
135
  ### Changed
132
- - [Stellar Protocol 12 compatibility](https://github.com/bloom-solutions/ruby-stellar-base/pull/51).
136
+ - [Stellar Protocol 12 compatibility](https://github.com/astroband/ruby-stellar-base/pull/51).
133
137
  - XDR changes for path payment
134
138
  - constant renames, which may cause breaking changes if referred to directly
135
139
 
136
- ## [0.20.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.19.0...v0.20.0) - 2019-05-22
140
+ ## [0.20.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.19.0...base-v0.20.0) - 2019-05-22
137
141
  ### Added
138
142
  - Stellar Protocol 11 compatibility (#48)
139
143
  - XDR changes for [CAP-0006 Buy Offers](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0006.md)
@@ -144,11 +148,11 @@ bumps. A breaking change will get clearly notified in this log.
144
148
  - Deprecate `manage_offer` and `create_passive_offer` factory methods in `Stellar::Transaction` and `Stellar::Operation`
145
149
  - Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
146
150
 
147
- ## [0.19.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.18.0...v0.19.0)
151
+ ## [0.19.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.18.0...base-v0.19.0)
148
152
  ### Changed
149
153
  - Loosen ActiveSupport to >= 5.0.0
150
154
 
151
- ## [0.18.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.17.0...v0.18.0)
155
+ ## [0.18.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.17.0...base-v0.18.0)
152
156
  ### Added
153
157
  - 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))
154
158
  - Add factories for ledger, transaction, operation.
@@ -156,11 +160,11 @@ bumps. A breaking change will get clearly notified in this log.
156
160
  ### Changed
157
161
  - Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
158
162
 
159
- ## [0.17.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.16.0...v0.17.0)
163
+ ## [0.17.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.16.0...base-v0.17.0)
160
164
  ### Fixed
161
165
  - Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
162
166
 
163
- ## [0.16.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.15.0...v0.16.0)
167
+ ## [0.16.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.15.0...base-v0.16.0)
164
168
  ### Added
165
169
  - Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
166
170
  - Merge two transactions with `Stellar::TransactionEnvelope#merge`
@@ -168,14 +172,14 @@ bumps. A breaking change will get clearly notified in this log.
168
172
  ### Fixed
169
173
  - Source account overriding in Stellar::Transaction#to_operations
170
174
 
171
- ## [0.15.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.14.0...v0.15.0)
175
+ ## [0.15.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.14.0...base-v0.15.0)
172
176
  ### Added
173
177
  - `Stellar::Operation.change_trust` can accept `Stellar::Asset` instance for `line`
174
178
 
175
179
  ### Fixed
176
180
  - Protect `Stellar::Operation.change_trust` against malicious arguments, in the event that developers pass this argument directly from user input
177
181
 
178
- ## [0.14.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.13.0...v0.14.0)
182
+ ## [0.14.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.13.0...base-v0.14.0)
179
183
 
180
184
  ### Added
181
185
  - We now support the bump sequence operation with `Operation.bump_sequence`.
@@ -185,7 +189,7 @@ bumps. A breaking change will get clearly notified in this log.
185
189
  - `Operation.change_trust` learned how to use a default for the `:limit` parameter
186
190
  - `StrKey` learned about new version bytes `pre_auth_tx` and `hash_x`
187
191
 
188
- ## [0.13.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.12.0...v0.13.0)
192
+ ## [0.13.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.12.0...base-v0.13.0)
189
193
 
190
194
  ### Changed
191
195
  - Update XDR definitions for stellar-core 0.9.1 support
@@ -193,7 +197,7 @@ bumps. A breaking change will get clearly notified in this log.
193
197
  ### Added
194
198
  - Added `#signer_key` helper to `KeyPair`
195
199
 
196
- ## [0.12.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.11.0...v0.12.0)
200
+ ## [0.12.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.11.0...base-v0.12.0)
197
201
 
198
202
  ### Changed
199
203
  - Avoid modifying $LOAD_PATH to fix load order issues
@@ -203,7 +207,7 @@ bumps. A breaking change will get clearly notified in this log.
203
207
 
204
208
  - BREAKING CHANGE: Removed support for JRuby.
205
209
 
206
- ## [0.11.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.10.0...v0.11.0)
210
+ ## [0.11.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.10.0...base-v0.11.0)
207
211
 
208
212
  ### Added
209
213
  - Added support for `manage_data` operations
@@ -211,48 +215,48 @@ bumps. A breaking change will get clearly notified in this log.
211
215
  ### Changed
212
216
  - `Stellar::Transaction#to_envelope` can now be used without arguments, returning a `Stellar::TransactionEnvelope` with zero signatures.
213
217
 
214
- ## [0.10.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.9.0...v0.10.0)
218
+ ## [0.10.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.9.0...base-v0.10.0)
215
219
 
216
220
  - 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.
217
221
 
218
- ## [0.9.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.8.0...v0.9.0)
222
+ ## [0.9.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.8.0...base-v0.9.0)
219
223
 
220
224
  ### Changed
221
225
  - XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
222
226
 
223
- ## [0.8.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.7.0...v0.8.0)
227
+ ## [0.8.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.7.0...base-v0.8.0)
224
228
 
225
229
  ### Changed
226
230
  - BREAKING CHANGE: The default network for this library is now the stellar test network.
227
231
  To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
228
232
  at the head of your script or in your configuration function.
229
233
 
230
- ## [0.7.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.1...v0.7.0)
234
+ ## [0.7.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.1...base-v0.7.0)
231
235
 
232
236
  ### Changed
233
237
 
234
238
  - Bump xdr dependency to 1.0.0
235
239
 
236
- ## [0.6.1](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.0...v0.6.1)
240
+ ## [0.6.1](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.0...base-v0.6.1)
237
241
 
238
242
  ### Changed
239
243
 
240
244
  - Update default fee for transactions to new minimum of 100 stroops
241
245
 
242
246
 
243
- ## [0.6.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.5.0...v0.6.0)
247
+ ## [0.6.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.5.0...base-v0.6.0)
244
248
 
245
249
  ### Changed
246
250
 
247
251
  - Update to latest xdr (stellar-core commit ad22bccafbbc14a358f05a989f7b95714dc9d4c6)
248
252
 
249
- ## [0.5.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.4.0...v0.5.0)
253
+ ## [0.5.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.4.0...base-v0.5.0)
250
254
 
251
255
  ### Changed
252
256
 
253
257
  - Update to latest xdr
254
258
 
255
- ## [0.4.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.3.0...v0.4.0)
259
+ ## [0.4.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.3.0...base-v0.4.0)
256
260
 
257
261
  ### Changed
258
262
  - 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).
@@ -38,6 +38,7 @@ module Stellar
38
38
  AssetCode4 = XDR::Opaque[4]
39
39
  AssetCode12 = XDR::Opaque[12]
40
40
  autoload :AssetType
41
+ autoload :AssetCode
41
42
  autoload :Asset
42
43
  autoload :Price
43
44
  autoload :Liabilities
@@ -46,6 +47,7 @@ module Stellar
46
47
  autoload :Signer
47
48
  autoload :AccountFlags
48
49
  MASK_ACCOUNT_FLAGS = 0x7
50
+ MASK_ACCOUNT_FLAGS_V17 = 0xF
49
51
  MAX_SIGNERS = 20
50
52
  SponsorshipDescriptor = XDR::Option[AccountID]
51
53
  autoload :AccountEntryExtensionV2
@@ -54,6 +56,7 @@ module Stellar
54
56
  autoload :TrustLineFlags
55
57
  MASK_TRUSTLINE_FLAGS = 1
56
58
  MASK_TRUSTLINE_FLAGS_V13 = 3
59
+ MASK_TRUSTLINE_FLAGS_V17 = 7
57
60
  autoload :TrustLineEntry
58
61
  autoload :OfferEntryFlags
59
62
  MASK_OFFERENTRY_FLAGS = 1
@@ -65,6 +68,9 @@ module Stellar
65
68
  autoload :Claimant
66
69
  autoload :ClaimableBalanceIDType
67
70
  autoload :ClaimableBalanceID
71
+ autoload :ClaimableBalanceFlags
72
+ MASK_CLAIMABLE_BALANCE_FLAGS = 0x1
73
+ autoload :ClaimableBalanceEntryExtensionV1
68
74
  autoload :ClaimableBalanceEntry
69
75
  autoload :LedgerEntryExtensionV1
70
76
  autoload :LedgerEntry
@@ -94,6 +100,9 @@ module Stellar
94
100
  autoload :BeginSponsoringFutureReservesOp
95
101
  autoload :RevokeSponsorshipType
96
102
  autoload :RevokeSponsorshipOp
103
+ autoload :ClawbackOp
104
+ autoload :ClawbackClaimableBalanceOp
105
+ autoload :SetTrustLineFlagsOp
97
106
  autoload :Operation
98
107
  autoload :OperationID
99
108
  autoload :MemoType
@@ -149,6 +158,12 @@ module Stellar
149
158
  autoload :EndSponsoringFutureReservesResult
150
159
  autoload :RevokeSponsorshipResultCode
151
160
  autoload :RevokeSponsorshipResult
161
+ autoload :ClawbackResultCode
162
+ autoload :ClawbackResult
163
+ autoload :ClawbackClaimableBalanceResultCode
164
+ autoload :ClawbackClaimableBalanceResult
165
+ autoload :SetTrustLineFlagsResultCode
166
+ autoload :SetTrustLineFlagsResult
152
167
  autoload :OperationResultCode
153
168
  autoload :OperationResult
154
169
  autoload :TransactionResultCode
@@ -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;
@@ -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
  # };
@@ -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
@@ -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