stellar-base 0.29.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/generated/stellar/account_entry_extension_v2/ext.rb +4 -0
  4. data/generated/stellar/account_entry_extension_v2.rb +2 -0
  5. data/generated/stellar/account_entry_extension_v3.rb +28 -0
  6. data/generated/stellar/allow_trust_result_code.rb +5 -2
  7. data/generated/stellar/alpha_num12.rb +20 -0
  8. data/generated/stellar/alpha_num4.rb +20 -0
  9. data/generated/stellar/asset.rb +2 -15
  10. data/generated/stellar/asset_type.rb +3 -1
  11. data/generated/stellar/change_trust_asset.rb +39 -0
  12. data/generated/stellar/change_trust_op.rb +2 -2
  13. data/generated/stellar/change_trust_result_code.rb +15 -7
  14. data/generated/stellar/claim_atom.rb +31 -0
  15. data/generated/stellar/claim_atom_type.rb +24 -0
  16. data/generated/stellar/claim_liquidity_atom.rb +30 -0
  17. data/generated/stellar/claim_offer_atom_v0.rb +33 -0
  18. data/generated/stellar/crypto_key_type.rb +6 -4
  19. data/generated/stellar/envelope_type.rb +10 -8
  20. data/generated/stellar/extension_point.rb +22 -0
  21. data/generated/stellar/{operation_id/id.rb → hash_id_preimage/operation_id.rb} +2 -2
  22. data/generated/stellar/{operation_id.rb → hash_id_preimage/revoke_id.rb} +12 -16
  23. data/generated/stellar/hash_id_preimage.rb +44 -0
  24. data/generated/stellar/inner_transaction_result/result.rb +6 -2
  25. data/generated/stellar/inner_transaction_result.rb +2 -0
  26. data/generated/stellar/ledger_bounds.rb +20 -0
  27. data/generated/stellar/ledger_entry/data.rb +4 -0
  28. data/generated/stellar/ledger_entry.rb +2 -0
  29. data/generated/stellar/ledger_entry_type.rb +3 -1
  30. data/generated/stellar/ledger_header/ext.rb +4 -0
  31. data/generated/stellar/ledger_header.rb +2 -0
  32. data/generated/stellar/{asset/alpha_num12.rb → ledger_header_extension_v1/ext.rb} +9 -7
  33. data/generated/stellar/ledger_header_extension_v1.rb +30 -0
  34. data/generated/stellar/ledger_header_flags.rb +24 -0
  35. data/generated/stellar/{asset/alpha_num4.rb → ledger_key/liquidity_pool.rb} +4 -6
  36. data/generated/stellar/ledger_key/trust_line.rb +2 -2
  37. data/generated/stellar/ledger_key.rb +10 -1
  38. data/generated/stellar/ledger_upgrade.rb +4 -0
  39. data/generated/stellar/ledger_upgrade_type.rb +3 -1
  40. data/generated/stellar/liquidity_pool_constant_product_parameters.rb +22 -0
  41. data/generated/stellar/liquidity_pool_deposit_op.rb +26 -0
  42. data/generated/stellar/liquidity_pool_deposit_result.rb +25 -0
  43. data/generated/stellar/liquidity_pool_deposit_result_code.rb +41 -0
  44. data/generated/stellar/liquidity_pool_entry/body/constant_product.rb +32 -0
  45. data/generated/stellar/liquidity_pool_entry/body.rb +38 -0
  46. data/generated/stellar/liquidity_pool_entry.rb +39 -0
  47. data/generated/stellar/liquidity_pool_parameters.rb +23 -0
  48. data/generated/stellar/liquidity_pool_type.rb +20 -0
  49. data/generated/stellar/liquidity_pool_withdraw_op.rb +24 -0
  50. data/generated/stellar/liquidity_pool_withdraw_result.rb +25 -0
  51. data/generated/stellar/liquidity_pool_withdraw_result_code.rb +36 -0
  52. data/generated/stellar/manage_offer_success_result.rb +2 -2
  53. data/generated/stellar/message_type.rb +4 -1
  54. data/generated/stellar/offer_entry_flags.rb +2 -1
  55. data/generated/stellar/operation/body.rb +8 -0
  56. data/generated/stellar/operation.rb +4 -0
  57. data/generated/stellar/operation_result/tr.rb +8 -0
  58. data/generated/stellar/operation_result.rb +4 -0
  59. data/generated/stellar/operation_type.rb +5 -1
  60. data/generated/stellar/path_payment_strict_receive_result/success.rb +2 -2
  61. data/generated/stellar/path_payment_strict_receive_result.rb +1 -1
  62. data/generated/stellar/path_payment_strict_send_result/success.rb +2 -2
  63. data/generated/stellar/path_payment_strict_send_result.rb +1 -1
  64. data/generated/stellar/precondition_type.rb +24 -0
  65. data/generated/stellar/preconditions.rb +30 -0
  66. data/generated/stellar/preconditions_v2.rb +51 -0
  67. data/generated/stellar/revoke_sponsorship_result_code.rb +3 -1
  68. data/generated/stellar/scp_quorum_set.rb +2 -2
  69. data/generated/stellar/send_more.rb +18 -0
  70. data/generated/stellar/set_trust_line_flags_result_code.rb +4 -1
  71. data/generated/stellar/signer_key/ed25519_signed_payload.rb +24 -0
  72. data/generated/stellar/signer_key.rb +20 -6
  73. data/generated/stellar/signer_key_type.rb +6 -4
  74. data/generated/stellar/stellar_message.rb +4 -0
  75. data/generated/stellar/transaction.rb +3 -3
  76. data/generated/stellar/transaction_result_code.rb +6 -1
  77. data/generated/stellar/trust_line_asset.rb +39 -0
  78. data/generated/stellar/trust_line_entry/ext/v1/ext.rb +4 -0
  79. data/generated/stellar/trust_line_entry/ext/v1.rb +2 -0
  80. data/generated/stellar/trust_line_entry/ext.rb +2 -0
  81. data/generated/stellar/trust_line_entry.rb +7 -5
  82. data/generated/stellar/trust_line_entry_extension_v2/ext.rb +24 -0
  83. data/generated/stellar/trust_line_entry_extension_v2.rb +30 -0
  84. data/generated/stellar-base-generated.rb +33 -1
  85. data/lib/stellar/account_flags.rb +1 -1
  86. data/lib/stellar/amount.rb +36 -0
  87. data/lib/stellar/asset.rb +8 -0
  88. data/lib/stellar/dsl.rb +3 -0
  89. data/lib/stellar/ledger_key.rb +5 -3
  90. data/lib/stellar/liquidity_pool/base_pool.rb +47 -0
  91. data/lib/stellar/liquidity_pool/constant_product_pool.rb +15 -0
  92. data/lib/stellar/liquidity_pool.rb +12 -0
  93. data/lib/stellar/operation.rb +346 -444
  94. data/lib/stellar/price.rb +13 -7
  95. data/lib/stellar/transaction.rb +1 -1
  96. data/lib/stellar/transaction_builder.rb +120 -18
  97. data/lib/stellar/transaction_v0.rb +5 -1
  98. data/lib/stellar/util/strkey.rb +15 -1
  99. data/lib/stellar/version.rb +1 -1
  100. data/lib/stellar-base.rb +2 -0
  101. metadata +51 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e34d24d567ded9c3e2a6f8b5c043d905b1606d954b9c1e0f9d06cb1bccf07d22
