stellar-base 0.26.0 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -32
  3. data/README.md +3 -3
  4. data/generated/stellar/account_flags.rb +9 -4
  5. data/generated/stellar/account_merge_result.rb +1 -1
  6. data/generated/stellar/allow_trust_op.rb +3 -18
  7. data/generated/stellar/allow_trust_result_code.rb +4 -1
  8. data/generated/stellar/alpha_num12.rb +20 -0
  9. data/generated/stellar/alpha_num4.rb +20 -0
  10. data/generated/stellar/asset.rb +2 -15
  11. data/generated/stellar/asset_code.rb +30 -0
  12. data/generated/stellar/asset_type.rb +3 -1
  13. data/generated/stellar/begin_sponsoring_future_reserves_result.rb +2 -1
  14. data/generated/stellar/change_trust_asset.rb +39 -0
  15. data/generated/stellar/change_trust_op.rb +2 -2
  16. data/generated/stellar/change_trust_result_code.rb +13 -7
  17. data/generated/stellar/claim_atom.rb +31 -0
  18. data/generated/stellar/claim_atom_type.rb +24 -0
  19. data/generated/stellar/claim_liquidity_atom.rb +30 -0
  20. data/generated/stellar/claim_offer_atom_v0.rb +33 -0
  21. data/generated/stellar/claimable_balance_entry/ext.rb +4 -0
  22. data/generated/stellar/claimable_balance_entry.rb +2 -0
  23. data/generated/stellar/{asset/alpha_num12.rb → claimable_balance_entry_extension_v1/ext.rb} +9 -7
  24. data/generated/stellar/{operation_id.rb → claimable_balance_entry_extension_v1.rb} +12 -14
  25. data/generated/stellar/claimable_balance_flags.rb +22 -0
  26. data/generated/stellar/clawback_claimable_balance_op.rb +18 -0
  27. data/generated/stellar/clawback_claimable_balance_result.rb +26 -0
  28. data/generated/stellar/clawback_claimable_balance_result_code.rb +29 -0
  29. data/generated/stellar/clawback_op.rb +22 -0
  30. data/generated/stellar/clawback_result.rb +25 -0
  31. data/generated/stellar/clawback_result_code.rb +31 -0
  32. data/generated/stellar/create_passive_sell_offer_op.rb +1 -1
  33. data/generated/stellar/end_sponsoring_future_reserves_result.rb +2 -1
  34. data/generated/stellar/envelope_type.rb +10 -8
  35. data/generated/stellar/{operation_id/id.rb → hash_id_preimage/operation_id.rb} +4 -4
  36. data/generated/stellar/hash_id_preimage/revoke_id.rb +28 -0
  37. data/generated/stellar/hash_id_preimage.rb +44 -0
  38. data/generated/stellar/ledger_entry/data.rb +4 -0
  39. data/generated/stellar/ledger_entry.rb +2 -0
  40. data/generated/stellar/ledger_entry_type.rb +3 -1
  41. data/generated/stellar/ledger_header/ext.rb +4 -0
  42. data/generated/stellar/ledger_header.rb +2 -0
  43. data/generated/stellar/ledger_header_extension_v1/ext.rb +24 -0
  44. data/generated/stellar/ledger_header_extension_v1.rb +30 -0
  45. data/generated/stellar/ledger_header_flags.rb +24 -0
  46. data/generated/stellar/{asset/alpha_num4.rb → ledger_key/liquidity_pool.rb} +4 -6
  47. data/generated/stellar/ledger_key/trust_line.rb +2 -2
  48. data/generated/stellar/ledger_key.rb +10 -1
  49. data/generated/stellar/ledger_upgrade.rb +4 -0
  50. data/generated/stellar/ledger_upgrade_type.rb +3 -1
  51. data/generated/stellar/liquidity_pool_constant_product_parameters.rb +22 -0
  52. data/generated/stellar/liquidity_pool_deposit_op.rb +26 -0
  53. data/generated/stellar/liquidity_pool_deposit_result.rb +26 -0
  54. data/generated/stellar/liquidity_pool_deposit_result_code.rb +41 -0
  55. data/generated/stellar/liquidity_pool_entry/body/constant_product.rb +31 -0
  56. data/generated/stellar/liquidity_pool_entry/body.rb +37 -0
  57. data/generated/stellar/liquidity_pool_entry.rb +38 -0
  58. data/generated/stellar/liquidity_pool_parameters.rb +23 -0
  59. data/generated/stellar/liquidity_pool_type.rb +20 -0
  60. data/generated/stellar/liquidity_pool_withdraw_op.rb +24 -0
  61. data/generated/stellar/liquidity_pool_withdraw_result.rb +26 -0
  62. data/generated/stellar/liquidity_pool_withdraw_result_code.rb +36 -0
  63. data/generated/stellar/manage_offer_success_result.rb +2 -2
  64. data/generated/stellar/operation/body.rb +20 -0
  65. data/generated/stellar/operation.rb +10 -0
  66. data/generated/stellar/operation_result/tr.rb +20 -0
  67. data/generated/stellar/operation_result.rb +10 -0
  68. data/generated/stellar/operation_type.rb +11 -1
  69. data/generated/stellar/path_payment_strict_receive_result/success.rb +2 -2
  70. data/generated/stellar/path_payment_strict_receive_result.rb +1 -1
  71. data/generated/stellar/path_payment_strict_send_result/success.rb +2 -2
  72. data/generated/stellar/path_payment_strict_send_result.rb +1 -1
  73. data/generated/stellar/payment_result_code.rb +1 -1
  74. data/generated/stellar/revoke_sponsorship_op.rb +1 -2
  75. data/generated/stellar/revoke_sponsorship_result_code.rb +3 -1
  76. data/generated/stellar/scp_quorum_set.rb +2 -2
  77. data/generated/stellar/set_options_result_code.rb +14 -11
  78. data/generated/stellar/set_trust_line_flags_op.rb +25 -0
  79. data/generated/stellar/set_trust_line_flags_result.rb +25 -0
  80. data/generated/stellar/set_trust_line_flags_result_code.rb +34 -0
  81. data/generated/stellar/transaction_result_code.rb +1 -1
  82. data/generated/stellar/trust_line_asset.rb +39 -0
  83. data/generated/stellar/trust_line_entry/ext/v1/ext.rb +4 -0
  84. data/generated/stellar/trust_line_entry/ext/v1.rb +2 -0
  85. data/generated/stellar/trust_line_entry/ext.rb +2 -0
  86. data/generated/stellar/trust_line_entry.rb +7 -5
  87. data/generated/stellar/trust_line_entry_extension_v2/ext.rb +24 -0
  88. data/generated/stellar/trust_line_entry_extension_v2.rb +30 -0
  89. data/generated/stellar/trust_line_flags.rb +5 -1
  90. data/generated/stellar-base-generated.rb +40 -1
  91. data/lib/stellar/account.rb +59 -0
  92. data/lib/stellar/account_flags.rb +1 -1
  93. data/lib/stellar/amount.rb +36 -0
  94. data/lib/stellar/asset.rb +8 -0
  95. data/lib/stellar/compat.rb +6 -3
  96. data/lib/stellar/concerns/transaction.rb +4 -2
  97. data/lib/stellar/dsl.rb +26 -0
  98. data/lib/stellar/ledger_key.rb +5 -3
  99. data/lib/stellar/liquidity_pool/base_pool.rb +47 -0
  100. data/lib/stellar/liquidity_pool/constant_product_pool.rb +15 -0
  101. data/lib/stellar/liquidity_pool.rb +12 -0
  102. data/lib/stellar/operation.rb +357 -386
  103. data/lib/stellar/price.rb +13 -7
  104. data/lib/stellar/transaction_builder.rb +27 -11
  105. data/lib/stellar/trust_line_flags.rb +53 -0
  106. data/lib/stellar/util/strkey.rb +15 -7
  107. data/lib/stellar/version.rb +3 -0
  108. data/lib/stellar-base.rb +5 -2
  109. metadata +61 -16
  110. data/generated/stellar/allow_trust_op/asset.rb +0 -33
  111. data/lib/stellar/base/version.rb +0 -5
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # struct
9
9
  # {
