stellar-base 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -21
- data/CONTRIBUTING.md +5 -5
- data/README.md +1 -1
- data/generated/stellar-base-generated.rb +6 -3
- data/generated/stellar/operation.rb +4 -2
- data/generated/stellar/operation/body.rb +30 -26
- data/generated/stellar/operation_result.rb +4 -2
- data/generated/stellar/operation_result/tr.rb +32 -28
- data/generated/stellar/operation_type.rb +17 -15
- data/generated/stellar/{path_payment_op.rb → path_payment_strict_receive_op.rb} +2 -2
- data/generated/stellar/path_payment_strict_receive_result.rb +38 -0
- data/generated/stellar/path_payment_strict_receive_result/success.rb +22 -0
- data/generated/stellar/path_payment_strict_receive_result_code.rb +47 -0
- data/generated/stellar/path_payment_strict_send_op.rb +32 -0
- data/generated/stellar/{path_payment_result.rb → path_payment_strict_send_result.rb} +7 -7
- data/generated/stellar/{path_payment_result → path_payment_strict_send_result}/success.rb +1 -1
- data/generated/stellar/path_payment_strict_send_result_code.rb +47 -0
- data/lib/stellar-base.rb +1 -1
- data/lib/stellar/base/version.rb +1 -1
- data/lib/stellar/operation.rb +63 -6
- data/lib/stellar/{path_payment_result.rb → path_payment_strict_receive_result.rb} +1 -1
- data/lib/stellar/transaction.rb +12 -0
- data/spec/lib/stellar/operation_spec.rb +63 -1
- data/spec/lib/stellar/{path_payment_result_spec.rb → path_payment_strict_receive_result_spec.rb} +10 -10
- data/spec/lib/stellar/transaction_spec.rb +32 -0
- data/xdr/Stellar-transaction.x +94 -27
- metadata +14 -10
- data/generated/stellar/path_payment_result_code.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feb38eef272fff967b9499abba3f4374cfa1d9ed62c38266a1e51ee1ca019989
|
4
|
+
data.tar.gz: 0d3457265d1fef82c7ebbdea198f59546edd4c6bf7411f7ddf73442d6eeeb129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebb31a2dc1383580580f205e69f180d56b53f4ed4b060d947bd2743f4ca6bb25062e64a2f0ab83cd511b4ed0ca06cf22ab3f040c2fba2f94222f70230a30e173
|
7
|
+
data.tar.gz: 4e2f8d7798b1d43bc8ca12e8922e41b0a9960b85b607172053be23d4e023701b828b5041e7d392dc029ddfe2dd99d1eb4cfd65c510318bee06ae3f4785833df5
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,13 @@ file. This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
As this project is pre 1.0, breaking changes may happen for minor version
|
7
7
|
bumps. A breaking change will get clearly notified in this log.
|
8
8
|
|
9
|
-
## [0.
|
9
|
+
## [0.21.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.21.0...v0.20.0) - 2019-10-04
|
10
|
+
### Changed
|
11
|
+
- [Stellar Protocol 12 compatibility](https://github.com/bloom-solutions/ruby-stellar-base/pull/51).
|
12
|
+
- XDR changes for path payment
|
13
|
+
- constant renames, which may cause breaking changes if referred to directly
|
14
|
+
|
15
|
+
## [0.20.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.20.0...v0.19.0) - 2019-05-22
|
10
16
|
### Added
|
11
17
|
- Stellar Protocol 11 compatibility (#48)
|
12
18
|
- XDR changes for [CAP-0006 Buy Offers](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0006.md)
|
@@ -15,13 +21,13 @@ bumps. A breaking change will get clearly notified in this log.
|
|
15
21
|
|
16
22
|
### Changed
|
17
23
|
- Deprecate `manage_offer` and `create_passive_offer` factory methods in `Stellar::Transaction` and `Stellar::Operation`
|
18
|
-
- Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
|
24
|
+
- Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
|
19
25
|
|
20
|
-
## [0.19.0](https://github.com/
|
26
|
+
## [0.19.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.18.0...v0.19.0)
|
21
27
|
### Changed
|
22
28
|
- Loosen ActiveSupport to >= 5.0.0
|
23
29
|
|
24
|
-
## [0.18.0](https://github.com/
|
30
|
+
## [0.18.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.17.0...v0.18.0)
|
25
31
|
### Added
|
26
32
|
- 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))
|
27
33
|
- Add factories for ledger, transaction, operation.
|
@@ -29,11 +35,11 @@ bumps. A breaking change will get clearly notified in this log.
|
|
29
35
|
### Changed
|
30
36
|
- Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
|
31
37
|
|
32
|
-
## [0.17.0](https://github.com/
|
38
|
+
## [0.17.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.16.0...v0.17.0)
|
33
39
|
### Fixed
|
34
40
|
- Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
|
35
41
|
|
36
|
-
## [0.16.0](https://github.com/
|
42
|
+
## [0.16.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.15.0...v0.16.0)
|
37
43
|
### Added
|
38
44
|
- Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
|
39
45
|
- Merge two transactions with `Stellar::TransactionEnvelope#merge`
|
@@ -41,14 +47,14 @@ bumps. A breaking change will get clearly notified in this log.
|
|
41
47
|
### Fixed
|
42
48
|
- Source account overriding in Stellar::Transaction#to_operations
|
43
49
|
|
44
|
-
## [0.15.0](https://github.com/
|
50
|
+
## [0.15.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.14.0...v0.15.0)
|
45
51
|
### Added
|
46
52
|
- `Stellar::Operation.change_trust` can accept `Stellar::Asset` instance for `line`
|
47
53
|
|
48
54
|
### Fixed
|
49
55
|
- Protect `Stellar::Operation.change_trust` against malicious arguments, in the event that developers pass this argument directly from user input
|
50
56
|
|
51
|
-
## [0.14.0](https://github.com/
|
57
|
+
## [0.14.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.13.0...v0.14.0)
|
52
58
|
|
53
59
|
### Added
|
54
60
|
- We now support the bump sequence operation with `Operation.bump_sequence`.
|
@@ -58,7 +64,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
58
64
|
- `Operation.change_trust` learned how to use a default for the `:limit` parameter
|
59
65
|
- `StrKey` learned about new version bytes `pre_auth_tx` and `hash_x`
|
60
66
|
|
61
|
-
## [0.13.0](https://github.com/
|
67
|
+
## [0.13.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.12.0...v0.13.0)
|
62
68
|
|
63
69
|
### Changed
|
64
70
|
- Update XDR definitions for stellar-core 0.9.1 support
|
@@ -66,7 +72,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
66
72
|
### Added
|
67
73
|
- Added `#signer_key` helper to `KeyPair`
|
68
74
|
|
69
|
-
## [0.12.0](https://github.com/
|
75
|
+
## [0.12.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.11.0...v0.12.0)
|
70
76
|
|
71
77
|
### Changed
|
72
78
|
- Avoid modifying $LOAD_PATH to fix load order issues
|
@@ -76,7 +82,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
76
82
|
|
77
83
|
- BREAKING CHANGE: Removed support for JRuby.
|
78
84
|
|
79
|
-
## [0.11.0](https://github.com/
|
85
|
+
## [0.11.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.10.0...v0.11.0)
|
80
86
|
|
81
87
|
### Added
|
82
88
|
- Added support for `manage_data` operations
|
@@ -84,48 +90,48 @@ bumps. A breaking change will get clearly notified in this log.
|
|
84
90
|
### Changed
|
85
91
|
- `Stellar::Transaction#to_envelope` can now be used without arguments, returning a `Stellar::TransactionEnvelope` with zero signatures.
|
86
92
|
|
87
|
-
## [0.10.0](https://github.com/
|
93
|
+
## [0.10.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.9.0...v0.10.0)
|
88
94
|
|
89
|
-
- 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.
|
95
|
+
- 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.
|
90
96
|
|
91
|
-
## [0.9.0](https://github.com/
|
97
|
+
## [0.9.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.8.0...v0.9.0)
|
92
98
|
|
93
99
|
### Changed
|
94
100
|
- XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
|
95
101
|
|
96
|
-
## [0.8.0](https://github.com/
|
102
|
+
## [0.8.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.7.0...v0.8.0)
|
97
103
|
|
98
104
|
### Changed
|
99
|
-
- BREAKING CHANGE: The default network for this library is now the stellar test network.
|
105
|
+
- BREAKING CHANGE: The default network for this library is now the stellar test network.
|
100
106
|
To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
|
101
107
|
at the head of your script or in your configuration function.
|
102
108
|
|
103
|
-
## [0.7.0](https://github.com/
|
109
|
+
## [0.7.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.1...v0.7.0)
|
104
110
|
|
105
111
|
### Changed
|
106
112
|
|
107
113
|
- Bump xdr dependency to 1.0.0
|
108
114
|
|
109
|
-
## [0.6.1](https://github.com/
|
115
|
+
## [0.6.1](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.0...v0.6.1)
|
110
116
|
|
111
117
|
### Changed
|
112
118
|
|
113
119
|
- Update default fee for transactions to new minimum of 100 stroops
|
114
120
|
|
115
121
|
|
116
|
-
## [0.6.0](https://github.com/
|
122
|
+
## [0.6.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.5.0...v0.6.0)
|
117
123
|
|
118
124
|
### Changed
|
119
125
|
|
120
126
|
- Update to latest xdr (stellar-core commit ad22bccafbbc14a358f05a989f7b95714dc9d4c6)
|
121
127
|
|
122
|
-
## [0.5.0](https://github.com/
|
128
|
+
## [0.5.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.4.0...v0.5.0)
|
123
129
|
|
124
130
|
### Changed
|
125
131
|
|
126
132
|
- Update to latest xdr
|
127
133
|
|
128
|
-
## [0.4.0](https://github.com/
|
134
|
+
## [0.4.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.3.0...v0.4.0)
|
129
135
|
|
130
136
|
### Changed
|
131
137
|
- BREAKING CHANGE: "Amounts", that is, input parameters that represent a
|
data/CONTRIBUTING.md
CHANGED
@@ -28,21 +28,21 @@ ask contributors to follow so that we can merge your changes quickly.
|
|
28
28
|
* Include a descriptive [commit message](https://github.com/erlang/otp/wiki/Writing-good-commit-messages).
|
29
29
|
* Changes contributed via pull request should focus on a single issue at a time.
|
30
30
|
* Rebase your local changes against the master branch. Resolve any conflicts that arise.
|
31
|
-
|
32
|
-
At this point you're waiting on us. We like to at least comment on pull requests within three
|
31
|
+
|
32
|
+
At this point you're waiting on us. We like to at least comment on pull requests within three
|
33
33
|
business days. We may suggest some changes or improvements or alternatives.
|
34
34
|
|
35
35
|
# Additional Resources
|
36
36
|
|
37
|
-
* [Bug tracker (Github)](https://github.com/
|
37
|
+
* [Bug tracker (Github)](https://github.com/bloom-solutions/ruby-stellar-base/issues)
|
38
38
|
* <a href="https://docs.google.com/forms/d/1g7EF6PERciwn7zfmfke5Sir2n10yddGGSXyZsq98tVY/viewform?usp=send_form">Contributor License Agreement</a>
|
39
39
|
* #stellar-dev IRC channel on freenode.org and Slack chat on stellar-public.slack.com
|
40
40
|
|
41
41
|
|
42
42
|
This document is inspired by:
|
43
43
|
|
44
|
-
https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md
|
44
|
+
https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md
|
45
45
|
|
46
|
-
https://github.com/thoughtbot/factory_girl_rails/blob/master/CONTRIBUTING.md
|
46
|
+
https://github.com/thoughtbot/factory_girl_rails/blob/master/CONTRIBUTING.md
|
47
47
|
|
48
48
|
https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Stellar::Base
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/bloom-solutions/ruby-stellar-base.svg)](https://travis-ci.org/bloom-solutions/ruby-stellar-base)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/stellar/ruby-stellar-base/badges/gpa.svg)](https://codeclimate.com/github/stellar/ruby-stellar-base)
|
5
5
|
|
6
6
|
The stellar-base library is the lowest-level stellar helper library. It consists of classes
|
@@ -64,7 +64,8 @@ module Stellar
|
|
64
64
|
autoload :OperationType
|
65
65
|
autoload :CreateAccountOp
|
66
66
|
autoload :PaymentOp
|
67
|
-
autoload :
|
67
|
+
autoload :PathPaymentStrictReceiveOp
|
68
|
+
autoload :PathPaymentStrictSendOp
|
68
69
|
autoload :ManageSellOfferOp
|
69
70
|
autoload :ManageBuyOfferOp
|
70
71
|
autoload :CreatePassiveSellOfferOp
|
@@ -86,9 +87,11 @@ module Stellar
|
|
86
87
|
autoload :CreateAccountResult
|
87
88
|
autoload :PaymentResultCode
|
88
89
|
autoload :PaymentResult
|
89
|
-
autoload :
|
90
|
+
autoload :PathPaymentStrictReceiveResultCode
|
90
91
|
autoload :SimplePaymentResult
|
91
|
-
autoload :
|
92
|
+
autoload :PathPaymentStrictReceiveResult
|
93
|
+
autoload :PathPaymentStrictSendResultCode
|
94
|
+
autoload :PathPaymentStrictSendResult
|
92
95
|
autoload :ManageSellOfferResultCode
|
93
96
|
autoload :ManageOfferEffect
|
94
97
|
autoload :ManageOfferSuccessResult
|
@@ -18,8 +18,8 @@ require 'xdr'
|
|
18
18
|
# CreateAccountOp createAccountOp;
|
19
19
|
# case PAYMENT:
|
20
20
|
# PaymentOp paymentOp;
|
21
|
-
# case
|
22
|
-
#
|
21
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
22
|
+
# PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
|
23
23
|
# case MANAGE_SELL_OFFER:
|
24
24
|
# ManageSellOfferOp manageSellOfferOp;
|
25
25
|
# case CREATE_PASSIVE_SELL_OFFER:
|
@@ -40,6 +40,8 @@ require 'xdr'
|
|
40
40
|
# BumpSequenceOp bumpSequenceOp;
|
41
41
|
# case MANAGE_BUY_OFFER:
|
42
42
|
# ManageBuyOfferOp manageBuyOfferOp;
|
43
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
44
|
+
# PathPaymentStrictSendOp pathPaymentStrictSendOp;
|
43
45
|
# }
|
44
46
|
# body;
|
45
47
|
# };
|
@@ -11,8 +11,8 @@ require 'xdr'
|
|
11
11
|
# CreateAccountOp createAccountOp;
|
12
12
|
# case PAYMENT:
|
13
13
|
# PaymentOp paymentOp;
|
14
|
-
# case
|
15
|
-
#
|
14
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
15
|
+
# PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
|
16
16
|
# case MANAGE_SELL_OFFER:
|
17
17
|
# ManageSellOfferOp manageSellOfferOp;
|
18
18
|
# case CREATE_PASSIVE_SELL_OFFER:
|
@@ -33,6 +33,8 @@ require 'xdr'
|
|
33
33
|
# BumpSequenceOp bumpSequenceOp;
|
34
34
|
# case MANAGE_BUY_OFFER:
|
35
35
|
# ManageBuyOfferOp manageBuyOfferOp;
|
36
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
37
|
+
# PathPaymentStrictSendOp pathPaymentStrictSendOp;
|
36
38
|
# }
|
37
39
|
#
|
38
40
|
# ===========================================================================
|
@@ -41,32 +43,34 @@ module Stellar
|
|
41
43
|
class Body < XDR::Union
|
42
44
|
switch_on OperationType, :type
|
43
45
|
|
44
|
-
switch :create_account,
|
45
|
-
switch :payment,
|
46
|
-
switch :
|
47
|
-
switch :manage_sell_offer,
|
48
|
-
switch :create_passive_sell_offer,
|
49
|
-
switch :set_options,
|
50
|
-
switch :change_trust,
|
51
|
-
switch :allow_trust,
|
52
|
-
switch :account_merge,
|
46
|
+
switch :create_account, :create_account_op
|
47
|
+
switch :payment, :payment_op
|
48
|
+
switch :path_payment_strict_receive, :path_payment_strict_receive_op
|
49
|
+
switch :manage_sell_offer, :manage_sell_offer_op
|
50
|
+
switch :create_passive_sell_offer, :create_passive_sell_offer_op
|
51
|
+
switch :set_options, :set_options_op
|
52
|
+
switch :change_trust, :change_trust_op
|
53
|
+
switch :allow_trust, :allow_trust_op
|
54
|
+
switch :account_merge, :destination
|
53
55
|
switch :inflation
|
54
|
-
switch :manage_data,
|
55
|
-
switch :bump_sequence,
|
56
|
-
switch :manage_buy_offer,
|
56
|
+
switch :manage_data, :manage_data_op
|
57
|
+
switch :bump_sequence, :bump_sequence_op
|
58
|
+
switch :manage_buy_offer, :manage_buy_offer_op
|
59
|
+
switch :path_payment_strict_send, :path_payment_strict_send_op
|
57
60
|
|
58
|
-
attribute :create_account_op,
|
59
|
-
attribute :payment_op,
|
60
|
-
attribute :
|
61
|
-
attribute :manage_sell_offer_op,
|
62
|
-
attribute :create_passive_sell_offer_op,
|
63
|
-
attribute :set_options_op,
|
64
|
-
attribute :change_trust_op,
|
65
|
-
attribute :allow_trust_op,
|
66
|
-
attribute :destination,
|
67
|
-
attribute :manage_data_op,
|
68
|
-
attribute :bump_sequence_op,
|
69
|
-
attribute :manage_buy_offer_op,
|
61
|
+
attribute :create_account_op, CreateAccountOp
|
62
|
+
attribute :payment_op, PaymentOp
|
63
|
+
attribute :path_payment_strict_receive_op, PathPaymentStrictReceiveOp
|
64
|
+
attribute :manage_sell_offer_op, ManageSellOfferOp
|
65
|
+
attribute :create_passive_sell_offer_op, CreatePassiveSellOfferOp
|
66
|
+
attribute :set_options_op, SetOptionsOp
|
67
|
+
attribute :change_trust_op, ChangeTrustOp
|
68
|
+
attribute :allow_trust_op, AllowTrustOp
|
69
|
+
attribute :destination, AccountID
|
70
|
+
attribute :manage_data_op, ManageDataOp
|
71
|
+
attribute :bump_sequence_op, BumpSequenceOp
|
72
|
+
attribute :manage_buy_offer_op, ManageBuyOfferOp
|
73
|
+
attribute :path_payment_strict_send_op, PathPaymentStrictSendOp
|
70
74
|
end
|
71
75
|
end
|
72
76
|
end
|
@@ -14,8 +14,8 @@ require 'xdr'
|
|
14
14
|
# CreateAccountResult createAccountResult;
|
15
15
|
# case PAYMENT:
|
16
16
|
# PaymentResult paymentResult;
|
17
|
-
# case
|
18
|
-
#
|
17
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
18
|
+
# PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
|
19
19
|
# case MANAGE_SELL_OFFER:
|
20
20
|
# ManageSellOfferResult manageSellOfferResult;
|
21
21
|
# case CREATE_PASSIVE_SELL_OFFER:
|
@@ -36,6 +36,8 @@ require 'xdr'
|
|
36
36
|
# BumpSequenceResult bumpSeqResult;
|
37
37
|
# case MANAGE_BUY_OFFER:
|
38
38
|
# ManageBuyOfferResult manageBuyOfferResult;
|
39
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
40
|
+
# PathPaymentStrictSendResult pathPaymentStrictSendResult;
|
39
41
|
# }
|
40
42
|
# tr;
|
41
43
|
# default:
|
@@ -11,8 +11,8 @@ require 'xdr'
|
|
11
11
|
# CreateAccountResult createAccountResult;
|
12
12
|
# case PAYMENT:
|
13
13
|
# PaymentResult paymentResult;
|
14
|
-
# case
|
15
|
-
#
|
14
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
15
|
+
# PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult;
|
16
16
|
# case MANAGE_SELL_OFFER:
|
17
17
|
# ManageSellOfferResult manageSellOfferResult;
|
18
18
|
# case CREATE_PASSIVE_SELL_OFFER:
|
@@ -33,6 +33,8 @@ require 'xdr'
|
|
33
33
|
# BumpSequenceResult bumpSeqResult;
|
34
34
|
# case MANAGE_BUY_OFFER:
|
35
35
|
# ManageBuyOfferResult manageBuyOfferResult;
|
36
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
37
|
+
# PathPaymentStrictSendResult pathPaymentStrictSendResult;
|
36
38
|
# }
|
37
39
|
#
|
38
40
|
# ===========================================================================
|
@@ -41,33 +43,35 @@ module Stellar
|
|
41
43
|
class Tr < XDR::Union
|
42
44
|
switch_on OperationType, :type
|
43
45
|
|
44
|
-
switch :create_account,
|
45
|
-
switch :payment,
|
46
|
-
switch :
|
47
|
-
switch :manage_sell_offer,
|
48
|
-
switch :create_passive_sell_offer,
|
49
|
-
switch :set_options,
|
50
|
-
switch :change_trust,
|
51
|
-
switch :allow_trust,
|
52
|
-
switch :account_merge,
|
53
|
-
switch :inflation,
|
54
|
-
switch :manage_data,
|
55
|
-
switch :bump_sequence,
|
56
|
-
switch :manage_buy_offer,
|
46
|
+
switch :create_account, :create_account_result
|
47
|
+
switch :payment, :payment_result
|
48
|
+
switch :path_payment_strict_receive, :path_payment_strict_receive_result
|
49
|
+
switch :manage_sell_offer, :manage_sell_offer_result
|
50
|
+
switch :create_passive_sell_offer, :create_passive_sell_offer_result
|
51
|
+
switch :set_options, :set_options_result
|
52
|
+
switch :change_trust, :change_trust_result
|
53
|
+
switch :allow_trust, :allow_trust_result
|
54
|
+
switch :account_merge, :account_merge_result
|
55
|
+
switch :inflation, :inflation_result
|
56
|
+
switch :manage_data, :manage_data_result
|
57
|
+
switch :bump_sequence, :bump_seq_result
|
58
|
+
switch :manage_buy_offer, :manage_buy_offer_result
|
59
|
+
switch :path_payment_strict_send, :path_payment_strict_send_result
|
57
60
|
|
58
|
-
attribute :create_account_result,
|
59
|
-
attribute :payment_result,
|
60
|
-
attribute :
|
61
|
-
attribute :manage_sell_offer_result,
|
62
|
-
attribute :create_passive_sell_offer_result,
|
63
|
-
attribute :set_options_result,
|
64
|
-
attribute :change_trust_result,
|
65
|
-
attribute :allow_trust_result,
|
66
|
-
attribute :account_merge_result,
|
67
|
-
attribute :inflation_result,
|
68
|
-
attribute :manage_data_result,
|
69
|
-
attribute :bump_seq_result,
|
70
|
-
attribute :manage_buy_offer_result,
|
61
|
+
attribute :create_account_result, CreateAccountResult
|
62
|
+
attribute :payment_result, PaymentResult
|
63
|
+
attribute :path_payment_strict_receive_result, PathPaymentStrictReceiveResult
|
64
|
+
attribute :manage_sell_offer_result, ManageSellOfferResult
|
65
|
+
attribute :create_passive_sell_offer_result, ManageSellOfferResult
|
66
|
+
attribute :set_options_result, SetOptionsResult
|
67
|
+
attribute :change_trust_result, ChangeTrustResult
|
68
|
+
attribute :allow_trust_result, AllowTrustResult
|
69
|
+
attribute :account_merge_result, AccountMergeResult
|
70
|
+
attribute :inflation_result, InflationResult
|
71
|
+
attribute :manage_data_result, ManageDataResult
|
72
|
+
attribute :bump_seq_result, BumpSequenceResult
|
73
|
+
attribute :manage_buy_offer_result, ManageBuyOfferResult
|
74
|
+
attribute :path_payment_strict_send_result, PathPaymentStrictSendResult
|
71
75
|
end
|
72
76
|
end
|
73
77
|
end
|
@@ -9,7 +9,7 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# CREATE_ACCOUNT = 0,
|
11
11
|
# PAYMENT = 1,
|
12
|
-
#
|
12
|
+
# PATH_PAYMENT_STRICT_RECEIVE = 2,
|
13
13
|
# MANAGE_SELL_OFFER = 3,
|
14
14
|
# CREATE_PASSIVE_SELL_OFFER = 4,
|
15
15
|
# SET_OPTIONS = 5,
|
@@ -19,25 +19,27 @@ require 'xdr'
|
|
19
19
|
# INFLATION = 9,
|
20
20
|
# MANAGE_DATA = 10,
|
21
21
|
# BUMP_SEQUENCE = 11,
|
22
|
-
# MANAGE_BUY_OFFER = 12
|
22
|
+
# MANAGE_BUY_OFFER = 12,
|
23
|
+
# PATH_PAYMENT_STRICT_SEND = 13
|
23
24
|
# };
|
24
25
|
#
|
25
26
|
# ===========================================================================
|
26
27
|
module Stellar
|
27
28
|
class OperationType < XDR::Enum
|
28
|
-
member :create_account,
|
29
|
-
member :payment,
|
30
|
-
member :
|
31
|
-
member :manage_sell_offer,
|
32
|
-
member :create_passive_sell_offer,
|
33
|
-
member :set_options,
|
34
|
-
member :change_trust,
|
35
|
-
member :allow_trust,
|
36
|
-
member :account_merge,
|
37
|
-
member :inflation,
|
38
|
-
member :manage_data,
|
39
|
-
member :bump_sequence,
|
40
|
-
member :manage_buy_offer,
|
29
|
+
member :create_account, 0
|
30
|
+
member :payment, 1
|
31
|
+
member :path_payment_strict_receive, 2
|
32
|
+
member :manage_sell_offer, 3
|
33
|
+
member :create_passive_sell_offer, 4
|
34
|
+
member :set_options, 5
|
35
|
+
member :change_trust, 6
|
36
|
+
member :allow_trust, 7
|
37
|
+
member :account_merge, 8
|
38
|
+
member :inflation, 9
|
39
|
+
member :manage_data, 10
|
40
|
+
member :bump_sequence, 11
|
41
|
+
member :manage_buy_offer, 12
|
42
|
+
member :path_payment_strict_send, 13
|
41
43
|
|
42
44
|
seal
|
43
45
|
end
|