stellar-base 0.23.1 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +134 -29
  3. data/README.md +7 -7
  4. data/generated/stellar-base-generated.rb +44 -1
  5. data/generated/stellar/account_entry.rb +3 -13
  6. data/generated/stellar/account_entry/ext.rb +2 -16
  7. data/generated/stellar/account_entry_extension_v1.rb +32 -0
  8. data/generated/stellar/account_entry_extension_v1/ext.rb +28 -0
  9. data/generated/stellar/account_entry_extension_v2.rb +34 -0
  10. data/generated/stellar/{account_entry/ext/v1 → account_entry_extension_v2}/ext.rb +8 -12
  11. data/generated/stellar/account_flags.rb +9 -4
  12. data/generated/stellar/account_merge_result.rb +1 -1
  13. data/generated/stellar/account_merge_result_code.rb +3 -1
  14. data/generated/stellar/allow_trust_op.rb +3 -18
  15. data/generated/stellar/asset_code.rb +30 -0
  16. data/generated/stellar/begin_sponsoring_future_reserves_op.rb +18 -0
  17. data/generated/stellar/begin_sponsoring_future_reserves_result.rb +26 -0
  18. data/generated/stellar/begin_sponsoring_future_reserves_result_code.rb +29 -0
  19. data/generated/stellar/claim_claimable_balance_op.rb +18 -0
  20. data/generated/stellar/claim_claimable_balance_result.rb +25 -0
  21. data/generated/stellar/claim_claimable_balance_result_code.rb +31 -0
  22. data/generated/stellar/claim_predicate.rb +43 -0
  23. data/generated/stellar/claim_predicate_type.rb +30 -0
  24. data/generated/stellar/claimable_balance_entry.rb +46 -0
  25. data/generated/stellar/claimable_balance_entry/ext.rb +28 -0
  26. data/generated/stellar/claimable_balance_entry_extension_v1.rb +30 -0
  27. data/generated/stellar/claimable_balance_entry_extension_v1/ext.rb +24 -0
  28. data/generated/stellar/claimable_balance_flags.rb +22 -0
  29. data/generated/stellar/claimable_balance_id.rb +23 -0
  30. data/generated/stellar/claimable_balance_id_type.rb +20 -0
  31. data/generated/stellar/claimant.rb +31 -0
  32. data/generated/stellar/claimant/v0.rb +22 -0
  33. data/generated/stellar/claimant_type.rb +20 -0
  34. data/generated/stellar/clawback_claimable_balance_op.rb +18 -0
  35. data/generated/stellar/clawback_claimable_balance_result.rb +26 -0
  36. data/generated/stellar/clawback_claimable_balance_result_code.rb +29 -0
  37. data/generated/stellar/clawback_op.rb +22 -0
  38. data/generated/stellar/clawback_result.rb +25 -0
  39. data/generated/stellar/clawback_result_code.rb +31 -0
  40. data/generated/stellar/create_claimable_balance_op.rb +22 -0
  41. data/generated/stellar/create_claimable_balance_result.rb +27 -0
  42. data/generated/stellar/create_claimable_balance_result_code.rb +30 -0
  43. data/generated/stellar/create_passive_sell_offer_op.rb +1 -1
  44. data/generated/stellar/end_sponsoring_future_reserves_result.rb +26 -0
  45. data/generated/stellar/end_sponsoring_future_reserves_result_code.rb +25 -0
  46. data/generated/stellar/envelope_type.rb +3 -1
  47. data/generated/stellar/inner_transaction_result.rb +2 -1
  48. data/generated/stellar/inner_transaction_result/result.rb +3 -1
  49. data/generated/stellar/ledger_entry.rb +4 -0
  50. data/generated/stellar/ledger_entry/data.rb +12 -8
  51. data/generated/stellar/ledger_entry/ext.rb +4 -0
  52. data/generated/stellar/ledger_entry_extension_v1.rb +30 -0
  53. data/generated/stellar/ledger_entry_extension_v1/ext.rb +24 -0
  54. data/generated/stellar/ledger_entry_type.rb +7 -5
  55. data/generated/stellar/ledger_key.rb +17 -8
  56. data/generated/stellar/ledger_key/claimable_balance.rb +20 -0
  57. data/generated/stellar/operation.rb +16 -0
  58. data/generated/stellar/operation/body.rb +57 -26
  59. data/generated/stellar/operation_id.rb +32 -0
  60. data/generated/stellar/operation_id/id.rb +24 -0
  61. data/generated/stellar/operation_result.rb +16 -0
  62. data/generated/stellar/operation_result/tr.rb +60 -28
  63. data/generated/stellar/operation_result_code.rb +3 -1
  64. data/generated/stellar/operation_type.rb +31 -15
  65. data/generated/stellar/path_payment_strict_receive_result.rb +2 -1
  66. data/generated/stellar/payment_result_code.rb +1 -1
  67. data/generated/stellar/revoke_sponsorship_op.rb +35 -0
  68. data/generated/stellar/revoke_sponsorship_op/signer.rb +22 -0
  69. data/generated/stellar/revoke_sponsorship_result.rb +25 -0
  70. data/generated/stellar/revoke_sponsorship_result_code.rb +31 -0
  71. data/generated/stellar/revoke_sponsorship_type.rb +22 -0
  72. data/generated/stellar/set_options_result_code.rb +14 -11
  73. data/generated/stellar/set_trust_line_flags_op.rb +25 -0
  74. data/generated/stellar/set_trust_line_flags_result.rb +25 -0
  75. data/generated/stellar/set_trust_line_flags_result_code.rb +31 -0
  76. data/generated/stellar/transaction_result_code.rb +5 -3
  77. data/generated/stellar/trust_line_flags.rb +5 -1
  78. data/lib/stellar-base.rb +18 -5
  79. data/lib/stellar/account_flags.rb +1 -1
  80. data/lib/stellar/asset.rb +10 -0
  81. data/lib/stellar/claim_predicate.rb +198 -0
  82. data/lib/stellar/compat.rb +4 -16
  83. data/lib/stellar/concerns/transaction.rb +5 -4
  84. data/lib/stellar/dsl.rb +93 -0
  85. data/lib/stellar/ext/xdr.rb +50 -0
  86. data/lib/stellar/key_pair.rb +60 -53
  87. data/lib/stellar/ledger_key.rb +32 -0
  88. data/lib/stellar/muxed_account.rb +16 -0
  89. data/lib/stellar/networks.rb +12 -12
  90. data/lib/stellar/operation.rb +144 -17
  91. data/lib/stellar/price.rb +11 -2
  92. data/lib/stellar/transaction.rb +1 -169
  93. data/lib/stellar/transaction_builder.rb +28 -2
  94. data/lib/stellar/transaction_envelope.rb +7 -43
  95. data/lib/stellar/transaction_v0.rb +2 -10
  96. data/lib/stellar/trust_line_flags.rb +53 -0
  97. data/lib/stellar/util/strkey.rb +6 -6
  98. data/lib/stellar/version.rb +1 -3
  99. metadata +177 -30
  100. data/generated/stellar/account_entry/ext/v1.rb +0 -34
  101. data/generated/stellar/allow_trust_op/asset.rb +0 -33
  102. data/lib/stellar/util/continued_fraction.rb +0 -96