10
10
  # AccountID accountID;
11
- # Asset asset;
11
+ # TrustLineAsset asset;
12
12
  # }
13
13
  #
14
14
  # ===========================================================================
@@ -16,7 +16,7 @@ module Stellar
16
16
  class LedgerKey
17
17
  class TrustLine < XDR::Struct
18
18
  attribute :account_id, AccountID
19
- attribute :asset, Asset
19
+ attribute :asset, TrustLineAsset
20
20
  end
21
21
  end
22
22
  end
@@ -17,7 +17,7 @@ require 'xdr'
17
17
  # struct
18
18
  # {
19
19
  # AccountID accountID;
20
- # Asset asset;
20
+ # TrustLineAsset asset;
21
21
  # } trustLine;
22
22
  #
23
23
  # case OFFER:
@@ -39,6 +39,12 @@ require 'xdr'
39
39
  # {
40
40
  # ClaimableBalanceID balanceID;
41
41
  # } claimableBalance;
42
+ #
43
+ # case LIQUIDITY_POOL:
44
+ # struct
45
+ # {
46
+ # PoolID liquidityPoolID;
47
+ # } liquidityPool;
42
48
  # };
43
49
  #
44
50
  # ===========================================================================
@@ -51,6 +57,7 @@ module Stellar
51
57
  autoload :Offer
