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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -21
  3. data/{LICENSE.txt → LICENSE} +0 -0
  4. data/README.md +2 -3
  5. data/generated/stellar-base-generated.rb +31 -4
  6. data/generated/stellar/allow_trust_op.rb +3 -2
  7. data/generated/stellar/authenticated_message.rb +4 -4
  8. data/generated/stellar/authenticated_message/v0.rb +4 -4
  9. data/generated/stellar/change_trust_result_code.rb +1 -1
  10. data/generated/stellar/crypto_key_type.rb +8 -4
  11. data/generated/stellar/curve25519_public.rb +1 -1
  12. data/generated/stellar/curve25519_secret.rb +1 -1
  13. data/generated/stellar/envelope_type.rb +9 -5
  14. data/generated/stellar/fee_bump_transaction.rb +39 -0
  15. data/generated/stellar/fee_bump_transaction/ext.rb +24 -0
  16. data/generated/stellar/fee_bump_transaction/inner_tx.rb +25 -0
  17. data/generated/stellar/fee_bump_transaction_envelope.rb +22 -0
  18. data/generated/stellar/hmac_sha256_key.rb +1 -1
  19. data/generated/stellar/hmac_sha256_mac.rb +1 -1
  20. data/generated/stellar/inner_transaction_result.rb +56 -0
  21. data/generated/stellar/inner_transaction_result/ext.rb +24 -0
  22. data/generated/stellar/inner_transaction_result/result.rb +52 -0
  23. data/generated/stellar/inner_transaction_result_pair.rb +20 -0
  24. data/generated/stellar/ledger_close_meta.rb +23 -0
  25. data/generated/stellar/ledger_close_meta_v0.rb +35 -0
  26. data/generated/stellar/manage_buy_offer_result_code.rb +5 -4
  27. data/generated/stellar/manage_sell_offer_result_code.rb +12 -8
  28. data/generated/stellar/message_type.rb +6 -1
  29. data/generated/stellar/muxed_account.rb +35 -0
  30. data/generated/stellar/muxed_account/med25519.rb +22 -0
  31. data/generated/stellar/operation.rb +7 -5
  32. data/generated/stellar/operation/body.rb +31 -27
  33. data/generated/stellar/operation_result.rb +5 -3
  34. data/generated/stellar/operation_result/tr.rb +33 -29
  35. data/generated/stellar/operation_result_code.rb +3 -3
  36. data/generated/stellar/operation_type.rb +17 -15
  37. data/generated/stellar/{path_payment_op.rb → path_payment_strict_receive_op.rb} +6 -6
  38. data/generated/stellar/path_payment_strict_receive_result.rb +38 -0
  39. data/generated/stellar/path_payment_strict_receive_result/success.rb +22 -0
  40. data/generated/stellar/path_payment_strict_receive_result_code.rb +56 -0
  41. data/generated/stellar/path_payment_strict_send_op.rb +32 -0
  42. data/generated/stellar/{path_payment_result.rb → path_payment_strict_send_result.rb} +7 -7
  43. data/generated/stellar/{path_payment_result → path_payment_strict_send_result}/success.rb +1 -1
  44. data/generated/stellar/path_payment_strict_send_result_code.rb +55 -0
  45. data/generated/stellar/payment_op.rb +4 -4
  46. data/generated/stellar/peer_stats.rb +48 -0
  47. data/generated/stellar/signed_survey_request_message.rb +20 -0
  48. data/generated/stellar/signed_survey_response_message.rb +20 -0
  49. data/generated/stellar/stellar_message.rb +22 -12
  50. data/generated/stellar/survey_message_command_type.rb +20 -0
  51. data/generated/stellar/survey_request_message.rb +26 -0
  52. data/generated/stellar/survey_response_body.rb +23 -0
  53. data/generated/stellar/survey_response_message.rb +26 -0
  54. data/generated/stellar/topology_response_body.rb +25 -0
  55. data/generated/stellar/transaction.rb +2 -2
  56. data/generated/stellar/transaction_envelope.rb +17 -8
  57. data/generated/stellar/transaction_meta.rb +4 -0
  58. data/generated/stellar/transaction_meta_v2.rb +24 -0
  59. data/generated/stellar/transaction_result.rb +3 -0
  60. data/generated/stellar/transaction_result/result.rb +9 -3
  61. data/generated/stellar/transaction_result_code.rb +21 -14
  62. data/generated/stellar/transaction_result_meta.rb +22 -0
  63. data/generated/stellar/transaction_signature_payload.rb +3 -1
  64. data/generated/stellar/transaction_signature_payload/tagged_transaction.rb +7 -3
  65. data/generated/stellar/transaction_v0.rb +39 -0
  66. data/generated/stellar/transaction_v0/ext.rb +24 -0
  67. data/generated/stellar/transaction_v0_envelope.rb +22 -0
  68. data/generated/stellar/transaction_v1_envelope.rb +22 -0
  69. data/generated/stellar/trust_line_flags.rb +6 -2
  70. data/generated/stellar/upgrade_entry_meta.rb +20 -0
  71. data/lib/stellar-base.rb +27 -24
  72. data/lib/stellar/account_flags.rb +2 -4
  73. data/lib/stellar/asset.rb +6 -6
  74. data/lib/stellar/base.rb +1 -1
  75. data/lib/stellar/{base/compat.rb → compat.rb} +6 -7
  76. data/lib/stellar/concerns/transaction.rb +49 -0
  77. data/lib/stellar/convert.rb +2 -2
  78. data/lib/stellar/factories.rb +1 -3
  79. data/lib/stellar/fee_bump_transaction.rb +21 -0
  80. data/lib/stellar/key_pair.rb +9 -6
  81. data/lib/stellar/networks.rb +5 -7
  82. data/lib/stellar/operation.rb +427 -336
  83. data/lib/stellar/{path_payment_result.rb → path_payment_strict_receive_result.rb} +2 -3
  84. data/lib/stellar/price.rb +2 -4
  85. data/lib/stellar/signer_key.rb +4 -8
  86. data/lib/stellar/thresholds.rb +5 -7
  87. data/lib/stellar/transaction.rb +154 -175
  88. data/lib/stellar/transaction_builder.rb +149 -0
  89. data/lib/stellar/transaction_envelope.rb +40 -8
  90. data/lib/stellar/transaction_v0.rb +39 -0
  91. data/lib/stellar/util/continued_fraction.rb +19 -19
  92. data/lib/stellar/util/strkey.rb +39 -14
  93. data/lib/stellar/{base/version.rb → version.rb} +1 -1
  94. metadata +61 -211
  95. data/.gitignore +0 -17
  96. data/.travis.yml +0 -16
  97. data/.yardopts +0 -8
  98. data/CONTRIBUTING.md +0 -48
  99. data/Gemfile +0 -15
  100. data/Guardfile +0 -5
  101. data/Rakefile +0 -4
  102. data/examples/allow_trust.rb +0 -51
  103. data/examples/create_account.rb +0 -26
  104. data/examples/low_level_transaction_post.rb +0 -46
  105. data/examples/mid_level_transaction_post.rb +0 -33
  106. data/examples/non_native_payment.rb +0 -60
  107. data/examples/offer.rb +0 -75
  108. data/examples/transaction_merge.rb +0 -23
  109. data/generated/stellar/path_payment_result_code.rb +0 -47
  110. data/ruby-stellar-base.gemspec +0 -34
  111. data/spec/lib/stellar/account_flags_spec.rb +0 -19
  112. data/spec/lib/stellar/asset_spec.rb +0 -45
  113. data/spec/lib/stellar/convert_spec.rb +0 -61
  114. data/spec/lib/stellar/key_pair_spec.rb +0 -251
  115. data/spec/lib/stellar/networks_spec.rb +0 -77
  116. data/spec/lib/stellar/operation_spec.rb +0 -71
  117. data/spec/lib/stellar/path_payment_result_spec.rb +0 -95
  118. data/spec/lib/stellar/price_spec.rb +0 -34
  119. data/spec/lib/stellar/signer_key_spec.rb +0 -26
  120. data/spec/lib/stellar/thresholds_spec.rb +0 -62
  121. data/spec/lib/stellar/transaction_envelope_spec.rb +0 -93
  122. data/spec/lib/stellar/transaction_spec.rb +0 -100
  123. data/spec/lib/stellar/util/strkey_spec.rb +0 -54
  124. data/spec/spec_helper.rb +0 -16
  125. data/spec/support/matchers/be_strkey.rb +0 -9
  126. data/spec/support/matchers/eq_bytes.rb +0 -5
  127. data/spec/support/matchers/have_length.rb +0 -5
  128. data/tasks/rspec.rake +0 -6
  129. data/tasks/travis.rake +0 -1
  130. data/tasks/xdr.rake +0 -45
  131. data/xdr/Stellar-SCP.x +0 -86
  132. data/xdr/Stellar-ledger-entries.x +0 -295
  133. data/xdr/Stellar-ledger.x +0 -318
  134. data/xdr/Stellar-overlay.x +0 -146
  135. data/xdr/Stellar-transaction.x +0 -834
  136. data/xdr/Stellar-types.x +0 -81