@@ -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
9
+ # {
10
+ # ClaimableBalanceID balanceID;
11
+ # }
12
+ #
13
+ # ===========================================================================
14
+ module Stellar
15
+ class LedgerKey
16
+ class ClaimableBalance < XDR::Struct
17
+ attribute :balance_id, ClaimableBalanceID
18
+ end
19
+ end
20
+ end
@@ -42,6 +42,22 @@ require 'xdr'
42
42
  # ManageBuyOfferOp manageBuyOfferOp;
43
43
  # case PATH_PAYMENT_STRICT_SEND:
44
44
  # PathPaymentStrictSendOp pathPaymentStrictSendOp;
45
+ # case CREATE_CLAIMABLE_BALANCE:
46
+ # CreateClaimableBalanceOp createClaimableBalanceOp;
47
+ # case CLAIM_CLAIMABLE_BALANCE:
48
+ # ClaimClaimableBalanceOp claimClaimableBalanceOp;
49
+ # case BEGIN_SPONSORING_FUTURE_RESERVES:
50
+ # BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
51
+ # case END_SPONSORING_FUTURE_RESERVES:
52
+ # void;
53
+ # case REVOKE_SPONSORSHIP:
54
+ # RevokeSponsorshipOp revokeSponsorshipOp;
55
+ # case CLAWBACK:
56
+ # ClawbackOp clawbackOp;
57
+ # case CLAWBACK_CLAIMABLE_BALANCE:
58
+ # ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
59
+ # case SET_TRUST_LINE_FLAGS:
60
+ # SetTrustLineFlagsOp setTrustLineFlagsOp;
45
61
  # }
