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,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
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct HmacSha256Key
9
9
  # {
10
- # opaque key[32];
10
+ # opaque key[32];
11
11
  # };
12
12
  #
13
13
  # ===========================================================================
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct HmacSha256Mac
9
9
  # {
10
- # opaque mac[32];
10
+ # opaque mac[32];
11
11
  # };
12
12
  #
13
13
  # ===========================================================================
@@ -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
@@ -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 InnerTransactionResultPair
9
+ # {
10
+ # Hash transactionHash; // hash of the inner transaction
11
+ # InnerTransactionResult result; // result for the inner transaction
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class InnerTransactionResultPair < XDR::Struct
17
+ attribute :transaction_hash, Hash
18
+ attribute :result, InnerTransactionResult
19
+ end
20
+ 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 LedgerCloseMeta switch (int v)
9
+ # {
10
+ # case 0:
11
+ # LedgerCloseMetaV0 v0;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class LedgerCloseMeta < XDR::Union
17
+ switch_on XDR::Int, :v
18
+
19
+ switch 0, :v0
20
+
21
+ attribute :v0, LedgerCloseMetaV0
22
+ end
23
+ end
@@ -0,0 +1,35 @@
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 LedgerCloseMetaV0
9
+ # {
10
+ # LedgerHeaderHistoryEntry ledgerHeader;
11
+ # // NB: txSet is sorted in "Hash order"
12
+ # TransactionSet txSet;
13
+ #
14
+ # // NB: transactions are sorted in apply order here
15
+ # // fees for all transactions are processed first
16
+ # // followed by applying transactions
17
+ # TransactionResultMeta txProcessing<>;
18
+ #
19
+ # // upgrades are applied last
20
+ # UpgradeEntryMeta upgradesProcessing<>;
21
+ #
22
+ # // other misc information attached to the ledger close
23
+ # SCPHistoryEntry scpInfo<>;
24
+ # };
25
+ #
26
+ # ===========================================================================
27
+ module Stellar
28
+ class LedgerCloseMetaV0 < XDR::Struct
29
+ attribute :ledger_header, LedgerHeaderHistoryEntry
30
+ attribute :tx_set, TransactionSet
31
+ attribute :tx_processing, XDR::VarArray[TransactionResultMeta]
32
+ attribute :upgrades_processing, XDR::VarArray[UpgradeEntryMeta]
33
+ attribute :scp_info, XDR::VarArray[SCPHistoryEntry]
34
+ end
35
+ end
@@ -16,14 +16,15 @@ require 'xdr'
16
16
  # MANAGE_BUY_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
17
17
  # MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
18
18
  # MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
19
- # MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
20
- # MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
21
- # MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
19
+ # MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
20
+ # MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
21
+ # MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
22
22
  # MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
23
23
  # MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
24
24
  #
25
25
  # // update errors
26
- # MANAGE_BUY_OFFER_NOT_FOUND = -11, // offerID does not match an existing offer
26
+ # MANAGE_BUY_OFFER_NOT_FOUND =
27
+ # -11, // offerID does not match an existing offer
27
28
  #
28
29
  # MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
29
30
  # };
@@ -11,21 +11,25 @@ require 'xdr'
11
11
  # MANAGE_SELL_OFFER_SUCCESS = 0,
12
12
  #
13
13
  # // codes considered as "failure" for the operation
14
- # MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
15
- # MANAGE_SELL_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
16
- # MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
14
+ # MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
15
+ # MANAGE_SELL_OFFER_SELL_NO_TRUST =
16
+ # -2, // no trust line for what we're selling
17
+ # MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
17
18
  # MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
18
19
  # MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
19
- # MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
20
- # MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
21
- # MANAGE_SELL_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
20
+ # MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
21
+ # MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
22
+ # MANAGE_SELL_OFFER_CROSS_SELF =
23
+ # -8, // would cross an offer from the same user
22
24
  # MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
23
25
  # MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
24
26
  #
25
27
  # // update errors
26
- # MANAGE_SELL_OFFER_NOT_FOUND = -11, // offerID does not match an existing offer
28
+ # MANAGE_SELL_OFFER_NOT_FOUND =
29
+ # -11, // offerID does not match an existing offer
27
30
  #
28
- # MANAGE_SELL_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
31
+ # MANAGE_SELL_OFFER_LOW_RESERVE =
32
+ # -12 // not enough funds to create a new Offer
29
33
  # };
30
34
  #
31
35
  # ===========================================================================
@@ -26,7 +26,10 @@ require 'xdr'
26
26
  # GET_SCP_STATE = 12,
27
27
  #
28
28
  # // new messages
29
- # HELLO = 13
29
+ # HELLO = 13,
30
+ #
31
+ # SURVEY_REQUEST = 14,
32
+ # SURVEY_RESPONSE = 15
30
33
  # };
31
34
  #
32
35
  # ===========================================================================
@@ -45,6 +48,8 @@ module Stellar
45
48
  member :scp_message, 11
46
49
  member :get_scp_state, 12
47
50
  member :hello, 13
51
+ member :survey_request, 14
52
+ member :survey_response, 15
48
53
 
49
54
  seal
50
55
  end
@@ -0,0 +1,35 @@
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 MuxedAccount switch (CryptoKeyType type)
9
+ # {
10
+ # case KEY_TYPE_ED25519:
11
+ # uint256 ed25519;
12
+ # case KEY_TYPE_MUXED_ED25519:
13
+ # struct
14
+ # {
15
+ # uint64 id;
16
+ # uint256 ed25519;
17
+ # } med25519;
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class MuxedAccount < XDR::Union
23
+ include XDR::Namespace
24
+
25
+ autoload :Med25519
26
+
27
+ switch_on CryptoKeyType, :type
28
+
29
+ switch :key_type_ed25519, :ed25519
30
+ switch :key_type_muxed_ed25519, :med25519
31
+
32
+ attribute :ed25519, Uint256
33
+ attribute :med25519, Med25519
34
+ end
35
+ 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
9
+ # {
10
+ # uint64 id;
11
+ # uint256 ed25519;
12
+ # }
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class MuxedAccount
17
+ class Med25519 < XDR::Struct
18
+ attribute :id, Uint64
19
+ attribute :ed25519, Uint256
20
+ end
21
+ end
22
+ end