stellar-base 0.19.0 → 0.23.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +2 -3
- data/generated/stellar-base-generated.rb +45 -8
- data/generated/stellar/allow_trust_op.rb +5 -4
- data/generated/stellar/allow_trust_op/asset.rb +4 -4
- data/generated/stellar/asset.rb +2 -2
- data/generated/stellar/asset/alpha_num12.rb +2 -2
- data/generated/stellar/asset/alpha_num4.rb +2 -2
- data/generated/stellar/authenticated_message.rb +4 -4
- data/generated/stellar/authenticated_message/v0.rb +4 -4
- data/generated/stellar/bucket_entry.rb +6 -0
- data/generated/stellar/bucket_entry_type.rb +8 -2
- data/generated/stellar/bucket_metadata.rb +32 -0
- data/generated/stellar/bucket_metadata/ext.rb +24 -0
- data/generated/stellar/claim_offer_atom.rb +2 -2
- data/generated/stellar/{create_passive_offer_op.rb → create_passive_sell_offer_op.rb} +2 -2
- 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 +10 -4
- 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/ledger_close_value_signature.rb +20 -0
- data/generated/stellar/ledger_key.rb +1 -1
- data/generated/stellar/ledger_key/offer.rb +2 -2
- data/generated/stellar/manage_buy_offer_op.rb +29 -0
- data/generated/stellar/{manage_offer_result.rb → manage_buy_offer_result.rb} +5 -5
- data/generated/stellar/manage_buy_offer_result_code.rb +51 -0
- data/generated/stellar/{manage_offer_op.rb → manage_sell_offer_op.rb} +4 -4
- data/generated/stellar/manage_sell_offer_result.rb +26 -0
- data/generated/stellar/manage_sell_offer_result_code.rb +54 -0
- 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/offer_entry.rb +2 -2
- data/generated/stellar/operation.rb +13 -9
- data/generated/stellar/operation/body.rb +37 -29
- data/generated/stellar/operation_result.rb +10 -6
- data/generated/stellar/operation_result/tr.rb +38 -30
- data/generated/stellar/operation_result_code.rb +11 -7
- data/generated/stellar/operation_type.rb +20 -16
- 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/signer.rb +1 -1
- data/generated/stellar/stellar_message.rb +22 -12
- data/generated/stellar/stellar_value.rb +7 -5
- data/generated/stellar/stellar_value/ext.rb +8 -4
- data/generated/stellar/stellar_value_type.rb +22 -0
- 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/time_bounds.rb +4 -4
- data/generated/stellar/topology_response_body.rb +25 -0
- data/generated/stellar/transaction.rb +4 -4
- data/generated/stellar/transaction_envelope.rb +17 -8
- data/generated/stellar/transaction_meta.rb +4 -0
- data/generated/stellar/transaction_meta_v1.rb +1 -1
- 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 +28 -23
- 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/compat.rb +21 -0
- 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 +428 -317
- 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 -169
- 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 +68 -210
- data/.gitignore +0 -17
- data/.travis.yml +0 -13
- data/.yardopts +0 -8
- data/CHANGELOG.md +0 -120
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -15
- data/Guardfile +0 -5
- data/Rakefile +0 -4
- 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/manage_offer_result_code.rb +0 -50
- 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 -50
- data/xdr/Stellar-SCP.x +0 -86
- data/xdr/Stellar-ledger-entries.x +0 -288
- data/xdr/Stellar-ledger.x +0 -283
- data/xdr/Stellar-overlay.x +0 -146
- data/xdr/Stellar-transaction.x +0 -777
- 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: b0374689ad0aea387b1a9364e4a4008767fee2e654434d7ed83034c183e77015
|
4
|
+
data.tar.gz: 46642a42072f2f7ad5e2ce5e8ccb9e4cff2d8991173adc1d7627b2bfa8660e5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b928d1453197e01d277f26cefec2176dd54ec7cce1d558fd4c8b828021ddec9daf2be6dc597a9836a14c6b8f88381798632894c64b098324a1b168d8650ab53e
|
7
|
+
data.tar.gz: 8fc5fdb48d02bb67e18123038a592e321fe24689ed4fb44c7913b0fb8357fc6e1b675d6e3fb96acecc1a7de512ce0cf947aaddd95ffebdd3d62a07cd0ff587f8
|
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
|
|
@@ -33,7 +33,10 @@ module Stellar
|
|
33
33
|
String32 = XDR::String[32]
|
34
34
|
String64 = XDR::String[64]
|
35
35
|
SequenceNumber = Int64
|
36
|
+
TimePoint = Uint64
|
36
37
|
DataValue = XDR::VarOpaque[64]
|
38
|
+
AssetCode4 = XDR::Opaque[4]
|
39
|
+
AssetCode12 = XDR::Opaque[12]
|
37
40
|
autoload :AssetType
|
38
41
|
autoload :Asset
|
39
42
|
autoload :Price
|
@@ -46,6 +49,7 @@ module Stellar
|
|
46
49
|
autoload :AccountEntry
|
47
50
|
autoload :TrustLineFlags
|
48
51
|
MASK_TRUSTLINE_FLAGS = 1
|
52
|
+
MASK_TRUSTLINE_FLAGS_V13 = 3
|
49
53
|
autoload :TrustLineEntry
|
50
54
|
autoload :OfferEntryFlags
|
51
55
|
MASK_OFFERENTRY_FLAGS = 1
|
@@ -57,13 +61,16 @@ end
|
|
57
61
|
module Stellar
|
58
62
|
include XDR::Namespace
|
59
63
|
|
64
|
+
autoload :MuxedAccount
|
60
65
|
autoload :DecoratedSignature
|
61
66
|
autoload :OperationType
|
62
67
|
autoload :CreateAccountOp
|
63
68
|
autoload :PaymentOp
|
64
|
-
autoload :
|
65
|
-
autoload :
|
66
|
-
autoload :
|
69
|
+
autoload :PathPaymentStrictReceiveOp
|
70
|
+
autoload :PathPaymentStrictSendOp
|
71
|
+
autoload :ManageSellOfferOp
|
72
|
+
autoload :ManageBuyOfferOp
|
73
|
+
autoload :CreatePassiveSellOfferOp
|
67
74
|
autoload :SetOptionsOp
|
68
75
|
autoload :ChangeTrustOp
|
69
76
|
autoload :AllowTrustOp
|
@@ -73,21 +80,31 @@ module Stellar
|
|
73
80
|
autoload :MemoType
|
74
81
|
autoload :Memo
|
75
82
|
autoload :TimeBounds
|
83
|
+
MAX_OPS_PER_TX = 100
|
84
|
+
autoload :TransactionV0
|
85
|
+
autoload :TransactionV0Envelope
|
76
86
|
autoload :Transaction
|
77
|
-
autoload :
|
87
|
+
autoload :TransactionV1Envelope
|
88
|
+
autoload :FeeBumpTransaction
|
89
|
+
autoload :FeeBumpTransactionEnvelope
|
78
90
|
autoload :TransactionEnvelope
|
91
|
+
autoload :TransactionSignaturePayload
|
79
92
|
autoload :ClaimOfferAtom
|
80
93
|
autoload :CreateAccountResultCode
|
81
94
|
autoload :CreateAccountResult
|
82
95
|
autoload :PaymentResultCode
|
83
96
|
autoload :PaymentResult
|
84
|
-
autoload :
|
97
|
+
autoload :PathPaymentStrictReceiveResultCode
|
85
98
|
autoload :SimplePaymentResult
|
86
|
-
autoload :
|
87
|
-
autoload :
|
99
|
+
autoload :PathPaymentStrictReceiveResult
|
100
|
+
autoload :PathPaymentStrictSendResultCode
|
101
|
+
autoload :PathPaymentStrictSendResult
|
102
|
+
autoload :ManageSellOfferResultCode
|
88
103
|
autoload :ManageOfferEffect
|
89
104
|
autoload :ManageOfferSuccessResult
|
90
|
-
autoload :
|
105
|
+
autoload :ManageSellOfferResult
|
106
|
+
autoload :ManageBuyOfferResultCode
|
107
|
+
autoload :ManageBuyOfferResult
|
91
108
|
autoload :SetOptionsResultCode
|
92
109
|
autoload :SetOptionsResult
|
93
110
|
autoload :ChangeTrustResultCode
|
@@ -106,18 +123,23 @@ module Stellar
|
|
106
123
|
autoload :OperationResultCode
|
107
124
|
autoload :OperationResult
|
108
125
|
autoload :TransactionResultCode
|
126
|
+
autoload :InnerTransactionResult
|
127
|
+
autoload :InnerTransactionResultPair
|
109
128
|
autoload :TransactionResult
|
110
129
|
end
|
111
130
|
module Stellar
|
112
131
|
include XDR::Namespace
|
113
132
|
|
114
133
|
UpgradeType = XDR::VarOpaque[128]
|
134
|
+
autoload :StellarValueType
|
135
|
+
autoload :LedgerCloseValueSignature
|
115
136
|
autoload :StellarValue
|
116
137
|
autoload :LedgerHeader
|
117
138
|
autoload :LedgerUpgradeType
|
118
139
|
autoload :LedgerUpgrade
|
119
140
|
autoload :LedgerKey
|
120
141
|
autoload :BucketEntryType
|
142
|
+
autoload :BucketMetadata
|
121
143
|
autoload :BucketEntry
|
122
144
|
autoload :TransactionSet
|
123
145
|
autoload :TransactionResultPair
|
@@ -133,7 +155,12 @@ module Stellar
|
|
133
155
|
LedgerEntryChanges = XDR::VarArray[LedgerEntryChange]
|
134
156
|
autoload :OperationMeta
|
135
157
|
autoload :TransactionMetaV1
|
158
|
+
autoload :TransactionMetaV2
|
136
159
|
autoload :TransactionMeta
|
160
|
+
autoload :TransactionResultMeta
|
161
|
+
autoload :UpgradeEntryMeta
|
162
|
+
autoload :LedgerCloseMetaV0
|
163
|
+
autoload :LedgerCloseMeta
|
137
164
|
end
|
138
165
|
module Stellar
|
139
166
|
include XDR::Namespace
|
@@ -147,6 +174,16 @@ module Stellar
|
|
147
174
|
autoload :PeerAddress
|
148
175
|
autoload :MessageType
|
149
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
|
150
187
|
autoload :StellarMessage
|
151
188
|
autoload :AuthenticatedMessage
|
152
189
|
end
|
@@ -12,16 +12,17 @@ require 'xdr'
|
|
12
12
|
# {
|
13
13
|
# // ASSET_TYPE_NATIVE is not allowed
|
14
14
|
# case ASSET_TYPE_CREDIT_ALPHANUM4:
|
15
|
-
#
|
15
|
+
# AssetCode4 assetCode4;
|
16
16
|
#
|
17
17
|
# case ASSET_TYPE_CREDIT_ALPHANUM12:
|
18
|
-
#
|
18
|
+
# AssetCode12 assetCode12;
|
19
19
|
#
|
20
20
|
# // add other asset types here in the future
|
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
|
@@ -9,10 +9,10 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# // ASSET_TYPE_NATIVE is not allowed
|
11
11
|
# case ASSET_TYPE_CREDIT_ALPHANUM4:
|
12
|
-
#
|
12
|
+
# AssetCode4 assetCode4;
|
13
13
|
#
|
14
14
|
# case ASSET_TYPE_CREDIT_ALPHANUM12:
|
15
|
-
#
|
15
|
+
# AssetCode12 assetCode12;
|
16
16
|
#
|
17
17
|
# // add other asset types here in the future
|
18
18
|
# }
|
@@ -26,8 +26,8 @@ module Stellar
|
|
26
26
|
switch :asset_type_credit_alphanum4, :asset_code4
|
27
27
|
switch :asset_type_credit_alphanum12, :asset_code12
|
28
28
|
|
29
|
-
attribute :asset_code4,
|
30
|
-
attribute :asset_code12,
|
29
|
+
attribute :asset_code4, AssetCode4
|
30
|
+
attribute :asset_code12, AssetCode12
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
data/generated/stellar/asset.rb
CHANGED
@@ -13,14 +13,14 @@ require 'xdr'
|
|
13
13
|
# case ASSET_TYPE_CREDIT_ALPHANUM4:
|
14
14
|
# struct
|
15
15
|
# {
|
16
|
-
#
|
16
|
+
# AssetCode4 assetCode;
|
17
17
|
# AccountID issuer;
|
18
18
|
# } alphaNum4;
|
19
19
|
#
|
20
20
|
# case ASSET_TYPE_CREDIT_ALPHANUM12:
|
21
21
|
# struct
|
22
22
|
# {
|
23
|
-
#
|
23
|
+
# AssetCode12 assetCode;
|
24
24
|
# AccountID issuer;
|
25
25
|
# } alphaNum12;
|
26
26
|
#
|
@@ -7,7 +7,7 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# struct
|
9
9
|
# {
|
10
|
-
#
|
10
|
+
# AssetCode12 assetCode;
|
11
11
|
# AccountID issuer;
|
12
12
|
# }
|
13
13
|
#
|
@@ -15,7 +15,7 @@ require 'xdr'
|
|
15
15
|
module Stellar
|
16
16
|
class Asset
|
17
17
|
class AlphaNum12 < XDR::Struct
|
18
|
-
attribute :asset_code,
|
18
|
+
attribute :asset_code, AssetCode12
|
19
19
|
attribute :issuer, AccountID
|
20
20
|
end
|
21
21
|
end
|
@@ -7,7 +7,7 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# struct
|
9
9
|
# {
|
10
|
-
#
|
10
|
+
# AssetCode4 assetCode;
|
11
11
|
# AccountID issuer;
|
12
12
|
# }
|
13
13
|
#
|
@@ -15,7 +15,7 @@ require 'xdr'
|
|
15
15
|
module Stellar
|
16
16
|
class Asset
|
17
17
|
class AlphaNum4 < XDR::Struct
|
18
|
-
attribute :asset_code,
|
18
|
+
attribute :asset_code, AssetCode4
|
19
19
|
attribute :issuer, AccountID
|
20
20
|
end
|
21
21
|
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
|
# ===========================================================================
|
@@ -8,10 +8,13 @@ require 'xdr'
|
|
8
8
|
# union BucketEntry switch (BucketEntryType type)
|
9
9
|
# {
|
10
10
|
# case LIVEENTRY:
|
11
|
+
# case INITENTRY:
|
11
12
|
# LedgerEntry liveEntry;
|
12
13
|
#
|
13
14
|
# case DEADENTRY:
|
14
15
|
# LedgerKey deadEntry;
|
16
|
+
# case METAENTRY:
|
17
|
+
# BucketMetadata metaEntry;
|
15
18
|
# };
|
16
19
|
#
|
17
20
|
# ===========================================================================
|
@@ -20,9 +23,12 @@ module Stellar
|
|
20
23
|
switch_on BucketEntryType, :type
|
21
24
|
|
22
25
|
switch :liveentry, :live_entry
|
26
|
+
switch :initentry, :live_entry
|
23
27
|
switch :deadentry, :dead_entry
|
28
|
+
switch :metaentry, :meta_entry
|
24
29
|
|
25
30
|
attribute :live_entry, LedgerEntry
|
26
31
|
attribute :dead_entry, LedgerKey
|
32
|
+
attribute :meta_entry, BucketMetadata
|
27
33
|
end
|
28
34
|
end
|
@@ -7,15 +7,21 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# enum BucketEntryType
|
9
9
|
# {
|
10
|
-
#
|
11
|
-
#
|
10
|
+
# METAENTRY =
|
11
|
+
# -1, // At-and-after protocol 11: bucket metadata, should come first.
|
12
|
+
# LIVEENTRY = 0, // Before protocol 11: created-or-updated;
|
13
|
+
# // At-and-after protocol 11: only updated.
|
14
|
+
# DEADENTRY = 1,
|
15
|
+
# INITENTRY = 2 // At-and-after protocol 11: only created.
|
12
16
|
# };
|
13
17
|
#
|
14
18
|
# ===========================================================================
|
15
19
|
module Stellar
|
16
20
|
class BucketEntryType < XDR::Enum
|
21
|
+
member :metaentry, -1
|
17
22
|
member :liveentry, 0
|
18
23
|
member :deadentry, 1
|
24
|
+
member :initentry, 2
|
19
25
|
|
20
26
|
seal
|
21
27
|
end
|
@@ -0,0 +1,32 @@
|
|
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 BucketMetadata
|
9
|
+
# {
|
10
|
+
# // Indicates the protocol version used to create / merge this bucket.
|
11
|
+
# uint32 ledgerVersion;
|
12
|
+
#
|
13
|
+
# // reserved for future use
|
14
|
+
# union switch (int v)
|
15
|
+
# {
|
16
|
+
# case 0:
|
17
|
+
# void;
|
18
|
+
# }
|
19
|
+
# ext;
|
20
|
+
# };
|
21
|
+
#
|
22
|
+
# ===========================================================================
|
23
|
+
module Stellar
|
24
|
+
class BucketMetadata < XDR::Struct
|
25
|
+
include XDR::Namespace
|
26
|
+
|
27
|
+
autoload :Ext
|
28
|
+
|
29
|
+
attribute :ledger_version, Uint32
|
30
|
+
attribute :ext, Ext
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,24 @@
|
|
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 switch (int v)
|
9
|
+
# {
|
10
|
+
# case 0:
|
11
|
+
# void;
|
12
|
+
# }
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class BucketMetadata
|
17
|
+
class Ext < XDR::Union
|
18
|
+
switch_on XDR::Int, :v
|
19
|
+
|
20
|
+
switch 0
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -9,7 +9,7 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# // emitted to identify the offer
|
11
11
|
# AccountID sellerID; // Account that owns the offer
|
12
|
-
#
|
12
|
+
# int64 offerID;
|
13
13
|
#
|
14
14
|
# // amount and asset taken from the owner
|
15
15
|
# Asset assetSold;
|
@@ -24,7 +24,7 @@ require 'xdr'
|
|
24
24
|
module Stellar
|
25
25
|
class ClaimOfferAtom < XDR::Struct
|
26
26
|
attribute :seller_id, AccountID
|
27
|
-
attribute :offer_id,
|
27
|
+
attribute :offer_id, Int64
|
28
28
|
attribute :asset_sold, Asset
|
29
29
|
attribute :amount_sold, Int64
|
30
30
|
attribute :asset_bought, Asset
|
@@ -5,7 +5,7 @@ require 'xdr'
|
|
5
5
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
|
-
# struct
|
8
|
+
# struct CreatePassiveSellOfferOp
|
9
9
|
# {
|
10
10
|
# Asset selling; // A
|
11
11
|
# Asset buying; // B
|
@@ -15,7 +15,7 @@ require 'xdr'
|
|
15
15
|
#
|
16
16
|
# ===========================================================================
|
17
17
|
module Stellar
|
18
|
-
class
|
18
|
+
class CreatePassiveSellOfferOp < XDR::Struct
|
19
19
|
attribute :selling, Asset
|
20
20
|
attribute :buying, Asset
|
21
21
|
attribute :amount, Int64
|