@@ -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 PathPaymentStrictSendOp
9
+ # {
10
+ # Asset sendAsset; // asset we pay with
11
+ # int64 sendAmount; // amount of sendAsset to send (excluding fees)
12
+ #
13
+ # MuxedAccount destination; // recipient of the payment
14
+ # Asset destAsset; // what they end up with
15
+ # int64 destMin; // the minimum amount of dest asset to
16
+ # // be received
17
+ # // The operation will fail if it can't be met
18
+ #
19
+ # Asset path<5>; // additional hops it must go through to get there
20
+ # };
21
+ #
22
+ # ===========================================================================
23
+ module Stellar
24
+ class PathPaymentStrictSendOp < XDR::Struct
25
+ attribute :send_asset, Asset
26
+ attribute :send_amount, Int64
27
+ attribute :destination, MuxedAccount
28
+ attribute :dest_asset, Asset
29
+ attribute :dest_min, Int64
30
+ attribute :path, XDR::VarArray[Asset, 5]
31
+ end
32
+ end
@@ -5,15 +5,15 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union PathPaymentResult switch (PathPaymentResultCode code)
8
+ # union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code)
9
9
  # {
10
- # case PATH_PAYMENT_SUCCESS:
10
+ # case PATH_PAYMENT_STRICT_SEND_SUCCESS:
11
11
  # struct