4
- data.tar.gz: 2fc5f03bc44df1adb28c136f72261be94a7cd1bf668358150f2d477dcd4187da
3
+ metadata.gz: 37d725fa4d77fd25c02397c7d25f6798b537ebe3f7eb8fe84715fc134b0304fd
4
+ data.tar.gz: 577ca9cb0b37d98f3b631a85125cd1b5732285827b33eb61990949aed810dc73
5
5
  SHA512:
6
- metadata.gz: a50f950abc85606cea2077cabc92e32f4734a5bd336945a8718b30c5766c0ebee562351fbaaa85cb0602851504b7edf41e0f9560f96570a86b9b5a7fd5500c30
7
- data.tar.gz: 87b85c15be138718404efdc6e738d3577117f4cdf9e9b0d26dbd2ff6c9e5ff58c05e5f47ba966d462494304f632c485ab52870e078988a3c40801aa44a8c8875
6
+ metadata.gz: 767697d1e7f98af39da13ec28205b169e24de30f4f11a16c784cb56407c254ec5a484109908537aa2c2b301d134ac0c028fcc94a864dc6359dac6c5fb2f58c93
7
+ data.tar.gz: 520ebf0c69bd20e314e4c8d38ccb77b4711cbacb5de20e87e870c52442e1e4bc02889a9bac3e8180c6c3380a7be08bfffe7e05e46009649072f3301ce69cf58d
data/CHANGELOG.md CHANGED
@@ -7,6 +7,31 @@ 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.32.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.31.0...v0.32.0) (2022-05-17)
11
+
12
+ ### Added
13
+ * **protocol** support Stellar protocol 19 ([#265](https://github.com/astroband/ruby-stellar-sdk/issues/265)) ([fead030](https://github.com/astroband/ruby-stellar-sdk/commit/fead030fdf6159cc184d5337a0f6f14fa61de963))
14
+
15
+ ## [0.31.0](https://github.com/astroband/ruby-stellar-sdk/compare/v0.30.0...v0.31.0) (2022-02-20)
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+ * unconditionally use muxed accounts in tx builder (#250)
19
+
20
+ ### Features
21
+ * 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))
22
+
23
+ ### Bug Fixes
24
+ * 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))
25
+
26
+ ## [0.30.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.29.0...v0.30.0) (2021-10-14)
27
+
28
+ ### Added
29
+ * **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))
30
+ ### Changed
31
+ * `Stellar::Amount` class moved to `stellar-base` gem from `stellar-sdk`
32
+ * `Stellar::Horizon::Problem` class moved to `stellar-horizon` gem
33
+ * `toml-rb` gem is replaced with `tomlrb` gem to work around [segfaults in Ruby 3.0](https://github.com/mjackson/citrus/issues/60)
34
+
10
35
  ## [0.29.0](https://www.github.com/astroband/ruby-stellar-sdk/compare/v0.28.0...v0.29.0) (2021-09-07)
11
36
  - No changes
12
37
 
@@ -9,6 +9,8 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 3:
13
+ # AccountEntryExtensionV3 v3;
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 3, :v3
21
24
 
25
+ attribute :v3, AccountEntryExtensionV3
22
26
  end
23
27
  end
24
28
  end
@@ -15,6 +15,8 @@ require 'xdr'
15
15
  # {
16
16
  # case 0:
17
17
  # void;
18
+ # case 3:
19
+ # AccountEntryExtensionV3 v3;
18
20
  # }
19
21
  # ext;
20
22
  # };
@@ -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 AccountEntryExtensionV3
9
+ # {
10
+ # // We can use this to add more fields, or because it is first, to
11
+ # // change AccountEntryExtensionV3 into a union.
12
+ # ExtensionPoint ext;
13
+ #
14
+ # // Ledger number at which `seqNum` took on its present value.
15
+ # uint32 seqLedger;
16
+ #
17
+ # // Time at which `seqNum` took on its present value.
18
+ # TimePoint seqTime;
19
+ # };
20
+ #
21
+ # ===========================================================================
22
+ module Stellar
23
+ class AccountEntryExtensionV3 < XDR::Struct
24
+ attribute :ext, ExtensionPoint
25
+ attribute :seq_ledger, Uint32
26
+ attribute :seq_time, TimePoint
27
+ end
28
+ end
@@ -14,8 +14,10 @@ require 'xdr'
14
14
  # ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline
15
15
  # // source account does not require trust
16
16
  # ALLOW_TRUST_TRUST_NOT_REQUIRED = -3,
17
- # ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust,
18
- # ALLOW_TRUST_SELF_NOT_ALLOWED = -5 // trusting self is not allowed
17
+ # ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust,
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,26 @@ 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 =
22
+ # -7, // Asset trustline is still referenced in a pool
23
+ # CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES =
24
+ # -8 // Asset trustline is deauthorized
20
25
  # };
21
26
  #
22
27
  # ===========================================================================
23
28
  module Stellar
24
29
  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
30
+ member :change_trust_success, 0
31
+ member :change_trust_malformed, -1
32
+ member :change_trust_no_issuer, -2
33
+ member :change_trust_invalid_limit, -3
34
+ member :change_trust_low_reserve, -4
35
+ member :change_trust_self_not_allowed, -5
36
+ member :change_trust_trust_line_missing, -6
37
+ member :change_trust_cannot_delete, -7
38
+ member :change_trust_not_auth_maintain_liabilities, -8
31
39
 
32
40
  seal
33
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
+ # 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
@@ -10,6 +10,7 @@ require 'xdr'
10
10
  # KEY_TYPE_ED25519 = 0,
11
11
  # KEY_TYPE_PRE_AUTH_TX = 1,
12
12
  # KEY_TYPE_HASH_X = 2,
13
+ # KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3,
13
14
  # // MUXED enum values for supported type are derived from the enum values
14
15
  # // above by ORing them with 0x100
15
16
  # KEY_TYPE_MUXED_ED25519 = 0x100
@@ -18,10 +19,11 @@ require 'xdr'
18
19
  # ===========================================================================
19
20
  module Stellar
20
21
  class CryptoKeyType < XDR::Enum
21
- member :key_type_ed25519, 0
22
- member :key_type_pre_auth_tx, 1
23
- member :key_type_hash_x, 2
24
- member :key_type_muxed_ed25519, 256
22
+ member :key_type_ed25519, 0
23
+ member :key_type_pre_auth_tx, 1
24
+ member :key_type_hash_x, 2
25
+ member :key_type_ed25519_signed_payload, 3
26
+ member :key_type_muxed_ed25519, 256
25
27
 
26
28
  seal
27
29
  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
@@ -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
+ # union ExtensionPoint switch (int v)
9
+ # {
10
+ # case 0:
11
+ # void;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class ExtensionPoint < XDR::Union
17
+ switch_on XDR::Int, :v
18
+
19
+ switch 0
20
+
21
+ end
22
+ end
@@ -14,8 +14,8 @@ require 'xdr'
14
14
  #
15
15
  # ===========================================================================
16
16
  module Stellar
17
- class OperationID
18
- class Id < XDR::Struct
17
+ class HashIDPreimage
18
+ class OperationID < XDR::Struct
19
19
  attribute :source_account, AccountID
20
20
  attribute :seq_num, SequenceNumber
21
21
  attribute :op_num, Uint32
@@ -5,28 +5,24 @@ require 'xdr'
5
5
 
6
6
  # === xdr source ============================================================
7
7
  #
8
- # union OperationID switch (EnvelopeType type)
9
- # {
10
- # case ENVELOPE_TYPE_OP_ID:
11
- # struct
8
+ # struct
12
9
  # {
13
10
  # AccountID sourceAccount;
14
11
  # SequenceNumber seqNum;
15
12
  # uint32 opNum;
16
- # } id;
17
- # };
13
+ # PoolID liquidityPoolID;
14
+ # Asset asset;
15
+ # }
18
16
  #
19
17
  # ===========================================================================
20
18
  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
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
31
27
  end
32
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
@@ -24,6 +24,8 @@ require 'xdr'
24
24
  # case txNOT_SUPPORTED:
25
25
  # // txFEE_BUMP_INNER_FAILED is not included
26
26
  # case txBAD_SPONSORSHIP:
27
+ # case txBAD_MIN_SEQ_AGE_OR_GAP:
28
+ # case txMALFORMED:
27
29
  # void;
28
30
  # }
29
31
  #
@@ -33,8 +35,8 @@ module Stellar
33
35
  class Result < XDR::Union
34
36
  switch_on TransactionResultCode, :code
35
37
 
36
- switch :tx_success, :results
37
- switch :tx_failed, :results
38
+ switch :tx_success, :results
39
+ switch :tx_failed, :results
38
40
  switch :tx_too_early
39
41
  switch :tx_too_late
40
42
  switch :tx_missing_operation
@@ -47,6 +49,8 @@ module Stellar
47
49
  switch :tx_internal_error
48
50
  switch :tx_not_supported
49
51
  switch :tx_bad_sponsorship
52
+ switch :tx_bad_min_seq_age_or_gap
53
+ switch :tx_malformed
50
54
 
51
55
  attribute :results, XDR::VarArray[OperationResult]
52
56
  end
@@ -29,6 +29,8 @@ require 'xdr'
29
29
  # case txNOT_SUPPORTED:
30
30
  # // txFEE_BUMP_INNER_FAILED is not included
31
31
  # case txBAD_SPONSORSHIP:
32
+ # case txBAD_MIN_SEQ_AGE_OR_GAP:
33
+ # case txMALFORMED:
32
34
  # void;
33
35
  # }
34
36
  # result;