52
58
  autoload :Data
53
59
  autoload :ClaimableBalance
60
+ autoload :LiquidityPool
54
61
 
55
62
  switch_on LedgerEntryType, :type
56
63
 
@@ -59,11 +66,13 @@ module Stellar
59
66
  switch :offer, :offer
60
67
  switch :data, :data
61
68
  switch :claimable_balance, :claimable_balance
69
+ switch :liquidity_pool, :liquidity_pool
62
70
 
63
71
  attribute :account, Account
64
72
  attribute :trust_line, TrustLine
65
73
  attribute :offer, Offer
66
74
  attribute :data, Data
67
75
  attribute :claimable_balance, ClaimableBalance
76
+ attribute :liquidity_pool, LiquidityPool
68
77
  end
69
78
  end
@@ -15,6 +15,8 @@ require 'xdr'
15
15
  # uint32 newMaxTxSetSize; // update maxTxSetSize
16
16
  # case LEDGER_UPGRADE_BASE_RESERVE:
17
17
  # uint32 newBaseReserve; // update baseReserve
18
+ # case LEDGER_UPGRADE_FLAGS:
19
+ # uint32 newFlags; // update flags
18
20
  # };
19
21
  #
20
22
  # ===========================================================================
@@ -26,10 +28,12 @@ module Stellar
26
28
  switch :ledger_upgrade_base_fee, :new_base_fee
27
29
  switch :ledger_upgrade_max_tx_set_size, :new_max_tx_set_size
28
30
  switch :ledger_upgrade_base_reserve, :new_base_reserve
31
+ switch :ledger_upgrade_flags, :new_flags
29
32
 
30
33
  attribute :new_ledger_version, Uint32
31
34
  attribute :new_base_fee, Uint32
32
35
  attribute :new_max_tx_set_size, Uint32
33
36
  attribute :new_base_reserve, Uint32
37
+ attribute :new_flags, Uint32
34
38
  end
35
39
  end
@@ -10,7 +10,8 @@ require 'xdr'
10
10
  # LEDGER_UPGRADE_VERSION = 1,
11
11
  # LEDGER_UPGRADE_BASE_FEE = 2,
12
12
  # LEDGER_UPGRADE_MAX_TX_SET_SIZE = 3,
13
- # LEDGER_UPGRADE_BASE_RESERVE = 4
13
+ # LEDGER_UPGRADE_BASE_RESERVE = 4,
14
+ # LEDGER_UPGRADE_FLAGS = 5
14
15
  # };
15
16
  #
16
17
  # ===========================================================================
@@ -20,6 +21,7 @@ module Stellar
20
21
  member :ledger_upgrade_base_fee, 2
21
22
  member :ledger_upgrade_max_tx_set_size, 3
22
23
  member :ledger_upgrade_base_reserve, 4
24
+ member :ledger_upgrade_flags, 5
23
25
 
24
26
  seal
25
27
  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 LiquidityPoolConstantProductParameters
