stellar-base 0.0.18 → 0.0.19
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/generated/stellar-base-generated.rb +56 -102
- data/generated/stellar/account_entry.rb +18 -5
- data/generated/stellar/account_entry/ext.rb +24 -0
- data/generated/stellar/account_flags.rb +2 -2
- data/generated/stellar/account_merge_result.rb +2 -2
- data/generated/stellar/account_merge_result_code.rb +2 -2
- data/generated/stellar/allow_trust_op.rb +2 -2
- data/generated/stellar/allow_trust_op/currency.rb +2 -2
- data/generated/stellar/allow_trust_result.rb +2 -2
- data/generated/stellar/allow_trust_result_code.rb +2 -2
- data/generated/stellar/bucket_entry.rb +2 -2
- data/generated/stellar/bucket_entry_type.rb +2 -2
- data/generated/stellar/change_trust_op.rb +2 -2
- data/generated/stellar/change_trust_result.rb +2 -2
- data/generated/stellar/change_trust_result_code.rb +2 -2
- data/generated/stellar/claim_offer_atom.rb +2 -2
- data/generated/stellar/create_account_op.rb +2 -2
- data/generated/stellar/create_account_result.rb +2 -2
- data/generated/stellar/create_account_result_code.rb +10 -10
- data/generated/stellar/create_passive_offer_op.rb +2 -2
- data/generated/stellar/crypto_key_type.rb +20 -0
- data/generated/stellar/currency.rb +2 -2
- data/generated/stellar/currency/alpha_num.rb +2 -2
- data/generated/stellar/currency_type.rb +2 -2
- data/generated/stellar/decorated_signature.rb +6 -6
- data/generated/stellar/dont_have.rb +2 -2
- data/generated/stellar/envelope_type.rb +22 -0
- data/generated/stellar/error.rb +2 -2
- data/generated/stellar/hello.rb +10 -8
- data/generated/stellar/inflation_payout.rb +3 -3
- data/generated/stellar/inflation_result.rb +3 -3
- data/generated/stellar/inflation_result_code.rb +2 -2
- data/generated/stellar/ledger_entry.rb +2 -4
- data/generated/stellar/ledger_entry_change.rb +2 -2
- data/generated/stellar/ledger_entry_change_type.rb +2 -2
- data/generated/stellar/ledger_entry_type.rb +2 -2
- data/generated/stellar/ledger_header.rb +28 -12
- data/generated/stellar/ledger_header/ext.rb +24 -0
- data/generated/stellar/ledger_header_history_entry.rb +15 -2
- data/generated/stellar/ledger_header_history_entry/ext.rb +24 -0
- data/generated/stellar/ledger_key.rb +2 -2
- data/generated/stellar/ledger_key/account.rb +2 -2
- data/generated/stellar/ledger_key/offer.rb +2 -2
- data/generated/stellar/ledger_key/trust_line.rb +2 -2
- data/generated/stellar/ledger_upgrade.rb +27 -0
- data/generated/stellar/ledger_upgrade_type.rb +22 -0
- data/generated/stellar/manage_offer_effect.rb +2 -2
- data/generated/stellar/manage_offer_op.rb +2 -2
- data/generated/stellar/manage_offer_result.rb +2 -2
- data/generated/stellar/manage_offer_result_code.rb +25 -21
- data/generated/stellar/manage_offer_success_result.rb +2 -2
- data/generated/stellar/manage_offer_success_result/offer.rb +2 -2
- data/generated/stellar/memo.rb +2 -2
- data/generated/stellar/memo_type.rb +2 -2
- data/generated/stellar/message_type.rb +2 -2
- data/generated/stellar/offer_entry.rb +15 -2
- data/generated/stellar/offer_entry/ext.rb +24 -0
- data/generated/stellar/offer_entry_flags.rb +2 -2
- data/generated/stellar/operation.rb +4 -4
- data/generated/stellar/operation/body.rb +4 -4
- data/generated/stellar/operation_result.rb +2 -2
- data/generated/stellar/operation_result/tr.rb +2 -2
- data/generated/stellar/operation_result_code.rb +2 -2
- data/generated/stellar/operation_type.rb +2 -2
- data/generated/stellar/path_payment_op.rb +2 -2
- data/generated/stellar/path_payment_result.rb +2 -2
- data/generated/stellar/path_payment_result/success.rb +2 -2
- data/generated/stellar/path_payment_result_code.rb +23 -20
- data/generated/stellar/payment_op.rb +2 -2
- data/generated/stellar/payment_result.rb +2 -2
- data/generated/stellar/payment_result_code.rb +19 -15
- data/generated/stellar/peer_address.rb +2 -2
- data/generated/stellar/price.rb +2 -2
- data/generated/stellar/public_key.rb +23 -0
- data/generated/stellar/scp_ballot.rb +2 -2
- data/generated/stellar/scp_envelope.rb +2 -4
- data/generated/stellar/scp_nomination.rb +22 -0
- data/generated/stellar/scp_quorum_set.rb +4 -4
- data/generated/stellar/scp_statement.rb +33 -16
- data/generated/stellar/scp_statement/pledges.rb +38 -14
- data/generated/stellar/scp_statement/pledges/confirm.rb +28 -0
- data/generated/stellar/scp_statement/pledges/externalize.rb +28 -0
- data/generated/stellar/scp_statement/pledges/prepare.rb +14 -6
- data/generated/stellar/scp_statement_type.rb +10 -10
- data/generated/stellar/set_options_op.rb +11 -4
- data/generated/stellar/set_options_result.rb +2 -2
- data/generated/stellar/set_options_result_code.rb +16 -12
- data/generated/stellar/signer.rb +4 -4
- data/generated/stellar/simple_payment_result.rb +2 -2
- data/generated/stellar/stellar_message.rb +2 -2
- data/generated/stellar/stellar_value.rb +40 -0
- data/generated/stellar/stellar_value/ext.rb +24 -0
- data/generated/stellar/threshold_indexes.rb +26 -0
- data/generated/stellar/time_bounds.rb +2 -2
- data/generated/stellar/transaction.rb +17 -4
- data/generated/stellar/transaction/ext.rb +24 -0
- data/generated/stellar/transaction_envelope.rb +2 -2
- data/generated/stellar/transaction_history_entry.rb +15 -2
- data/generated/stellar/transaction_history_entry/ext.rb +24 -0
- data/generated/stellar/transaction_history_result_entry.rb +15 -2
- data/generated/stellar/transaction_history_result_entry/ext.rb +24 -0
- data/generated/stellar/transaction_meta.rb +2 -2
- data/generated/stellar/transaction_result.rb +12 -2
- data/generated/stellar/transaction_result/ext.rb +24 -0
- data/generated/stellar/transaction_result/result.rb +2 -2
- data/generated/stellar/transaction_result_code.rb +2 -2
- data/generated/stellar/transaction_result_pair.rb +2 -2
- data/generated/stellar/transaction_result_set.rb +4 -4
- data/generated/stellar/transaction_set.rb +4 -4
- data/generated/stellar/trust_line_entry.rb +15 -2
- data/generated/stellar/trust_line_entry/ext.rb +24 -0
- data/generated/stellar/trust_line_flags.rb +2 -2
- data/lib/stellar/base/version.rb +1 -1
- data/lib/stellar/currency.rb +1 -1
- data/lib/stellar/key_pair.rb +14 -5
- data/lib/stellar/operation.rb +7 -7
- data/lib/stellar/transaction.rb +15 -3
- data/lib/stellar/transaction_envelope.rb +1 -1
- data/ruby-stellar-base.gemspec +1 -1
- data/spec/lib/stellar/key_pair_spec.rb +40 -9
- data/spec/lib/stellar/transaction_envelope_spec.rb +2 -2
- data/spec/lib/stellar/transaction_spec.rb +6 -6
- data/tasks/xdr.rake +11 -8
- data/xdr/Stellar-SCP.x +87 -0
- data/xdr/Stellar-ledger-entries.x +80 -6
- data/xdr/Stellar-ledger.x +87 -8
- data/xdr/Stellar-overlay.x +3 -16
- data/xdr/Stellar-transaction.x +66 -39
- data/xdr/Stellar-types.x +17 -29
- data/xdr/StellarXDR.x +1 -1
- metadata +25 -7
- data/generated/stellar/stellar_ballot.rb +0 -22
- data/generated/stellar/stellar_ballot_value.rb +0 -22
- data/xdr/SCPXDR.x +0 -67
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
@@ -11,29 +11,32 @@ require 'xdr'
|
|
|
11
11
|
# PATH_PAYMENT_SUCCESS = 0, // success
|
|
12
12
|
#
|
|
13
13
|
# // codes considered as "failure" for the operation
|
|
14
|
-
# PATH_PAYMENT_MALFORMED = -1,
|
|
15
|
-
# PATH_PAYMENT_UNDERFUNDED = -2,
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
14
|
+
# PATH_PAYMENT_MALFORMED = -1, // bad input
|
|
15
|
+
# PATH_PAYMENT_UNDERFUNDED = -2, // not enough funds in source account
|
|
16
|
+
# PATH_PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account
|
|
17
|
+
# PATH_PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
|
|
18
|
+
# PATH_PAYMENT_NO_DESTINATION = -5, // destination account does not exist
|
|
19
|
+
# PATH_PAYMENT_NO_TRUST = -6, // dest missing a trust line for currency
|
|
20
|
+
# PATH_PAYMENT_NOT_AUTHORIZED = -7, // dest not authorized to hold currency
|
|
21
|
+
# PATH_PAYMENT_LINE_FULL = -8, // dest would go above their limit
|
|
22
|
+
# PATH_PAYMENT_TOO_FEW_OFFERS = -9, // not enough offers to satisfy path
|
|
23
|
+
# PATH_PAYMENT_OVER_SENDMAX = -10 // could not satisfy sendmax
|
|
23
24
|
# };
|
|
24
25
|
#
|
|
25
26
|
# ===========================================================================
|
|
26
27
|
module Stellar
|
|
27
28
|
class PathPaymentResultCode < XDR::Enum
|
|
28
|
-
member :path_payment_success,
|
|
29
|
-
member :path_payment_malformed,
|
|
30
|
-
member :path_payment_underfunded,
|
|
31
|
-
member :
|
|
32
|
-
member :
|
|
33
|
-
member :
|
|
34
|
-
member :
|
|
35
|
-
member :
|
|
36
|
-
member :
|
|
29
|
+
member :path_payment_success, 0
|
|
30
|
+
member :path_payment_malformed, -1
|
|
31
|
+
member :path_payment_underfunded, -2
|
|
32
|
+
member :path_payment_src_no_trust, -3
|
|
33
|
+
member :path_payment_src_not_authorized, -4
|
|
34
|
+
member :path_payment_no_destination, -5
|
|
35
|
+
member :path_payment_no_trust, -6
|
|
36
|
+
member :path_payment_not_authorized, -7
|
|
37
|
+
member :path_payment_line_full, -8
|
|
38
|
+
member :path_payment_too_few_offers, -9
|
|
39
|
+
member :path_payment_over_sendmax, -10
|
|
37
40
|
|
|
38
41
|
seal
|
|
39
42
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
@@ -11,24 +11,28 @@ require 'xdr'
|
|
|
11
11
|
# PAYMENT_SUCCESS = 0, // payment successfuly completed
|
|
12
12
|
#
|
|
13
13
|
# // codes considered as "failure" for the operation
|
|
14
|
-
# PAYMENT_MALFORMED = -1,
|
|
15
|
-
# PAYMENT_UNDERFUNDED = -2,
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
14
|
+
# PAYMENT_MALFORMED = -1, // bad input
|
|
15
|
+
# PAYMENT_UNDERFUNDED = -2, // not enough funds in source account
|
|
16
|
+
# PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account
|
|
17
|
+
# PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
|
|
18
|
+
# PAYMENT_NO_DESTINATION = -5, // destination account does not exist
|
|
19
|
+
# PAYMENT_NO_TRUST = -6, // destination missing a trust line for currency
|
|
20
|
+
# PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold currency
|
|
21
|
+
# PAYMENT_LINE_FULL = -8 // destination would go above their limit
|
|
20
22
|
# };
|
|
21
23
|
#
|
|
22
24
|
# ===========================================================================
|
|
23
25
|
module Stellar
|
|
24
26
|
class PaymentResultCode < XDR::Enum
|
|
25
|
-
member :payment_success,
|
|
26
|
-
member :payment_malformed,
|
|
27
|
-
member :payment_underfunded,
|
|
28
|
-
member :
|
|
29
|
-
member :
|
|
30
|
-
member :
|
|
31
|
-
member :
|
|
27
|
+
member :payment_success, 0
|
|
28
|
+
member :payment_malformed, -1
|
|
29
|
+
member :payment_underfunded, -2
|
|
30
|
+
member :payment_src_no_trust, -3
|
|
31
|
+
member :payment_src_not_authorized, -4
|
|
32
|
+
member :payment_no_destination, -5
|
|
33
|
+
member :payment_no_trust, -6
|
|
34
|
+
member :payment_not_authorized, -7
|
|
35
|
+
member :payment_line_full, -8
|
|
32
36
|
|
|
33
37
|
seal
|
|
34
38
|
end
|
data/generated/stellar/price.rb
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
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 PublicKey switch (CryptoKeyType type)
|
|
9
|
+
# {
|
|
10
|
+
# case KEY_TYPES_ED25519:
|
|
11
|
+
# uint256 ed25519;
|
|
12
|
+
# };
|
|
13
|
+
#
|
|
14
|
+
# ===========================================================================
|
|
15
|
+
module Stellar
|
|
16
|
+
class PublicKey < XDR::Union
|
|
17
|
+
switch_on CryptoKeyType, :type
|
|
18
|
+
|
|
19
|
+
switch :key_types_ed25519, :ed25519
|
|
20
|
+
|
|
21
|
+
attribute :ed25519, Uint256
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
7
7
|
#
|
|
8
8
|
# struct SCPEnvelope
|
|
9
9
|
# {
|
|
10
|
-
# uint256 nodeID; // v
|
|
11
10
|
# SCPStatement statement;
|
|
12
11
|
# Signature signature;
|
|
13
12
|
# };
|
|
@@ -15,7 +14,6 @@ require 'xdr'
|
|
|
15
14
|
# ===========================================================================
|
|
16
15
|
module Stellar
|
|
17
16
|
class SCPEnvelope < XDR::Struct
|
|
18
|
-
attribute :node_id, Uint256
|
|
19
17
|
attribute :statement, SCPStatement
|
|
20
18
|
attribute :signature, Signature
|
|
21
19
|
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 SCPNomination
|
|
9
|
+
# {
|
|
10
|
+
# Hash quorumSetHash; // D
|
|
11
|
+
# Value votes<>; // X
|
|
12
|
+
# Value accepted<>; // Y
|
|
13
|
+
# };
|
|
14
|
+
#
|
|
15
|
+
# ===========================================================================
|
|
16
|
+
module Stellar
|
|
17
|
+
class SCPNomination < XDR::Struct
|
|
18
|
+
attribute :quorum_set_hash, Hash
|
|
19
|
+
attribute :votes, XDR::VarArray[Value]
|
|
20
|
+
attribute :accepted, XDR::VarArray[Value]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
@@ -8,7 +8,7 @@ require 'xdr'
|
|
|
8
8
|
# struct SCPQuorumSet
|
|
9
9
|
# {
|
|
10
10
|
# uint32 threshold;
|
|
11
|
-
#
|
|
11
|
+
# PublicKey validators<>;
|
|
12
12
|
# SCPQuorumSet innerSets<>;
|
|
13
13
|
# };
|
|
14
14
|
#
|
|
@@ -16,7 +16,7 @@ require 'xdr'
|
|
|
16
16
|
module Stellar
|
|
17
17
|
class SCPQuorumSet < XDR::Struct
|
|
18
18
|
attribute :threshold, Uint32
|
|
19
|
-
attribute :validators, XDR::VarArray[
|
|
19
|
+
attribute :validators, XDR::VarArray[PublicKey]
|
|
20
20
|
attribute :inner_sets, XDR::VarArray[SCPQuorumSet]
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
7
7
|
#
|
|
8
8
|
# struct SCPStatement
|
|
9
9
|
# {
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# Hash quorumSetHash; // D
|
|
10
|
+
# NodeID nodeID; // v
|
|
11
|
+
# uint64 slotIndex; // i
|
|
13
12
|
#
|
|
14
13
|
# union switch (SCPStatementType type)
|
|
15
14
|
# {
|
|
16
|
-
# case
|
|
15
|
+
# case SCP_ST_PREPARE:
|
|
17
16
|
# struct
|
|
18
17
|
# {
|
|
19
|
-
#
|
|
20
|
-
# SCPBallot
|
|
18
|
+
# Hash quorumSetHash; // D
|
|
19
|
+
# SCPBallot ballot; // b
|
|
20
|
+
# SCPBallot* prepared; // p
|
|
21
|
+
# SCPBallot* preparedPrime; // p'
|
|
22
|
+
# uint32 nC; // n_c
|
|
23
|
+
# uint32 nP; // n_P
|
|
21
24
|
# } prepare;
|
|
22
|
-
# case
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
25
|
+
# case SCP_ST_CONFIRM:
|
|
26
|
+
# struct
|
|
27
|
+
# {
|
|
28
|
+
# Hash quorumSetHash; // D
|
|
29
|
+
# uint32 nPrepared; // n_p
|
|
30
|
+
# SCPBallot commit; // c
|
|
31
|
+
# uint32 nP; // n_P
|
|
32
|
+
# } confirm;
|
|
33
|
+
# case SCP_ST_EXTERNALIZE:
|
|
34
|
+
# struct
|
|
35
|
+
# {
|
|
36
|
+
# SCPBallot commit; // c
|
|
37
|
+
# uint32 nP; // n_P
|
|
38
|
+
# // not from the paper, but useful to build tooling to
|
|
39
|
+
# // traverse the graph based off only the latest statement
|
|
40
|
+
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
|
41
|
+
# } externalize;
|
|
42
|
+
# case SCP_ST_NOMINATE:
|
|
43
|
+
# SCPNomination nominate;
|
|
26
44
|
# }
|
|
27
45
|
# pledges;
|
|
28
46
|
# };
|
|
@@ -34,9 +52,8 @@ module Stellar
|
|
|
34
52
|
|
|
35
53
|
autoload :Pledges
|
|
36
54
|
|
|
37
|
-
attribute :
|
|
38
|
-
attribute :
|
|
39
|
-
attribute :
|
|
40
|
-
attribute :pledges, Pledges
|
|
55
|
+
attribute :node_id, NodeID
|
|
56
|
+
attribute :slot_index, Uint64
|
|
57
|
+
attribute :pledges, Pledges
|
|
41
58
|
end
|
|
42
59
|
end
|
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
2
|
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
require 'xdr'
|
|
5
5
|
|
|
6
6
|
# === xdr source ============================================================
|
|
7
7
|
#
|
|
8
8
|
# union switch (SCPStatementType type)
|
|
9
9
|
# {
|
|
10
|
-
# case
|
|
10
|
+
# case SCP_ST_PREPARE:
|
|
11
11
|
# struct
|
|
12
12
|
# {
|
|
13
|
-
#
|
|
14
|
-
# SCPBallot
|
|
13
|
+
# Hash quorumSetHash; // D
|
|
14
|
+
# SCPBallot ballot; // b
|
|
15
|
+
# SCPBallot* prepared; // p
|
|
16
|
+
# SCPBallot* preparedPrime; // p'
|
|
17
|
+
# uint32 nC; // n_c
|
|
18
|
+
# uint32 nP; // n_P
|
|
15
19
|
# } prepare;
|
|
16
|
-
# case
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
+
# case SCP_ST_CONFIRM:
|
|
21
|
+
# struct
|
|
22
|
+
# {
|
|
23
|
+
# Hash quorumSetHash; // D
|
|
24
|
+
# uint32 nPrepared; // n_p
|
|
25
|
+
# SCPBallot commit; // c
|
|
26
|
+
# uint32 nP; // n_P
|
|
27
|
+
# } confirm;
|
|
28
|
+
# case SCP_ST_EXTERNALIZE:
|
|
29
|
+
# struct
|
|
30
|
+
# {
|
|
31
|
+
# SCPBallot commit; // c
|
|
32
|
+
# uint32 nP; // n_P
|
|
33
|
+
# // not from the paper, but useful to build tooling to
|
|
34
|
+
# // traverse the graph based off only the latest statement
|
|
35
|
+
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
|
36
|
+
# } externalize;
|
|
37
|
+
# case SCP_ST_NOMINATE:
|
|
38
|
+
# SCPNomination nominate;
|
|
20
39
|
# }
|
|
21
40
|
#
|
|
22
41
|
# ===========================================================================
|
|
@@ -26,15 +45,20 @@ module Stellar
|
|
|
26
45
|
include XDR::Namespace
|
|
27
46
|
|
|
28
47
|
autoload :Prepare
|
|
48
|
+
autoload :Confirm
|
|
49
|
+
autoload :Externalize
|
|
29
50
|
|
|
30
51
|
switch_on SCPStatementType, :type
|
|
31
52
|
|
|
32
|
-
switch :
|
|
33
|
-
switch :
|
|
34
|
-
switch :
|
|
35
|
-
switch :
|
|
53
|
+
switch :scp_st_prepare, :prepare
|
|
54
|
+
switch :scp_st_confirm, :confirm
|
|
55
|
+
switch :scp_st_externalize, :externalize
|
|
56
|
+
switch :scp_st_nominate, :nominate
|
|
36
57
|
|
|
37
|
-
attribute :prepare,
|
|
58
|
+
attribute :prepare, Prepare
|
|
59
|
+
attribute :confirm, Confirm
|
|
60
|
+
attribute :externalize, Externalize
|
|
61
|
+
attribute :nominate, SCPNomination
|
|
38
62
|
end
|
|
39
63
|
end
|
|
40
64
|
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
|
+
# struct
|
|
9
|
+
# {
|
|
10
|
+
# Hash quorumSetHash; // D
|
|
11
|
+
# uint32 nPrepared; // n_p
|
|
12
|
+
# SCPBallot commit; // c
|
|
13
|
+
# uint32 nP; // n_P
|
|
14
|
+
# }
|
|
15
|
+
#
|
|
16
|
+
# ===========================================================================
|
|
17
|
+
module Stellar
|
|
18
|
+
class SCPStatement
|
|
19
|
+
class Pledges
|
|
20
|
+
class Confirm < XDR::Struct
|
|
21
|
+
attribute :quorum_set_hash, Hash
|
|
22
|
+
attribute :n_prepared, Uint32
|
|
23
|
+
attribute :commit, SCPBallot
|
|
24
|
+
attribute :n_p, Uint32
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
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
|
+
# struct
|
|
9
|
+
# {
|
|
10
|
+
# SCPBallot commit; // c
|
|
11
|
+
# uint32 nP; // n_P
|
|
12
|
+
# // not from the paper, but useful to build tooling to
|
|
13
|
+
# // traverse the graph based off only the latest statement
|
|
14
|
+
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
|
15
|
+
# }
|
|
16
|
+
#
|
|
17
|
+
# ===========================================================================
|
|
18
|
+
module Stellar
|
|
19
|
+
class SCPStatement
|
|
20
|
+
class Pledges
|
|
21
|
+
class Externalize < XDR::Struct
|
|
22
|
+
attribute :commit, SCPBallot
|
|
23
|
+
attribute :n_p, Uint32
|
|
24
|
+
attribute :commit_quorum_set_hash, Hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|