stellar-base 0.27.0 → 0.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/generated/stellar/allow_trust_result_code.rb +4 -1
  4. data/generated/stellar/alpha_num12.rb +20 -0
  5. data/generated/stellar/alpha_num4.rb +20 -0
  6. data/generated/stellar/asset.rb +2 -15
  7. data/generated/stellar/asset_type.rb +3 -1
  8. data/generated/stellar/change_trust_asset.rb +39 -0
  9. data/generated/stellar/change_trust_op.rb +2 -2
  10. data/generated/stellar/change_trust_result_code.rb +13 -7
  11. data/generated/stellar/claim_atom.rb +31 -0
  12. data/generated/stellar/claim_atom_type.rb +24 -0
  13. data/generated/stellar/claim_liquidity_atom.rb +30 -0
  14. data/generated/stellar/claim_offer_atom_v0.rb +33 -0
  15. data/generated/stellar/envelope_type.rb +10 -8
  16. data/generated/stellar/{operation_id/id.rb → hash_id_preimage/operation_id.rb} +4 -4
  17. data/generated/stellar/hash_id_preimage/revoke_id.rb +28 -0
  18. data/generated/stellar/hash_id_preimage.rb +44 -0
  19. data/generated/stellar/ledger_entry/data.rb +4 -0
  20. data/generated/stellar/ledger_entry.rb +2 -0
  21. data/generated/stellar/ledger_entry_type.rb +3 -1
  22. data/generated/stellar/ledger_header/ext.rb +4 -0
  23. data/generated/stellar/ledger_header.rb +2 -0
  24. data/generated/stellar/{asset/alpha_num12.rb → ledger_header_extension_v1/ext.rb} +9 -7
  25. data/generated/stellar/{operation_id.rb → ledger_header_extension_v1.rb} +12 -14
  26. data/generated/stellar/ledger_header_flags.rb +24 -0
  27. data/generated/stellar/{asset/alpha_num4.rb → ledger_key/liquidity_pool.rb} +4 -6
  28. data/generated/stellar/ledger_key/trust_line.rb +2 -2
  29. data/generated/stellar/ledger_key.rb +10 -1
  30. data/generated/stellar/ledger_upgrade.rb +4 -0
  31. data/generated/stellar/ledger_upgrade_type.rb +3 -1
  32. data/generated/stellar/liquidity_pool_constant_product_parameters.rb +22 -0
  33. data/generated/stellar/liquidity_pool_deposit_op.rb +26 -0
  34. data/generated/stellar/liquidity_pool_deposit_result.rb +26 -0
  35. data/generated/stellar/liquidity_pool_deposit_result_code.rb +41 -0
  36. data/generated/stellar/liquidity_pool_entry/body/constant_product.rb +31 -0
  37. data/generated/stellar/liquidity_pool_entry/body.rb +37 -0
  38. data/generated/stellar/liquidity_pool_entry.rb +38 -0
  39. data/generated/stellar/liquidity_pool_parameters.rb +23 -0
  40. data/generated/stellar/liquidity_pool_type.rb +20 -0
  41. data/generated/stellar/liquidity_pool_withdraw_op.rb +24 -0
  42. data/generated/stellar/liquidity_pool_withdraw_result.rb +26 -0
  43. data/generated/stellar/liquidity_pool_withdraw_result_code.rb +36 -0
  44. data/generated/stellar/manage_offer_success_result.rb +2 -2
  45. data/generated/stellar/operation/body.rb +8 -0
  46. data/generated/stellar/operation.rb +4 -0
  47. data/generated/stellar/operation_result/tr.rb +8 -0
  48. data/generated/stellar/operation_result.rb +4 -0
  49. data/generated/stellar/operation_type.rb +5 -1
  50. data/generated/stellar/path_payment_strict_receive_result/success.rb +2 -2
  51. data/generated/stellar/path_payment_strict_receive_result.rb +1 -1
  52. data/generated/stellar/path_payment_strict_send_result/success.rb +2 -2
  53. data/generated/stellar/path_payment_strict_send_result.rb +1 -1
  54. data/generated/stellar/revoke_sponsorship_result_code.rb +3 -1
  55. data/generated/stellar/scp_quorum_set.rb +2 -2
  56. data/generated/stellar/set_trust_line_flags_result_code.rb +4 -1
  57. data/generated/stellar/trust_line_asset.rb +39 -0
  58. data/generated/stellar/trust_line_entry/ext/v1/ext.rb +4 -0
  59. data/generated/stellar/trust_line_entry/ext/v1.rb +2 -0
  60. data/generated/stellar/trust_line_entry/ext.rb +2 -0
  61. data/generated/stellar/trust_line_entry.rb +7 -5
  62. data/generated/stellar/trust_line_entry_extension_v2/ext.rb +24 -0
  63. data/generated/stellar/trust_line_entry_extension_v2.rb +30 -0
  64. data/generated/stellar-base-generated.rb +25 -1
  65. data/lib/stellar/account.rb +59 -0
  66. data/lib/stellar/account_flags.rb +1 -1
  67. data/lib/stellar/amount.rb +36 -0
  68. data/lib/stellar/asset.rb +8 -0
  69. data/lib/stellar/compat.rb +6 -4
  70. data/lib/stellar/dsl.rb +22 -0
  71. data/lib/stellar/ledger_key.rb +5 -3
  72. data/lib/stellar/liquidity_pool/base_pool.rb +47 -0
  73. data/lib/stellar/liquidity_pool/constant_product_pool.rb +15 -0
  74. data/lib/stellar/liquidity_pool.rb +12 -0
  75. data/lib/stellar/operation.rb +346 -444
  76. data/lib/stellar/price.rb +13 -7
  77. data/lib/stellar/transaction_builder.rb +11 -9
  78. data/lib/stellar/util/strkey.rb +15 -7
  79. data/lib/stellar/version.rb +1 -1
  80. data/lib/stellar-base.rb +3 -0
  81. metadata +44 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3f2262b18e995857495f0209dff368bf75d5ca0fb946a77c890a859e816f916