9
+ # {
10
+ # Asset assetA; // assetA < assetB
11
+ # Asset assetB;
12
+ # int32 fee; // Fee is in basis points, so the actual rate is (fee/100)%
13
+ # };
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class LiquidityPoolConstantProductParameters < XDR::Struct
18
+ attribute :asset_a, Asset
19
+ attribute :asset_b, Asset
20
+ attribute :fee, Int32
21
+ end
22
+ 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 LiquidityPoolDepositOp
9
+ # {
10
+ # PoolID liquidityPoolID;
11
+ # int64 maxAmountA; // maximum amount of first asset to deposit
12
+ # int64 maxAmountB; // maximum amount of second asset to deposit
13
+ # Price minPrice; // minimum depositA/depositB
14
+ # Price maxPrice; // maximum depositA/depositB
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class LiquidityPoolDepositOp < XDR::Struct
20
+ attribute :liquidity_pool_id, PoolID
21
+ attribute :max_amount_a, Int64
22
+ attribute :max_amount_b, Int64
23
+ attribute :min_price, Price
24
+ attribute :max_price, Price
25
+ end
26
+ 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
+ # union LiquidityPoolDepositResult switch (
9
+ # LiquidityPoolDepositResultCode code)
10
+ # {
11
+ # case LIQUIDITY_POOL_DEPOSIT_SUCCESS:
12
+ # void;
13
+ # default:
14
+ # void;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class LiquidityPoolDepositResult < XDR::Union
20
+ switch_on LiquidityPoolDepositResultCode, :code
21
+
22
+ switch :liquidity_pool_deposit_success
23
+ switch :default
24
+
25
+ end
26
+ end
@@ -0,0 +1,41 @@
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 LiquidityPoolDepositResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # LIQUIDITY_POOL_DEPOSIT_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # LIQUIDITY_POOL_DEPOSIT_MALFORMED = -1, // bad input
15
+ # LIQUIDITY_POOL_DEPOSIT_NO_TRUST = -2, // no trust line for one of the
16
+ # // assets
17
+ # LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED = -3, // not authorized for one of the
18
+ # // assets
19
+ # LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED = -4, // not enough balance for one of
20
+ # // the assets
21
+ # LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't
22
+ # // have sufficient limit
23
+ # LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds
24
+ # LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7 // pool reserves are full
25
+ # };
26
+ #
27
+ # ===========================================================================
28
+ module Stellar
29
+ class LiquidityPoolDepositResultCode < XDR::Enum
30
+ member :liquidity_pool_deposit_success, 0
31
+ member :liquidity_pool_deposit_malformed, -1
32
+ member :liquidity_pool_deposit_no_trust, -2
33
+ member :liquidity_pool_deposit_not_authorized, -3
34
+ member :liquidity_pool_deposit_underfunded, -4
35
+ member :liquidity_pool_deposit_line_full, -5
36
+ member :liquidity_pool_deposit_bad_price, -6
37
+ member :liquidity_pool_deposit_pool_full, -7
38
+
39
+ seal
40
+ end
41
+ end
@@ -0,0 +1,31 @@
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
+ # LiquidityPoolConstantProductParameters params;
11
+ #
12
+ # int64 reserveA; // amount of A in the pool
13
+ # int64 reserveB; // amount of B in the pool
14
+ # int64 totalPoolShares; // total number of pool shares issued
15
+ # int64 poolSharesTrustLineCount; // number of trust lines for the associated pool shares
16
+ # }
17
+ #
18
+ # ===========================================================================
19
+ module Stellar
20
+ class LiquidityPoolEntry
21
+ class Body
22
+ class ConstantProduct < XDR::Struct
23
+ attribute :params, LiquidityPoolConstantProductParameters
24
+ attribute :reserve_a, Int64
25
+ attribute :reserve_b, Int64
26
+ attribute :total_pool_shares, Int64
27
+ attribute :pool_shares_trust_line_count, Int64
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,37 @@
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 (LiquidityPoolType type)
9
+ # {
10
+ # case LIQUIDITY_POOL_CONSTANT_PRODUCT:
11
+ # struct
12
+ # {
13
+ # LiquidityPoolConstantProductParameters params;
14
+ #
15
+ # int64 reserveA; // amount of A in the pool
16
+ # int64 reserveB; // amount of B in the pool
17
+ # int64 totalPoolShares; // total number of pool shares issued
18
+ # int64 poolSharesTrustLineCount; // number of trust lines for the associated pool shares
19
+ # } constantProduct;
20
+ # }
21
+ #
22
+ # ===========================================================================
23
+ module Stellar
24
+ class LiquidityPoolEntry
25
+ class Body < XDR::Union
26
+ include XDR::Namespace
27
+
28
+ autoload :ConstantProduct
29
+
30
+ switch_on LiquidityPoolType, :type
31
+
32
+ switch :liquidity_pool_constant_product, :constant_product
33
+
34
+ attribute :constant_product, ConstantProduct
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,38 @@
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 LiquidityPoolEntry
9
+ # {
10
+ # PoolID liquidityPoolID;
11
+ #
12
+ # union switch (LiquidityPoolType type)
13
+ # {
14
+ # case LIQUIDITY_POOL_CONSTANT_PRODUCT:
15
+ # struct
16
+ # {
17
+ # LiquidityPoolConstantProductParameters params;
18
+ #
19
+ # int64 reserveA; // amount of A in the pool
20
+ # int64 reserveB; // amount of B in the pool
21
+ # int64 totalPoolShares; // total number of pool shares issued
22
+ # int64 poolSharesTrustLineCount; // number of trust lines for the associated pool shares
23
+ # } constantProduct;
24
+ # }
25
+ # body;
26
+ # };
27
+ #
28
+ # ===========================================================================
29
+ module Stellar
30
+ class LiquidityPoolEntry < XDR::Struct
31
+ include XDR::Namespace
32
+
33
+ autoload :Body
34
+
35
+ attribute :liquidity_pool_id, PoolID
36
+ attribute :body, Body
37
+ end
38
+ 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 LiquidityPoolParameters switch (LiquidityPoolType type)
9
+ # {
10
+ # case LIQUIDITY_POOL_CONSTANT_PRODUCT:
11
+ # LiquidityPoolConstantProductParameters constantProduct;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class LiquidityPoolParameters < XDR::Union
17
+ switch_on LiquidityPoolType, :type
18
+
19
+ switch :liquidity_pool_constant_product, :constant_product
20
+
21
+ attribute :constant_product, LiquidityPoolConstantProductParameters
22
+ end
23
+ 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 LiquidityPoolType
9
+ # {
10
+ # LIQUIDITY_POOL_CONSTANT_PRODUCT = 0
11
+ # };
12
+ #
13
+ # ===========================================================================
14
+ module Stellar
15
+ class LiquidityPoolType < XDR::Enum
16
+ member :liquidity_pool_constant_product, 0
17
+
18
+ seal
19
+ end
20
+ 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 LiquidityPoolWithdrawOp
9
+ # {
10
+ # PoolID liquidityPoolID;
11
+ # int64 amount; // amount of pool shares to withdraw
12
+ # int64 minAmountA; // minimum amount of first asset to withdraw
13
+ # int64 minAmountB; // minimum amount of second asset to withdraw
14
+ # };
15
+ #
16
+ # ===========================================================================
17
+ module Stellar
18
+ class LiquidityPoolWithdrawOp < XDR::Struct
19
+ attribute :liquidity_pool_id, PoolID
20
+ attribute :amount, Int64
21
+ attribute :min_amount_a, Int64
22
+ attribute :min_amount_b, Int64
23
+ end
24
+ 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
+ # union LiquidityPoolWithdrawResult switch (
9
+ # LiquidityPoolWithdrawResultCode code)
10
+ # {
11
+ # case LIQUIDITY_POOL_WITHDRAW_SUCCESS:
12
+ # void;
13
+ # default:
14
+ # void;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class LiquidityPoolWithdrawResult < XDR::Union
20
+ switch_on LiquidityPoolWithdrawResultCode, :code
21
+
22
+ switch :liquidity_pool_withdraw_success
23
+ switch :default
24
+
25
+ end
26
+ end
@@ -0,0 +1,36 @@
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 LiquidityPoolWithdrawResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # LIQUIDITY_POOL_WITHDRAW_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # LIQUIDITY_POOL_WITHDRAW_MALFORMED = -1, // bad input
15
+ # LIQUIDITY_POOL_WITHDRAW_NO_TRUST = -2, // no trust line for one of the
16
+ # // assets
17
+ # LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED = -3, // not enough balance of the
18
+ # // pool share
19
+ # LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one
20
+ # // of the assets
21
+ # LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough
22
+ # };
23
+ #
24
+ # ===========================================================================
25
+ module Stellar
26
+ class LiquidityPoolWithdrawResultCode < XDR::Enum
27
+ member :liquidity_pool_withdraw_success, 0
28
+ member :liquidity_pool_withdraw_malformed, -1
29
+ member :liquidity_pool_withdraw_no_trust, -2
30
+ member :liquidity_pool_withdraw_underfunded, -3
31
+ member :liquidity_pool_withdraw_line_full, -4
32
+ member :liquidity_pool_withdraw_under_minimum, -5
33
+
34
+ seal
35
+ end
36
+ end
@@ -8,7 +8,7 @@ require 'xdr'
8
8
  # struct ManageOfferSuccessResult
