stellar-base 0.24.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +79 -56
  3. data/README.md +7 -7
  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_id.rb +1 -1
  26. data/generated/stellar/operation_id/id.rb +2 -2
  27. data/generated/stellar/operation_result.rb +6 -0
  28. data/generated/stellar/operation_result/tr.rb +12 -0
  29. data/generated/stellar/operation_type.rb +7 -1
  30. data/generated/stellar/payment_result_code.rb +1 -1
  31. data/generated/stellar/revoke_sponsorship_op.rb +1 -2
  32. data/generated/stellar/set_options_result_code.rb +14 -11
  33. data/generated/stellar/set_trust_line_flags_op.rb +25 -0
  34. data/generated/stellar/set_trust_line_flags_result.rb +25 -0
  35. data/generated/stellar/set_trust_line_flags_result_code.rb +31 -0
  36. data/generated/stellar/transaction_result_code.rb +1 -1
  37. data/generated/stellar/trust_line_flags.rb +5 -1
  38. data/lib/stellar-base.rb +6 -2
  39. data/lib/stellar/account.rb +59 -0
  40. data/lib/stellar/asset.rb +10 -0
  41. data/lib/stellar/compat.rb +6 -7
  42. data/lib/stellar/concerns/transaction.rb +5 -4
  43. data/lib/stellar/dsl.rb +32 -5
  44. data/lib/stellar/ext/xdr.rb +8 -7
  45. data/lib/stellar/key_pair.rb +22 -23
  46. data/lib/stellar/ledger_key.rb +4 -2
  47. data/lib/stellar/muxed_account.rb +16 -0
  48. data/lib/stellar/operation.rb +89 -19
  49. data/lib/stellar/transaction.rb +1 -1
  50. data/lib/stellar/transaction_builder.rb +20 -7
  51. data/lib/stellar/transaction_envelope.rb +6 -16
  52. data/lib/stellar/transaction_v0.rb +2 -10
  53. data/lib/stellar/trust_line_flags.rb +53 -0
  54. data/lib/stellar/util/strkey.rb +15 -7
  55. data/lib/stellar/version.rb +3 -0
  56. metadata +34 -16
  57. data/generated/stellar/allow_trust_op/asset.rb +0 -33
  58. data/lib/stellar/base/version.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f32d18dcada46e11a1836cdeda94d852d89ac6de0c89472ef794d748e38bcc68
4
- data.tar.gz: d15156a33fc3b64ef70e78d83892ab70ec3e076611667572c3bda07aa4aaf2f6
3
+ metadata.gz: 747484cfbd2ecc3339c7f02db339afd3259cbfc438c752b88384437d92b7dd8e
4
+ data.tar.gz: 85490bd0247c71f517fdc1c66cabe961d4ce8c4b574d42b2f3cddeeb54b2e395
5
5
  SHA512:
6
- metadata.gz: b2ad9163443ed4391d9004f41b07ba61e59378c8d01505210f7a62dff8239a748e0bc137a07e7f37d80991f8fb580246377a30c7d2189fbd044c05d586ab48a7
7
- data.tar.gz: 9395e4eb5c837643a2046d681892c9bfc4ea5a43c3a4612729f61a63c3c4c962d1fbea598fef754c980a90d282a8d31a7435658c8e4053dad612b2a2efa37c5e
6
+ metadata.gz: d6a0f7794d178e34799db7dad0c64ed37830896b30c7a53b204c055fb71289a535b5044d5340663ccfec96c33317f1754eed6a9ee7eba7aaa37da7431cfd26f2
7
+ data.tar.gz: 623a2e0bee087f04c3b512c63ccaefdc9d85f9cecc8bde008cdaed01d017577fbbb07910b621809913557d7fff5bb559928b3b341295c544d90a1fda4d584e16
data/CHANGELOG.md CHANGED
@@ -1,87 +1,110 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this
4
- file. 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/).
5
6
 
6
7
  As this project is pre 1.0, breaking changes may happen for minor version
7
8
  bumps. A breaking change will get clearly notified in this log.
8
9
 
9
- ## [Unreleased]
10
+ ## [0.28.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.27.0...v0.28.0) (2021-07-17)
11
+
12
+ ### Features
13
+
14
+ * 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))
15
+
16
+ ## [0.27.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.26.0...v0.27.0) (2021-05-08)
17
+
18
+ ### Features
19
+
20
+ * **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))
21
+
22
+ ## [0.26.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.25.0...v0.26.0) - 2021-02-05
23
+ - No changes
24
+
25
+ ## [0.25.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
26
+ ### Added
27
+ - `MuxedAccount` implements `#to_keypair` conversion protocol
28
+ - `MuxedAccount` correctly responds to `#address` with strkey encoded public key
29
+ ### Fixed
30
+ - `Transaction::V0#source_account` now properly returns `MuxedAccount` instead of raw bytes
31
+
32
+ ## [0.24.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
10
33
  ### Added