12
12
  # {
13
13
  # ClaimOfferAtom offers<>;
14
14
  # SimplePaymentResult last;
15
15
  # } success;
16
- # case PATH_PAYMENT_NO_ISSUER:
16
+ # case PATH_PAYMENT_STRICT_SEND_NO_ISSUER:
17
17
  # Asset noIssuer; // the asset that caused the error
18
18
  # default:
19
19
  # void;
@@ -21,15 +21,15 @@ require 'xdr'
21
21
  #
22
22
  # ===========================================================================
23
23
  module Stellar
24
- class PathPaymentResult < XDR::Union
24
+ class PathPaymentStrictSendResult < XDR::Union
25
25
  include XDR::Namespace
26
26
 
27
27
  autoload :Success
28
28
 
29
- switch_on PathPaymentResultCode, :code
29
+ switch_on PathPaymentStrictSendResultCode, :code
30
30
 
31
- switch :path_payment_success, :success
32
- switch :path_payment_no_issuer, :no_issuer
31
+ switch :path_payment_strict_send_success, :success
32
+ switch :path_payment_strict_send_no_issuer, :no_issuer
33
33
  switch :default
34
34
 
35
35
  attribute :success, Success
@@ -13,7 +13,7 @@ require 'xdr'
13
13
  #
14
14
  # ===========================================================================
15
15
  module Stellar
16
- class PathPaymentResult
16
+ class PathPaymentStrictSendResult
17
17
  class Success < XDR::Struct