9
9
  # {
10
10
  # // offers that got claimed while creating this offer
11
- # ClaimOfferAtom offersClaimed<>;
11
+ # ClaimAtom offersClaimed<>;
12
12
  #
13
13
  # union switch (ManageOfferEffect effect)
14
14
  # {
@@ -28,7 +28,7 @@ module Stellar
28
28
 
29
29
  autoload :Offer
30
30
 
31
- attribute :offers_claimed, XDR::VarArray[ClaimOfferAtom]
31
+ attribute :offers_claimed, XDR::VarArray[ClaimAtom]
32
32
  attribute :offer, Offer
33
33
  end
34
34
  end
@@ -45,6 +45,16 @@ require 'xdr'
45
45
  # void;
46
46
  # case REVOKE_SPONSORSHIP:
47
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;
54
+ # case LIQUIDITY_POOL_DEPOSIT:
55
+ # LiquidityPoolDepositOp liquidityPoolDepositOp;
56
+ # case LIQUIDITY_POOL_WITHDRAW:
57
+ # LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
48
58
  # }
49
59
  #
50
60
  # ===========================================================================
@@ -72,6 +82,11 @@ module Stellar
72
82
  switch :begin_sponsoring_future_reserves, :begin_sponsoring_future_reserves_op
73
83
  switch :end_sponsoring_future_reserves