11
34
  - Add conversion methods for KeyPair and Asset
12
35
  - Stellar Protocol 14 support
13
36
  - Regenerate XDR wrappers from definitions in stellar-core 14.1.1
14
37
  - Add [CAP-23 Two-Part Payments](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md) support
15
38
  - Add ClaimPredicate DSL methods which help with creation of claim predicates.
16
- ```
17
- # use class-level helpers to create simple predicates
39
+ ```ruby
40
+ # use class-level helpers to create simple predicates
18
41
  unconditional = Stellar::ClaimPredicate.unconditional
19
42
  before_rel_time = Stellar::ClaimPredicate.before_relative_time(1.hour)
20
43
  before_abs_time = Stellar::ClaimPredicate.before_absolute_time(Date.tomorrow.beginning_of_day)
21
-
44
+
22
45
  # negate predicates using `~` unary operator
23
46
  ~predicate # same as predicate.not
24
-
47
+
25
48
  # build complex predicates using `&` and `|` infix operators
26
49
  predicate & other_predicate # same as `predicate.and(other_predicate)`
27
50
  predicate | other_predicate # same as `predicate.or(other_predicate)`
28
-
29
- # quickly define complex predicates using `.compose` class method with the block
51
+
52
+ # quickly define complex predicates using `.compose` class method with the block
30
53
  unconditional = Stellar::ClaimPredicate.compose { }
31
- complex = Stellar::ClaimPredicate.compose do
32
- before_relative_time(1.week) & ~before_relative_time(10.seconds) |
54
+ complex = Stellar::ClaimPredicate.compose do
55
+ before_relative_time(1.week) & ~before_relative_time(10.seconds) |
33
56
  end
34
-
35
- # here's what building this predicate would look like without DSL
57
+
58
+ # here's what building this predicate would look like without DSL
36
59
  complex = Stellar::ClaimPredicate.new(
37
- Stellar::ClaimPredicateType::AND,
60
+ Stellar::ClaimPredicateType::AND,
38
61
  Stellar::ClaimPredicate.new(
39
62
  Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 7 * 24 * 60 * 60
40
- ),
63
+ ),
41
64
  Stellar::ClaimPredicate.new(
42
65
  Stellar::ClaimPredicateType::NOT, Stellar::ClaimPredicate.new(
43
66
  Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 10
44
67
  )
45
68
  )
46
69
  )
47
-
70
+
48
71
  ```
49
72
  - Extend Operation with `create_claimable_balance` and `claim_claimable_balance` helpers
50
73
  - Add Claimant and ClaimPredicate DSL methods to reduce the noise.
51
- ```
74
+ ```ruby
52
75
  include Stellar::DSL
53
-
76
+
54
77
  sender = KeyPair('S....')
55
78
  recipient = 'G....'
56
-
79
+
57
80
  op = Operation.create_claimable_balance(
58
81
  asset: Stellar::Asset.native,
59
82
  amount: 100,
60
83
  claimants: [
61
84
  Claimant(recipient) { after(10.seconds) & before(1.week) },
62
- Claimant(sender), # allow unconditional claim-back
85
+ Claimant(sender), # allow unconditional claim-back
63
86
  ]
64
87
  )
65
88
  ])
66
89
  ```
67
90
  - Add simple predicate evaluation feature so that developers can sanity-check their predicates
68
- ```
91
+ ```ruby
69
92
  include Stellar::DSL
70
-
93
+
71
94
  predicate = ClaimPredicate { before_relative_time(1.week) & ~before_relative_time(10.seconds) }
72
-
95
+
73
96
  # predicate.evaluate(balance_creation_time, claim_evaluation_time)
74
97
  predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:00:05") # => false
75
98
  predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:01:00") # => true
76
99
  predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 08:50:00") # => true
77
-
100
+
78
101
  # you can also pass an instance of ActiveSupport::Duration as a second parameter, in this case
79
- # it works as a relative offset from `balance_creation_time`
102
+ # it works as a relative offset from `balance_creation_time`
80
103
  predicate.evaluate("2020-10-20 09:00:00", 1.week + 1.second) # => false
81
-
104
+
82
105
  # it is effectively the same as
83
- predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 09:00:01") # => false
84
- ```
106
+ predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 09:00:01") # => false
107
+ ```
85
108
  - Add [CAP-33 Sponsored Reserves](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0033.md) support
86
109
  - Extend the operation class with helpers that allow sponsoring reserves and also revoke sponsorships.
87
110
  - `Operation.begin_sponsoring_future_reserves`
@@ -92,35 +115,35 @@ bumps. A breaking change will get clearly notified in this log.
92
115
  - `Operation.revoke_sponsorship(account_id:, data_name:)`
