stellar-base 0.22.0 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +0 -4
- data/generated/stellar-base-generated.rb +10 -1
- 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 +1 -1
- 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/muxed_account.rb +35 -0
- data/generated/stellar/muxed_account/med25519.rb +22 -0
- data/generated/stellar/operation.rb +3 -3
- data/generated/stellar/operation/body.rb +2 -2
- data/generated/stellar/operation_result.rb +1 -1
- data/generated/stellar/operation_result/tr.rb +1 -1
- data/generated/stellar/operation_result_code.rb +3 -3
- data/generated/stellar/path_payment_strict_receive_op.rb +4 -4
- data/generated/stellar/path_payment_strict_receive_result_code.rb +21 -12
- data/generated/stellar/path_payment_strict_send_op.rb +6 -6
- data/generated/stellar/path_payment_strict_send_result_code.rb +20 -12
- data/generated/stellar/payment_op.rb +4 -4
- data/generated/stellar/survey_response_body.rb +2 -2
- data/generated/stellar/transaction.rb +2 -2
- data/generated/stellar/transaction_envelope.rb +17 -8
- 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_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/lib/stellar-base.rb +27 -25
- 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 +421 -416
- data/lib/stellar/path_payment_strict_receive_result.rb +1 -2
- 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 +169 -195
- data/lib/stellar/transaction_builder.rb +59 -25
- data/lib/stellar/transaction_envelope.rb +40 -8
- data/lib/stellar/transaction_v0.rb +51 -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 +35 -204
- data/.gitignore +0 -17
- data/.travis.yml +0 -16
- data/.yardopts +0 -8
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -9
- 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/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 -131
- data/spec/lib/stellar/path_payment_strict_receive_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_builder_spec.rb +0 -263
- data/spec/lib/stellar/transaction_envelope_spec.rb +0 -93
- data/spec/lib/stellar/transaction_spec.rb +0 -132
- 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 -372
- data/xdr/Stellar-overlay.x +0 -229
- data/xdr/Stellar-transaction.x +0 -901
- 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: ee7c9178d44b90ea76adef982ec44927775101498a500fa0a00c7ec628bbffa9
|
4
|
+
data.tar.gz: 8135ebe14a37dcb84ae903bd428b038037f1a9feb35460265fac86f3f6c489a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c4b5b21650d187486994c7e22db39b1a7812897e2872492b7955b77843783087adfc7440b18cbc58f00e1c569075a05f6fa8c2a1801789a240b6ef71f011819
|
7
|
+
data.tar.gz: 69a634ed5af1faaa4b81ed9bc07da4977618435f8f1ec4c42e39d039ab12362dd76f27bd00eaf1cdf5bda66d2fdabf172b81cba423e554bddea94d8eeb1bc2a7
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,18 @@ 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.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.23.0) - 2020-06-18
|
10
|
+
### Added
|
11
|
+
- Transaction builder now builds V1 transactions
|
12
|
+
- FeeBumpTransaction can wrap V0 transaction
|
13
|
+
|
14
|
+
## [0.23.0](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.0...v0.22.0) - 2020-06-11
|
15
|
+
### Added
|
16
|
+
- Stellar Protocol 13 support
|
17
|
+
- Fee-Bump transactions ([CAP-0015](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md))
|
18
|
+
- Multiplexed accounts ([CAP-0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md))
|
19
|
+
- Fine-Grained control on trustline authorization ([CAP-0018](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0018.md))
|
20
|
+
|
9
21
|
## [0.22.0](https://github.com/stellar/ruby-stellar-base/compare/v0.21.0...v0.22.0) - 2020-03-26
|
10
22
|
### Added
|
11
23
|
- Add TransactionBuilder ([#54](https://github.com/stellar/ruby-stellar-base/issues/54))
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -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,6 +61,7 @@ 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
|
@@ -79,9 +81,14 @@ module Stellar
|
|
79
81
|
autoload :Memo
|
80
82
|
autoload :TimeBounds
|
81
83
|
MAX_OPS_PER_TX = 100
|
84
|
+
autoload :TransactionV0
|
85
|
+
autoload :TransactionV0Envelope
|
82
86
|
autoload :Transaction
|
83
|
-
autoload :
|
87
|
+
autoload :TransactionV1Envelope
|
88
|
+
autoload :FeeBumpTransaction
|
89
|
+
autoload :FeeBumpTransactionEnvelope
|
84
90
|
autoload :TransactionEnvelope
|
91
|
+
autoload :TransactionSignaturePayload
|
85
92
|
autoload :ClaimOfferAtom
|
86
93
|
autoload :CreateAccountResultCode
|
87
94
|
autoload :CreateAccountResult
|
@@ -116,6 +123,8 @@ module Stellar
|
|
116
123
|
autoload :OperationResultCode
|
117
124
|
autoload :OperationResult
|
118
125
|
autoload :TransactionResultCode
|
126
|
+
autoload :InnerTransactionResult
|
127
|
+
autoload :InnerTransactionResultPair
|
119
128
|
autoload :TransactionResult
|
120
129
|
end
|
121
130
|
module Stellar
|
@@ -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
|
@@ -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 FeeBumpTransaction
|
17
|
+
class Ext < XDR::Union
|
18
|
+
switch_on XDR::Int, :v
|
19
|
+
|
20
|
+
switch 0
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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 (EnvelopeType type)
|
9
|
+
# {
|
10
|
+
# case ENVELOPE_TYPE_TX:
|
11
|
+
# TransactionV1Envelope v1;
|
12
|
+
# }
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class FeeBumpTransaction
|
17
|
+
class InnerTx < XDR::Union
|
18
|
+
switch_on EnvelopeType, :type
|
19
|
+
|
20
|
+
switch :envelope_type_tx, :v1
|
21
|
+
|
22
|
+
attribute :v1, TransactionV1Envelope
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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 FeeBumpTransactionEnvelope
|
9
|
+
# {
|
10
|
+
# FeeBumpTransaction tx;
|
11
|
+
# /* Each decorated signature is a signature over the SHA256 hash of
|
12
|
+
# * a TransactionSignaturePayload */
|
13
|
+
# DecoratedSignature signatures<20>;
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class FeeBumpTransactionEnvelope < XDR::Struct
|
19
|
+
attribute :tx, FeeBumpTransaction
|
20
|
+
attribute :signatures, XDR::VarArray[DecoratedSignature, 20]
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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 InnerTransactionResult
|
9
|
+
# {
|
10
|
+
# // Always 0. Here for binary compatibility.
|
11
|
+
# int64 feeCharged;
|
12
|
+
#
|
13
|
+
# union switch (TransactionResultCode code)
|
14
|
+
# {
|
15
|
+
# // txFEE_BUMP_INNER_SUCCESS is not included
|
16
|
+
# case txSUCCESS:
|
17
|
+
# case txFAILED:
|
18
|
+
# OperationResult results<>;
|
19
|
+
# case txTOO_EARLY:
|
20
|
+
# case txTOO_LATE:
|
21
|
+
# case txMISSING_OPERATION:
|
22
|
+
# case txBAD_SEQ:
|
23
|
+
# case txBAD_AUTH:
|
24
|
+
# case txINSUFFICIENT_BALANCE:
|
25
|
+
# case txNO_ACCOUNT:
|
26
|
+
# case txINSUFFICIENT_FEE:
|
27
|
+
# case txBAD_AUTH_EXTRA:
|
28
|
+
# case txINTERNAL_ERROR:
|
29
|
+
# case txNOT_SUPPORTED:
|
30
|
+
# // txFEE_BUMP_INNER_FAILED is not included
|
31
|
+
# void;
|
32
|
+
# }
|
33
|
+
# result;
|
34
|
+
#
|
35
|
+
# // reserved for future use
|
36
|
+
# union switch (int v)
|
37
|
+
# {
|
38
|
+
# case 0:
|
39
|
+
# void;
|
40
|
+
# }
|
41
|
+
# ext;
|
42
|
+
# };
|
43
|
+
#
|
44
|
+
# ===========================================================================
|
45
|
+
module Stellar
|
46
|
+
class InnerTransactionResult < XDR::Struct
|
47
|
+
include XDR::Namespace
|
48
|
+
|
49
|
+
autoload :Result
|
50
|
+
autoload :Ext
|
51
|
+
|
52
|
+
attribute :fee_charged, Int64
|
53
|
+
attribute :result, Result
|
54
|
+
attribute :ext, Ext
|
55
|
+
end
|
56
|
+
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 InnerTransactionResult
|
17
|
+
class Ext < XDR::Union
|
18
|
+
switch_on XDR::Int, :v
|
19
|
+
|
20
|
+
switch 0
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 (TransactionResultCode code)
|
9
|
+
# {
|
10
|
+
# // txFEE_BUMP_INNER_SUCCESS is not included
|
11
|
+
# case txSUCCESS:
|
12
|
+
# case txFAILED:
|
13
|
+
# OperationResult results<>;
|
14
|
+
# case txTOO_EARLY:
|
15
|
+
# case txTOO_LATE:
|
16
|
+
# case txMISSING_OPERATION:
|
17
|
+
# case txBAD_SEQ:
|
18
|
+
# case txBAD_AUTH:
|
19
|
+
# case txINSUFFICIENT_BALANCE:
|
20
|
+
# case txNO_ACCOUNT:
|
21
|
+
# case txINSUFFICIENT_FEE:
|
22
|
+
# case txBAD_AUTH_EXTRA:
|
23
|
+
# case txINTERNAL_ERROR:
|
24
|
+
# case txNOT_SUPPORTED:
|
25
|
+
# // txFEE_BUMP_INNER_FAILED is not included
|
26
|
+
# void;
|
27
|
+
# }
|
28
|
+
#
|
29
|
+
# ===========================================================================
|
30
|
+
module Stellar
|
31
|
+
class InnerTransactionResult
|
32
|
+
class Result < XDR::Union
|
33
|
+
switch_on TransactionResultCode, :code
|
34
|
+
|
35
|
+
switch :tx_success, :results
|
36
|
+
switch :tx_failed, :results
|
37
|
+
switch :tx_too_early
|
38
|
+
switch :tx_too_late
|
39
|
+
switch :tx_missing_operation
|
40
|
+
switch :tx_bad_seq
|
41
|
+
switch :tx_bad_auth
|
42
|
+
switch :tx_insufficient_balance
|
43
|
+
switch :tx_no_account
|
44
|
+
switch :tx_insufficient_fee
|
45
|
+
switch :tx_bad_auth_extra
|
46
|
+
switch :tx_internal_error
|
47
|
+
switch :tx_not_supported
|
48
|
+
|
49
|
+
attribute :results, XDR::VarArray[OperationResult]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|