4
- data.tar.gz: ef32817bb66be06efe55f7da2ef204837895f4f6966c4fd55b91e2f1bbff8bb9
3
+ metadata.gz: aec1ef3949346ac5f45c7337753938f2ca424566e8b630429bc3c645a9184f06
4
+ data.tar.gz: 6657ae69d9d257cda03a58c65fb8e20308f04826f384d7e7ca4e73e6d3308c8b
5
5
  SHA512:
6
- metadata.gz: d6a82d8306b2c62d57b4467fcbfef426d276b7c11612dfed13fb2db13b43c6aa9091f7cfd1c7d6c464b3d93f6faf7d72b7262fdfd9d6dc9dfb7ca7557c9b5254
7
- data.tar.gz: ab279d7660378ed94d5d1fdfd2367714c10d78bd7f109dba50dafbcd186de0de97de0893b4b50620029a9189a0ad5d0e98604769ec4a4b0e82c1ceaa8c99278a
6
+ metadata.gz: 4c63bdf6d1a0d9d201c73d56be579e0850cf749a9553d5a7b99b4fd75f8ec2b485a88963946fb2832e58da1fbd0819af8cbf0ae863728580849bd80dfbb236c0
7
+ data.tar.gz: f808809b911435a72ae55e540ea275e4b3a1b8bd7e492ca2be365c0eaf8a96d26d6c90e8859dc55307499e1dab61c3108a2c9777413a904816c2a8300f2f1070
data/CHANGELOG.md CHANGED
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
  As this project is pre 1.0, breaking changes may happen for minor version
8
8
  bumps. A breaking change will get clearly notified in this log.
9
9
 
