auction-ruby-base 0.1.1
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.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.travis.yml +15 -0
- data/.yardopts +8 -0
- data/CHANGELOG.md +58 -0
- data/CONTRIBUTING.md +48 -0
- data/Gemfile +15 -0
- data/Guardfile +5 -0
- data/LICENSE.txt +202 -0
- data/README.md +83 -0
- data/Rakefile +4 -0
- data/auction-ruby-base.gemspec +35 -0
- data/examples/create_account.rb +26 -0
- data/examples/low_level_transaction_post.rb +46 -0
- data/examples/mid_level_transaction_post.rb +33 -0
- data/examples/non_native_payment.rb +60 -0
- data/examples/offer.rb +75 -0
- data/examples/transaction_merge.rb +23 -0
- data/generated/stellar-base-generated.rb +174 -0
- data/generated/stellar/account_entry.rb +55 -0
- data/generated/stellar/account_entry/ext.rb +24 -0
- data/generated/stellar/account_flags.rb +31 -0
- data/generated/stellar/account_merge_result.rb +26 -0
- data/generated/stellar/account_merge_result_code.rb +30 -0
- data/generated/stellar/affirm_fail_op.rb +22 -0
- data/generated/stellar/affirm_fail_result.rb +25 -0
- data/generated/stellar/affirm_fail_result_code.rb +22 -0
- data/generated/stellar/affirm_pass_op.rb +24 -0
- data/generated/stellar/affirm_pass_result.rb +25 -0
- data/generated/stellar/affirm_pass_result_code.rb +22 -0
- data/generated/stellar/allow_trust_op.rb +38 -0
- data/generated/stellar/allow_trust_op/asset.rb +33 -0
- data/generated/stellar/allow_trust_result.rb +25 -0
- data/generated/stellar/allow_trust_result_code.rb +31 -0
- data/generated/stellar/asset.rb +47 -0
- data/generated/stellar/asset/alpha_num12.rb +22 -0
- data/generated/stellar/asset/alpha_num4.rb +22 -0
- data/generated/stellar/asset_type.rb +24 -0
- data/generated/stellar/auth.rb +20 -0
- data/generated/stellar/auth_cert.rb +22 -0
- data/generated/stellar/authenticated_message.rb +32 -0
- data/generated/stellar/authenticated_message/v0.rb +24 -0
- data/generated/stellar/bucket_entry.rb +28 -0
- data/generated/stellar/bucket_entry_type.rb +22 -0
- data/generated/stellar/change_trust_op.rb +22 -0
- data/generated/stellar/change_trust_result.rb +25 -0
- data/generated/stellar/change_trust_result_code.rb +31 -0
- data/generated/stellar/claim_offer_atom.rb +33 -0
- data/generated/stellar/create_account_op.rb +20 -0
- data/generated/stellar/create_account_result.rb +25 -0
- data/generated/stellar/create_account_result_code.rb +32 -0
- data/generated/stellar/create_bid_op.rb +20 -0
- data/generated/stellar/create_bid_result.rb +25 -0
- data/generated/stellar/create_bid_result_code.rb +22 -0
- data/generated/stellar/create_lot_op.rb +46 -0
- data/generated/stellar/create_lot_result.rb +25 -0
- data/generated/stellar/create_lot_result_code.rb +22 -0
- data/generated/stellar/create_passive_offer_op.rb +24 -0
- data/generated/stellar/crypto_key_type.rb +20 -0
- data/generated/stellar/curve25519_public.rb +18 -0
- data/generated/stellar/curve25519_secret.rb +18 -0
- data/generated/stellar/decorated_signature.rb +20 -0
- data/generated/stellar/dont_have.rb +20 -0
- data/generated/stellar/envelope_type.rb +24 -0
- data/generated/stellar/error.rb +20 -0
- data/generated/stellar/error_code.rb +28 -0
- data/generated/stellar/hello.rb +34 -0
- data/generated/stellar/hmac_sha256_key.rb +18 -0
- data/generated/stellar/hmac_sha256_mac.rb +18 -0
- data/generated/stellar/inflation_payout.rb +20 -0
- data/generated/stellar/inflation_result.rb +26 -0
- data/generated/stellar/inflation_result_code.rb +24 -0
- data/generated/stellar/ip_addr_type.rb +22 -0
- data/generated/stellar/ledger_entry.rb +52 -0
- data/generated/stellar/ledger_entry/data.rb +49 -0
- data/generated/stellar/ledger_entry/ext.rb +24 -0
- data/generated/stellar/ledger_entry_change.rb +35 -0
- data/generated/stellar/ledger_entry_change_type.rb +26 -0
- data/generated/stellar/ledger_entry_type.rb +32 -0
- data/generated/stellar/ledger_header.rb +69 -0
- data/generated/stellar/ledger_header/ext.rb +24 -0
- data/generated/stellar/ledger_header_history_entry.rb +33 -0
- data/generated/stellar/ledger_header_history_entry/ext.rb +24 -0
- data/generated/stellar/ledger_key.rb +87 -0
- data/generated/stellar/ledger_key/account.rb +20 -0
- data/generated/stellar/ledger_key/lot.rb +22 -0
- data/generated/stellar/ledger_key/message.rb +22 -0
- data/generated/stellar/ledger_key/offer.rb +22 -0
- data/generated/stellar/ledger_key/participant.rb +22 -0
- data/generated/stellar/ledger_key/proof.rb +22 -0
- data/generated/stellar/ledger_key/trust_line.rb +22 -0
- data/generated/stellar/ledger_scp_messages.rb +20 -0
- data/generated/stellar/ledger_upgrade.rb +31 -0
- data/generated/stellar/ledger_upgrade_type.rb +24 -0
- data/generated/stellar/lot_branch.rb +21 -0
- data/generated/stellar/lot_entry.rb +64 -0
- data/generated/stellar/lot_entry/ext.rb +24 -0
- data/generated/stellar/lot_type.rb +21 -0
- data/generated/stellar/manage_offer_effect.rb +24 -0
- data/generated/stellar/manage_offer_op.rb +28 -0
- data/generated/stellar/manage_offer_result.rb +26 -0
- data/generated/stellar/manage_offer_result_code.rb +50 -0
- data/generated/stellar/manage_offer_success_result.rb +34 -0
- data/generated/stellar/manage_offer_success_result/offer.rb +30 -0
- data/generated/stellar/memo.rb +38 -0
- data/generated/stellar/memo_type.rb +28 -0
- data/generated/stellar/message_entry.rb +38 -0
- data/generated/stellar/message_entry/ext.rb +24 -0
- data/generated/stellar/message_type.rb +51 -0
- data/generated/stellar/offer_entry.rb +49 -0
- data/generated/stellar/offer_entry/ext.rb +24 -0
- data/generated/stellar/offer_entry_flags.rb +21 -0
- data/generated/stellar/operation.rb +65 -0
- data/generated/stellar/operation/body.rb +88 -0
- data/generated/stellar/operation_meta.rb +18 -0
- data/generated/stellar/operation_result.rb +67 -0
- data/generated/stellar/operation_result/tr.rb +89 -0
- data/generated/stellar/operation_result_code.rb +25 -0
- data/generated/stellar/operation_type.rb +52 -0
- data/generated/stellar/participant_entry.rb +39 -0
- data/generated/stellar/participant_entry/ext.rb +24 -0
- data/generated/stellar/participant_state.rb +25 -0
- data/generated/stellar/path_payment_op.rb +32 -0
- data/generated/stellar/path_payment_result.rb +38 -0
- data/generated/stellar/path_payment_result/success.rb +22 -0
- data/generated/stellar/path_payment_result_code.rb +47 -0
- data/generated/stellar/payment_op.rb +22 -0
- data/generated/stellar/payment_result.rb +25 -0
- data/generated/stellar/payment_result_code.rb +41 -0
- data/generated/stellar/peer_address.rb +33 -0
- data/generated/stellar/peer_address/ip.rb +29 -0
- data/generated/stellar/price.rb +20 -0
- data/generated/stellar/proof_entry.rb +42 -0
- data/generated/stellar/proof_entry/ext.rb +24 -0
- data/generated/stellar/provide_proof_op.rb +24 -0
- data/generated/stellar/provide_proof_result.rb +25 -0
- data/generated/stellar/provide_proof_result_code.rb +22 -0
- data/generated/stellar/public_key.rb +23 -0
- data/generated/stellar/register_participant_op.rb +22 -0
- data/generated/stellar/register_participant_result.rb +25 -0
- data/generated/stellar/register_participant_result_code.rb +22 -0
- data/generated/stellar/scp_ballot.rb +20 -0
- data/generated/stellar/scp_envelope.rb +20 -0
- data/generated/stellar/scp_history_entry.rb +23 -0
- data/generated/stellar/scp_history_entry_v0.rb +20 -0
- data/generated/stellar/scp_nomination.rb +22 -0
- data/generated/stellar/scp_quorum_set.rb +22 -0
- data/generated/stellar/scp_statement.rb +58 -0
- data/generated/stellar/scp_statement/pledges.rb +63 -0
- data/generated/stellar/scp_statement/pledges/confirm.rb +30 -0
- data/generated/stellar/scp_statement/pledges/externalize.rb +26 -0
- data/generated/stellar/scp_statement/pledges/prepare.rb +32 -0
- data/generated/stellar/scp_statement_type.rb +26 -0
- data/generated/stellar/send_message_op.rb +22 -0
- data/generated/stellar/send_message_result.rb +25 -0
- data/generated/stellar/send_message_result_code.rb +22 -0
- data/generated/stellar/set_options_op.rb +41 -0
- data/generated/stellar/set_options_result.rb +25 -0
- data/generated/stellar/set_options_result_code.rb +40 -0
- data/generated/stellar/signer.rb +20 -0
- data/generated/stellar/simple_payment_result.rb +22 -0
- data/generated/stellar/stellar_message.rb +74 -0
- data/generated/stellar/stellar_value.rb +41 -0
- data/generated/stellar/stellar_value/ext.rb +24 -0
- data/generated/stellar/threshold_indexes.rb +26 -0
- data/generated/stellar/time_bounds.rb +20 -0
- data/generated/stellar/transaction.rb +50 -0
- data/generated/stellar/transaction/ext.rb +24 -0
- data/generated/stellar/transaction_envelope.rb +20 -0
- data/generated/stellar/transaction_history_entry.rb +33 -0
- data/generated/stellar/transaction_history_entry/ext.rb +24 -0
- data/generated/stellar/transaction_history_result_entry.rb +33 -0
- data/generated/stellar/transaction_history_result_entry/ext.rb +24 -0
- data/generated/stellar/transaction_meta.rb +23 -0
- data/generated/stellar/transaction_result.rb +43 -0
- data/generated/stellar/transaction_result/ext.rb +24 -0
- data/generated/stellar/transaction_result/result.rb +30 -0
- data/generated/stellar/transaction_result_code.rb +45 -0
- data/generated/stellar/transaction_result_pair.rb +20 -0
- data/generated/stellar/transaction_result_set.rb +18 -0
- data/generated/stellar/transaction_set.rb +20 -0
- data/generated/stellar/trust_line_entry.rb +41 -0
- data/generated/stellar/trust_line_entry/ext.rb +24 -0
- data/generated/stellar/trust_line_flags.rb +21 -0
- data/lib/stellar-base.rb +33 -0
- data/lib/stellar/account_flags.rb +28 -0
- data/lib/stellar/asset.rb +69 -0
- data/lib/stellar/base.rb +1 -0
- data/lib/stellar/base/version.rb +5 -0
- data/lib/stellar/convert.rb +32 -0
- data/lib/stellar/key_pair.rb +112 -0
- data/lib/stellar/networks.rb +45 -0
- data/lib/stellar/operation.rb +384 -0
- data/lib/stellar/path_payment_result.rb +17 -0
- data/lib/stellar/price.rb +32 -0
- data/lib/stellar/thresholds.rb +39 -0
- data/lib/stellar/transaction.rb +205 -0
- data/lib/stellar/transaction_envelope.rb +32 -0
- data/lib/stellar/util/continued_fraction.rb +96 -0
- data/lib/stellar/util/strkey.rb +43 -0
- data/spec/lib/stellar/account_flags_spec.rb +19 -0
- data/spec/lib/stellar/asset_spec.rb +45 -0
- data/spec/lib/stellar/convert_spec.rb +61 -0
- data/spec/lib/stellar/key_pair_spec.rb +238 -0
- data/spec/lib/stellar/networks_spec.rb +77 -0
- data/spec/lib/stellar/operation_spec.rb +13 -0
- data/spec/lib/stellar/path_payment_result_spec.rb +95 -0
- data/spec/lib/stellar/price_spec.rb +34 -0
- data/spec/lib/stellar/thresholds_spec.rb +62 -0
- data/spec/lib/stellar/transaction_envelope_spec.rb +93 -0
- data/spec/lib/stellar/transaction_spec.rb +83 -0
- data/spec/lib/stellar/util/strkey_spec.rb +46 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/support/matchers/be_strkey.rb +9 -0
- data/spec/support/matchers/eq_bytes.rb +5 -0
- data/spec/support/matchers/have_length.rb +5 -0
- data/tasks/rspec.rake +6 -0
- data/tasks/travis.rake +1 -0
- data/tasks/xdr.rake +50 -0
- data/xdr/Stellar-SCP.x +86 -0
- data/xdr/Stellar-ledger-entries.x +351 -0
- data/xdr/Stellar-ledger.x +288 -0
- data/xdr/Stellar-overlay.x +146 -0
- data/xdr/Stellar-transaction.x +936 -0
- data/xdr/Stellar-types.x +55 -0
- metadata +495 -0
|
@@ -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 OfferEntry
|
|
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,21 @@
|
|
|
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 OfferEntryFlags
|
|
9
|
+
# {
|
|
10
|
+
# // issuer has authorized account to perform transactions with its credit
|
|
11
|
+
# PASSIVE_FLAG = 1
|
|
12
|
+
# };
|
|
13
|
+
#
|
|
14
|
+
# ===========================================================================
|
|
15
|
+
module Stellar
|
|
16
|
+
class OfferEntryFlags < XDR::Enum
|
|
17
|
+
member :passive_flag, 1
|
|
18
|
+
|
|
19
|
+
seal
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
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 Operation
|
|
9
|
+
# {
|
|
10
|
+
# // sourceAccount is the account used to run the operation
|
|
11
|
+
# // if not set, the runtime defaults to "sourceAccount" specified at
|
|
12
|
+
# // the transaction level
|
|
13
|
+
# AccountID* sourceAccount;
|
|
14
|
+
#
|
|
15
|
+
# union switch (OperationType type)
|
|
16
|
+
# {
|
|
17
|
+
# case CREATE_ACCOUNT:
|
|
18
|
+
# CreateAccountOp createAccountOp;
|
|
19
|
+
# case PAYMENT:
|
|
20
|
+
# PaymentOp paymentOp;
|
|
21
|
+
# case PATH_PAYMENT:
|
|
22
|
+
# PathPaymentOp pathPaymentOp;
|
|
23
|
+
# case MANAGE_OFFER:
|
|
24
|
+
# ManageOfferOp manageOfferOp;
|
|
25
|
+
# case CREATE_PASSIVE_OFFER:
|
|
26
|
+
# CreatePassiveOfferOp createPassiveOfferOp;
|
|
27
|
+
# case SET_OPTIONS:
|
|
28
|
+
# SetOptionsOp setOptionsOp;
|
|
29
|
+
# case CHANGE_TRUST:
|
|
30
|
+
# ChangeTrustOp changeTrustOp;
|
|
31
|
+
# case ALLOW_TRUST:
|
|
32
|
+
# AllowTrustOp allowTrustOp;
|
|
33
|
+
# case ACCOUNT_MERGE:
|
|
34
|
+
# AccountID destination;
|
|
35
|
+
# case INFLATION:
|
|
36
|
+
# void;
|
|
37
|
+
# case CREATE_LOT:
|
|
38
|
+
# CreateLotOp createLotOp;
|
|
39
|
+
# case REGISTER_PARTICIPANT:
|
|
40
|
+
# RegisterParticipantOp registerParticipantOp;
|
|
41
|
+
# case PROVIDE_PROOF:
|
|
42
|
+
# ProvideProofOp provideProofOp;
|
|
43
|
+
# case SEND_MESSAGE:
|
|
44
|
+
# SendMessageOp sendMessageOp;
|
|
45
|
+
# case CREATE_BID:
|
|
46
|
+
# CreateBidOp createBidOp;
|
|
47
|
+
# case AFFIRM_FAIL:
|
|
48
|
+
# AffirmFailOp affirmFailOp;
|
|
49
|
+
# case AFFIRM_PASS:
|
|
50
|
+
# AffirmPassOp affirmPassOp;
|
|
51
|
+
# }
|
|
52
|
+
# body;
|
|
53
|
+
# };
|
|
54
|
+
#
|
|
55
|
+
# ===========================================================================
|
|
56
|
+
module Stellar
|
|
57
|
+
class Operation < XDR::Struct
|
|
58
|
+
include XDR::Namespace
|
|
59
|
+
|
|
60
|
+
autoload :Body
|
|
61
|
+
|
|
62
|
+
attribute :source_account, XDR::Option[AccountID]
|
|
63
|
+
attribute :body, Body
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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 (OperationType type)
|
|
9
|
+
# {
|
|
10
|
+
# case CREATE_ACCOUNT:
|
|
11
|
+
# CreateAccountOp createAccountOp;
|
|
12
|
+
# case PAYMENT:
|
|
13
|
+
# PaymentOp paymentOp;
|
|
14
|
+
# case PATH_PAYMENT:
|
|
15
|
+
# PathPaymentOp pathPaymentOp;
|
|
16
|
+
# case MANAGE_OFFER:
|
|
17
|
+
# ManageOfferOp manageOfferOp;
|
|
18
|
+
# case CREATE_PASSIVE_OFFER:
|
|
19
|
+
# CreatePassiveOfferOp createPassiveOfferOp;
|
|
20
|
+
# case SET_OPTIONS:
|
|
21
|
+
# SetOptionsOp setOptionsOp;
|
|
22
|
+
# case CHANGE_TRUST:
|
|
23
|
+
# ChangeTrustOp changeTrustOp;
|
|
24
|
+
# case ALLOW_TRUST:
|
|
25
|
+
# AllowTrustOp allowTrustOp;
|
|
26
|
+
# case ACCOUNT_MERGE:
|
|
27
|
+
# AccountID destination;
|
|
28
|
+
# case INFLATION:
|
|
29
|
+
# void;
|
|
30
|
+
# case CREATE_LOT:
|
|
31
|
+
# CreateLotOp createLotOp;
|
|
32
|
+
# case REGISTER_PARTICIPANT:
|
|
33
|
+
# RegisterParticipantOp registerParticipantOp;
|
|
34
|
+
# case PROVIDE_PROOF:
|
|
35
|
+
# ProvideProofOp provideProofOp;
|
|
36
|
+
# case SEND_MESSAGE:
|
|
37
|
+
# SendMessageOp sendMessageOp;
|
|
38
|
+
# case CREATE_BID:
|
|
39
|
+
# CreateBidOp createBidOp;
|
|
40
|
+
# case AFFIRM_FAIL:
|
|
41
|
+
# AffirmFailOp affirmFailOp;
|
|
42
|
+
# case AFFIRM_PASS:
|
|
43
|
+
# AffirmPassOp affirmPassOp;
|
|
44
|
+
# }
|
|
45
|
+
#
|
|
46
|
+
# ===========================================================================
|
|
47
|
+
module Stellar
|
|
48
|
+
class Operation
|
|
49
|
+
class Body < XDR::Union
|
|
50
|
+
switch_on OperationType, :type
|
|
51
|
+
|
|
52
|
+
switch :create_account, :create_account_op
|
|
53
|
+
switch :payment, :payment_op
|
|
54
|
+
switch :path_payment, :path_payment_op
|
|
55
|
+
switch :manage_offer, :manage_offer_op
|
|
56
|
+
switch :create_passive_offer, :create_passive_offer_op
|
|
57
|
+
switch :set_options, :set_options_op
|
|
58
|
+
switch :change_trust, :change_trust_op
|
|
59
|
+
switch :allow_trust, :allow_trust_op
|
|
60
|
+
switch :account_merge, :destination
|
|
61
|
+
switch :inflation
|
|
62
|
+
switch :create_lot, :create_lot_op
|
|
63
|
+
switch :register_participant, :register_participant_op
|
|
64
|
+
switch :provide_proof, :provide_proof_op
|
|
65
|
+
switch :send_message, :send_message_op
|
|
66
|
+
switch :create_bid, :create_bid_op
|
|
67
|
+
switch :affirm_fail, :affirm_fail_op
|
|
68
|
+
switch :affirm_pass, :affirm_pass_op
|
|
69
|
+
|
|
70
|
+
attribute :create_account_op, CreateAccountOp
|
|
71
|
+
attribute :payment_op, PaymentOp
|
|
72
|
+
attribute :path_payment_op, PathPaymentOp
|
|
73
|
+
attribute :manage_offer_op, ManageOfferOp
|
|
74
|
+
attribute :create_passive_offer_op, CreatePassiveOfferOp
|
|
75
|
+
attribute :set_options_op, SetOptionsOp
|
|
76
|
+
attribute :change_trust_op, ChangeTrustOp
|
|
77
|
+
attribute :allow_trust_op, AllowTrustOp
|
|
78
|
+
attribute :destination, AccountID
|
|
79
|
+
attribute :create_lot_op, CreateLotOp
|
|
80
|
+
attribute :register_participant_op, RegisterParticipantOp
|
|
81
|
+
attribute :provide_proof_op, ProvideProofOp
|
|
82
|
+
attribute :send_message_op, SendMessageOp
|
|
83
|
+
attribute :create_bid_op, CreateBidOp
|
|
84
|
+
attribute :affirm_fail_op, AffirmFailOp
|
|
85
|
+
attribute :affirm_pass_op, AffirmPassOp
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
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 OperationMeta
|
|
9
|
+
# {
|
|
10
|
+
# LedgerEntryChanges changes;
|
|
11
|
+
# };
|
|
12
|
+
#
|
|
13
|
+
# ===========================================================================
|
|
14
|
+
module Stellar
|
|
15
|
+
class OperationMeta < XDR::Struct
|
|
16
|
+
attribute :changes, LedgerEntryChanges
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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 OperationResult switch (OperationResultCode code)
|
|
9
|
+
# {
|
|
10
|
+
# case opINNER:
|
|
11
|
+
# union switch (OperationType type)
|
|
12
|
+
# {
|
|
13
|
+
# case CREATE_ACCOUNT:
|
|
14
|
+
# CreateAccountResult createAccountResult;
|
|
15
|
+
# case PAYMENT:
|
|
16
|
+
# PaymentResult paymentResult;
|
|
17
|
+
# case PATH_PAYMENT:
|
|
18
|
+
# PathPaymentResult pathPaymentResult;
|
|
19
|
+
# case MANAGE_OFFER:
|
|
20
|
+
# ManageOfferResult manageOfferResult;
|
|
21
|
+
# case CREATE_PASSIVE_OFFER:
|
|
22
|
+
# ManageOfferResult createPassiveOfferResult;
|
|
23
|
+
# case SET_OPTIONS:
|
|
24
|
+
# SetOptionsResult setOptionsResult;
|
|
25
|
+
# case CHANGE_TRUST:
|
|
26
|
+
# ChangeTrustResult changeTrustResult;
|
|
27
|
+
# case ALLOW_TRUST:
|
|
28
|
+
# AllowTrustResult allowTrustResult;
|
|
29
|
+
# case ACCOUNT_MERGE:
|
|
30
|
+
# AccountMergeResult accountMergeResult;
|
|
31
|
+
# case INFLATION:
|
|
32
|
+
# InflationResult inflationResult;
|
|
33
|
+
# case CREATE_LOT:
|
|
34
|
+
# CreateLotResult createLotResult;
|
|
35
|
+
# case REGISTER_PARTICIPANT:
|
|
36
|
+
# RegisterParticipantResult registerParticipantResult;
|
|
37
|
+
# case PROVIDE_PROOF:
|
|
38
|
+
# ProvideProofResult provideProofResult;
|
|
39
|
+
# case SEND_MESSAGE:
|
|
40
|
+
# SendMessageResult sendMessageResult;
|
|
41
|
+
# case CREATE_BID:
|
|
42
|
+
# CreateBidResult createBidResult;
|
|
43
|
+
# case AFFIRM_FAIL:
|
|
44
|
+
# AffirmFailResult affirmFailResult;
|
|
45
|
+
# case AFFIRM_PASS:
|
|
46
|
+
# AffirmPassResult affirmPassResult;
|
|
47
|
+
# }
|
|
48
|
+
# tr;
|
|
49
|
+
# default:
|
|
50
|
+
# void;
|
|
51
|
+
# };
|
|
52
|
+
#
|
|
53
|
+
# ===========================================================================
|
|
54
|
+
module Stellar
|
|
55
|
+
class OperationResult < XDR::Union
|
|
56
|
+
include XDR::Namespace
|
|
57
|
+
|
|
58
|
+
autoload :Tr
|
|
59
|
+
|
|
60
|
+
switch_on OperationResultCode, :code
|
|
61
|
+
|
|
62
|
+
switch :op_inner, :tr
|
|
63
|
+
switch :default
|
|
64
|
+
|
|
65
|
+
attribute :tr, Tr
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
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 (OperationType type)
|
|
9
|
+
# {
|
|
10
|
+
# case CREATE_ACCOUNT:
|
|
11
|
+
# CreateAccountResult createAccountResult;
|
|
12
|
+
# case PAYMENT:
|
|
13
|
+
# PaymentResult paymentResult;
|
|
14
|
+
# case PATH_PAYMENT:
|
|
15
|
+
# PathPaymentResult pathPaymentResult;
|
|
16
|
+
# case MANAGE_OFFER:
|
|
17
|
+
# ManageOfferResult manageOfferResult;
|
|
18
|
+
# case CREATE_PASSIVE_OFFER:
|
|
19
|
+
# ManageOfferResult createPassiveOfferResult;
|
|
20
|
+
# case SET_OPTIONS:
|
|
21
|
+
# SetOptionsResult setOptionsResult;
|
|
22
|
+
# case CHANGE_TRUST:
|
|
23
|
+
# ChangeTrustResult changeTrustResult;
|
|
24
|
+
# case ALLOW_TRUST:
|
|
25
|
+
# AllowTrustResult allowTrustResult;
|
|
26
|
+
# case ACCOUNT_MERGE:
|
|
27
|
+
# AccountMergeResult accountMergeResult;
|
|
28
|
+
# case INFLATION:
|
|
29
|
+
# InflationResult inflationResult;
|
|
30
|
+
# case CREATE_LOT:
|
|
31
|
+
# CreateLotResult createLotResult;
|
|
32
|
+
# case REGISTER_PARTICIPANT:
|
|
33
|
+
# RegisterParticipantResult registerParticipantResult;
|
|
34
|
+
# case PROVIDE_PROOF:
|
|
35
|
+
# ProvideProofResult provideProofResult;
|
|
36
|
+
# case SEND_MESSAGE:
|
|
37
|
+
# SendMessageResult sendMessageResult;
|
|
38
|
+
# case CREATE_BID:
|
|
39
|
+
# CreateBidResult createBidResult;
|
|
40
|
+
# case AFFIRM_FAIL:
|
|
41
|
+
# AffirmFailResult affirmFailResult;
|
|
42
|
+
# case AFFIRM_PASS:
|
|
43
|
+
# AffirmPassResult affirmPassResult;
|
|
44
|
+
# }
|
|
45
|
+
#
|
|
46
|
+
# ===========================================================================
|
|
47
|
+
module Stellar
|
|
48
|
+
class OperationResult
|
|
49
|
+
class Tr < XDR::Union
|
|
50
|
+
switch_on OperationType, :type
|
|
51
|
+
|
|
52
|
+
switch :create_account, :create_account_result
|
|
53
|
+
switch :payment, :payment_result
|
|
54
|
+
switch :path_payment, :path_payment_result
|
|
55
|
+
switch :manage_offer, :manage_offer_result
|
|
56
|
+
switch :create_passive_offer, :create_passive_offer_result
|
|
57
|
+
switch :set_options, :set_options_result
|
|
58
|
+
switch :change_trust, :change_trust_result
|
|
59
|
+
switch :allow_trust, :allow_trust_result
|
|
60
|
+
switch :account_merge, :account_merge_result
|
|
61
|
+
switch :inflation, :inflation_result
|
|
62
|
+
switch :create_lot, :create_lot_result
|
|
63
|
+
switch :register_participant, :register_participant_result
|
|
64
|
+
switch :provide_proof, :provide_proof_result
|
|
65
|
+
switch :send_message, :send_message_result
|
|
66
|
+
switch :create_bid, :create_bid_result
|
|
67
|
+
switch :affirm_fail, :affirm_fail_result
|
|
68
|
+
switch :affirm_pass, :affirm_pass_result
|
|
69
|
+
|
|
70
|
+
attribute :create_account_result, CreateAccountResult
|
|
71
|
+
attribute :payment_result, PaymentResult
|
|
72
|
+
attribute :path_payment_result, PathPaymentResult
|
|
73
|
+
attribute :manage_offer_result, ManageOfferResult
|
|
74
|
+
attribute :create_passive_offer_result, ManageOfferResult
|
|
75
|
+
attribute :set_options_result, SetOptionsResult
|
|
76
|
+
attribute :change_trust_result, ChangeTrustResult
|
|
77
|
+
attribute :allow_trust_result, AllowTrustResult
|
|
78
|
+
attribute :account_merge_result, AccountMergeResult
|
|
79
|
+
attribute :inflation_result, InflationResult
|
|
80
|
+
attribute :create_lot_result, CreateLotResult
|
|
81
|
+
attribute :register_participant_result, RegisterParticipantResult
|
|
82
|
+
attribute :provide_proof_result, ProvideProofResult
|
|
83
|
+
attribute :send_message_result, SendMessageResult
|
|
84
|
+
attribute :create_bid_result, CreateBidResult
|
|
85
|
+
attribute :affirm_fail_result, AffirmFailResult
|
|
86
|
+
attribute :affirm_pass_result, AffirmPassResult
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
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
|
+
# enum OperationResultCode
|
|
9
|
+
# {
|
|
10
|
+
# opINNER = 0, // inner object result is valid
|
|
11
|
+
#
|
|
12
|
+
# opBAD_AUTH = -1, // too few valid signatures / wrong network
|
|
13
|
+
# opNO_ACCOUNT = -2 // source account was not found
|
|
14
|
+
# };
|
|
15
|
+
#
|
|
16
|
+
# ===========================================================================
|
|
17
|
+
module Stellar
|
|
18
|
+
class OperationResultCode < XDR::Enum
|
|
19
|
+
member :op_inner, 0
|
|
20
|
+
member :op_bad_auth, -1
|
|
21
|
+
member :op_no_account, -2
|
|
22
|
+
|
|
23
|
+
seal
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
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 OperationType
|
|
9
|
+
# {
|
|
10
|
+
# CREATE_ACCOUNT = 0,
|
|
11
|
+
# PAYMENT = 1,
|
|
12
|
+
# PATH_PAYMENT = 2,
|
|
13
|
+
# MANAGE_OFFER = 3,
|
|
14
|
+
# CREATE_PASSIVE_OFFER = 4,
|
|
15
|
+
# SET_OPTIONS = 5,
|
|
16
|
+
# CHANGE_TRUST = 6,
|
|
17
|
+
# ALLOW_TRUST = 7,
|
|
18
|
+
# ACCOUNT_MERGE = 8,
|
|
19
|
+
# INFLATION = 9,
|
|
20
|
+
# CREATE_LOT = 10,
|
|
21
|
+
# REGISTER_PARTICIPANT = 11,
|
|
22
|
+
# PROVIDE_PROOF = 12,
|
|
23
|
+
# SEND_MESSAGE = 13,
|
|
24
|
+
# CREATE_BID = 14,
|
|
25
|
+
# AFFIRM_FAIL = 15,
|
|
26
|
+
# AFFIRM_PASS = 16
|
|
27
|
+
# };
|
|
28
|
+
#
|
|
29
|
+
# ===========================================================================
|
|
30
|
+
module Stellar
|
|
31
|
+
class OperationType < XDR::Enum
|
|
32
|
+
member :create_account, 0
|
|
33
|
+
member :payment, 1
|
|
34
|
+
member :path_payment, 2
|
|
35
|
+
member :manage_offer, 3
|
|
36
|
+
member :create_passive_offer, 4
|
|
37
|
+
member :set_options, 5
|
|
38
|
+
member :change_trust, 6
|
|
39
|
+
member :allow_trust, 7
|
|
40
|
+
member :account_merge, 8
|
|
41
|
+
member :inflation, 9
|
|
42
|
+
member :create_lot, 10
|
|
43
|
+
member :register_participant, 11
|
|
44
|
+
member :provide_proof, 12
|
|
45
|
+
member :send_message, 13
|
|
46
|
+
member :create_bid, 14
|
|
47
|
+
member :affirm_fail, 15
|
|
48
|
+
member :affirm_pass, 16
|
|
49
|
+
|
|
50
|
+
seal
|
|
51
|
+
end
|
|
52
|
+
end
|