74
84
  switch :revoke_sponsorship, :revoke_sponsorship_op
85
+ switch :clawback, :clawback_op
86
+ switch :clawback_claimable_balance, :clawback_claimable_balance_op
87
+ switch :set_trust_line_flags, :set_trust_line_flags_op
88
+ switch :liquidity_pool_deposit, :liquidity_pool_deposit_op
89
+ switch :liquidity_pool_withdraw, :liquidity_pool_withdraw_op
75
90
 
76
91
  attribute :create_account_op, CreateAccountOp
77
92
  attribute :payment_op, PaymentOp
@@ -90,6 +105,11 @@ module Stellar
90
105
  attribute :claim_claimable_balance_op, ClaimClaimableBalanceOp
91
106
  attribute :begin_sponsoring_future_reserves_op, BeginSponsoringFutureReservesOp
92
107
  attribute :revoke_sponsorship_op, RevokeSponsorshipOp
108
+ attribute :clawback_op, ClawbackOp
109
+ attribute :clawback_claimable_balance_op, ClawbackClaimableBalanceOp
110
+ attribute :set_trust_line_flags_op, SetTrustLineFlagsOp
111
+ attribute :liquidity_pool_deposit_op, LiquidityPoolDepositOp
112
+ attribute :liquidity_pool_withdraw_op, LiquidityPoolWithdrawOp
93
113
  end
94
114
  end
95
115
  end
@@ -52,6 +52,16 @@ require 'xdr'
52
52
  # void;
53
53
  # case REVOKE_SPONSORSHIP:
54
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;
61
+ # case LIQUIDITY_POOL_DEPOSIT:
62
+ # LiquidityPoolDepositOp liquidityPoolDepositOp;
63
+ # case LIQUIDITY_POOL_WITHDRAW:
64
+ # LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
55
65
  # }
56
66
  # body;
57
67
  # };
@@ -45,6 +45,16 @@ require 'xdr'
45
45
  # EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
46
46
  # case REVOKE_SPONSORSHIP:
47
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;
54
+ # case LIQUIDITY_POOL_DEPOSIT:
55
+ # LiquidityPoolDepositResult liquidityPoolDepositResult;
56
+ # case LIQUIDITY_POOL_WITHDRAW:
57
+ # LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
48
58
  # }
49
59
  #
50
60
  # ===========================================================================
@@ -72,6 +82,11 @@ module Stellar
72
82
  switch :begin_sponsoring_future_reserves, :begin_sponsoring_future_reserves_result
73
83
  switch :end_sponsoring_future_reserves, :end_sponsoring_future_reserves_result
