stellar-base 0.26.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1,30 @@
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 ClaimLiquidityAtom
9
+ # {
10
+ # PoolID liquidityPoolID;
11
+ #
12
+ # // amount and asset taken from the pool
13
+ # Asset assetSold;
14
+ # int64 amountSold;
15
+ #
16
+ # // amount and asset sent to the pool
17
+ # Asset assetBought;
18
+ # int64 amountBought;
19
+ # };
20
+ #
21
+ # ===========================================================================
22
+ module Stellar
23
+ class ClaimLiquidityAtom < XDR::Struct
24
+ attribute :liquidity_pool_id, PoolID
25
+ attribute :asset_sold, Asset
26
+ attribute :amount_sold, Int64
27
+ attribute :asset_bought, Asset
28
+ attribute :amount_bought, Int64
29
+ end
30
+ end
@@ -0,0 +1,33 @@
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 ClaimOfferAtomV0
9
+ # {
10
+ # // emitted to identify the offer
11
+ # uint256 sellerEd25519; // Account that owns the offer
12
+ # int64 offerID;
13
+ #
14
+ # // amount and asset taken from the owner
15
+ # Asset assetSold;
16
+ # int64 amountSold;
17
+ #
18
+ # // amount and asset sent to the owner
19
+ # Asset assetBought;
20
+ # int64 amountBought;
21
+ # };
22
+ #
23
+ # ===========================================================================
24
+ module Stellar
25
+ class ClaimOfferAtomV0 < XDR::Struct
26
+ attribute :seller_ed25519, Uint256
27
+ attribute :offer_id, Int64
28
+ attribute :asset_sold, Asset
29
+ attribute :amount_sold, Int64
30
+ attribute :asset_bought, Asset
31
+ attribute :amount_bought, Int64
32
+ end
33
+ end
@@ -9,6 +9,8 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 1:
13
+ # ClaimableBalanceEntryExtensionV1 v1;
12
14
  # }
13
15
  #
14
16
  # ===========================================================================
@@ -18,7 +20,9 @@ module Stellar
18
20
  switch_on XDR::Int, :v
19
21
 
20
22
  switch 0
23
+ switch 1, :v1
21
24
 
25
+ attribute :v1, ClaimableBalanceEntryExtensionV1
22
26
  end
23
27
  end
24
28
  end
@@ -24,6 +24,8 @@ require 'xdr'
24
24
  # {
25
25
  # case 0:
26
26
  # void;
27
+ # case 1:
28
+ # ClaimableBalanceEntryExtensionV1 v1;
27
29
  # }
28
30
  # ext;
29
31
  # };
@@ -5,18 +5,20 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # struct
8
+ # union switch (int v)
9
9
  # {
10
- # AssetCode12 assetCode;
11
- # AccountID issuer;
10
+ # case 0:
11
+ # void;
12
12
  # }
13
13
  #
14
14
  # ===========================================================================
15
15
  module Stellar
16
- class Asset
17
- class AlphaNum12 < XDR::Struct
18
- attribute :asset_code, AssetCode12
19
- attribute :issuer, AccountID
16
+ class ClaimableBalanceEntryExtensionV1
17
+ class Ext < XDR::Union
18
+ switch_on XDR::Int, :v
19
+
20
+ switch 0
21
+
20
22
  end
21
23
  end
22
24
  end
@@ -5,28 +5,26 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union OperationID switch (EnvelopeType type)
8
+ # struct ClaimableBalanceEntryExtensionV1
9
9
  # {
10
- # case ENVELOPE_TYPE_OP_ID:
11
- # struct
10
+ # union switch (int v)
12
11
  # {
13
- # MuxedAccount sourceAccount;
14
- # SequenceNumber seqNum;
15
- # uint32 opNum;
16
- # } id;
12
+ # case 0:
13
+ # void;
14
+ # }
15
+ # ext;
16
+ #
17
+ # uint32 flags; // see ClaimableBalanceFlags
17
18
  # };
18
19
  #
19
20
  # ===========================================================================
20
21
  module Stellar
21
- class OperationID < XDR::Union
22
+ class ClaimableBalanceEntryExtensionV1 < XDR::Struct
22
23
  include XDR::Namespace
23
24
 
24
- autoload :Id
25
+ autoload :Ext
25
26
 
26
- switch_on EnvelopeType, :type
27
-
28
- switch :envelope_type_op_id, :id
29
-
30
- attribute :id, Id
27
+ attribute :ext, Ext
28
+ attribute :flags, Uint32
31
29
  end
32
30
  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