18
18
  attribute :offers, XDR::VarArray[ClaimOfferAtom]
19
19
  attribute :last, SimplePaymentResult
@@ -0,0 +1,55 @@
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 PathPaymentStrictSendResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # PATH_PAYMENT_STRICT_SEND_SUCCESS = 0, // success
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # PATH_PAYMENT_STRICT_SEND_MALFORMED = -1, // bad input
15
+ # PATH_PAYMENT_STRICT_SEND_UNDERFUNDED =
16
+ # -2, // not enough funds in source account
17
+ # PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST =
18
+ # -3, // no trust line on source account
19
+ # PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED =
20
+ # -4, // source not authorized to transfer
21
+ # PATH_PAYMENT_STRICT_SEND_NO_DESTINATION =
22
+ # -5, // destination account does not exist
23
+ # PATH_PAYMENT_STRICT_SEND_NO_TRUST =
24
+ # -6, // dest missing a trust line for asset
25
+ # PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED =
26
+ # -7, // dest not authorized to hold asset
27
+ # PATH_PAYMENT_STRICT_SEND_LINE_FULL = -8, // dest would go above their limit
28
+ # PATH_PAYMENT_STRICT_SEND_NO_ISSUER = -9, // missing issuer on one asset
29
+ # PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS =
30
+ # -10, // not enough offers to satisfy path
31
+ # PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF =
32
+ # -11, // would cross one of its own offers
33
+ # PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN = -12 // could not satisfy destMin
34
+ # };
35
+ #
36
+ # ===========================================================================
37
+ module Stellar
38
+ class PathPaymentStrictSendResultCode < XDR::Enum
39
+ member :path_payment_strict_send_success, 0
40
+ member :path_payment_strict_send_malformed, -1
41
+ member :path_payment_strict_send_underfunded, -2
42
+ member :path_payment_strict_send_src_no_trust, -3
43
+ member :path_payment_strict_send_src_not_authorized, -4
44
+ member :path_payment_strict_send_no_destination, -5
45
+ member :path_payment_strict_send_no_trust, -6
46
+ member :path_payment_strict_send_not_authorized, -7
47
+ member :path_payment_strict_send_line_full, -8
48
+ member :path_payment_strict_send_no_issuer, -9
49
+ member :path_payment_strict_send_too_few_offers, -10
50
+ member :path_payment_strict_send_offer_cross_self, -11
51
+ member :path_payment_strict_send_under_destmin, -12
52
+
53
+ seal
54
+ end
55
+ end
@@ -7,15 +7,15 @@ require 'xdr'
7
7
  #
8
8
  # struct PaymentOp
9
9
  # {
10
- # AccountID destination; // recipient of the payment
11
- # Asset asset; // what they end up with
12
- # int64 amount; // amount they end up with
10
+ # MuxedAccount destination; // recipient of the payment
11
+ # Asset asset; // what they end up with
12
+ # int64 amount; // amount they end up with
13
13
  # };
14
14
  #
15
15
  # ===========================================================================
16
16
  module Stellar
17
17
  class PaymentOp < XDR::Struct
18
- attribute :destination, AccountID
18
+ attribute :destination, MuxedAccount
19
19
  attribute :asset, Asset
20
20
  attribute :amount, Int64
21
21
  end