93
116
  - `Operation.revoke_sponsorship(account_id:, balance_id:)`
94
117
  - `Operation.revoke_sponsorship(account_id:, signer:)`
95
-
96
118
 
97
- ## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.23.0) - 2020-06-18
119
+
120
+ ## [0.23.1](https://github.com/astroband/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
98
121
  ### Added
99
122
  - Transaction builder now builds V1 transactions
100
123
  - FeeBumpTransaction can wrap V0 transaction
101
-
102
- ## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.22.0) - 2020-06-11
124
+
125
+ ## [0.23.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.22.0...v0.23.0) - 2020-06-11
103
126
  ### Added
104
127
  - Stellar Protocol 13 support
105
128
  - Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
106
129
  - Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
107
130
  - Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))
108
-
109
- ## [0.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
131
+
132
+ ## [0.22.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.21.0...base-v0.22.0) - 2020-03-26
110
133
  ### Added
111
- - Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
134
+ - Add TransactionBuilder ([#54](https://github.com/astroband/ruby-stellar-base/issues/54))
112
135
 
113
136
  ### Changed
114
- - Regenerate XDR files ([#57](https://github.com/stellar/ruby-stellar-base/issues/57))
115
- - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/stellar/ruby-stellar-base/issues/59))
137
+ - Regenerate XDR files ([#57](https://github.com/astroband/ruby-stellar-base/issues/57))
138
+ - Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/astroband/ruby-stellar-base/issues/59))
116
139
 
117
- ## [0.21.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.20.0...v0.21.0) - 2019-10-04
140
+ ## [0.21.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.20.0...base-v0.21.0) - 2019-10-04
118
141
  ### Changed
119
- - [Stellar Protocol 12 compatibility](https://github.com/bloom-solutions/ruby-stellar-base/pull/51).
142
+ - [Stellar Protocol 12 compatibility](https://github.com/astroband/ruby-stellar-base/pull/51).
120
143
  - XDR changes for path payment
121
144
  - constant renames, which may cause breaking changes if referred to directly
122
145
 
123
- ## [0.20.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.19.0...v0.20.0) - 2019-05-22
146
+ ## [0.20.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.19.0...base-v0.20.0) - 2019-05-22
124
147
  ### Added
125
148
  - Stellar Protocol 11 compatibility (#48)
126
149
  - XDR changes for [CAP-0006 Buy Offers](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0006.md)
@@ -131,11 +154,11 @@ bumps. A breaking change will get clearly notified in this log.
131
154
  - Deprecate `manage_offer` and `create_passive_offer` factory methods in `Stellar::Transaction` and `Stellar::Operation`
132
155
  - Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
133
156
 
134
- ## [0.19.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.18.0...v0.19.0)
157
+ ## [0.19.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.18.0...base-v0.19.0)
135
158
  ### Changed
136
159
  - Loosen ActiveSupport to >= 5.0.0
137
160
 
138
- ## [0.18.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.17.0...v0.18.0)
161
+ ## [0.18.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.17.0...base-v0.18.0)
139
162
  ### Added
140
163
  - 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))
141
164
  - Add factories for ledger, transaction, operation.
@@ -143,11 +166,11 @@ bumps. A breaking change will get clearly notified in this log.
143
166
  ### Changed
144
167
  - Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
145
168
 
146
- ## [0.17.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.16.0...v0.17.0)
169
+ ## [0.17.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.16.0...base-v0.17.0)
147
170
  ### Fixed
148
171
  - Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
149
172
 
150
- ## [0.16.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.15.0...v0.16.0)
173
+ ## [0.16.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.15.0...base-v0.16.0)
151
174
  ### Added
152
175
  - Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
153
176
  - Merge two transactions with `Stellar::TransactionEnvelope#merge`
@@ -155,14 +178,14 @@ bumps. A breaking change will get clearly notified in this log.
155
178
  ### Fixed
156
179
  - Source account overriding in Stellar::Transaction#to_operations
157
180
 
158
- ## [0.15.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.14.0...v0.15.0)
181
+ ## [0.15.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.14.0...base-v0.15.0)
159
182
  ### Added
160
183
  - `Stellar::Operation.change_trust` can accept `Stellar::Asset` instance for `line`
161
184
 
162
185
  ### Fixed
163
186
  - Protect `Stellar::Operation.change_trust` against malicious arguments, in the event that developers pass this argument directly from user input
164
187
 
165
- ## [0.14.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.13.0...v0.14.0)
188
+ ## [0.14.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.13.0...base-v0.14.0)
166
189
 
167
190
  ### Added
168
191
  - We now support the bump sequence operation with `Operation.bump_sequence`.
@@ -172,7 +195,7 @@ bumps. A breaking change will get clearly notified in this log.
172
195
  - `Operation.change_trust` learned how to use a default for the `:limit` parameter
173
196
  - `StrKey` learned about new version bytes `pre_auth_tx` and `hash_x`
174
197
 
175
- ## [0.13.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.12.0...v0.13.0)
198
+ ## [0.13.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.12.0...base-v0.13.0)
176
199
 
177
200
  ### Changed
178
201
  - Update XDR definitions for stellar-core 0.9.1 support
@@ -180,7 +203,7 @@ bumps. A breaking change will get clearly notified in this log.
180
203
  ### Added
181
204
  - Added `#signer_key` helper to `KeyPair`
182
205
 
183
- ## [0.12.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.11.0...v0.12.0)
206
+ ## [0.12.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.11.0...base-v0.12.0)
184
207
 
185
208
  ### Changed
186
209
  - Avoid modifying $LOAD_PATH to fix load order issues
@@ -190,7 +213,7 @@ bumps. A breaking change will get clearly notified in this log.
190
213
 
191
214
  - BREAKING CHANGE: Removed support for JRuby.
192
215
 
193
- ## [0.11.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.10.0...v0.11.0)
216
+ ## [0.11.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.10.0...base-v0.11.0)
194
217
 
195
218
  ### Added
196
219
  - Added support for `manage_data` operations
@@ -198,48 +221,48 @@ bumps. A breaking change will get clearly notified in this log.
198
221
  ### Changed
199
222
  - `Stellar::Transaction#to_envelope` can now be used without arguments, returning a `Stellar::TransactionEnvelope` with zero signatures.
200
223
 
201
- ## [0.10.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.9.0...v0.10.0)
224
+ ## [0.10.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.9.0...base-v0.10.0)
202
225
 
203
226
  - 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.
204
227
 
205
- ## [0.9.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.8.0...v0.9.0)
228
+ ## [0.9.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.8.0...base-v0.9.0)
206
229
 
207
230
  ### Changed
208
231
  - XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
209
232
 
210
- ## [0.8.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.7.0...v0.8.0)
233
+ ## [0.8.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.7.0...base-v0.8.0)
211
234
 
212
235
  ### Changed
213
236
  - BREAKING CHANGE: The default network for this library is now the stellar test network.
214
237
  To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
215
238
  at the head of your script or in your configuration function.
216
239
 
217
- ## [0.7.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.1...v0.7.0)
240
+ ## [0.7.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.1...base-v0.7.0)
218
241
 
219
242
  ### Changed
220
243
 
221
244
  - Bump xdr dependency to 1.0.0
222
245
 
223
- ## [0.6.1](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.0...v0.6.1)
246
+ ## [0.6.1](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.6.0...base-v0.6.1)
224
247
 
225
248
  ### Changed
226
249
 
227
250
  - Update default fee for transactions to new minimum of 100 stroops
228
251
 
229
252
 
230
- ## [0.6.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.5.0...v0.6.0)
253
+ ## [0.6.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.5.0...base-v0.6.0)
231
254
 
232
255
  ### Changed
233
256
 
234
257
  - Update to latest xdr (stellar-core commit ad22bccafbbc14a358f05a989f7b95714dc9d4c6)
235
258
 
236
- ## [0.5.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.4.0...v0.5.0)
259
+ ## [0.5.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.4.0...base-v0.5.0)
237
260
 
238
261
  ### Changed
239
262
 
240
263
  - Update to latest xdr
241
264
 
242
- ## [0.4.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.3.0...v0.4.0)
265
+ ## [0.4.0](https://github.com/astroband/ruby-stellar-sdk/compare/base-v0.3.0...base-v0.4.0)
243
266
 
244
267
  ### Changed
245
268
  - BREAKING CHANGE: "Amounts", that is, input parameters that represent a
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # Stellar::Base
2
-
3
- [![Build Status](https://travis-ci.org/stellar/ruby-stellar-base.svg)](https://travis-ci.org/stellar/ruby-stellar-base)
4
- [![Code Climate](https://codeclimate.com/github/stellar/ruby-stellar-base/badges/gpa.svg)](https://codeclimate.com/github/stellar/ruby-stellar-base)
1
+ # Stellar SDK for Ruby: XDR and Low Level Abstractions
2
+ [![stellar-base](https://badge.fury.io/rb/stellar-base.svg)](https://badge.fury.io/rb/stellar-base)
3
+ [![Test](https://github.com/astroband/ruby-stellar-sdk/workflows/Test/badge.svg)](https://github.com/astroband/ruby-stellar-sdk/actions?query=branch%3Amaster)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/dadfcd9396aba493cb93/maintainability)](https://codeclimate.com/github/astroband/ruby-stellar-sdk/maintainability)
5
5
 
6
6
  The stellar-base library is the lowest-level stellar helper library. It consists of classes
7
7
  to read, write, hash, and sign the xdr structures that are used in stellard.
@@ -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
  # };