10
+ ## [0.31.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.30.0...v0.31.0) (2022-02-20)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+ * unconditionally use muxed accounts in tx builder (#250)
14
+
15
+ ### Features
16
+ * unconditionally use muxed accounts in tx builder ([#250](https://github.com/astroband/ruby-stellar-sdk/issues/250)) ([8537fa7](https://github.com/astroband/ruby-stellar-sdk/commit/8537fa7a0520816c895a5cec93b7c27de86de172))
17
+
18
+ ### Bug Fixes
19
+ * correctly serialize manage data op with empty value ([#258](https://github.com/astroband/ruby-stellar-sdk/issues/258)) ([dea0bac](https://github.com/astroband/ruby-stellar-sdk/commit/dea0bac129fc7e886c0ef42cd5eff5c3e150917f))
20
+
21
+ ## [0.30.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.29.0...v0.30.0) (2021-10-14)
22
+
23
+ ### Added
24
+ * **protocol** support Stellar protocol 18 ([#202](https://www.github.com/astroband/ruby-stellar-sdk/issues/202)) ([3cd93dc](https://github.com/astroband/ruby-stellar-sdk/commit/3cd93dc107ab84b8d3abb10a63a6dca0887f9a4d))
25
+ ### Changed
26
+ * `Stellar::Amount` class moved to `stellar-base` gem from `stellar-sdk`
27
+ * `Stellar::Horizon::Problem` class moved to `stellar-horizon` gem
28
+ * `toml-rb` gem is replaced with `tomlrb` gem to work around [segfaults in Ruby 3.0](https://github.com/mjackson/citrus/issues/60)
29
+
30
+ ## [0.29.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.28.0...v0.29.0) (2021-09-07)
31
+ - No changes
32
+
33
+ ## [0.28.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.27.0...v0.28.0) (2021-07-17)
34
+
35
+ ### Features
36
+
37
+ * support muxed accounts in tx builder ([#162](https://www.github.com/astroband/ruby-stellar-sdk/issues/162)) ([37cd954](https://www.github.com/astroband/ruby-stellar-sdk/commit/37cd954f92c7999a74ca779e795dde74a3d71aad))
38
+
10
39
  ## [0.27.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.26.0...v0.27.0) (2021-05-08)
11
40
 
12
41
  ### Features
@@ -15,7 +15,9 @@ require 'xdr'
15
15
  # // source account does not require trust
16
16
  # ALLOW_TRUST_TRUST_NOT_REQUIRED = -3,
17
17
  # ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust,
18
- # ALLOW_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
18
+ # ALLOW_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed
19
+ # ALLOW_TRUST_LOW_RESERVE = -6 // claimable balances can't be created
20
+ # // on revoke due to low reserves
19
21
  # };
20
22
  #
21
23
  # ===========================================================================
@@ -27,6 +29,7 @@ module Stellar
27
29
  member :allow_trust_trust_not_required, -3
28
30
  member :allow_trust_cant_revoke, -4
29
31
  member :allow_trust_self_not_allowed, -5
32
+ member :allow_trust_low_reserve, -6
30
33
 
31
34
  seal
32
35
  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 AlphaNum12
9
+ # {
10
+ # AssetCode12 assetCode;
11
+ # AccountID issuer;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class AlphaNum12 < XDR::Struct
17
+ attribute :asset_code, AssetCode12
18
+ attribute :issuer, AccountID
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # This code was automatically generated using xdrgen
2
+ # DO NOT EDIT or your changes may be overwritten
3
+
4
+ require 'xdr'
5
+
6
+ # === xdr source ============================================================
7
+ #
8
+ # struct AlphaNum4
9
+ # {
10
+ # AssetCode4 assetCode;
11
+ # AccountID issuer;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class AlphaNum4 < XDR::Struct
17
+ attribute :asset_code, AssetCode4
18
+ attribute :issuer, AccountID
19
+ end
20
+ end
@@ -11,18 +11,10 @@ require 'xdr'
11
11
  # void;
12
12
  #
13
13
  # case ASSET_TYPE_CREDIT_ALPHANUM4:
14
- # struct
15
- # {
16
- # AssetCode4 assetCode;
17
- # AccountID issuer;
18
- # } alphaNum4;
14
+ # AlphaNum4 alphaNum4;
19
15
  #
20
16
  # case ASSET_TYPE_CREDIT_ALPHANUM12:
21
- # struct
22
- # {
23
- # AssetCode12 assetCode;
24
- # AccountID issuer;
25
- # } alphaNum12;
17
+ # AlphaNum12 alphaNum12;
26
18
  #
27
19
  # // add other asset types here in the future
28
20
  # };
@@ -30,11 +22,6 @@ require 'xdr'
30
22
  # ===========================================================================
31
23
  module Stellar
32
24
  class Asset < XDR::Union
33
- include XDR::Namespace
34
-
35
- autoload :AlphaNum4
36
- autoload :AlphaNum12
37
-
38
25
  switch_on AssetType, :type
39
26
 
40
27
  switch :asset_type_native
@@ -9,7 +9,8 @@ require 'xdr'
9
9
  # {
10
10
  # ASSET_TYPE_NATIVE = 0,
11
11
  # ASSET_TYPE_CREDIT_ALPHANUM4 = 1,
12
- # ASSET_TYPE_CREDIT_ALPHANUM12 = 2
12
+ # ASSET_TYPE_CREDIT_ALPHANUM12 = 2,
13
+ # ASSET_TYPE_POOL_SHARE = 3
13
14
  # };
14
15
  #
15
16
  # ===========================================================================
@@ -18,6 +19,7 @@ module Stellar
18
19
  member :asset_type_native, 0
19
20
  member :asset_type_credit_alphanum4, 1
20
21
  member :asset_type_credit_alphanum12, 2
22
+ member :asset_type_pool_share, 3
21
23
 
22
24
  seal
23
25
  end
@@ -0,0 +1,39 @@
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 ChangeTrustAsset switch (AssetType type)
9
+ # {
10
+ # case ASSET_TYPE_NATIVE: // Not credit
11
+ # void;
12
+ #
13
+ # case ASSET_TYPE_CREDIT_ALPHANUM4:
14
+ # AlphaNum4 alphaNum4;
15
+ #
16
+ # case ASSET_TYPE_CREDIT_ALPHANUM12:
17
+ # AlphaNum12 alphaNum12;
18
+ #
19
+ # case ASSET_TYPE_POOL_SHARE:
20
+ # LiquidityPoolParameters liquidityPool;
21
+ #
22
+ # // add other asset types here in the future
23
+ # };
24
+ #
25
+ # ===========================================================================
26
+ module Stellar
27
+ class ChangeTrustAsset < XDR::Union
28
+ switch_on AssetType, :type
29
+
30
+ switch :asset_type_native
31
+ switch :asset_type_credit_alphanum4, :alpha_num4
32
+ switch :asset_type_credit_alphanum12, :alpha_num12
33
+ switch :asset_type_pool_share, :liquidity_pool
34
+
35
+ attribute :alpha_num4, AlphaNum4
36
+ attribute :alpha_num12, AlphaNum12
37
+ attribute :liquidity_pool, LiquidityPoolParameters
38
+ end
39
+ end
@@ -7,7 +7,7 @@ require 'xdr'
7
7
  #
8
8
  # struct ChangeTrustOp
9
9
  # {
10
- # Asset line;
10
+ # ChangeTrustAsset line;
11
11
  #
12
12
  # // if limit is set to 0, deletes the trust line
13
13
  # int64 limit;
@@ -16,7 +16,7 @@ require 'xdr'
16
16
  # ===========================================================================
17
17
  module Stellar
18
18
  class ChangeTrustOp < XDR::Struct
19
- attribute :line, Asset
19
+ attribute :line, ChangeTrustAsset
20
20
  attribute :limit, Int64
21
21
  end
22
22
  end
@@ -16,18 +16,24 @@ require 'xdr'
16
16
  # // cannot create with a limit of 0
17
17
  # CHANGE_TRUST_LOW_RESERVE =
18
18
  # -4, // not enough funds to create a new trust line,
19
- # CHANGE_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
19
+ # CHANGE_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed
20
+ # CHANGE_TRUST_TRUST_LINE_MISSING = -6, // Asset trustline is missing for pool
21
+ # CHANGE_TRUST_CANNOT_DELETE = -7, // Asset trustline is still referenced in a pool
22
+ # CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES = -8 // Asset trustline is deauthorized
20
23
  # };
21
24
  #
22
25
  # ===========================================================================
23
26
  module Stellar
24
27
  class ChangeTrustResultCode < XDR::Enum
25
- member :change_trust_success, 0
26
- member :change_trust_malformed, -1
27
- member :change_trust_no_issuer, -2
28
- member :change_trust_invalid_limit, -3
29
- member :change_trust_low_reserve, -4
30
- member :change_trust_self_not_allowed, -5
28
+ member :change_trust_success, 0
29
+ member :change_trust_malformed, -1
30
+ member :change_trust_no_issuer, -2
31
+ member :change_trust_invalid_limit, -3
32
+ member :change_trust_low_reserve, -4
33
+ member :change_trust_self_not_allowed, -5
34
+ member :change_trust_trust_line_missing, -6
35
+ member :change_trust_cannot_delete, -7
36
+ member :change_trust_not_auth_maintain_liabilities, -8
31
37
 
32
38
  seal
33
39
  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
+ # union ClaimAtom switch (ClaimAtomType type)
9
+ # {
10
+ # case CLAIM_ATOM_TYPE_V0:
11
+ # ClaimOfferAtomV0 v0;
12
+ # case CLAIM_ATOM_TYPE_ORDER_BOOK:
13
+ # ClaimOfferAtom orderBook;
14
+ # case CLAIM_ATOM_TYPE_LIQUIDITY_POOL:
15
+ # ClaimLiquidityAtom liquidityPool;
16
+ # };
17
+ #
18
+ # ===========================================================================
19
+ module Stellar
20
+ class ClaimAtom < XDR::Union
21
+ switch_on ClaimAtomType, :type
22
+
23
+ switch :claim_atom_type_v0, :v0
24
+ switch :claim_atom_type_order_book, :order_book
25
+ switch :claim_atom_type_liquidity_pool, :liquidity_pool
26
+
27
+ attribute :v0, ClaimOfferAtomV0
28
+ attribute :order_book, ClaimOfferAtom
29
+ attribute :liquidity_pool, ClaimLiquidityAtom
30
+ end
31
+ 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 ClaimAtomType
9
+ # {
10
+ # CLAIM_ATOM_TYPE_V0 = 0,
11
+ # CLAIM_ATOM_TYPE_ORDER_BOOK = 1,
12
+ # CLAIM_ATOM_TYPE_LIQUIDITY_POOL = 2
13
+ # };
14
+ #
15
+ # ===========================================================================
16
+ module Stellar
17
+ class ClaimAtomType < XDR::Enum
18
+ member :claim_atom_type_v0, 0
19
+ member :claim_atom_type_order_book, 1
20
+ member :claim_atom_type_liquidity_pool, 2
21
+
22
+ seal
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 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
@@ -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
  # };
@@ -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 LedgerHeaderExtensionV1
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 LedgerHeaderExtensionV1
9
9
  # {
10
- # case ENVELOPE_TYPE_OP_ID:
11
- # struct
10
+ # uint32 flags; // LedgerHeaderFlags
11
+ #
12
+ # union switch (int v)
12
13
  # {
13
- # MuxedAccount sourceAccount;
14
- # SequenceNumber seqNum;
15
- # uint32 opNum;
16
- # } id;
14
+ # case 0:
15
+ # void;
16
+ # }
17
+ # ext;
17
18
  # };
18
19
  #
19
20
  # ===========================================================================
20
21
  module Stellar
21
- class OperationID < XDR::Union
22
+ class LedgerHeaderExtensionV1 < 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 :flags, Uint32
28
+ attribute :ext, Ext
31
29
  end
32
30
  end