@@ -0,0 +1,48 @@
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 PeerStats
9
+ # {
10
+ # NodeID id;
11
+ # string versionStr<100>;
12
+ # uint64 messagesRead;
13
+ # uint64 messagesWritten;
14
+ # uint64 bytesRead;
15
+ # uint64 bytesWritten;
16
+ # uint64 secondsConnected;
17
+ #
18
+ # uint64 uniqueFloodBytesRecv;
19
+ # uint64 duplicateFloodBytesRecv;
20
+ # uint64 uniqueFetchBytesRecv;
21
+ # uint64 duplicateFetchBytesRecv;
22
+ #
23
+ # uint64 uniqueFloodMessageRecv;
24
+ # uint64 duplicateFloodMessageRecv;
25
+ # uint64 uniqueFetchMessageRecv;
26
+ # uint64 duplicateFetchMessageRecv;
27
+ # };
28
+ #
29
+ # ===========================================================================
30
+ module Stellar
31
+ class PeerStats < XDR::Struct
32
+ attribute :id, NodeID
33
+ attribute :version_str, XDR::String[100]
34
+ attribute :messages_read, Uint64
35
+ attribute :messages_written, Uint64
36
+ attribute :bytes_read, Uint64
37
+ attribute :bytes_written, Uint64
38
+ attribute :seconds_connected, Uint64
39
+ attribute :unique_flood_bytes_recv, Uint64
40
+ attribute :duplicate_flood_bytes_recv, Uint64
41
+ attribute :unique_fetch_bytes_recv, Uint64
42
+ attribute :duplicate_fetch_bytes_recv, Uint64
43
+ attribute :unique_flood_message_recv, Uint64
44
+ attribute :duplicate_flood_message_recv, Uint64
45
+ attribute :unique_fetch_message_recv, Uint64
46
+ attribute :duplicate_fetch_message_recv, Uint64
47
+ end
48
+ end
@@ -0,0 +1,20 @@
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 SignedSurveyRequestMessage
9
+ # {
10
+ # Signature requestSignature;
11
+ # SurveyRequestMessage request;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class SignedSurveyRequestMessage < XDR::Struct
17
+ attribute :request_signature, Signature
18
+ attribute :request, SurveyRequestMessage
19
+ end
20
+ end
@@ -0,0 +1,20 @@
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 SignedSurveyResponseMessage
9
+ # {
10
+ # Signature responseSignature;
11
+ # SurveyResponseMessage response;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class SignedSurveyResponseMessage < XDR::Struct
17
+ attribute :response_signature, Signature
18
+ attribute :response, SurveyResponseMessage
19
+ end
20
+ end
@@ -28,6 +28,12 @@ require 'xdr'
28
28
  # case TRANSACTION:
29
29
  # TransactionEnvelope transaction;
30
30
  #
31
+ # case SURVEY_REQUEST:
32
+ # SignedSurveyRequestMessage signedSurveyRequestMessage;
33
+ #
34
+ # case SURVEY_RESPONSE:
35
+ # SignedSurveyResponseMessage signedSurveyResponseMessage;
36
+ #
31
37
  # // SCP
32
38
  # case GET_SCP_QUORUMSET:
33
39
  # uint256 qSetHash;
@@ -53,22 +59,26 @@ module Stellar
53
59
  switch :get_tx_set, :tx_set_hash
54
60
  switch :tx_set, :tx_set
55
61
  switch :transaction, :transaction
62
+ switch :survey_request, :signed_survey_request_message
63
+ switch :survey_response, :signed_survey_response_message
56
64
  switch :get_scp_quorumset, :q_set_hash
57
65
  switch :scp_quorumset, :q_set
58
66
  switch :scp_message, :envelope
59
67
  switch :get_scp_state, :get_scp_ledger_seq
60
68
 
61
- attribute :error, Error
62
- attribute :hello, Hello
63
- attribute :auth, Auth
64
- attribute :dont_have, DontHave
65
- attribute :peers, XDR::VarArray[PeerAddress, 100]
66
- attribute :tx_set_hash, Uint256
67
- attribute :tx_set, TransactionSet
68
- attribute :transaction, TransactionEnvelope
69
- attribute :q_set_hash, Uint256
70
- attribute :q_set, SCPQuorumSet
71
- attribute :envelope, SCPEnvelope
72
- attribute :get_scp_ledger_seq, Uint32
69
+ attribute :error, Error
70
+ attribute :hello, Hello
71
+ attribute :auth, Auth
72
+ attribute :dont_have, DontHave
73
+ attribute :peers, XDR::VarArray[PeerAddress, 100]
74
+ attribute :tx_set_hash, Uint256
75
+ attribute :tx_set, TransactionSet
76
+ attribute :transaction, TransactionEnvelope
77
+ attribute :signed_survey_request_message, SignedSurveyRequestMessage
78
+ attribute :signed_survey_response_message, SignedSurveyResponseMessage
79
+ attribute :q_set_hash, Uint256
80
+ attribute :q_set, SCPQuorumSet
81
+ attribute :envelope, SCPEnvelope
82
+ attribute :get_scp_ledger_seq, Uint32
73
83
  end
