stellar-base 0.18.0 → 0.23.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +2 -3
- data/generated/stellar-base-generated.rb +45 -8
- data/generated/stellar/allow_trust_op.rb +5 -4
- data/generated/stellar/allow_trust_op/asset.rb +4 -4
- data/generated/stellar/asset.rb +2 -2
- data/generated/stellar/asset/alpha_num12.rb +2 -2
- data/generated/stellar/asset/alpha_num4.rb +2 -2
- data/generated/stellar/authenticated_message.rb +4 -4
- data/generated/stellar/authenticated_message/v0.rb +4 -4
- data/generated/stellar/bucket_entry.rb +6 -0
- data/generated/stellar/bucket_entry_type.rb +8 -2
- data/generated/stellar/bucket_metadata.rb +32 -0
- data/generated/stellar/bucket_metadata/ext.rb +24 -0
- data/generated/stellar/claim_offer_atom.rb +2 -2
- data/generated/stellar/{create_passive_offer_op.rb → create_passive_sell_offer_op.rb} +2 -2
- data/generated/stellar/crypto_key_type.rb +8 -4
- data/generated/stellar/curve25519_public.rb +1 -1
- data/generated/stellar/curve25519_secret.rb +1 -1
- data/generated/stellar/envelope_type.rb +10 -4
- data/generated/stellar/fee_bump_transaction.rb +39 -0
- data/generated/stellar/fee_bump_transaction/ext.rb +24 -0
- data/generated/stellar/fee_bump_transaction/inner_tx.rb +25 -0
- data/generated/stellar/fee_bump_transaction_envelope.rb +22 -0
- data/generated/stellar/hmac_sha256_key.rb +1 -1
- data/generated/stellar/hmac_sha256_mac.rb +1 -1
- data/generated/stellar/inner_transaction_result.rb +56 -0
- data/generated/stellar/inner_transaction_result/ext.rb +24 -0
- data/generated/stellar/inner_transaction_result/result.rb +52 -0
- data/generated/stellar/inner_transaction_result_pair.rb +20 -0
- data/generated/stellar/ledger_close_meta.rb +23 -0
- data/generated/stellar/ledger_close_meta_v0.rb +35 -0
- data/generated/stellar/ledger_close_value_signature.rb +20 -0
- data/generated/stellar/ledger_key.rb +1 -1
- data/generated/stellar/ledger_key/offer.rb +2 -2
- data/generated/stellar/manage_buy_offer_op.rb +29 -0
- data/generated/stellar/{manage_offer_result.rb → manage_buy_offer_result.rb} +5 -5
- data/generated/stellar/manage_buy_offer_result_code.rb +51 -0
- data/generated/stellar/{manage_offer_op.rb → manage_sell_offer_op.rb} +4 -4
- data/generated/stellar/manage_sell_offer_result.rb +26 -0
- data/generated/stellar/manage_sell_offer_result_code.rb +54 -0
- data/generated/stellar/message_type.rb +6 -1
- data/generated/stellar/muxed_account.rb +35 -0
- data/generated/stellar/muxed_account/med25519.rb +22 -0
- data/generated/stellar/offer_entry.rb +2 -2
- data/generated/stellar/operation.rb +13 -9
- data/generated/stellar/operation/body.rb +37 -29
- data/generated/stellar/operation_result.rb +10 -6
- data/generated/stellar/operation_result/tr.rb +38 -30
- data/generated/stellar/operation_result_code.rb +11 -7
- data/generated/stellar/operation_type.rb +20 -16
- data/generated/stellar/{path_payment_op.rb → path_payment_strict_receive_op.rb} +6 -6
- data/generated/stellar/path_payment_strict_receive_result.rb +38 -0
- data/generated/stellar/path_payment_strict_receive_result/success.rb +22 -0
- data/generated/stellar/path_payment_strict_receive_result_code.rb +56 -0
- data/generated/stellar/path_payment_strict_send_op.rb +32 -0
- data/generated/stellar/{path_payment_result.rb → path_payment_strict_send_result.rb} +7 -7
- data/generated/stellar/{path_payment_result → path_payment_strict_send_result}/success.rb +1 -1
- data/generated/stellar/path_payment_strict_send_result_code.rb +55 -0
- data/generated/stellar/payment_op.rb +4 -4
- data/generated/stellar/peer_stats.rb +48 -0
- data/generated/stellar/signed_survey_request_message.rb +20 -0
- data/generated/stellar/signed_survey_response_message.rb +20 -0
- data/generated/stellar/signer.rb +1 -1
- data/generated/stellar/stellar_message.rb +22 -12
- data/generated/stellar/stellar_value.rb +7 -5
- data/generated/stellar/stellar_value/ext.rb +8 -4
- data/generated/stellar/stellar_value_type.rb +22 -0
- data/generated/stellar/survey_message_command_type.rb +20 -0
- data/generated/stellar/survey_request_message.rb +26 -0
- data/generated/stellar/survey_response_body.rb +23 -0
- data/generated/stellar/survey_response_message.rb +26 -0
- data/generated/stellar/time_bounds.rb +4 -4
- data/generated/stellar/topology_response_body.rb +25 -0
- data/generated/stellar/transaction.rb +4 -4
- data/generated/stellar/transaction_envelope.rb +17 -8
- data/generated/stellar/transaction_meta.rb +4 -0
- data/generated/stellar/transaction_meta_v1.rb +1 -1
- data/generated/stellar/transaction_meta_v2.rb +24 -0
- data/generated/stellar/transaction_result.rb +3 -0
- data/generated/stellar/transaction_result/result.rb +9 -3
- data/generated/stellar/transaction_result_code.rb +21 -14
- data/generated/stellar/transaction_result_meta.rb +22 -0
- data/generated/stellar/transaction_signature_payload.rb +3 -1
- data/generated/stellar/transaction_signature_payload/tagged_transaction.rb +7 -3
- data/generated/stellar/transaction_v0.rb +39 -0
- data/generated/stellar/transaction_v0/ext.rb +24 -0
- data/generated/stellar/transaction_v0_envelope.rb +22 -0
- data/generated/stellar/transaction_v1_envelope.rb +22 -0
- data/generated/stellar/trust_line_flags.rb +6 -2
- data/generated/stellar/upgrade_entry_meta.rb +20 -0
- data/lib/stellar-base.rb +28 -23
- data/lib/stellar/account_flags.rb +2 -4
- data/lib/stellar/asset.rb +6 -6
- data/lib/stellar/base.rb +1 -1
- data/lib/stellar/compat.rb +21 -0
- data/lib/stellar/concerns/transaction.rb +49 -0
- data/lib/stellar/convert.rb +2 -2
- data/lib/stellar/factories.rb +1 -3
- data/lib/stellar/fee_bump_transaction.rb +21 -0
- data/lib/stellar/key_pair.rb +9 -6
- data/lib/stellar/networks.rb +5 -7
- data/lib/stellar/operation.rb +428 -317
- data/lib/stellar/{path_payment_result.rb → path_payment_strict_receive_result.rb} +2 -3
- data/lib/stellar/price.rb +2 -4
- data/lib/stellar/signer_key.rb +4 -8
- data/lib/stellar/thresholds.rb +5 -7
- data/lib/stellar/transaction.rb +154 -169
- data/lib/stellar/transaction_builder.rb +149 -0
- data/lib/stellar/transaction_envelope.rb +40 -8
- data/lib/stellar/transaction_v0.rb +39 -0
- data/lib/stellar/util/continued_fraction.rb +19 -19
- data/lib/stellar/util/strkey.rb +39 -14
- data/lib/stellar/{base/version.rb → version.rb} +1 -1
- metadata +69 -211
- data/.gitignore +0 -17
- data/.travis.yml +0 -14
- data/.yardopts +0 -8
- data/CHANGELOG.md +0 -120
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -15
- data/Guardfile +0 -5
- data/Rakefile +0 -4
- data/examples/create_account.rb +0 -26
- data/examples/low_level_transaction_post.rb +0 -46
- data/examples/mid_level_transaction_post.rb +0 -33
- data/examples/non_native_payment.rb +0 -60
- data/examples/offer.rb +0 -75
- data/examples/transaction_merge.rb +0 -23
- data/generated/stellar/manage_offer_result_code.rb +0 -50
- data/generated/stellar/path_payment_result_code.rb +0 -47
- data/ruby-stellar-base.gemspec +0 -34
- data/spec/lib/stellar/account_flags_spec.rb +0 -19
- data/spec/lib/stellar/asset_spec.rb +0 -45
- data/spec/lib/stellar/convert_spec.rb +0 -61
- data/spec/lib/stellar/key_pair_spec.rb +0 -251
- data/spec/lib/stellar/networks_spec.rb +0 -77
- data/spec/lib/stellar/operation_spec.rb +0 -71
- data/spec/lib/stellar/path_payment_result_spec.rb +0 -95
- data/spec/lib/stellar/price_spec.rb +0 -34
- data/spec/lib/stellar/signer_key_spec.rb +0 -26
- data/spec/lib/stellar/thresholds_spec.rb +0 -62
- data/spec/lib/stellar/transaction_envelope_spec.rb +0 -93
- data/spec/lib/stellar/transaction_spec.rb +0 -100
- data/spec/lib/stellar/util/strkey_spec.rb +0 -54
- data/spec/spec_helper.rb +0 -16
- data/spec/support/matchers/be_strkey.rb +0 -9
- data/spec/support/matchers/eq_bytes.rb +0 -5
- data/spec/support/matchers/have_length.rb +0 -5
- data/tasks/rspec.rake +0 -6
- data/tasks/travis.rake +0 -1
- data/tasks/xdr.rake +0 -50
- data/xdr/Stellar-SCP.x +0 -86
- data/xdr/Stellar-ledger-entries.x +0 -288
- data/xdr/Stellar-ledger.x +0 -283
- data/xdr/Stellar-overlay.x +0 -146
- data/xdr/Stellar-transaction.x +0 -777
- data/xdr/Stellar-types.x +0 -81
@@ -8,7 +8,7 @@ require 'xdr'
|
|
8
8
|
# struct
|
9
9
|
# {
|
10
10
|
# AccountID sellerID;
|
11
|
-
#
|
11
|
+
# int64 offerID;
|
12
12
|
# }
|
13
13
|
#
|
14
14
|
# ===========================================================================
|
@@ -16,7 +16,7 @@ module Stellar
|
|
16
16
|
class LedgerKey
|
17
17
|
class Offer < XDR::Struct
|
18
18
|
attribute :seller_id, AccountID
|
19
|
-
attribute :offer_id,
|
19
|
+
attribute :offer_id, Int64
|
20
20
|
end
|
21
21
|
end
|
22
22
|
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
|
+
# struct ManageBuyOfferOp
|
9
|
+
# {
|
10
|
+
# Asset selling;
|
11
|
+
# Asset buying;
|
12
|
+
# int64 buyAmount; // amount being bought. if set to 0, delete the offer
|
13
|
+
# Price price; // price of thing being bought in terms of what you are
|
14
|
+
# // selling
|
15
|
+
#
|
16
|
+
# // 0=create a new offer, otherwise edit an existing offer
|
17
|
+
# int64 offerID;
|
18
|
+
# };
|
19
|
+
#
|
20
|
+
# ===========================================================================
|
21
|
+
module Stellar
|
22
|
+
class ManageBuyOfferOp < XDR::Struct
|
23
|
+
attribute :selling, Asset
|
24
|
+
attribute :buying, Asset
|
25
|
+
attribute :buy_amount, Int64
|
26
|
+
attribute :price, Price
|
27
|
+
attribute :offer_id, Int64
|
28
|
+
end
|
29
|
+
end
|
@@ -5,9 +5,9 @@ require 'xdr'
|
|
5
5
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
|
-
# union
|
8
|
+
# union ManageBuyOfferResult switch (ManageBuyOfferResultCode code)
|
9
9
|
# {
|
10
|
-
# case
|
10
|
+
# case MANAGE_BUY_OFFER_SUCCESS:
|
11
11
|
# ManageOfferSuccessResult success;
|
12
12
|
# default:
|
13
13
|
# void;
|
@@ -15,10 +15,10 @@ require 'xdr'
|
|
15
15
|
#
|
16
16
|
# ===========================================================================
|
17
17
|
module Stellar
|
18
|
-
class
|
19
|
-
switch_on
|
18
|
+
class ManageBuyOfferResult < XDR::Union
|
19
|
+
switch_on ManageBuyOfferResultCode, :code
|
20
20
|
|
21
|
-
switch :
|
21
|
+
switch :manage_buy_offer_success, :success
|
22
22
|
switch :default
|
23
23
|
|
24
24
|
attribute :success, ManageOfferSuccessResult
|
@@ -0,0 +1,51 @@
|
|
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 ManageBuyOfferResultCode
|
9
|
+
# {
|
10
|
+
# // codes considered as "success" for the operation
|
11
|
+
# MANAGE_BUY_OFFER_SUCCESS = 0,
|
12
|
+
#
|
13
|
+
# // codes considered as "failure" for the operation
|
14
|
+
# MANAGE_BUY_OFFER_MALFORMED = -1, // generated offer would be invalid
|
15
|
+
# MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling
|
16
|
+
# MANAGE_BUY_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
|
17
|
+
# MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
|
18
|
+
# MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
|
19
|
+
# MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
|
20
|
+
# MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
|
21
|
+
# MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user
|
22
|
+
# MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
|
23
|
+
# MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
|
24
|
+
#
|
25
|
+
# // update errors
|
26
|
+
# MANAGE_BUY_OFFER_NOT_FOUND =
|
27
|
+
# -11, // offerID does not match an existing offer
|
28
|
+
#
|
29
|
+
# MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer
|
30
|
+
# };
|
31
|
+
#
|
32
|
+
# ===========================================================================
|
33
|
+
module Stellar
|
34
|
+
class ManageBuyOfferResultCode < XDR::Enum
|
35
|
+
member :manage_buy_offer_success, 0
|
36
|
+
member :manage_buy_offer_malformed, -1
|
37
|
+
member :manage_buy_offer_sell_no_trust, -2
|
38
|
+
member :manage_buy_offer_buy_no_trust, -3
|
39
|
+
member :manage_buy_offer_sell_not_authorized, -4
|
40
|
+
member :manage_buy_offer_buy_not_authorized, -5
|
41
|
+
member :manage_buy_offer_line_full, -6
|
42
|
+
member :manage_buy_offer_underfunded, -7
|
43
|
+
member :manage_buy_offer_cross_self, -8
|
44
|
+
member :manage_buy_offer_sell_no_issuer, -9
|
45
|
+
member :manage_buy_offer_buy_no_issuer, -10
|
46
|
+
member :manage_buy_offer_not_found, -11
|
47
|
+
member :manage_buy_offer_low_reserve, -12
|
48
|
+
|
49
|
+
seal
|
50
|
+
end
|
51
|
+
end
|
@@ -5,7 +5,7 @@ require 'xdr'
|
|
5
5
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
|
-
# struct
|
8
|
+
# struct ManageSellOfferOp
|
9
9
|
# {
|
10
10
|
# Asset selling;
|
11
11
|
# Asset buying;
|
@@ -13,16 +13,16 @@ require 'xdr'
|
|
13
13
|
# Price price; // price of thing being sold in terms of what you are buying
|
14
14
|
#
|
15
15
|
# // 0=create a new offer, otherwise edit an existing offer
|
16
|
-
#
|
16
|
+
# int64 offerID;
|
17
17
|
# };
|
18
18
|
#
|
19
19
|
# ===========================================================================
|
20
20
|
module Stellar
|
21
|
-
class
|
21
|
+
class ManageSellOfferOp < XDR::Struct
|
22
22
|
attribute :selling, Asset
|
23
23
|
attribute :buying, Asset
|
24
24
|
attribute :amount, Int64
|
25
25
|
attribute :price, Price
|
26
|
-
attribute :offer_id,
|
26
|
+
attribute :offer_id, Int64
|
27
27
|
end
|
28
28
|
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 ManageSellOfferResult switch (ManageSellOfferResultCode code)
|
9
|
+
# {
|
10
|
+
# case MANAGE_SELL_OFFER_SUCCESS:
|
11
|
+
# ManageOfferSuccessResult success;
|
12
|
+
# default:
|
13
|
+
# void;
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class ManageSellOfferResult < XDR::Union
|
19
|
+
switch_on ManageSellOfferResultCode, :code
|
20
|
+
|
21
|
+
switch :manage_sell_offer_success, :success
|
22
|
+
switch :default
|
23
|
+
|
24
|
+
attribute :success, ManageOfferSuccessResult
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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 ManageSellOfferResultCode
|
9
|
+
# {
|
10
|
+
# // codes considered as "success" for the operation
|
11
|
+
# MANAGE_SELL_OFFER_SUCCESS = 0,
|
12
|
+
#
|
13
|
+
# // codes considered as "failure" for the operation
|
14
|
+
# MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid
|
15
|
+
# MANAGE_SELL_OFFER_SELL_NO_TRUST =
|
16
|
+
# -2, // no trust line for what we're selling
|
17
|
+
# MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying
|
18
|
+
# MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell
|
19
|
+
# MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy
|
20
|
+
# MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying
|
21
|
+
# MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell
|
22
|
+
# MANAGE_SELL_OFFER_CROSS_SELF =
|
23
|
+
# -8, // would cross an offer from the same user
|
24
|
+
# MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling
|
25
|
+
# MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying
|
26
|
+
#
|
27
|
+
# // update errors
|
28
|
+
# MANAGE_SELL_OFFER_NOT_FOUND =
|
29
|
+
# -11, // offerID does not match an existing offer
|
30
|
+
#
|
31
|
+
# MANAGE_SELL_OFFER_LOW_RESERVE =
|
32
|
+
# -12 // not enough funds to create a new Offer
|
33
|
+
# };
|
34
|
+
#
|
35
|
+
# ===========================================================================
|
36
|
+
module Stellar
|
37
|
+
class ManageSellOfferResultCode < XDR::Enum
|
38
|
+
member :manage_sell_offer_success, 0
|
39
|
+
member :manage_sell_offer_malformed, -1
|
40
|
+
member :manage_sell_offer_sell_no_trust, -2
|
41
|
+
member :manage_sell_offer_buy_no_trust, -3
|
42
|
+
member :manage_sell_offer_sell_not_authorized, -4
|
43
|
+
member :manage_sell_offer_buy_not_authorized, -5
|
44
|
+
member :manage_sell_offer_line_full, -6
|
45
|
+
member :manage_sell_offer_underfunded, -7
|
46
|
+
member :manage_sell_offer_cross_self, -8
|
47
|
+
member :manage_sell_offer_sell_no_issuer, -9
|
48
|
+
member :manage_sell_offer_buy_no_issuer, -10
|
49
|
+
member :manage_sell_offer_not_found, -11
|
50
|
+
member :manage_sell_offer_low_reserve, -12
|
51
|
+
|
52
|
+
seal
|
53
|
+
end
|
54
|
+
end
|
@@ -26,7 +26,10 @@ require 'xdr'
|
|
26
26
|
# GET_SCP_STATE = 12,
|
27
27
|
#
|
28
28
|
# // new messages
|
29
|
-
# HELLO = 13
|
29
|
+
# HELLO = 13,
|
30
|
+
#
|
31
|
+
# SURVEY_REQUEST = 14,
|
32
|
+
# SURVEY_RESPONSE = 15
|
30
33
|
# };
|
31
34
|
#
|
32
35
|
# ===========================================================================
|
@@ -45,6 +48,8 @@ module Stellar
|
|
45
48
|
member :scp_message, 11
|
46
49
|
member :get_scp_state, 12
|
47
50
|
member :hello, 13
|
51
|
+
member :survey_request, 14
|
52
|
+
member :survey_response, 15
|
48
53
|
|
49
54
|
seal
|
50
55
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This code was automatically generated using xdrgen
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# union MuxedAccount switch (CryptoKeyType type)
|
9
|
+
# {
|
10
|
+
# case KEY_TYPE_ED25519:
|
11
|
+
# uint256 ed25519;
|
12
|
+
# case KEY_TYPE_MUXED_ED25519:
|
13
|
+
# struct
|
14
|
+
# {
|
15
|
+
# uint64 id;
|
16
|
+
# uint256 ed25519;
|
17
|
+
# } med25519;
|
18
|
+
# };
|
19
|
+
#
|
20
|
+
# ===========================================================================
|
21
|
+
module Stellar
|
22
|
+
class MuxedAccount < XDR::Union
|
23
|
+
include XDR::Namespace
|
24
|
+
|
25
|
+
autoload :Med25519
|
26
|
+
|
27
|
+
switch_on CryptoKeyType, :type
|
28
|
+
|
29
|
+
switch :key_type_ed25519, :ed25519
|
30
|
+
switch :key_type_muxed_ed25519, :med25519
|
31
|
+
|
32
|
+
attribute :ed25519, Uint256
|
33
|
+
attribute :med25519, Med25519
|
34
|
+
end
|
35
|
+
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
|
9
|
+
# {
|
10
|
+
# uint64 id;
|
11
|
+
# uint256 ed25519;
|
12
|
+
# }
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class MuxedAccount
|
17
|
+
class Med25519 < XDR::Struct
|
18
|
+
attribute :id, Uint64
|
19
|
+
attribute :ed25519, Uint256
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -8,7 +8,7 @@ require 'xdr'
|
|
8
8
|
# struct OfferEntry
|
9
9
|
# {
|
10
10
|
# AccountID sellerID;
|
11
|
-
#
|
11
|
+
# int64 offerID;
|
12
12
|
# Asset selling; // A
|
13
13
|
# Asset buying; // B
|
14
14
|
# int64 amount; // amount of A
|
@@ -38,7 +38,7 @@ module Stellar
|
|
38
38
|
autoload :Ext
|
39
39
|
|
40
40
|
attribute :seller_id, AccountID
|
41
|
-
attribute :offer_id,
|
41
|
+
attribute :offer_id, Int64
|
42
42
|
attribute :selling, Asset
|
43
43
|
attribute :buying, Asset
|
44
44
|
attribute :amount, Int64
|
@@ -10,7 +10,7 @@ require 'xdr'
|
|
10
10
|
# // sourceAccount is the account used to run the operation
|
11
11
|
# // if not set, the runtime defaults to "sourceAccount" specified at
|
12
12
|
# // the transaction level
|
13
|
-
#
|
13
|
+
# MuxedAccount* sourceAccount;
|
14
14
|
#
|
15
15
|
# union switch (OperationType type)
|
16
16
|
# {
|
@@ -18,12 +18,12 @@ require 'xdr'
|
|
18
18
|
# CreateAccountOp createAccountOp;
|
19
19
|
# case PAYMENT:
|
20
20
|
# PaymentOp paymentOp;
|
21
|
-
# case
|
22
|
-
#
|
23
|
-
# case
|
24
|
-
#
|
25
|
-
# case
|
26
|
-
#
|
21
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
22
|
+
# PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
|
23
|
+
# case MANAGE_SELL_OFFER:
|
24
|
+
# ManageSellOfferOp manageSellOfferOp;
|
25
|
+
# case CREATE_PASSIVE_SELL_OFFER:
|
26
|
+
# CreatePassiveSellOfferOp createPassiveSellOfferOp;
|
27
27
|
# case SET_OPTIONS:
|
28
28
|
# SetOptionsOp setOptionsOp;
|
29
29
|
# case CHANGE_TRUST:
|
@@ -31,13 +31,17 @@ require 'xdr'
|
|
31
31
|
# case ALLOW_TRUST:
|
32
32
|
# AllowTrustOp allowTrustOp;
|
33
33
|
# case ACCOUNT_MERGE:
|
34
|
-
#
|
34
|
+
# MuxedAccount destination;
|
35
35
|
# case INFLATION:
|
36
36
|
# void;
|
37
37
|
# case MANAGE_DATA:
|
38
38
|
# ManageDataOp manageDataOp;
|
39
39
|
# case BUMP_SEQUENCE:
|
40
40
|
# BumpSequenceOp bumpSequenceOp;
|
41
|
+
# case MANAGE_BUY_OFFER:
|
42
|
+
# ManageBuyOfferOp manageBuyOfferOp;
|
43
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
44
|
+
# PathPaymentStrictSendOp pathPaymentStrictSendOp;
|
41
45
|
# }
|
42
46
|
# body;
|
43
47
|
# };
|
@@ -49,7 +53,7 @@ module Stellar
|
|
49
53
|
|
50
54
|
autoload :Body
|
51
55
|
|
52
|
-
attribute :source_account, XDR::Option[
|
56
|
+
attribute :source_account, XDR::Option[MuxedAccount]
|
53
57
|
attribute :body, Body
|
54
58
|
end
|
55
59
|
end
|
@@ -11,12 +11,12 @@ require 'xdr'
|
|
11
11
|
# CreateAccountOp createAccountOp;
|
12
12
|
# case PAYMENT:
|
13
13
|
# PaymentOp paymentOp;
|
14
|
-
# case
|
15
|
-
#
|
16
|
-
# case
|
17
|
-
#
|
18
|
-
# case
|
19
|
-
#
|
14
|
+
# case PATH_PAYMENT_STRICT_RECEIVE:
|
15
|
+
# PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
|
16
|
+
# case MANAGE_SELL_OFFER:
|
17
|
+
# ManageSellOfferOp manageSellOfferOp;
|
18
|
+
# case CREATE_PASSIVE_SELL_OFFER:
|
19
|
+
# CreatePassiveSellOfferOp createPassiveSellOfferOp;
|
20
20
|
# case SET_OPTIONS:
|
21
21
|
# SetOptionsOp setOptionsOp;
|
22
22
|
# case CHANGE_TRUST:
|
@@ -24,13 +24,17 @@ require 'xdr'
|
|
24
24
|
# case ALLOW_TRUST:
|
25
25
|
# AllowTrustOp allowTrustOp;
|
26
26
|
# case ACCOUNT_MERGE:
|
27
|
-
#
|
27
|
+
# MuxedAccount destination;
|
28
28
|
# case INFLATION:
|
29
29
|
# void;
|
30
30
|
# case MANAGE_DATA:
|
31
31
|
# ManageDataOp manageDataOp;
|
32
32
|
# case BUMP_SEQUENCE:
|
33
33
|
# BumpSequenceOp bumpSequenceOp;
|
34
|
+
# case MANAGE_BUY_OFFER:
|
35
|
+
# ManageBuyOfferOp manageBuyOfferOp;
|
36
|
+
# case PATH_PAYMENT_STRICT_SEND:
|
37
|
+
# PathPaymentStrictSendOp pathPaymentStrictSendOp;
|
34
38
|
# }
|
35
39
|
#
|
36
40
|
# ===========================================================================
|
@@ -39,30 +43,34 @@ module Stellar
|
|
39
43
|
class Body < XDR::Union
|
40
44
|
switch_on OperationType, :type
|
41
45
|
|
42
|
-
switch :create_account,
|
43
|
-
switch :payment,
|
44
|
-
switch :
|
45
|
-
switch :
|
46
|
-
switch :
|
47
|
-
switch :set_options,
|
48
|
-
switch :change_trust,
|
49
|
-
switch :allow_trust,
|
50
|
-
switch :account_merge,
|
46
|
+
switch :create_account, :create_account_op
|
47
|
+
switch :payment, :payment_op
|
48
|
+
switch :path_payment_strict_receive, :path_payment_strict_receive_op
|
49
|
+
switch :manage_sell_offer, :manage_sell_offer_op
|
50
|
+
switch :create_passive_sell_offer, :create_passive_sell_offer_op
|
51
|
+
switch :set_options, :set_options_op
|
52
|
+
switch :change_trust, :change_trust_op
|
53
|
+
switch :allow_trust, :allow_trust_op
|
54
|
+
switch :account_merge, :destination
|
51
55
|
switch :inflation
|
52
|
-
switch :manage_data,
|
53
|
-
switch :bump_sequence,
|
56
|
+
switch :manage_data, :manage_data_op
|
57
|
+
switch :bump_sequence, :bump_sequence_op
|
58
|
+
switch :manage_buy_offer, :manage_buy_offer_op
|
59
|
+
switch :path_payment_strict_send, :path_payment_strict_send_op
|
54
60
|
|
55
|
-
attribute :create_account_op,
|
56
|
-
attribute :payment_op,
|
57
|
-
attribute :
|
58
|
-
attribute :
|
59
|
-
attribute :
|
60
|
-
attribute :set_options_op,
|
61
|
-
attribute :change_trust_op,
|
62
|
-
attribute :allow_trust_op,
|
63
|
-
attribute :destination,
|
64
|
-
attribute :manage_data_op,
|
65
|
-
attribute :bump_sequence_op,
|
61
|
+
attribute :create_account_op, CreateAccountOp
|
62
|
+
attribute :payment_op, PaymentOp
|
63
|
+
attribute :path_payment_strict_receive_op, PathPaymentStrictReceiveOp
|
64
|
+
attribute :manage_sell_offer_op, ManageSellOfferOp
|
65
|
+
attribute :create_passive_sell_offer_op, CreatePassiveSellOfferOp
|
66
|
+
attribute :set_options_op, SetOptionsOp
|
67
|
+
attribute :change_trust_op, ChangeTrustOp
|
68
|
+
attribute :allow_trust_op, AllowTrustOp
|
69
|
+
attribute :destination, MuxedAccount
|
70
|
+
attribute :manage_data_op, ManageDataOp
|
71
|
+
attribute :bump_sequence_op, BumpSequenceOp
|
72
|
+
attribute :manage_buy_offer_op, ManageBuyOfferOp
|
73
|
+
attribute :path_payment_strict_send_op, PathPaymentStrictSendOp
|
66
74
|
end
|
67
75
|
end
|
68
76
|
end
|