74
84
  switch :revoke_sponsorship, :revoke_sponsorship_result
85
+ switch :clawback, :clawback_result
86
+ switch :clawback_claimable_balance, :clawback_claimable_balance_result
87
+ switch :set_trust_line_flags, :set_trust_line_flags_result
88
+ switch :liquidity_pool_deposit, :liquidity_pool_deposit_result
89
+ switch :liquidity_pool_withdraw, :liquidity_pool_withdraw_result
75
90
 
76
91
  attribute :create_account_result, CreateAccountResult
77
92
  attribute :payment_result, PaymentResult
@@ -92,6 +107,11 @@ module Stellar
92
107
  attribute :begin_sponsoring_future_reserves_result, BeginSponsoringFutureReservesResult
93
108
  attribute :end_sponsoring_future_reserves_result, EndSponsoringFutureReservesResult
94
109
  attribute :revoke_sponsorship_result, RevokeSponsorshipResult
110
+ attribute :clawback_result, ClawbackResult
111
+ attribute :clawback_claimable_balance_result, ClawbackClaimableBalanceResult
112
+ attribute :set_trust_line_flags_result, SetTrustLineFlagsResult
113
+ attribute :liquidity_pool_deposit_result, LiquidityPoolDepositResult
114
+ attribute :liquidity_pool_withdraw_result, LiquidityPoolWithdrawResult
95
115
  end
96
116
  end
97
117
  end
@@ -48,6 +48,16 @@ require 'xdr'
48
48
  # EndSponsoringFutureReservesResult endSponsoringFutureReservesResult;
49
49
  # case REVOKE_SPONSORSHIP:
50
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;
57
+ # case LIQUIDITY_POOL_DEPOSIT:
58
+ # LiquidityPoolDepositResult liquidityPoolDepositResult;
59
+ # case LIQUIDITY_POOL_WITHDRAW:
60
+ # LiquidityPoolWithdrawResult liquidityPoolWithdrawResult;
51
61
  # }
52
62
  # tr;
53
63
  # default:
@@ -25,7 +25,12 @@ require 'xdr'
25
25
  # CLAIM_CLAIMABLE_BALANCE = 15,
26
26
  # BEGIN_SPONSORING_FUTURE_RESERVES = 16,
27
27
  # END_SPONSORING_FUTURE_RESERVES = 17,
28
- # REVOKE_SPONSORSHIP = 18
28
+ # REVOKE_SPONSORSHIP = 18,
29
+ # CLAWBACK = 19,
30
+ # CLAWBACK_CLAIMABLE_BALANCE = 20,
31
+ # SET_TRUST_LINE_FLAGS = 21,
32
+ # LIQUIDITY_POOL_DEPOSIT = 22,
33
+ # LIQUIDITY_POOL_WITHDRAW = 23
29
34
  # };
30
35
  #
31
36
  # ===========================================================================
@@ -50,6 +55,11 @@ module Stellar
50
55
  member :begin_sponsoring_future_reserves, 16
51
56
  member :end_sponsoring_future_reserves, 17
52
57
  member :revoke_sponsorship, 18
58
+ member :clawback, 19
59
+ member :clawback_claimable_balance, 20
60
+ member :set_trust_line_flags, 21
61
+ member :liquidity_pool_deposit, 22
62
+ member :liquidity_pool_withdraw, 23
53
63
 
54
64
  seal
55
65
  end
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct
9
9
  # {
10
- # ClaimOfferAtom offers<>;
10
+ # ClaimAtom offers<>;
11
11
  # SimplePaymentResult last;
12
12
  # }
13
13
  #
@@ -15,7 +15,7 @@ require 'xdr'
15
15
  module Stellar
16
16
  class PathPaymentStrictReceiveResult
17
17
  class Success < XDR::Struct
18
- attribute :offers, XDR::VarArray[ClaimOfferAtom]
18
+ attribute :offers, XDR::VarArray[ClaimAtom]
19
19
  attribute :last, SimplePaymentResult
20
20
  end
21
21
  end
@@ -11,7 +11,7 @@ require 'xdr'
11
11
  # case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS:
12
12
  # struct
13
13
  # {
14
- # ClaimOfferAtom offers<>;
14
+ # ClaimAtom offers<>;
15
15
  # SimplePaymentResult last;
16
16
  # } success;
17
17
  # case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: