stellar-base 0.23.1 → 0.24.0.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +88 -0
- data/generated/stellar-base-generated.rb +29 -1
- data/generated/stellar/account_entry.rb +3 -13
- data/generated/stellar/account_entry/ext.rb +2 -16
- data/generated/stellar/account_entry_extension_v1.rb +32 -0
- data/generated/stellar/account_entry_extension_v1/ext.rb +28 -0
- data/generated/stellar/account_entry_extension_v2.rb +34 -0
- data/generated/stellar/{account_entry/ext/v1 → account_entry_extension_v2}/ext.rb +8 -12
- data/generated/stellar/account_merge_result_code.rb +3 -1
- data/generated/stellar/begin_sponsoring_future_reserves_op.rb +18 -0
- data/generated/stellar/begin_sponsoring_future_reserves_result.rb +25 -0
- data/generated/stellar/begin_sponsoring_future_reserves_result_code.rb +29 -0
- data/generated/stellar/claim_claimable_balance_op.rb +18 -0
- data/generated/stellar/claim_claimable_balance_result.rb +25 -0
- data/generated/stellar/claim_claimable_balance_result_code.rb +31 -0
- data/generated/stellar/claim_predicate.rb +43 -0
- data/generated/stellar/claim_predicate_type.rb +30 -0
- data/generated/stellar/claimable_balance_entry.rb +44 -0
- data/generated/stellar/claimable_balance_entry/ext.rb +24 -0
- data/generated/stellar/claimable_balance_id.rb +23 -0
- data/generated/stellar/claimable_balance_id_type.rb +20 -0
- data/generated/stellar/claimant.rb +31 -0
- data/generated/stellar/claimant/v0.rb +22 -0
- data/generated/stellar/claimant_type.rb +20 -0
- data/generated/stellar/create_claimable_balance_op.rb +22 -0
- data/generated/stellar/create_claimable_balance_result.rb +27 -0
- data/generated/stellar/create_claimable_balance_result_code.rb +30 -0
- data/generated/stellar/end_sponsoring_future_reserves_result.rb +25 -0
- data/generated/stellar/end_sponsoring_future_reserves_result_code.rb +25 -0
- data/generated/stellar/envelope_type.rb +3 -1
- data/generated/stellar/inner_transaction_result.rb +2 -1
- data/generated/stellar/inner_transaction_result/result.rb +3 -1
- data/generated/stellar/ledger_entry.rb +4 -0
- data/generated/stellar/ledger_entry/data.rb +12 -8
- data/generated/stellar/ledger_entry/ext.rb +4 -0
- data/generated/stellar/ledger_entry_extension_v1.rb +30 -0
- data/generated/stellar/ledger_entry_extension_v1/ext.rb +24 -0
- data/generated/stellar/ledger_entry_type.rb +7 -5
- data/generated/stellar/ledger_key.rb +17 -8
- data/generated/stellar/ledger_key/claimable_balance.rb +20 -0
- data/generated/stellar/operation.rb +10 -0
- data/generated/stellar/operation/body.rb +45 -26
- data/generated/stellar/operation_id.rb +32 -0
- data/generated/stellar/operation_id/id.rb +24 -0
- data/generated/stellar/operation_result.rb +10 -0
- data/generated/stellar/operation_result/tr.rb +48 -28
- data/generated/stellar/operation_result_code.rb +3 -1
- data/generated/stellar/operation_type.rb +25 -15
- data/generated/stellar/path_payment_strict_receive_result.rb +2 -1
- data/generated/stellar/revoke_sponsorship_op.rb +36 -0
- data/generated/stellar/revoke_sponsorship_op/signer.rb +22 -0
- data/generated/stellar/revoke_sponsorship_result.rb +25 -0
- data/generated/stellar/revoke_sponsorship_result_code.rb +31 -0
- data/generated/stellar/revoke_sponsorship_type.rb +22 -0
- data/generated/stellar/transaction_result_code.rb +4 -2
- data/lib/stellar-base.rb +15 -5
- data/lib/stellar/account_flags.rb +1 -1
- data/lib/stellar/{version.rb → base/version.rb} +1 -1
- data/lib/stellar/claim_predicate.rb +198 -0
- data/lib/stellar/compat.rb +2 -11
- data/lib/stellar/dsl.rb +85 -0
- data/lib/stellar/ext/xdr.rb +49 -0
- data/lib/stellar/key_pair.rb +43 -35
- data/lib/stellar/ledger_key.rb +30 -0
- data/lib/stellar/networks.rb +12 -12
- data/lib/stellar/operation.rb +58 -1
- data/lib/stellar/price.rb +11 -2
- data/lib/stellar/transaction.rb +0 -168
- data/lib/stellar/transaction_builder.rb +28 -2
- data/lib/stellar/transaction_envelope.rb +3 -29
- data/lib/stellar/util/strkey.rb +6 -6
- metadata +162 -32
- data/generated/stellar/account_entry/ext/v1.rb +0 -34
- data/lib/stellar/util/continued_fraction.rb +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d13d4f0b46be5ae03ec00a019abebd5846c312d6074beab1656d097fabda353c
|
4
|
+
data.tar.gz: 179c7b90ffd0823967006bf92593f6b34418cd6bfb2f2b9e71456e96ef4d4360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63a0222c5014c166c3f7b0ce1054783a7cd5132dccbed308763a76c6eadb1165c96dbbb4be2d33d0b75a4edf8f5bda42d73cdee642901bcb1604d2a8cb5a45f1
|
7
|
+
data.tar.gz: ad4c8661b62f3f43efcb51d554876f6a6e2b28429b5d1845d8603dbdd3e5ff56f27ee488cc28d59f5482028d70dbfbc15c9f2211875f763718c9c848777eb7b6
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,94 @@ 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
|
+
## [Unreleased]
|
10
|
+
### Added
|
11
|
+
- Add conversion methods for KeyPair and Asset
|
12
|
+
- Stellar Protocol 14 support
|
13
|
+
- Regenerate XDR wrappers from definitions in stellar-core 14.1.1
|
14
|
+
- Add [CAP-23 Two-Part Payments](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md) support
|
15
|
+
- Add ClaimPredicate DSL methods which help with creation of claim predicates.
|
16
|
+
```
|
17
|
+
# use class-level helpers to create simple predicates
|
18
|
+
unconditional = Stellar::ClaimPredicate.unconditional
|
19
|
+
before_rel_time = Stellar::ClaimPredicate.before_relative_time(1.hour)
|
20
|
+
before_abs_time = Stellar::ClaimPredicate.before_absolute_time(Date.tomorrow.beginning_of_day)
|
21
|
+
|
22
|
+
# negate predicates using `~` unary operator
|
23
|
+
~predicate # same as predicate.not
|
24
|
+
|
25
|
+
# build complex predicates using `&` and `|` infix operators
|
26
|
+
predicate & other_predicate # same as `predicate.and(other_predicate)`
|
27
|
+
predicate | other_predicate # same as `predicate.or(other_predicate)`
|
28
|
+
|
29
|
+
# quickly define complex predicates using `.compose` class method with the block
|
30
|
+
unconditional = Stellar::ClaimPredicate.compose { }
|
31
|
+
complex = Stellar::ClaimPredicate.compose do
|
32
|
+
before_relative_time(1.week) & ~before_relative_time(10.seconds) |
|
33
|
+
end
|
34
|
+
|
35
|
+
# here's what building this predicate would look like without DSL
|
36
|
+
complex = Stellar::ClaimPredicate.new(
|
37
|
+
Stellar::ClaimPredicateType::AND,
|
38
|
+
Stellar::ClaimPredicate.new(
|
39
|
+
Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 7 * 24 * 60 * 60
|
40
|
+
),
|
41
|
+
Stellar::ClaimPredicate.new(
|
42
|
+
Stellar::ClaimPredicateType::NOT, Stellar::ClaimPredicate.new(
|
43
|
+
Stellar::ClaimPredicateType::BEFORE_RELATIVE_TIME, 10
|
44
|
+
)
|
45
|
+
)
|
46
|
+
)
|
47
|
+
|
48
|
+
```
|
49
|
+
- Extend Operation with `create_claimable_balance` and `claim_claimable_balance` helpers
|
50
|
+
- Add Claimant and ClaimPredicate DSL methods to reduce the noise.
|
51
|
+
```
|
52
|
+
include Stellar::DSL
|
53
|
+
|
54
|
+
sender = KeyPair('S....')
|
55
|
+
recipient = 'G....'
|
56
|
+
|
57
|
+
op = Operation.create_claimable_balance(
|
58
|
+
asset: Stellar::Asset.native,
|
59
|
+
amount: 100,
|
60
|
+
claimants: [
|
61
|
+
Claimant(recipient) { after(10.seconds) & before(1.week) },
|
62
|
+
Claimant(sender), # allow unconditional claim-back
|
63
|
+
]
|
64
|
+
)
|
65
|
+
])
|
66
|
+
```
|
67
|
+
- Add simple predicate evaluation feature so that developers can sanity-check their predicates
|
68
|
+
```
|
69
|
+
include Stellar::DSL
|
70
|
+
|
71
|
+
predicate = ClaimPredicate { before_relative_time(1.week) & ~before_relative_time(10.seconds) }
|
72
|
+
|
73
|
+
# predicate.evaluate(balance_creation_time, claim_evaluation_time)
|
74
|
+
predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:00:05") # => false
|
75
|
+
predicate.evaluate("2020-10-20 09:00:00", "2020-10-20 09:01:00") # => true
|
76
|
+
predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 08:50:00") # => true
|
77
|
+
|
78
|
+
# you can also pass an instance of ActiveSupport::Duration as a second parameter, in this case
|
79
|
+
# it works as a relative offset from `balance_creation_time`
|
80
|
+
predicate.evaluate("2020-10-20 09:00:00", 1.week + 1.second) # => false
|
81
|
+
|
82
|
+
# it is effectively the same as
|
83
|
+
predicate.evaluate("2020-10-20 09:00:00", "2020-10-27 09:00:01") # => false
|
84
|
+
```
|
85
|
+
- Add [CAP-33 Sponsored Reserves](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0033.md) support
|
86
|
+
- Extend the operation class with helpers that allow sponsoring reserves and also revoke sponsorships.
|
87
|
+
- `Operation.begin_sponsoring_future_reserves`
|
88
|
+
- `Operation.end_sponsoring_future_reserves`
|
89
|
+
- `Operation.revoke_sponsorship(account_id:)`
|
90
|
+
- `Operation.revoke_sponsorship(account_id:, asset:)`
|
91
|
+
- `Operation.revoke_sponsorship(account_id:, offer_id:)`
|
92
|
+
- `Operation.revoke_sponsorship(account_id:, data_name:)`
|
93
|
+
- `Operation.revoke_sponsorship(account_id:, balance_id:)`
|
94
|
+
- `Operation.revoke_sponsorship(account_id:, signer:)`
|
95
|
+
|
96
|
+
|
9
97
|
## [0.23.1](https://github.com/stellar/ruby-stellar-sdk/compare/v0.23.1...v0.23.0) - 2020-06-18
|
10
98
|
### Added
|
11
99
|
- Transaction builder now builds V1 transactions
|
@@ -46,6 +46,10 @@ module Stellar
|
|
46
46
|
autoload :Signer
|
47
47
|
autoload :AccountFlags
|
48
48
|
MASK_ACCOUNT_FLAGS = 0x7
|
49
|
+
MAX_SIGNERS = 20
|
50
|
+
SponsorshipDescriptor = XDR::Option[AccountID]
|
51
|
+
autoload :AccountEntryExtensionV2
|
52
|
+
autoload :AccountEntryExtensionV1
|
49
53
|
autoload :AccountEntry
|
50
54
|
autoload :TrustLineFlags
|
51
55
|
MASK_TRUSTLINE_FLAGS = 1
|
@@ -55,7 +59,16 @@ module Stellar
|
|
55
59
|
MASK_OFFERENTRY_FLAGS = 1
|
56
60
|
autoload :OfferEntry
|
57
61
|
autoload :DataEntry
|
62
|
+
autoload :ClaimPredicateType
|
63
|
+
autoload :ClaimPredicate
|
64
|
+
autoload :ClaimantType
|
65
|
+
autoload :Claimant
|
66
|
+
autoload :ClaimableBalanceIDType
|
67
|
+
autoload :ClaimableBalanceID
|
68
|
+
autoload :ClaimableBalanceEntry
|
69
|
+
autoload :LedgerEntryExtensionV1
|
58
70
|
autoload :LedgerEntry
|
71
|
+
autoload :LedgerKey
|
59
72
|
autoload :EnvelopeType
|
60
73
|
end
|
61
74
|
module Stellar
|
@@ -76,7 +89,13 @@ module Stellar
|
|
76
89
|
autoload :AllowTrustOp
|
77
90
|
autoload :ManageDataOp
|
78
91
|
autoload :BumpSequenceOp
|
92
|
+
autoload :CreateClaimableBalanceOp
|
93
|
+
autoload :ClaimClaimableBalanceOp
|
94
|
+
autoload :BeginSponsoringFutureReservesOp
|
95
|
+
autoload :RevokeSponsorshipType
|
96
|
+
autoload :RevokeSponsorshipOp
|
79
97
|
autoload :Operation
|
98
|
+
autoload :OperationID
|
80
99
|
autoload :MemoType
|
81
100
|
autoload :Memo
|
82
101
|
autoload :TimeBounds
|
@@ -120,6 +139,16 @@ module Stellar
|
|
120
139
|
autoload :ManageDataResult
|
121
140
|
autoload :BumpSequenceResultCode
|
122
141
|
autoload :BumpSequenceResult
|
142
|
+
autoload :CreateClaimableBalanceResultCode
|
143
|
+
autoload :CreateClaimableBalanceResult
|
144
|
+
autoload :ClaimClaimableBalanceResultCode
|
145
|
+
autoload :ClaimClaimableBalanceResult
|
146
|
+
autoload :BeginSponsoringFutureReservesResultCode
|
147
|
+
autoload :BeginSponsoringFutureReservesResult
|
148
|
+
autoload :EndSponsoringFutureReservesResultCode
|
149
|
+
autoload :EndSponsoringFutureReservesResult
|
150
|
+
autoload :RevokeSponsorshipResultCode
|
151
|
+
autoload :RevokeSponsorshipResult
|
123
152
|
autoload :OperationResultCode
|
124
153
|
autoload :OperationResult
|
125
154
|
autoload :TransactionResultCode
|
@@ -137,7 +166,6 @@ module Stellar
|
|
137
166
|
autoload :LedgerHeader
|
138
167
|
autoload :LedgerUpgradeType
|
139
168
|
autoload :LedgerUpgrade
|
140
|
-
autoload :LedgerKey
|
141
169
|
autoload :BucketEntryType
|
142
170
|
autoload :BucketMetadata
|
143
171
|
autoload :BucketEntry
|
@@ -21,7 +21,7 @@ require 'xdr'
|
|
21
21
|
# // thresholds stores unsigned bytes: [weight of master|low|medium|high]
|
22
22
|
# Thresholds thresholds;
|
23
23
|
#
|
24
|
-
# Signer signers<
|
24
|
+
# Signer signers<MAX_SIGNERS>; // possible signers for this account
|
25
25
|
#
|
26
26
|
# // reserved for future use
|
27
27
|
# union switch (int v)
|
@@ -29,17 +29,7 @@ require 'xdr'
|
|
29
29
|
# case 0:
|
30
30
|
# void;
|
31
31
|
# case 1:
|
32
|
-
#
|
33
|
-
# {
|
34
|
-
# Liabilities liabilities;
|
35
|
-
#
|
36
|
-
# union switch (int v)
|
37
|
-
# {
|
38
|
-
# case 0:
|
39
|
-
# void;
|
40
|
-
# }
|
41
|
-
# ext;
|
42
|
-
# } v1;
|
32
|
+
# AccountEntryExtensionV1 v1;
|
43
33
|
# }
|
44
34
|
# ext;
|
45
35
|
# };
|
@@ -59,7 +49,7 @@ module Stellar
|
|
59
49
|
attribute :flags, Uint32
|
60
50
|
attribute :home_domain, String32
|
61
51
|
attribute :thresholds, Thresholds
|
62
|
-
attribute :signers, XDR::VarArray[Signer,
|
52
|
+
attribute :signers, XDR::VarArray[Signer, MAX_SIGNERS]
|
63
53
|
attribute :ext, Ext
|
64
54
|
end
|
65
55
|
end
|
@@ -10,33 +10,19 @@ require 'xdr'
|
|
10
10
|
# case 0:
|
11
11
|
# void;
|
12
12
|
# case 1:
|
13
|
-
#
|
14
|
-
# {
|
15
|
-
# Liabilities liabilities;
|
16
|
-
#
|
17
|
-
# union switch (int v)
|
18
|
-
# {
|
19
|
-
# case 0:
|
20
|
-
# void;
|
21
|
-
# }
|
22
|
-
# ext;
|
23
|
-
# } v1;
|
13
|
+
# AccountEntryExtensionV1 v1;
|
24
14
|
# }
|
25
15
|
#
|
26
16
|
# ===========================================================================
|
27
17
|
module Stellar
|
28
18
|
class AccountEntry
|
29
19
|
class Ext < XDR::Union
|
30
|
-
include XDR::Namespace
|
31
|
-
|
32
|
-
autoload :V1
|
33
|
-
|
34
20
|
switch_on XDR::Int, :v
|
35
21
|
|
36
22
|
switch 0
|
37
23
|
switch 1, :v1
|
38
24
|
|
39
|
-
attribute :v1,
|
25
|
+
attribute :v1, AccountEntryExtensionV1
|
40
26
|
end
|
41
27
|
end
|
42
28
|
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 AccountEntryExtensionV1
|
9
|
+
# {
|
10
|
+
# Liabilities liabilities;
|
11
|
+
#
|
12
|
+
# union switch (int v)
|
13
|
+
# {
|
14
|
+
# case 0:
|
15
|
+
# void;
|
16
|
+
# case 2:
|
17
|
+
# AccountEntryExtensionV2 v2;
|
18
|
+
# }
|
19
|
+
# ext;
|
20
|
+
# };
|
21
|
+
#
|
22
|
+
# ===========================================================================
|
23
|
+
module Stellar
|
24
|
+
class AccountEntryExtensionV1 < XDR::Struct
|
25
|
+
include XDR::Namespace
|
26
|
+
|
27
|
+
autoload :Ext
|
28
|
+
|
29
|
+
attribute :liabilities, Liabilities
|
30
|
+
attribute :ext, Ext
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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
|
+
# case 2:
|
13
|
+
# AccountEntryExtensionV2 v2;
|
14
|
+
# }
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class AccountEntryExtensionV1
|
19
|
+
class Ext < XDR::Union
|
20
|
+
switch_on XDR::Int, :v
|
21
|
+
|
22
|
+
switch 0
|
23
|
+
switch 2, :v2
|
24
|
+
|
25
|
+
attribute :v2, AccountEntryExtensionV2
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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 AccountEntryExtensionV2
|
9
|
+
# {
|
10
|
+
# uint32 numSponsored;
|
11
|
+
# uint32 numSponsoring;
|
12
|
+
# SponsorshipDescriptor signerSponsoringIDs<MAX_SIGNERS>;
|
13
|
+
#
|
14
|
+
# union switch (int v)
|
15
|
+
# {
|
16
|
+
# case 0:
|
17
|
+
# void;
|
18
|
+
# }
|
19
|
+
# ext;
|
20
|
+
# };
|
21
|
+
#
|
22
|
+
# ===========================================================================
|
23
|
+
module Stellar
|
24
|
+
class AccountEntryExtensionV2 < XDR::Struct
|
25
|
+
include XDR::Namespace
|
26
|
+
|
27
|
+
autoload :Ext
|
28
|
+
|
29
|
+
attribute :num_sponsored, Uint32
|
30
|
+
attribute :num_sponsoring, Uint32
|
31
|
+
attribute :signer_sponsoring_i_ds, XDR::VarArray[SponsorshipDescriptor, MAX_SIGNERS]
|
32
|
+
attribute :ext, Ext
|
33
|
+
end
|
34
|
+
end
|
@@ -6,23 +6,19 @@ require 'xdr'
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
8
|
# union switch (int v)
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# {
|
10
|
+
# case 0:
|
11
|
+
# void;
|
12
|
+
# }
|
13
13
|
#
|
14
14
|
# ===========================================================================
|
15
15
|
module Stellar
|
16
|
-
class
|
17
|
-
class Ext
|
18
|
-
|
19
|
-
class Ext < XDR::Union
|
20
|
-
switch_on XDR::Int, :v
|
16
|
+
class AccountEntryExtensionV2
|
17
|
+
class Ext < XDR::Union
|
18
|
+
switch_on XDR::Int, :v
|
21
19
|
|
22
|
-
|
20
|
+
switch 0
|
23
21
|
|
24
|
-
end
|
25
|
-
end
|
26
22
|
end
|
27
23
|
end
|
28
24
|
end
|
@@ -15,8 +15,9 @@ require 'xdr'
|
|
15
15
|
# ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
|
16
16
|
# ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers
|
17
17
|
# ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5, // sequence number is over max allowed
|
18
|
-
# ACCOUNT_MERGE_DEST_FULL = -6
|
18
|
+
# ACCOUNT_MERGE_DEST_FULL = -6, // can't add source balance to
|
19
19
|
# // destination balance
|
20
|
+
# ACCOUNT_MERGE_IS_SPONSOR = -7 // can't merge account that is a sponsor
|
20
21
|
# };
|
21
22
|
#
|
22
23
|
# ===========================================================================
|
@@ -29,6 +30,7 @@ module Stellar
|
|
29
30
|
member :account_merge_has_sub_entries, -4
|
30
31
|
member :account_merge_seqnum_too_far, -5
|
31
32
|
member :account_merge_dest_full, -6
|
33
|
+
member :account_merge_is_sponsor, -7
|
32
34
|
|
33
35
|
seal
|
34
36
|
end
|
@@ -0,0 +1,18 @@
|
|
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 BeginSponsoringFutureReservesOp
|
9
|
+
# {
|
10
|
+
# AccountID sponsoredID;
|
11
|
+
# };
|
12
|
+
#
|
13
|
+
# ===========================================================================
|
14
|
+
module Stellar
|
15
|
+
class BeginSponsoringFutureReservesOp < XDR::Struct
|
16
|
+
attribute :sponsored_id, AccountID
|
17
|
+
end
|
18
|
+
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 BeginSponsoringFutureReservesResult switch (BeginSponsoringFutureReservesResultCode code)
|
9
|
+
# {
|
10
|
+
# case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS:
|
11
|
+
# void;
|
12
|
+
# default:
|
13
|
+
# void;
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class BeginSponsoringFutureReservesResult < XDR::Union
|
19
|
+
switch_on BeginSponsoringFutureReservesResultCode, :code
|
20
|
+
|
21
|
+
switch :begin_sponsoring_future_reserves_success
|
22
|
+
switch :default
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
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
|
+
# enum BeginSponsoringFutureReservesResultCode
|
9
|
+
# {
|
10
|
+
# // codes considered as "success" for the operation
|
11
|
+
# BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,
|
12
|
+
#
|
13
|
+
# // codes considered as "failure" for the operation
|
14
|
+
# BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED = -1,
|
15
|
+
# BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED = -2,
|
16
|
+
# BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE = -3
|
17
|
+
# };
|
18
|
+
#
|
19
|
+
# ===========================================================================
|
20
|
+
module Stellar
|
21
|
+
class BeginSponsoringFutureReservesResultCode < XDR::Enum
|
22
|
+
member :begin_sponsoring_future_reserves_success, 0
|
23
|
+
member :begin_sponsoring_future_reserves_malformed, -1
|
24
|
+
member :begin_sponsoring_future_reserves_already_sponsored, -2
|
25
|
+
member :begin_sponsoring_future_reserves_recursive, -3
|
26
|
+
|
27
|
+
seal
|
28
|
+
end
|
29
|
+
end
|