stellar-base 0.20.0 → 0.23.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -21
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +2 -3
- data/generated/stellar-base-generated.rb +31 -4
- data/generated/stellar/allow_trust_op.rb +3 -2
- data/generated/stellar/authenticated_message.rb +4 -4
- data/generated/stellar/authenticated_message/v0.rb +4 -4
- data/generated/stellar/change_trust_result_code.rb +1 -1
- data/generated/stellar/crypto_key_type.rb +8 -4
- data/generated/stellar/curve25519_public.rb +1 -1
- data/generated/stellar/curve25519_secret.rb +1 -1
- data/generated/stellar/envelope_type.rb +9 -5
- data/generated/stellar/fee_bump_transaction.rb +39 -0
- data/generated/stellar/fee_bump_transaction/ext.rb +24 -0
- data/generated/stellar/fee_bump_transaction/inner_tx.rb +25 -0
- data/generated/stellar/fee_bump_transaction_envelope.rb +22 -0
- data/generated/stellar/hmac_sha256_key.rb +1 -1
- data/generated/stellar/hmac_sha256_mac.rb +1 -1
- data/generated/stellar/inner_transaction_result.rb +56 -0
- data/generated/stellar/inner_transaction_result/ext.rb +24 -0
- data/generated/stellar/inner_transaction_result/result.rb +52 -0
- data/generated/stellar/inner_transaction_result_pair.rb +20 -0
- data/generated/stellar/ledger_close_meta.rb +23 -0
- data/generated/stellar/ledger_close_meta_v0.rb +35 -0
- data/generated/stellar/manage_buy_offer_result_code.rb +5 -4
- data/generated/stellar/manage_sell_offer_result_code.rb +12 -8
- data/generated/stellar/message_type.rb +6 -1
- data/generated/stellar/muxed_account.rb +35 -0
- data/generated/stellar/muxed_account/med25519.rb +22 -0
- data/generated/stellar/operation.rb +7 -5
- data/generated/stellar/operation/body.rb +31 -27
- data/generated/stellar/operation_result.rb +5 -3
- data/generated/stellar/operation_result/tr.rb +33 -29
- data/generated/stellar/operation_result_code.rb +3 -3
- data/generated/stellar/operation_type.rb +17 -15
- data/generated/stellar/{path_payment_op.rb → path_payment_strict_receive_op.rb} +6 -6
- 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 +56 -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 +55 -0
- data/generated/stellar/payment_op.rb +4 -4
- data/generated/stellar/peer_stats.rb +48 -0
- data/generated/stellar/signed_survey_request_message.rb +20 -0
- data/generated/stellar/signed_survey_response_message.rb +20 -0
- data/generated/stellar/stellar_message.rb +22 -12
- data/generated/stellar/survey_message_command_type.rb +20 -0
- data/generated/stellar/survey_request_message.rb +26 -0
- data/generated/stellar/survey_response_body.rb +23 -0
- data/generated/stellar/survey_response_message.rb +26 -0
- data/generated/stellar/topology_response_body.rb +25 -0
- data/generated/stellar/transaction.rb +2 -2
- data/generated/stellar/transaction_envelope.rb +17 -8
- data/generated/stellar/transaction_meta.rb +4 -0
- data/generated/stellar/transaction_meta_v2.rb +24 -0
- data/generated/stellar/transaction_result.rb +3 -0
- data/generated/stellar/transaction_result/result.rb +9 -3
- data/generated/stellar/transaction_result_code.rb +21 -14
- data/generated/stellar/transaction_result_meta.rb +22 -0
- data/generated/stellar/transaction_signature_payload.rb +3 -1
- data/generated/stellar/transaction_signature_payload/tagged_transaction.rb +7 -3
- data/generated/stellar/transaction_v0.rb +39 -0
- data/generated/stellar/transaction_v0/ext.rb +24 -0
- data/generated/stellar/transaction_v0_envelope.rb +22 -0
- data/generated/stellar/transaction_v1_envelope.rb +22 -0
- data/generated/stellar/trust_line_flags.rb +6 -2
- data/generated/stellar/upgrade_entry_meta.rb +20 -0
- data/lib/stellar-base.rb +27 -24
- data/lib/stellar/account_flags.rb +2 -4
- data/lib/stellar/asset.rb +6 -6
- data/lib/stellar/base.rb +1 -1
- data/lib/stellar/{base/compat.rb → compat.rb} +6 -7
- data/lib/stellar/concerns/transaction.rb +49 -0
- data/lib/stellar/convert.rb +2 -2
- data/lib/stellar/factories.rb +1 -3
- data/lib/stellar/fee_bump_transaction.rb +21 -0
- data/lib/stellar/key_pair.rb +9 -6
- data/lib/stellar/networks.rb +5 -7
- data/lib/stellar/operation.rb +427 -336
- data/lib/stellar/{path_payment_result.rb → path_payment_strict_receive_result.rb} +2 -3
- data/lib/stellar/price.rb +2 -4
- data/lib/stellar/signer_key.rb +4 -8
- data/lib/stellar/thresholds.rb +5 -7
- data/lib/stellar/transaction.rb +154 -175
- data/lib/stellar/transaction_builder.rb +149 -0
- data/lib/stellar/transaction_envelope.rb +40 -8
- data/lib/stellar/transaction_v0.rb +39 -0
- data/lib/stellar/util/continued_fraction.rb +19 -19
- data/lib/stellar/util/strkey.rb +39 -14
- data/lib/stellar/{base/version.rb → version.rb} +1 -1
- metadata +61 -211
- data/.gitignore +0 -17
- data/.travis.yml +0 -16
- data/.yardopts +0 -8
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -15
- data/Guardfile +0 -5
- data/Rakefile +0 -4
- data/examples/allow_trust.rb +0 -51
- data/examples/create_account.rb +0 -26
- data/examples/low_level_transaction_post.rb +0 -46
- data/examples/mid_level_transaction_post.rb +0 -33
- data/examples/non_native_payment.rb +0 -60
- data/examples/offer.rb +0 -75
- data/examples/transaction_merge.rb +0 -23
- data/generated/stellar/path_payment_result_code.rb +0 -47
- data/ruby-stellar-base.gemspec +0 -34
- data/spec/lib/stellar/account_flags_spec.rb +0 -19
- data/spec/lib/stellar/asset_spec.rb +0 -45
- data/spec/lib/stellar/convert_spec.rb +0 -61
- data/spec/lib/stellar/key_pair_spec.rb +0 -251
- data/spec/lib/stellar/networks_spec.rb +0 -77
- data/spec/lib/stellar/operation_spec.rb +0 -71
- data/spec/lib/stellar/path_payment_result_spec.rb +0 -95
- data/spec/lib/stellar/price_spec.rb +0 -34
- data/spec/lib/stellar/signer_key_spec.rb +0 -26
- data/spec/lib/stellar/thresholds_spec.rb +0 -62
- data/spec/lib/stellar/transaction_envelope_spec.rb +0 -93
- data/spec/lib/stellar/transaction_spec.rb +0 -100
- data/spec/lib/stellar/util/strkey_spec.rb +0 -54
- data/spec/spec_helper.rb +0 -16
- data/spec/support/matchers/be_strkey.rb +0 -9
- data/spec/support/matchers/eq_bytes.rb +0 -5
- data/spec/support/matchers/have_length.rb +0 -5
- data/tasks/rspec.rake +0 -6
- data/tasks/travis.rake +0 -1
- data/tasks/xdr.rake +0 -45
- data/xdr/Stellar-SCP.x +0 -86
- data/xdr/Stellar-ledger-entries.x +0 -295
- data/xdr/Stellar-ledger.x +0 -318
- data/xdr/Stellar-overlay.x +0 -146
- data/xdr/Stellar-transaction.x +0 -834
- data/xdr/Stellar-types.x +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f64a35c5eb47bfa8040c4486337eda24bab4016e9009aae6efc0bf7e177c919
|
4
|
+
data.tar.gz: 835b73de784daaeca652261baff0f2aff22606e465308954938f2ca41773cc95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae8f2a920a9084610976de5efa719e37a32d9d8a1221ecb071a7d9ab85f8af026e9a6ac8bbb2b149a8265877bee28ed83fc175ead0f1203d93728ddb302d0dd2
|
7
|
+
data.tar.gz: d916c3ef5da72b34f32fa274bfe94206a0b6ee6b8dc2dd2a7a1585534be58b753b3ea3f4a832bc671577700b0fb2d1fcc66ac9f5d955d34f00444492503db199
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,21 @@ 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.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
|
10
|
+
### Added
|
11
|
+
- Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- Regenerate XDR files ([#57](https://github.com/stellar/ruby-stellar-base/issues/57))
|
15
|
+
- Allow asset objects to be passed instead of list of parameters ([#59](https://github.com/stellar/ruby-stellar-base/issues/59))
|
16
|
+
|
17
|
+
## [0.21.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.20.0...v0.21.0) - 2019-10-04
|
18
|
+
### Changed
|
19
|
+
- [Stellar Protocol 12 compatibility](https://github.com/bloom-solutions/ruby-stellar-base/pull/51).
|
20
|
+
- XDR changes for path payment
|
21
|
+
- constant renames, which may cause breaking changes if referred to directly
|
22
|
+
|
23
|
+
## [0.20.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.19.0...v0.20.0) - 2019-05-22
|
10
24
|
### Added
|
11
25
|
- Stellar Protocol 11 compatibility (#48)
|
12
26
|
- XDR changes for [CAP-0006 Buy Offers](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0006.md)
|
@@ -15,13 +29,13 @@ bumps. A breaking change will get clearly notified in this log.
|
|
15
29
|
|
16
30
|
### Changed
|
17
31
|
- 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
|
32
|
+
- Add an option to pass the exact stellar-core revision into `xdr:update` Rake task
|
19
33
|
|
20
|
-
## [0.19.0](https://github.com/
|
34
|
+
## [0.19.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.18.0...v0.19.0)
|
21
35
|
### Changed
|
22
36
|
- Loosen ActiveSupport to >= 5.0.0
|
23
37
|
|
24
|
-
## [0.18.0](https://github.com/
|
38
|
+
## [0.18.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.17.0...v0.18.0)
|
25
39
|
### Added
|
26
40
|
- 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
41
|
- Add factories for ledger, transaction, operation.
|
@@ -29,11 +43,11 @@ bumps. A breaking change will get clearly notified in this log.
|
|
29
43
|
### Changed
|
30
44
|
- Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
|
31
45
|
|
32
|
-
## [0.17.0](https://github.com/
|
46
|
+
## [0.17.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.16.0...v0.17.0)
|
33
47
|
### Fixed
|
34
48
|
- Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
|
35
49
|
|
36
|
-
## [0.16.0](https://github.com/
|
50
|
+
## [0.16.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.15.0...v0.16.0)
|
37
51
|
### Added
|
38
52
|
- Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
|
39
53
|
- Merge two transactions with `Stellar::TransactionEnvelope#merge`
|
@@ -41,14 +55,14 @@ bumps. A breaking change will get clearly notified in this log.
|
|
41
55
|
### Fixed
|
42
56
|
- Source account overriding in Stellar::Transaction#to_operations
|
43
57
|
|
44
|
-
## [0.15.0](https://github.com/
|
58
|
+
## [0.15.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.14.0...v0.15.0)
|
45
59
|
### Added
|
46
60
|
- `Stellar::Operation.change_trust` can accept `Stellar::Asset` instance for `line`
|
47
61
|
|
48
62
|
### Fixed
|
49
63
|
- Protect `Stellar::Operation.change_trust` against malicious arguments, in the event that developers pass this argument directly from user input
|
50
64
|
|
51
|
-
## [0.14.0](https://github.com/
|
65
|
+
## [0.14.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.13.0...v0.14.0)
|
52
66
|
|
53
67
|
### Added
|
54
68
|
- We now support the bump sequence operation with `Operation.bump_sequence`.
|
@@ -58,7 +72,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
58
72
|
- `Operation.change_trust` learned how to use a default for the `:limit` parameter
|
59
73
|
- `StrKey` learned about new version bytes `pre_auth_tx` and `hash_x`
|
60
74
|
|
61
|
-
## [0.13.0](https://github.com/
|
75
|
+
## [0.13.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.12.0...v0.13.0)
|
62
76
|
|
63
77
|
### Changed
|
64
78
|
- Update XDR definitions for stellar-core 0.9.1 support
|
@@ -66,7 +80,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
66
80
|
### Added
|
67
81
|
- Added `#signer_key` helper to `KeyPair`
|
68
82
|
|
69
|
-
## [0.12.0](https://github.com/
|
83
|
+
## [0.12.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.11.0...v0.12.0)
|
70
84
|
|
71
85
|
### Changed
|
72
86
|
- Avoid modifying $LOAD_PATH to fix load order issues
|
@@ -76,7 +90,7 @@ bumps. A breaking change will get clearly notified in this log.
|
|
76
90
|
|
77
91
|
- BREAKING CHANGE: Removed support for JRuby.
|
78
92
|
|
79
|
-
## [0.11.0](https://github.com/
|
93
|
+
## [0.11.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.10.0...v0.11.0)
|
80
94
|
|
81
95
|
### Added
|
82
96
|
- Added support for `manage_data` operations
|
@@ -84,48 +98,48 @@ bumps. A breaking change will get clearly notified in this log.
|
|
84
98
|
### Changed
|
85
99
|
- `Stellar::Transaction#to_envelope` can now be used without arguments, returning a `Stellar::TransactionEnvelope` with zero signatures.
|
86
100
|
|
87
|
-
## [0.10.0](https://github.com/
|
101
|
+
## [0.10.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.9.0...v0.10.0)
|
88
102
|
|
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.
|
103
|
+
- 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
104
|
|
91
|
-
## [0.9.0](https://github.com/
|
105
|
+
## [0.9.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.8.0...v0.9.0)
|
92
106
|
|
93
107
|
### Changed
|
94
108
|
- XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
|
95
109
|
|
96
|
-
## [0.8.0](https://github.com/
|
110
|
+
## [0.8.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.7.0...v0.8.0)
|
97
111
|
|
98
112
|
### Changed
|
99
|
-
- BREAKING CHANGE: The default network for this library is now the stellar test network.
|
113
|
+
- BREAKING CHANGE: The default network for this library is now the stellar test network.
|
100
114
|
To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
|
101
115
|
at the head of your script or in your configuration function.
|
102
116
|
|
103
|
-
## [0.7.0](https://github.com/
|
117
|
+
## [0.7.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.1...v0.7.0)
|
104
118
|
|
105
119
|
### Changed
|
106
120
|
|
107
121
|
- Bump xdr dependency to 1.0.0
|
108
122
|
|
109
|
-
## [0.6.1](https://github.com/
|
123
|
+
## [0.6.1](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.6.0...v0.6.1)
|
110
124
|
|
111
125
|
### Changed
|
112
126
|
|
113
127
|
- Update default fee for transactions to new minimum of 100 stroops
|
114
128
|
|
115
129
|
|
116
|
-
## [0.6.0](https://github.com/
|
130
|
+
## [0.6.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.5.0...v0.6.0)
|
117
131
|
|
118
132
|
### Changed
|
119
133
|
|
120
134
|
- Update to latest xdr (stellar-core commit ad22bccafbbc14a358f05a989f7b95714dc9d4c6)
|
121
135
|
|
122
|
-
## [0.5.0](https://github.com/
|
136
|
+
## [0.5.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.4.0...v0.5.0)
|
123
137
|
|
124
138
|
### Changed
|
125
139
|
|
126
140
|
- Update to latest xdr
|
127
141
|
|
128
|
-
## [0.4.0](https://github.com/
|
142
|
+
## [0.4.0](https://github.com/bloom-solutions/ruby-stellar-base/compare/v0.3.0...v0.4.0)
|
129
143
|
|
130
144
|
### Changed
|
131
145
|
- BREAKING CHANGE: "Amounts", that is, input parameters that represent a
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -12,15 +12,14 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
```ruby
|
14
14
|
gem 'stellar-base'
|
15
|
+
gem 'xdr', git: 'https://github.com/stellar/ruby-xdr.git', tag: 'v3.0.1'
|
15
16
|
```
|
16
17
|
|
17
18
|
And then execute:
|
18
19
|
|
19
20
|
$ bundle
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
$ gem install stellar-base
|
22
|
+
**Note** we need to add such explicit xdr dependency, because version 3.0.1 is not on RubyGems yet. When it's published, you can remove this line
|
24
23
|
|
25
24
|
Also requires libsodium. Installable via `brew install libsodium` on OS X.
|
26
25
|
|
@@ -49,6 +49,7 @@ module Stellar
|
|
49
49
|
autoload :AccountEntry
|
50
50
|
autoload :TrustLineFlags
|
51
51
|
MASK_TRUSTLINE_FLAGS = 1
|
52
|
+
MASK_TRUSTLINE_FLAGS_V13 = 3
|
52
53
|
autoload :TrustLineEntry
|
53
54
|
autoload :OfferEntryFlags
|
54
55
|
MASK_OFFERENTRY_FLAGS = 1
|
@@ -60,11 +61,13 @@ end
|
|
60
61
|
module Stellar
|
61
62
|
include XDR::Namespace
|
62
63
|
|
64
|
+
autoload :MuxedAccount
|
63
65
|
autoload :DecoratedSignature
|
64
66
|
autoload :OperationType
|
65
67
|
autoload :CreateAccountOp
|
66
68
|
autoload :PaymentOp
|
67
|
-
autoload :
|
69
|
+
autoload :PathPaymentStrictReceiveOp
|
70
|
+
autoload :PathPaymentStrictSendOp
|
68
71
|
autoload :ManageSellOfferOp
|
69
72
|
autoload :ManageBuyOfferOp
|
70
73
|
autoload :CreatePassiveSellOfferOp
|
@@ -78,17 +81,24 @@ module Stellar
|
|
78
81
|
autoload :Memo
|
79
82
|
autoload :TimeBounds
|
80
83
|
MAX_OPS_PER_TX = 100
|
84
|
+
autoload :TransactionV0
|
85
|
+
autoload :TransactionV0Envelope
|
81
86
|
autoload :Transaction
|
82
|
-
autoload :
|
87
|
+
autoload :TransactionV1Envelope
|
88
|
+
autoload :FeeBumpTransaction
|
89
|
+
autoload :FeeBumpTransactionEnvelope
|
83
90
|
autoload :TransactionEnvelope
|
91
|
+
autoload :TransactionSignaturePayload
|
84
92
|
autoload :ClaimOfferAtom
|
85
93
|
autoload :CreateAccountResultCode
|
86
94
|
autoload :CreateAccountResult
|
87
95
|
autoload :PaymentResultCode
|
88
96
|
autoload :PaymentResult
|
89
|
-
autoload :
|
97
|
+
autoload :PathPaymentStrictReceiveResultCode
|
90
98
|
autoload :SimplePaymentResult
|
91
|
-
autoload :
|
99
|
+
autoload :PathPaymentStrictReceiveResult
|
100
|
+
autoload :PathPaymentStrictSendResultCode
|
101
|
+
autoload :PathPaymentStrictSendResult
|
92
102
|
autoload :ManageSellOfferResultCode
|
93
103
|
autoload :ManageOfferEffect
|
94
104
|
autoload :ManageOfferSuccessResult
|
@@ -113,6 +123,8 @@ module Stellar
|
|
113
123
|
autoload :OperationResultCode
|
114
124
|
autoload :OperationResult
|
115
125
|
autoload :TransactionResultCode
|
126
|
+
autoload :InnerTransactionResult
|
127
|
+
autoload :InnerTransactionResultPair
|
116
128
|
autoload :TransactionResult
|
117
129
|
end
|
118
130
|
module Stellar
|
@@ -143,7 +155,12 @@ module Stellar
|
|
143
155
|
LedgerEntryChanges = XDR::VarArray[LedgerEntryChange]
|
144
156
|
autoload :OperationMeta
|
145
157
|
autoload :TransactionMetaV1
|
158
|
+
autoload :TransactionMetaV2
|
146
159
|
autoload :TransactionMeta
|
160
|
+
autoload :TransactionResultMeta
|
161
|
+
autoload :UpgradeEntryMeta
|
162
|
+
autoload :LedgerCloseMetaV0
|
163
|
+
autoload :LedgerCloseMeta
|
147
164
|
end
|
148
165
|
module Stellar
|
149
166
|
include XDR::Namespace
|
@@ -157,6 +174,16 @@ module Stellar
|
|
157
174
|
autoload :PeerAddress
|
158
175
|
autoload :MessageType
|
159
176
|
autoload :DontHave
|
177
|
+
autoload :SurveyMessageCommandType
|
178
|
+
autoload :SurveyRequestMessage
|
179
|
+
autoload :SignedSurveyRequestMessage
|
180
|
+
EncryptedBody = XDR::VarOpaque[64000]
|
181
|
+
autoload :SurveyResponseMessage
|
182
|
+
autoload :SignedSurveyResponseMessage
|
183
|
+
autoload :PeerStats
|
184
|
+
PeerStatList = XDR::VarArray[PeerStats, 25]
|
185
|
+
autoload :TopologyResponseBody
|
186
|
+
autoload :SurveyResponseBody
|
160
187
|
autoload :StellarMessage
|
161
188
|
autoload :AuthenticatedMessage
|
162
189
|
end
|
@@ -21,7 +21,8 @@ require 'xdr'
|
|
21
21
|
# }
|
22
22
|
# asset;
|
23
23
|
#
|
24
|
-
#
|
24
|
+
# // 0, or any bitwise combination of TrustLineFlags
|
25
|
+
# uint32 authorize;
|
25
26
|
# };
|
26
27
|
#
|
27
28
|
# ===========================================================================
|
@@ -33,6 +34,6 @@ module Stellar
|
|
33
34
|
|
34
35
|
attribute :trustor, AccountID
|
35
36
|
attribute :asset, Asset
|
36
|
-
attribute :authorize,
|
37
|
+
attribute :authorize, Uint32
|
37
38
|
end
|
38
39
|
end
|
@@ -6,10 +6,10 @@ require 'xdr'
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
8
|
# struct
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# {
|
10
|
+
# uint64 sequence;
|
11
|
+
# StellarMessage message;
|
12
|
+
# HmacSha256Mac mac;
|
13
13
|
# }
|
14
14
|
#
|
15
15
|
# ===========================================================================
|
@@ -16,7 +16,7 @@ require 'xdr'
|
|
16
16
|
# // cannot create with a limit of 0
|
17
17
|
# CHANGE_TRUST_LOW_RESERVE =
|
18
18
|
# -4, // not enough funds to create a new trust line,
|
19
|
-
# CHANGE_TRUST_SELF_NOT_ALLOWED = -5
|
19
|
+
# CHANGE_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
|
20
20
|
# };
|
21
21
|
#
|
22
22
|
# ===========================================================================
|
@@ -9,15 +9,19 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# KEY_TYPE_ED25519 = 0,
|
11
11
|
# KEY_TYPE_PRE_AUTH_TX = 1,
|
12
|
-
# KEY_TYPE_HASH_X = 2
|
12
|
+
# KEY_TYPE_HASH_X = 2,
|
13
|
+
# // MUXED enum values for supported type are derived from the enum values
|
14
|
+
# // above by ORing them with 0x100
|
15
|
+
# KEY_TYPE_MUXED_ED25519 = 0x100
|
13
16
|
# };
|
14
17
|
#
|
15
18
|
# ===========================================================================
|
16
19
|
module Stellar
|
17
20
|
class CryptoKeyType < XDR::Enum
|
18
|
-
member :key_type_ed25519,
|
19
|
-
member :key_type_pre_auth_tx,
|
20
|
-
member :key_type_hash_x,
|
21
|
+
member :key_type_ed25519, 0
|
22
|
+
member :key_type_pre_auth_tx, 1
|
23
|
+
member :key_type_hash_x, 2
|
24
|
+
member :key_type_muxed_ed25519, 256
|
21
25
|
|
22
26
|
seal
|
23
27
|
end
|
@@ -7,19 +7,23 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# enum EnvelopeType
|
9
9
|
# {
|
10
|
+
# ENVELOPE_TYPE_TX_V0 = 0,
|
10
11
|
# ENVELOPE_TYPE_SCP = 1,
|
11
12
|
# ENVELOPE_TYPE_TX = 2,
|
12
13
|
# ENVELOPE_TYPE_AUTH = 3,
|
13
|
-
# ENVELOPE_TYPE_SCPVALUE = 4
|
14
|
+
# ENVELOPE_TYPE_SCPVALUE = 4,
|
15
|
+
# ENVELOPE_TYPE_TX_FEE_BUMP = 5
|
14
16
|
# };
|
15
17
|
#
|
16
18
|
# ===========================================================================
|
17
19
|
module Stellar
|
18
20
|
class EnvelopeType < XDR::Enum
|
19
|
-
member :
|
20
|
-
member :
|
21
|
-
member :
|
22
|
-
member :
|
21
|
+
member :envelope_type_tx_v0, 0
|
22
|
+
member :envelope_type_scp, 1
|
23
|
+
member :envelope_type_tx, 2
|
24
|
+
member :envelope_type_auth, 3
|
25
|
+
member :envelope_type_scpvalue, 4
|
26
|
+
member :envelope_type_tx_fee_bump, 5
|
23
27
|
|
24
28
|
seal
|
25
29
|
end
|
@@ -0,0 +1,39 @@
|
|
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 FeeBumpTransaction
|
9
|
+
# {
|
10
|
+
# MuxedAccount feeSource;
|
11
|
+
# int64 fee;
|
12
|
+
# union switch (EnvelopeType type)
|
13
|
+
# {
|
14
|
+
# case ENVELOPE_TYPE_TX:
|
15
|
+
# TransactionV1Envelope v1;
|
16
|
+
# }
|
17
|
+
# innerTx;
|
18
|
+
# union switch (int v)
|
19
|
+
# {
|
20
|
+
# case 0:
|
21
|
+
# void;
|
22
|
+
# }
|
23
|
+
# ext;
|
24
|
+
# };
|
25
|
+
#
|
26
|
+
# ===========================================================================
|
27
|
+
module Stellar
|
28
|
+
class FeeBumpTransaction < XDR::Struct
|
29
|
+
include XDR::Namespace
|
30
|
+
|
31
|
+
autoload :InnerTx
|
32
|
+
autoload :Ext
|
33
|
+
|
34
|
+
attribute :fee_source, MuxedAccount
|
35
|
+
attribute :fee, Int64
|
36
|
+
attribute :inner_tx, InnerTx
|
37
|
+
attribute :ext, Ext
|
38
|
+
end
|
39
|
+
end
|