Skip to content

Commit

Permalink
v0.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nebolsin committed Oct 30, 2020
1 parent 5f57af1 commit 3454e71
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 38 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: base
specs:
stellar-base (0.24.0)
stellar-base (0.25.0)
activesupport (>= 5.0.0, < 7.0)
base32 (>= 0.3.0, < 1.0)
digest-crc (>= 0.5.0, < 1.0)
Expand All @@ -11,11 +11,11 @@ PATH
PATH
remote: sdk
specs:
stellar-sdk (0.24.0)
stellar-sdk (0.25.0)
activesupport (>= 5.0.0, < 7.0)
excon (>= 0.71.0, < 1.0)
hyperclient (>= 0.7.0, < 1.0)
stellar-base (= 0.24.0)
stellar-base (= 0.25.0)
toml-rb (>= 1.1.1, < 3.0)

GEM
Expand Down
58 changes: 30 additions & 28 deletions base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
As this project is pre 1.0, breaking changes may happen for minor version
bumps. A breaking change will get clearly notified in this log.

## [Unreleased](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...master)
## [Unreleased](https://github.com/stellar/ruby-stellar-sdk/compare/v0.25.0...master)

## [0.25.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...v0.25.0) - 2020-10-30
### Added
- `MuxedAccount` implements `#to_keypair` conversion protocol
- `MuxedAccount` correctly responds to `#address` with strkey encoded public key
- `MuxedAccount` correctly responds to `#address` with strkey encoded public key
### Fixed
- `Transaction::V0#source_account` now properly returns `MuxedAccount` instead of raw bytes
- `Transaction::V0#source_account` now properly returns `MuxedAccount` instead of raw bytes

## [0.24.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
### Added
Expand All @@ -22,74 +24,74 @@ bumps. A breaking change will get clearly notified in this log.
- Add [CAP-23 Two-Part Payments](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md) support
- Add ClaimPredicate DSL methods which help with creation of claim predicates.
```ruby
# use class-level helpers to create simple predicates
# use class-level helpers to create simple predicates
unconditional = Stellar::ClaimPredicate.unconditional
before_rel_time = Stellar::ClaimPredicate.before_relative_time(1.hour)
before_abs_time = Stellar::ClaimPredicate.before_absolute_time(Date.tomorrow.beginning_of_day)

# negate predicates using `~` unary operator
~predicate # same as predicate.not

# build complex predicates using `&` and `|` infix operators
predicate & other_predicate # same as `predicate.and(other_predicate)`
predicate | other_predicate # same as `predicate.or(other_predicate)`
# quickly define complex predicates using `.compose` class method with the block

# quickly define complex predicates using `.compose` class method with the block
unconditional = Stellar::ClaimPredicate.compose { }
complex = Stellar::ClaimPredicate.compose do
before_relative_time(1.week) & ~before_relative_time(10.seconds) |
complex = Stellar::ClaimPredicate.compose do
before_relative_time(1.week) & ~before_relative_time(10.seconds) |
end
# here's what building this predicate would look like without DSL

# here's what building this predicate would look like without DSL
complex = Stellar::ClaimPredicate.new(
Stellar::ClaimPredicateType::AND,
Stellar::ClaimPredicateType::AND,
Stellar::ClaimPredicate.new(
Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 7 * 24 * 60 * 60
),
),
Stellar::ClaimPredicate.new(
Stellar::ClaimPredicateType::NOT, Stellar::ClaimPredicate.new(
Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 10
)
)
)

```
- Extend Operation with `create_claimable_balance` and `claim_claimable_balance` helpers
- Add Claimant and ClaimPredicate DSL methods to reduce the noise.
```ruby
include Stellar::DSL
sender = KeyPair('S....')
recipient = 'G....'
op = Operation.create_claimable_balance(
asset: Stellar::Asset.native,
amount: 100,
claimants: [
Claimant(recipient) { after(10.seconds) & before(1.week) },
Claimant(sender), # allow unconditional claim-back
Claimant(sender), # allow unconditional claim-back
]
)
])
```
- Add simple predicate evaluation feature so that developers can sanity-check their predicates
```ruby
include Stellar::DSL
predicate = ClaimPredicate { before_relative_time(1.week) & ~before_relative_time(10.seconds) }
# predicate.evaluate(balance_creation_time, claim_evaluation_time)
predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:00:05") # => false
predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:01:00") # => true
predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 08:50:00") # => true
# you can also pass an instance of ActiveSupport::Duration as a second parameter, in this case
# it works as a relative offset from `balance_creation_time`
# it works as a relative offset from `balance_creation_time`
predicate.evaluate("2020-10-20 09:00:00", 1.week + 1.second) # => false
# it is effectively the same as
predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 09:00:01") # => false
```
predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 09:00:01") # => false
```
- Add [CAP-33 Sponsored Reserves](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0033.md) support
- Extend the operation class with helpers that allow sponsoring reserves and also revoke sponsorships.
- `Operation.begin_sponsoring_future_reserves`
Expand All @@ -100,20 +102,20 @@ bumps. A breaking change will get clearly notified in this log.
- `Operation.revoke_sponsorship(account_id:, data_name:)`
- `Operation.revoke_sponsorship(account_id:, balance_id:)`
- `Operation.revoke_sponsorship(account_id:, signer:)`


## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.23.1) - 2020-06-18
### Added
- Transaction builder now builds V1 transactions
- FeeBumpTransaction can wrap V0 transaction

## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.22.0...v0.23.0) - 2020-06-11
### Added
- Stellar Protocol 13 support
- Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
- Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
- Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))

## [0.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
### Added
- Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
Expand Down
2 changes: 1 addition & 1 deletion base/lib/stellar/base/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Stellar
module Base
VERSION = "0.24.0"
VERSION = "0.25.0"
end
end
12 changes: 7 additions & 5 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...master)
## [Unreleased](https://github.com/stellar/ruby-stellar-sdk/compare/v0.25.0...master)

## [0.25.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.24.0...0.25.0)
### Changed
- `Stellar::SEP10` is updated to comply with SEP10 v2.1.0
- `build_challenge_tx` now accepts `domain` instead of `anchor_name`, using the
old param name will now result in deprecation warning
- `read_challenge_tx` correctly validates multi-op challenge transactions
- `verify_challenge_tx_threshold` now expects simple `{'GA...' => weight, ... }` hash for `signers`
- `read_challenge_tx` correctly validates multi-op challenge transactions
- `verify_challenge_tx_threshold` now expects simple `{'GA...' => weight, ... }` hash for `signers`
### Removed:
- Deprecated `Stellar::SEP10.verify_challenge_tx` method is removed
- Deprecated `Stellar::SEP10.verify_challenge_tx` method is removed

## [0.24.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.24.0) - 2020-10-20
- Protocol 14 support
Expand All @@ -29,7 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
- Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
- Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))

## [0.8.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.7.0...v0.8.0)
### Added
- SEP-10 Multisig Support [#69](https://github.com/stellar/ruby-stellar-sdk/pull/69)
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/stellar/sdk/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Stellar
module SDK
VERSION = "0.24.0"
VERSION = "0.25.0"
end
end

0 comments on commit 3454e71

Please sign in to comment.