46
62
  # body;
47
63
  # };
@@ -35,6 +35,22 @@ require 'xdr'
35
35
  # ManageBuyOfferOp manageBuyOfferOp;
36
36
  # case PATH_PAYMENT_STRICT_SEND:
37
37
  # PathPaymentStrictSendOp pathPaymentStrictSendOp;
38
+ # case CREATE_CLAIMABLE_BALANCE:
39
+ # CreateClaimableBalanceOp createClaimableBalanceOp;
40
+ # case CLAIM_CLAIMABLE_BALANCE:
41
+ # ClaimClaimableBalanceOp claimClaimableBalanceOp;
42
+ # case BEGIN_SPONSORING_FUTURE_RESERVES:
43
+ # BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
44
+ # case END_SPONSORING_FUTURE_RESERVES:
45
+ # void;
46
+ # case REVOKE_SPONSORSHIP:
47
+ # RevokeSponsorshipOp revokeSponsorshipOp;
48
+ # case CLAWBACK:
49
+ # ClawbackOp clawbackOp;
50
+ # case CLAWBACK_CLAIMABLE_BALANCE:
51
+ # ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
52
+ # case SET_TRUST_LINE_FLAGS:
53
+ # SetTrustLineFlagsOp setTrustLineFlagsOp;
38
54
  # }
39
55
  #
40
56
  # ===========================================================================
@@ -43,34 +59,49 @@ module Stellar
43
59
  class Body < XDR::Union
44
60
  switch_on OperationType, :type
45
61
 
46
- switch :create_account, :create_account_op
47
- switch :payment, :payment_op
48
- switch :path_payment_strict_receive, :path_payment_strict_receive_op
49
- switch :manage_sell_offer, :manage_sell_offer_op
50
- switch :create_passive_sell_offer, :create_passive_sell_offer_op
51
- switch :set_options, :set_options_op
52
- switch :change_trust, :change_trust_op
53
- switch :allow_trust, :allow_trust_op
54
- switch :account_merge, :destination
62
+ switch :create_account, :create_account_op
63
+ switch :payment, :payment_op
64
+ switch :path_payment_strict_receive, :path_payment_strict_receive_op
65
+ switch :manage_sell_offer, :manage_sell_offer_op
66
+ switch :create_passive_sell_offer, :create_passive_sell_offer_op
67
+ switch :set_options, :set_options_op
68
+ switch :change_trust, :change_trust_op
69
+ switch :allow_trust, :allow_trust_op
70
+ switch :account_merge, :destination
55
71
  switch :inflation
56
- switch :manage_data, :manage_data_op
57
- switch :bump_sequence, :bump_sequence_op
58
- switch :manage_buy_offer, :manage_buy_offer_op
59
- switch :path_payment_strict_send, :path_payment_strict_send_op
72
+ switch :manage_data, :manage_data_op
73
+ switch :bump_sequence, :bump_sequence_op
74
+ switch :manage_buy_offer, :manage_buy_offer_op
75
+ switch :path_payment_strict_send, :path_payment_strict_send_op
76
+ switch :create_claimable_balance, :create_claimable_balance_op
77
+ switch :claim_claimable_balance, :claim_claimable_balance_op
78
+ switch :begin_sponsoring_future_reserves, :begin_sponsoring_future_reserves_op
79
+ switch :end_sponsoring_future_reserves
80
+ switch :revoke_sponsorship, :revoke_sponsorship_op
81
+ switch :clawback, :clawback_op
82
+ switch :clawback_claimable_balance, :clawback_claimable_balance_op
83
+ switch :set_trust_line_flags, :set_trust_line_flags_op
60
84
 