74
84
  end
@@ -0,0 +1,20 @@
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 SurveyMessageCommandType
9
+ # {
10
+ # SURVEY_TOPOLOGY = 0
11
+ # };
12
+ #
13
+ # ===========================================================================
14
+ module Stellar
15
+ class SurveyMessageCommandType < XDR::Enum
16
+ member :survey_topology, 0
17
+
18
+ seal
19
+ end
20
+ end
@@ -0,0 +1,26 @@
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 SurveyRequestMessage
9
+ # {
10
+ # NodeID surveyorPeerID;
11
+ # NodeID surveyedPeerID;
12
+ # uint32 ledgerNum;
13
+ # Curve25519Public encryptionKey;
14
+ # SurveyMessageCommandType commandType;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class SurveyRequestMessage < XDR::Struct
20
+ attribute :surveyor_peer_id, NodeID
21
+ attribute :surveyed_peer_id, NodeID
22
+ attribute :ledger_num, Uint32
23
+ attribute :encryption_key, Curve25519Public
24
+ attribute :command_type, SurveyMessageCommandType
25
+ end
26
+ end
@@ -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 SurveyResponseBody switch (SurveyMessageCommandType type)
9
+ # {
10
+ # case SURVEY_TOPOLOGY:
11
+ # TopologyResponseBody topologyResponseBody;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class SurveyResponseBody < XDR::Union
17
+ switch_on SurveyMessageCommandType, :type
18
+
19
+ switch :survey_topology, :topology_response_body
20
+
21
+ attribute :topology_response_body, TopologyResponseBody
22
+ end
23
+ end
@@ -0,0 +1,26 @@
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 SurveyResponseMessage
9
+ # {
10
+ # NodeID surveyorPeerID;
11
+ # NodeID surveyedPeerID;
12
+ # uint32 ledgerNum;
13
+ # SurveyMessageCommandType commandType;
14
+ # EncryptedBody encryptedBody;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class SurveyResponseMessage < XDR::Struct
20
+ attribute :surveyor_peer_id, NodeID
21
+ attribute :surveyed_peer_id, NodeID
22
+ attribute :ledger_num, Uint32
23
+ attribute :command_type, SurveyMessageCommandType
24
+ attribute :encrypted_body, EncryptedBody
25
+ end
26
+ 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
+ # struct TopologyResponseBody
9
+ # {
10
+ # PeerStatList inboundPeers;
11
+ # PeerStatList outboundPeers;
12
+ #
13
+ # uint32 totalInboundPeerCount;
14
+ # uint32 totalOutboundPeerCount;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class TopologyResponseBody < XDR::Struct
20
+ attribute :inbound_peers, PeerStatList
21
+ attribute :outbound_peers, PeerStatList
22
+ attribute :total_inbound_peer_count, Uint32
23
+ attribute :total_outbound_peer_count, Uint32
24
+ end
25
+ end
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # struct Transaction
9
9
  # {
10
10
  # // account used to run the transaction
11
- # AccountID sourceAccount;
11
+ # MuxedAccount sourceAccount;
12
12
  #
13
13
  # // the fee the sourceAccount will pay
14
14
  # uint32 fee;
@@ -39,7 +39,7 @@ module Stellar
39
39
 
40
40
  autoload :Ext
41
41
 
42
- attribute :source_account, AccountID
42
+ attribute :source_account, MuxedAccount
43
43
  attribute :fee, Uint32
44
44
  attribute :seq_num, SequenceNumber
45
45
  attribute :time_bounds, XDR::Option[TimeBounds]