+ # enum ClaimableBalanceFlags
9
+ # {
10
+ # // If set, the issuer account of the asset held by the claimable balance may
11
+ # // clawback the claimable balance
12
+ # CLAIMABLE_BALANCE_CLAWBACK_ENABLED_FLAG = 0x1
13
+ # };
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class ClaimableBalanceFlags < XDR::Enum
18
+ member :claimable_balance_clawback_enabled_flag, 1
19
+
20
+ seal
21
+ end
22
+ end
@@ -0,0 +1,18 @@
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 ClawbackClaimableBalanceOp
9
+ # {
10
+ # ClaimableBalanceID balanceID;
11
+ # };
12
+ #
13
+ # ===========================================================================
14
+ module Stellar
15
+ class ClawbackClaimableBalanceOp < XDR::Struct
16
+ attribute :balance_id, ClaimableBalanceID
17
+ end
18
+ 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 ClawbackClaimableBalanceResult switch (
9
+ # ClawbackClaimableBalanceResultCode code)
10
+ # {
11
+ # case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS:
12
+ # void;
13
+ # default:
14
+ # void;
15
+ # };
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class ClawbackClaimableBalanceResult < XDR::Union
20
+ switch_on ClawbackClaimableBalanceResultCode, :code
21
+
22
+ switch :clawback_claimable_balance_success
23
+ switch :default
24
+
25
+ end
26
+ end
@@ -0,0 +1,29 @@
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 ClawbackClaimableBalanceResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # CLAWBACK_CLAIMABLE_BALANCE_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1,
15
+ # CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER = -2,
16
+ # CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED = -3
17
+ # };
18
+ #
19
+ # ===========================================================================
20
+ module Stellar
21
+ class ClawbackClaimableBalanceResultCode < XDR::Enum
22
+ member :clawback_claimable_balance_success, 0
23
+ member :clawback_claimable_balance_does_not_exist, -1
24
+ member :clawback_claimable_balance_not_issuer, -2
25
+ member :clawback_claimable_balance_not_clawback_enabled, -3
26
+
27
+ seal
28
+ end
29
+ 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 ClawbackOp
9
+ # {
10
+ # Asset asset;
11
+ # MuxedAccount from;
12
+ # int64 amount;
13
+ # };
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class ClawbackOp < XDR::Struct
18
+ attribute :asset, Asset
19
+ attribute :from, MuxedAccount
20
+ attribute :amount, Int64
21
+ end
22
+ 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 ClawbackResult switch (ClawbackResultCode code)
9
+ # {
10
+ # case CLAWBACK_SUCCESS:
11
+ # void;
12
+ # default:
13
+ # void;
14
+ # };
15
+ #
16
+ # ===========================================================================
17
+ module Stellar
18
+ class ClawbackResult < XDR::Union
19
+ switch_on ClawbackResultCode, :code
20
+
21
+ switch :clawback_success
22
+ switch :default
23
+
24
+ end
25
+ 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
+ # enum ClawbackResultCode
9
+ # {
10
+ # // codes considered as "success" for the operation
11
+ # CLAWBACK_SUCCESS = 0,
12
+ #
13
+ # // codes considered as "failure" for the operation
14
+ # CLAWBACK_MALFORMED = -1,
15
+ # CLAWBACK_NOT_CLAWBACK_ENABLED = -2,
16
+ # CLAWBACK_NO_TRUST = -3,
17
+ # CLAWBACK_UNDERFUNDED = -4
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class ClawbackResultCode < XDR::Enum
23
+ member :clawback_success, 0
24
+ member :clawback_malformed, -1
25
+ member :clawback_not_clawback_enabled, -2
26
+ member :clawback_no_trust, -3
27
+ member :clawback_underfunded, -4
28
+
29
+ seal
30
+ end
31
+ end
@@ -9,7 +9,7 @@ require 'xdr'
9
9
  # {
10
10
  # Asset selling; // A
11
11
  # Asset buying; // B
12
- # int64 amount; // amount taker gets. if set to 0, delete the offer
12
+ # int64 amount; // amount taker gets
13
13
  # Price price; // cost of A in terms of B
14
14
  # };
15
15
  #
@@ -5,7 +5,8 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union EndSponsoringFutureReservesResult switch (EndSponsoringFutureReservesResultCode code)
8
+ # union EndSponsoringFutureReservesResult switch (
9
+ # EndSponsoringFutureReservesResultCode code)
9
10
  # {
10
11
  # case END_SPONSORING_FUTURE_RESERVES_SUCCESS:
11
12
  # void;
@@ -13,19 +13,21 @@ require 'xdr'
13
13
  # ENVELOPE_TYPE_AUTH = 3,
14
14
  # ENVELOPE_TYPE_SCPVALUE = 4,
15
15
  # ENVELOPE_TYPE_TX_FEE_BUMP = 5,
16
- # ENVELOPE_TYPE_OP_ID = 6
16
+ # ENVELOPE_TYPE_OP_ID = 6,
17
+ # ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7
17
18
  # };
18
19
  #
19
20
  # ===========================================================================
20
21
  module Stellar
21
22
  class EnvelopeType < XDR::Enum
22
- member :envelope_type_tx_v0, 0
23
- member :envelope_type_scp, 1
24
- member :envelope_type_tx, 2
25
- member :envelope_type_auth, 3
26
- member :envelope_type_scpvalue, 4
27
- member :envelope_type_tx_fee_bump, 5
28
- member :envelope_type_op_id, 6
23
+ member :envelope_type_tx_v0, 0
24
+ member :envelope_type_scp, 1
25
+ member :envelope_type_tx, 2
26
+ member :envelope_type_auth, 3
27
+ member :envelope_type_scpvalue, 4
28
+ member :envelope_type_tx_fee_bump, 5
29
+ member :envelope_type_op_id, 6
30
+ member :envelope_type_pool_revoke_op_id, 7
29
31
 
30
32
  seal
31
33
  end
@@ -7,16 +7,16 @@ require 'xdr'
7
7
  #
8
8
  # struct
9
9
  # {
10
- # MuxedAccount sourceAccount;
10
+ # AccountID sourceAccount;
11
11
  # SequenceNumber seqNum;
12
12
  # uint32 opNum;
13
13
  # }
14
14
  #
15
15
  # ===========================================================================
16
16
  module Stellar
17
- class OperationID
18
- class Id < XDR::Struct
19
- attribute :source_account, MuxedAccount
17
+ class HashIDPreimage
18
+ class OperationID < XDR::Struct
19
+ attribute :source_account, AccountID
20
20
  attribute :seq_num, SequenceNumber
21
21
  attribute :op_num, Uint32
22
22
  end
@@ -0,0 +1,28 @@
1
+ # This code was automatically generated using xdrgen
2
+ # DO NOT EDIT or your changes may be overwritten
3
+
4
+ require 'xdr'
5
+
6
+ # === xdr source ============================================================
7
+ #
8
+ # struct
9
+ # {
10
+ # AccountID sourceAccount;
11
+ # SequenceNumber seqNum;
12
+ # uint32 opNum;
13
+ # PoolID liquidityPoolID;
14
+ # Asset asset;
15
+ # }
16
+ #
17
+ # ===========================================================================
18
+ module Stellar
19
+ class HashIDPreimage
20
+ class RevokeID < XDR::Struct
21
+ attribute :source_account, AccountID
22
+ attribute :seq_num, SequenceNumber
23
+ attribute :op_num, Uint32
24
+ attribute :liquidity_pool_id, PoolID
25
+ attribute :asset, Asset
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,44 @@
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 HashIDPreimage switch (EnvelopeType type)
9
+ # {
10
+ # case ENVELOPE_TYPE_OP_ID:
11
+ # struct
12
+ # {
13
+ # AccountID sourceAccount;
14
+ # SequenceNumber seqNum;
15
+ # uint32 opNum;
16
+ # } operationID;
17
+ # case ENVELOPE_TYPE_POOL_REVOKE_OP_ID:
18
+ # struct
19
+ # {
20
+ # AccountID sourceAccount;
21
+ # SequenceNumber seqNum;
22
+ # uint32 opNum;
23
+ # PoolID liquidityPoolID;
24
+ # Asset asset;
25
+ # } revokeID;
26
+ # };
27
+ #
28
+ # ===========================================================================
29
+ module Stellar
30
+ class HashIDPreimage < XDR::Union
31
+ include XDR::Namespace
32
+
33
+ autoload :OperationID
34
+ autoload :RevokeID
35
+
36
+ switch_on EnvelopeType, :type
37
+
38
+ switch :envelope_type_op_id, :operation_id
39
+ switch :envelope_type_pool_revoke_op_id, :revoke_id
40
+
41
+ attribute :operation_id, OperationID
42
+ attribute :revoke_id, RevokeID
43
+ end
44
+ end
@@ -17,6 +17,8 @@ require 'xdr'
17
17
  # DataEntry data;
18
18
  # case CLAIMABLE_BALANCE:
19
19
  # ClaimableBalanceEntry claimableBalance;
20
+ # case LIQUIDITY_POOL:
21
+ # LiquidityPoolEntry liquidityPool;
20
22
  # }
21
23
  #
22
24
  # ===========================================================================
@@ -30,12 +32,14 @@ module Stellar
30
32
  switch :offer, :offer
31
33
  switch :data, :data
32
34
  switch :claimable_balance, :claimable_balance
35
+ switch :liquidity_pool, :liquidity_pool
33
36
 
34
37
  attribute :account, AccountEntry
35
38
  attribute :trust_line, TrustLineEntry
36
39
  attribute :offer, OfferEntry
37
40
  attribute :data, DataEntry
38
41
  attribute :claimable_balance, ClaimableBalanceEntry
42
+ attribute :liquidity_pool, LiquidityPoolEntry
39
43
  end
40
44
  end
41
45
  end
@@ -21,6 +21,8 @@ require 'xdr'
21
21
  # DataEntry data;
22
22
  # case CLAIMABLE_BALANCE:
23
23
  # ClaimableBalanceEntry claimableBalance;
24
+ # case LIQUIDITY_POOL:
25
+ # LiquidityPoolEntry liquidityPool;
24
26
  # }
25
27
  # data;
26
28
  #
@@ -11,7 +11,8 @@ require 'xdr'
11
11
  # TRUSTLINE = 1,
12
12
  # OFFER = 2,
13
13
  # DATA = 3,
14
- # CLAIMABLE_BALANCE = 4
14
+ # CLAIMABLE_BALANCE = 4,
15
+ # LIQUIDITY_POOL = 5
15
16
  # };
16
17
  #
17
18
  # ===========================================================================
@@ -22,6 +23,7 @@ module Stellar
22
23
  member :offer, 2
23
24
  member :data, 3
24
25
  member :claimable_balance, 4
26
+ member :liquidity_pool, 5
25
27
 
26
28
  seal
27
29
  end
@@ -9,6 +9,8 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 1:
13
+ # LedgerHeaderExtensionV1 v1;
12
14
  # }
13
15
  #
14
16
  # ===========================================================================
@@ -18,7 +20,9 @@ module Stellar
18
20
  switch_on XDR::Int, :v
19
21
 
20
22
  switch 0
23
+ switch 1, :v1
21
24
 
25
+ attribute :v1, LedgerHeaderExtensionV1
22
26
  end
23
27
  end
24
28
  end
@@ -39,6 +39,8 @@ require 'xdr'
39
39
  # {
40
40
  # case 0:
41
41
  # void;
42
+ # case 1:
43
+ # LedgerHeaderExtensionV1 v1;
42
44
  # }
43
45
  # ext;
44
46
  # };
@@ -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 LedgerHeaderExtensionV1
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,30 @@
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 LedgerHeaderExtensionV1
9
+ # {
10
+ # uint32 flags; // LedgerHeaderFlags
11
+ #
12
+ # union switch (int v)
13
+ # {
14
+ # case 0:
15
+ # void;
16
+ # }
17
+ # ext;
18
+ # };
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class LedgerHeaderExtensionV1 < XDR::Struct
23
+ include XDR::Namespace
24
+
25
+ autoload :Ext
26
+
27
+ attribute :flags, Uint32
28
+ attribute :ext, Ext
29
+ end
30
+ 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
+ # enum LedgerHeaderFlags
9
+ # {
10
+ # DISABLE_LIQUIDITY_POOL_TRADING_FLAG = 0x1,
11
+ # DISABLE_LIQUIDITY_POOL_DEPOSIT_FLAG = 0x2,
12
+ # DISABLE_LIQUIDITY_POOL_WITHDRAWAL_FLAG = 0x4
13
+ # };
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class LedgerHeaderFlags < XDR::Enum
18
+ member :disable_liquidity_pool_trading_flag, 1
19
+ member :disable_liquidity_pool_deposit_flag, 2
20
+ member :disable_liquidity_pool_withdrawal_flag, 4
21
+
22
+ seal
23
+ end
24
+ end
@@ -7,16 +7,14 @@ require 'xdr'
7
7
  #
8
8
  # struct
9
9
  # {
10
- # AssetCode4 assetCode;
11
- # AccountID issuer;
10
+ # PoolID liquidityPoolID;
12
11
  # }
13
12
  #
14
13
  # ===========================================================================
15
14
  module Stellar
16
- class Asset
17
- class AlphaNum4 < XDR::Struct
18
- attribute :asset_code, AssetCode4
19
- attribute :issuer, AccountID
15
+ class LedgerKey
16
+ class LiquidityPool < XDR::Struct
17
+ attribute :liquidity_pool_id, PoolID
20
18
  end
21
19
  end
22
20
  end