61
- attribute :create_account_op, CreateAccountOp
62
- attribute :payment_op, PaymentOp
63
- attribute :path_payment_strict_receive_op, PathPaymentStrictReceiveOp
64
- attribute :manage_sell_offer_op, ManageSellOfferOp
65
- attribute :create_passive_sell_offer_op, CreatePassiveSellOfferOp
66
- attribute :set_options_op, SetOptionsOp
67
- attribute :change_trust_op, ChangeTrustOp
68
- attribute :allow_trust_op, AllowTrustOp
69
- attribute :destination, MuxedAccount
70
- attribute :manage_data_op, ManageDataOp
71
- attribute :bump_sequence_op, BumpSequenceOp
72
- attribute :manage_buy_offer_op, ManageBuyOfferOp
73
- attribute :path_payment_strict_send_op, PathPaymentStrictSendOp
85
+ attribute :create_account_op, CreateAccountOp
86
+ attribute :payment_op, PaymentOp
87
+ attribute :path_payment_strict_receive_op, PathPaymentStrictReceiveOp
88
+ attribute :manage_sell_offer_op, ManageSellOfferOp
89
+ attribute :create_passive_sell_offer_op, CreatePassiveSellOfferOp
90
+ attribute :set_options_op, SetOptionsOp
91
+ attribute :change_trust_op, ChangeTrustOp
92
+ attribute :allow_trust_op, AllowTrustOp
93
+ attribute :destination, MuxedAccount
94
+ attribute :manage_data_op, ManageDataOp
95
+ attribute :bump_sequence_op, BumpSequenceOp
96
+ attribute :manage_buy_offer_op, ManageBuyOfferOp
97
+ attribute :path_payment_strict_send_op, PathPaymentStrictSendOp
98
+ attribute :create_claimable_balance_op, CreateClaimableBalanceOp
99
+ attribute :claim_claimable_balance_op, ClaimClaimableBalanceOp
100
+ attribute :begin_sponsoring_future_reserves_op, BeginSponsoringFutureReservesOp
101
+ attribute :revoke_sponsorship_op, RevokeSponsorshipOp
102
+ attribute :clawback_op, ClawbackOp
103
+ attribute :clawback_claimable_balance_op, ClawbackClaimableBalanceOp
104
+ attribute :set_trust_line_flags_op, SetTrustLineFlagsOp
74
105
  end
75
106
  end
76
107
  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
+ # union OperationID switch (EnvelopeType type)
9
+ # {
10
+ # case ENVELOPE_TYPE_OP_ID:
11
+ # struct
12
+ # {
13
+ # MuxedAccount sourceAccount;
14
+ # SequenceNumber seqNum;
15
+ # uint32 opNum;
16
+ # } id;
17
+ # };
18
+ #
19
+ # ===========================================================================
20
+ module Stellar
21
+ class OperationID < XDR::Union
22
+ include XDR::Namespace
23
+
24
+ autoload :Id
25
+
26
+ switch_on EnvelopeType, :type
27
+
28
+ switch :envelope_type_op_id, :id
29
+
30
+ attribute :id, Id
31
+ end
32
+ 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
+ # struct
9
+ # {
10
+ # MuxedAccount sourceAccount;
11
+ # SequenceNumber seqNum;
12
+ # uint32 opNum;
13
+ # }
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class OperationID
18
+ class Id < XDR::Struct
19
+ attribute :source_account, MuxedAccount
20
+ attribute :seq_num, SequenceNumber
21
+ attribute :op_num, Uint32
22
+ end
23
+ end
24
+ end
@@ -38,6 +38,22 @@ require 'xdr'
38
38
  # ManageBuyOfferResult manageBuyOfferResult;
39
39
  # case PATH_PAYMENT_STRICT_SEND:
40
40
  # PathPaymentStrictSendResult pathPaymentStrictSendResult;
41
+ # case CREATE_CLAIMABLE_BALANCE:
42
+ # CreateClaimableBalanceResult createClaimableBalanceResult;
43
+ # case CLAIM_CLAIMABLE_BALANCE:
44
+ # ClaimClaimableBalanceResult claimClaimableBalanceResult;
45
+ # case BEGIN_SPONSORING_FUTURE_RESERVES:
46
+ # BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
47
+ # case END_SPONSORING_FUTURE_RESERVES:
48
+ # EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
49
+ # case REVOKE_SPONSORSHIP:
50
+ # RevokeSponsorshipResult revokeSponsorshipResult;
51
+ # case CLAWBACK:
52
+ # ClawbackResult clawbackResult;
53
+ # case CLAWBACK_CLAIMABLE_BALANCE:
54
+ # ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
55
+ # case SET_TRUST_LINE_FLAGS:
56
+ # SetTrustLineFlagsResult setTrustLineFlagsResult;
41
57
  # }
42
58
  # tr;
43
59
  # default:
@@ -35,6 +35,22 @@ require 'xdr'
35
35
  # ManageBuyOfferResult manageBuyOfferResult;
36
36
  # case PATH_PAYMENT_STRICT_SEND:
37
37
  # PathPaymentStrictSendResult pathPaymentStrictSendResult;
38
+ # case CREATE_CLAIMABLE_BALANCE:
39
+ # CreateClaimableBalanceResult createClaimableBalanceResult;
40
+ # case CLAIM_CLAIMABLE_BALANCE:
41
+ # ClaimClaimableBalanceResult claimClaimableBalanceResult;
42
+ # case BEGIN_SPONSORING_FUTURE_RESERVES:
43
+ # BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult;
44
+ # case END_SPONSORING_FUTURE_RESERVES:
45
+ # EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
46
+ # case REVOKE_SPONSORSHIP:
47
+ # RevokeSponsorshipResult revokeSponsorshipResult;
48
+ # case CLAWBACK:
49
+ # ClawbackResult clawbackResult;
50
+ # case CLAWBACK_CLAIMABLE_BALANCE:
51
+ # ClawbackClaimableBalanceResult clawbackClaimableBalanceResult;
52
+ # case SET_TRUST_LINE_FLAGS:
53
+ # SetTrustLineFlagsResult setTrustLineFlagsResult;
38
54
  # }
39
55
  #
40
56
  # ===========================================================================
@@ -43,35 +59,51 @@ module Stellar
43
59
  class Tr < XDR::Union
44
60
  switch_on OperationType, :type
45
61
 
46
- switch :create_account, :create_account_result
47
- switch :payment, :payment_result
48
- switch :path_payment_strict_receive, :path_payment_strict_receive_result
49
- switch :manage_sell_offer, :manage_sell_offer_result
50
- switch :create_passive_sell_offer, :create_passive_sell_offer_result
51
- switch :set_options, :set_options_result
52
- switch :change_trust, :change_trust_result
53
- switch :allow_trust, :allow_trust_result
54
- switch :account_merge, :account_merge_result
55
- switch :inflation, :inflation_result
56
- switch :manage_data, :manage_data_result
57
- switch :bump_sequence, :bump_seq_result
58
- switch :manage_buy_offer, :manage_buy_offer_result
59
- switch :path_payment_strict_send, :path_payment_strict_send_result
62
+ switch :create_account, :create_account_result
63
+ switch :payment, :payment_result
64
+ switch :path_payment_strict_receive, :path_payment_strict_receive_result
65
+ switch :manage_sell_offer, :manage_sell_offer_result
66
+ switch :create_passive_sell_offer, :create_passive_sell_offer_result
67
+ switch :set_options, :set_options_result
68
+ switch :change_trust, :change_trust_result
69
+ switch :allow_trust, :allow_trust_result
70
+ switch :account_merge, :account_merge_result
71
+ switch :inflation, :inflation_result
72
+ switch :manage_data, :manage_data_result
73
+ switch :bump_sequence, :bump_seq_result
74
+ switch :manage_buy_offer, :manage_buy_offer_result
75
+ switch :path_payment_strict_send, :path_payment_strict_send_result
76
+ switch :create_claimable_balance, :create_claimable_balance_result
77
+ switch :claim_claimable_balance, :claim_claimable_balance_result
78
+ switch :begin_sponsoring_future_reserves, :begin_sponsoring_future_reserves_result
79
+ switch :end_sponsoring_future_reserves, :end_sponsoring_future_reserves_result
80
+ switch :revoke_sponsorship, :revoke_sponsorship_result
81
+ switch :clawback, :clawback_result
82
+ switch :clawback_claimable_balance, :clawback_claimable_balance_result
83
+ switch :set_trust_line_flags, :set_trust_line_flags_result
60
84
 
61
- attribute :create_account_result, CreateAccountResult
62
- attribute :payment_result, PaymentResult
63
- attribute :path_payment_strict_receive_result, PathPaymentStrictReceiveResult
64
- attribute :manage_sell_offer_result, ManageSellOfferResult
65
- attribute :create_passive_sell_offer_result, ManageSellOfferResult
66
- attribute :set_options_result, SetOptionsResult
67
- attribute :change_trust_result, ChangeTrustResult
68
- attribute :allow_trust_result, AllowTrustResult
69
- attribute :account_merge_result, AccountMergeResult
70
- attribute :inflation_result, InflationResult
71
- attribute :manage_data_result, ManageDataResult
72
- attribute :bump_seq_result, BumpSequenceResult
73
- attribute :manage_buy_offer_result, ManageBuyOfferResult
74
- attribute :path_payment_strict_send_result, PathPaymentStrictSendResult
85
+ attribute :create_account_result, CreateAccountResult
86
+ attribute :payment_result, PaymentResult
87
+ attribute :path_payment_strict_receive_result, PathPaymentStrictReceiveResult
88
+ attribute :manage_sell_offer_result, ManageSellOfferResult
89
+ attribute :create_passive_sell_offer_result, ManageSellOfferResult
90
+ attribute :set_options_result, SetOptionsResult
91
+ attribute :change_trust_result, ChangeTrustResult
92
+ attribute :allow_trust_result, AllowTrustResult
93
+ attribute :account_merge_result, AccountMergeResult
94
+ attribute :inflation_result, InflationResult
95
+ attribute :manage_data_result, ManageDataResult
96
+ attribute :bump_seq_result, BumpSequenceResult
97
+ attribute :manage_buy_offer_result, ManageBuyOfferResult
98
+ attribute :path_payment_strict_send_result, PathPaymentStrictSendResult
99
+ attribute :create_claimable_balance_result, CreateClaimableBalanceResult
100
+ attribute :claim_claimable_balance_result, ClaimClaimableBalanceResult
101
+ attribute :begin_sponsoring_future_reserves_result, BeginSponsoringFutureReservesResult
102
+ attribute :end_sponsoring_future_reserves_result, EndSponsoringFutureReservesResult
103
+ attribute :revoke_sponsorship_result, RevokeSponsorshipResult
104
+ attribute :clawback_result, ClawbackResult
105
+ attribute :clawback_claimable_balance_result, ClawbackClaimableBalanceResult
106
+ attribute :set_trust_line_flags_result, SetTrustLineFlagsResult
75
107
  end
76
108
  end
77
109
  end
@@ -13,7 +13,8 @@ require 'xdr'
13
13
  # opNO_ACCOUNT = -2, // source account was not found
14
14
  # opNOT_SUPPORTED = -3, // operation not supported at this time
15
15
  # opTOO_MANY_SUBENTRIES = -4, // max number of subentries already reached
16
- # opEXCEEDED_WORK_LIMIT = -5 // operation did too much work
16
+ # opEXCEEDED_WORK_LIMIT = -5, // operation did too much work
17
+ # opTOO_MANY_SPONSORING = -6 // account is sponsoring too many entries
17
18
  # };
18
19
  #
19
20
  # ===========================================================================
@@ -25,6 +26,7 @@ module Stellar
25
26
  member :op_not_supported, -3
26
27
  member :op_too_many_subentries, -4
27
28
  member :op_exceeded_work_limit, -5
29
+ member :op_too_many_sponsoring, -6
28
30
 
29
31
  seal
30
32
  end
@@ -20,26 +20,42 @@ require 'xdr'
20
20
  # MANAGE_DATA = 10,
21
21
  # BUMP_SEQUENCE = 11,
22
22
  # MANAGE_BUY_OFFER = 12,
23
- # PATH_PAYMENT_STRICT_SEND = 13
23
+ # PATH_PAYMENT_STRICT_SEND = 13,
24
+ # CREATE_CLAIMABLE_BALANCE = 14,
25
+ # CLAIM_CLAIMABLE_BALANCE = 15,
26
+ # BEGIN_SPONSORING_FUTURE_RESERVES = 16,
27
+ # END_SPONSORING_FUTURE_RESERVES = 17,
28
+ # REVOKE_SPONSORSHIP = 18,
29
+ # CLAWBACK = 19,
30
+ # CLAWBACK_CLAIMABLE_BALANCE = 20,
31
+ # SET_TRUST_LINE_FLAGS = 21
24
32
  # };
25
33
  #
26
34
  # ===========================================================================
27
35
  module Stellar
28
36
  class OperationType < XDR::Enum
29
- member :create_account, 0
30
- member :payment, 1
31
- member :path_payment_strict_receive, 2
32
- member :manage_sell_offer, 3
33
- member :create_passive_sell_offer, 4
34
- member :set_options, 5
35
- member :change_trust, 6
36
- member :allow_trust, 7
37
- member :account_merge, 8
38
- member :inflation, 9
39
- member :manage_data, 10
40
- member :bump_sequence, 11
41
- member :manage_buy_offer, 12
42
- member :path_payment_strict_send, 13
37
+ member :create_account, 0
38
+ member :payment, 1
39
+ member :path_payment_strict_receive, 2
40
+ member :manage_sell_offer, 3
41
+ member :create_passive_sell_offer, 4
42
+ member :set_options, 5
43
+ member :change_trust, 6
44
+ member :allow_trust, 7
45
+ member :account_merge, 8
46
+ member :inflation, 9
47
+ member :manage_data, 10
48
+ member :bump_sequence, 11
49
+ member :manage_buy_offer, 12
50
+ member :path_payment_strict_send, 13
51
+ member :create_claimable_balance, 14
52
+ member :claim_claimable_balance, 15
53
+ member :begin_sponsoring_future_reserves, 16
54
+ member :end_sponsoring_future_reserves, 17
55
+ member :revoke_sponsorship, 18
56
+ member :clawback, 19
57
+ member :clawback_claimable_balance, 20
58
+ member :set_trust_line_flags, 21
43
59
 
44
60
  seal
45
61
  end
@@ -5,7 +5,8 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union PathPaymentStrictReceiveResult switch (PathPaymentStrictReceiveResultCode code)
8
+ # union PathPaymentStrictReceiveResult switch (
9
+ # PathPaymentStrictReceiveResultCode code)
9
10
  # {
10
11
  # case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS:
11
12
  # struct
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # enum PaymentResultCode
9
9
  # {
10
10
  # // codes considered as "success" for the operation
11
- # PAYMENT_SUCCESS = 0, // payment successfuly completed
11
+ # PAYMENT_SUCCESS = 0, // payment successfully completed
12
12
  #
13
13
  # // codes considered as "failure" for the operation
14
14
  # PAYMENT_MALFORMED = -1, // bad input
@@ -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 RevokeSponsorshipOp switch (RevokeSponsorshipType type)
9
+ # {
10
+ # case REVOKE_SPONSORSHIP_LEDGER_ENTRY:
11
+ # LedgerKey ledgerKey;
12
+ # case REVOKE_SPONSORSHIP_SIGNER:
13
+ # struct
14
+ # {
15
+ # AccountID accountID;
16
+ # SignerKey signerKey;
17
+ # } signer;
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class RevokeSponsorshipOp < XDR::Union
23
+ include XDR::Namespace
24
+
25
+ autoload :Signer
26
+
27
+ switch_on RevokeSponsorshipType, :type
28
+
29
+ switch :revoke_sponsorship_ledger_entry, :ledger_key
30
+ switch :revoke_sponsorship_signer, :signer
31
+
32
+ attribute :ledger_key, LedgerKey
33
+ attribute :signer, Signer
34
+ end
35
+ end