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,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
|
+
# struct ParticipantEntry
|
|
9
|
+
# {
|
|
10
|
+
# AccountID accountID;
|
|
11
|
+
# uint64 lotID;
|
|
12
|
+
# uint32 state;
|
|
13
|
+
# uint64 bestBid;
|
|
14
|
+
# uint32 bestBidSeq;
|
|
15
|
+
#
|
|
16
|
+
# // reserved for future use
|
|
17
|
+
# union switch (int v)
|
|
18
|
+
# {
|
|
19
|
+
# case 0:
|
|
20
|
+
# void;
|
|
21
|
+
# }
|
|
22
|
+
# ext;
|
|
23
|
+
# };
|
|
24
|
+
#
|
|
25
|
+
# ===========================================================================
|
|
26
|
+
module Stellar
|
|
27
|
+
class ParticipantEntry < XDR::Struct
|
|
28
|
+
include XDR::Namespace
|
|
29
|
+
|
|
30
|
+
autoload :Ext
|
|
31
|
+
|
|
32
|
+
attribute :account_id, AccountID
|
|
33
|
+
attribute :lot_id, Uint64
|
|
34
|
+
attribute :state, Uint32
|
|
35
|
+
attribute :best_bid, Uint64
|
|
36
|
+
attribute :best_bid_seq, Uint32
|
|
37
|
+
attribute :ext, Ext
|
|
38
|
+
end
|
|
39
|
+
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
|
+
# union switch (int v)
|
|
9
|
+
# {
|
|
10
|
+
# case 0:
|
|
11
|
+
# void;
|
|
12
|
+
# }
|
|
13
|
+
#
|
|
14
|
+
# ===========================================================================
|
|
15
|
+
module Stellar
|
|
16
|
+
class ParticipantEntry
|
|
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,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 ParticipantState {
|
|
9
|
+
# APPROVED = 0,
|
|
10
|
+
# PENDING = 1,
|
|
11
|
+
# PASS = 2,
|
|
12
|
+
# FAIL = 3
|
|
13
|
+
# };
|
|
14
|
+
#
|
|
15
|
+
# ===========================================================================
|
|
16
|
+
module Stellar
|
|
17
|
+
class ParticipantState < XDR::Enum
|
|
18
|
+
member :approved, 0
|
|
19
|
+
member :pending, 1
|
|
20
|
+
member :pass, 2
|
|
21
|
+
member :fail, 3
|
|
22
|
+
|
|
23
|
+
seal
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
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 PathPaymentOp
|
|
9
|
+
# {
|
|
10
|
+
# Asset sendAsset; // asset we pay with
|
|
11
|
+
# int64 sendMax; // the maximum amount of sendAsset to
|
|
12
|
+
# // send (excluding fees).
|
|
13
|
+
# // The operation will fail if can't be met
|
|
14
|
+
#
|
|
15
|
+
# AccountID destination; // recipient of the payment
|
|
16
|
+
# Asset destAsset; // what they end up with
|
|
17
|
+
# int64 destAmount; // amount they end up with
|
|
18
|
+
#
|
|
19
|
+
# Asset path<5>; // additional hops it must go through to get there
|
|
20
|
+
# };
|
|
21
|
+
#
|
|
22
|
+
# ===========================================================================
|
|
23
|
+
module Stellar
|
|
24
|
+
class PathPaymentOp < XDR::Struct
|
|
25
|
+
attribute :send_asset, Asset
|
|
26
|
+
attribute :send_max, Int64
|
|
27
|
+
attribute :destination, AccountID
|
|
28
|
+
attribute :dest_asset, Asset
|
|
29
|
+
attribute :dest_amount, Int64
|
|
30
|
+
attribute :path, XDR::VarArray[Asset, 5]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
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 PathPaymentResult switch (PathPaymentResultCode code)
|
|
9
|
+
# {
|
|
10
|
+
# case PATH_PAYMENT_SUCCESS:
|
|
11
|
+
# struct
|
|
12
|
+
# {
|
|
13
|
+
# ClaimOfferAtom offers<>;
|
|
14
|
+
# SimplePaymentResult last;
|
|
15
|
+
# } success;
|
|
16
|
+
# case PATH_PAYMENT_NO_ISSUER:
|
|
17
|
+
# Asset noIssuer; // the asset that caused the error
|
|
18
|
+
# default:
|
|
19
|
+
# void;
|
|
20
|
+
# };
|
|
21
|
+
#
|
|
22
|
+
# ===========================================================================
|
|
23
|
+
module Stellar
|
|
24
|
+
class PathPaymentResult < XDR::Union
|
|
25
|
+
include XDR::Namespace
|
|
26
|
+
|
|
27
|
+
autoload :Success
|
|
28
|
+
|
|
29
|
+
switch_on PathPaymentResultCode, :code
|
|
30
|
+
|
|
31
|
+
switch :path_payment_success, :success
|
|
32
|
+
switch :path_payment_no_issuer, :no_issuer
|
|
33
|
+
switch :default
|
|
34
|
+
|
|
35
|
+
attribute :success, Success
|
|
36
|
+
attribute :no_issuer, Asset
|
|
37
|
+
end
|
|
38
|
+
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
|
+
# ClaimOfferAtom offers<>;
|
|
11
|
+
# SimplePaymentResult last;
|
|
12
|
+
# }
|
|
13
|
+
#
|
|
14
|
+
# ===========================================================================
|
|
15
|
+
module Stellar
|
|
16
|
+
class PathPaymentResult
|
|
17
|
+
class Success < XDR::Struct
|
|
18
|
+
attribute :offers, XDR::VarArray[ClaimOfferAtom]
|
|
19
|
+
attribute :last, SimplePaymentResult
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
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 PathPaymentResultCode
|
|
9
|
+
# {
|
|
10
|
+
# // codes considered as "success" for the operation
|
|
11
|
+
# PATH_PAYMENT_SUCCESS = 0, // success
|
|
12
|
+
#
|
|
13
|
+
# // codes considered as "failure" for the operation
|
|
14
|
+
# PATH_PAYMENT_MALFORMED = -1, // bad input
|
|
15
|
+
# PATH_PAYMENT_UNDERFUNDED = -2, // not enough funds in source account
|
|
16
|
+
# PATH_PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account
|
|
17
|
+
# PATH_PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
|
|
18
|
+
# PATH_PAYMENT_NO_DESTINATION = -5, // destination account does not exist
|
|
19
|
+
# PATH_PAYMENT_NO_TRUST = -6, // dest missing a trust line for asset
|
|
20
|
+
# PATH_PAYMENT_NOT_AUTHORIZED = -7, // dest not authorized to hold asset
|
|
21
|
+
# PATH_PAYMENT_LINE_FULL = -8, // dest would go above their limit
|
|
22
|
+
# PATH_PAYMENT_NO_ISSUER = -9, // missing issuer on one asset
|
|
23
|
+
# PATH_PAYMENT_TOO_FEW_OFFERS = -10, // not enough offers to satisfy path
|
|
24
|
+
# PATH_PAYMENT_OFFER_CROSS_SELF = -11, // would cross one of its own offers
|
|
25
|
+
# PATH_PAYMENT_OVER_SENDMAX = -12 // could not satisfy sendmax
|
|
26
|
+
# };
|
|
27
|
+
#
|
|
28
|
+
# ===========================================================================
|
|
29
|
+
module Stellar
|
|
30
|
+
class PathPaymentResultCode < XDR::Enum
|
|
31
|
+
member :path_payment_success, 0
|
|
32
|
+
member :path_payment_malformed, -1
|
|
33
|
+
member :path_payment_underfunded, -2
|
|
34
|
+
member :path_payment_src_no_trust, -3
|
|
35
|
+
member :path_payment_src_not_authorized, -4
|
|
36
|
+
member :path_payment_no_destination, -5
|
|
37
|
+
member :path_payment_no_trust, -6
|
|
38
|
+
member :path_payment_not_authorized, -7
|
|
39
|
+
member :path_payment_line_full, -8
|
|
40
|
+
member :path_payment_no_issuer, -9
|
|
41
|
+
member :path_payment_too_few_offers, -10
|
|
42
|
+
member :path_payment_offer_cross_self, -11
|
|
43
|
+
member :path_payment_over_sendmax, -12
|
|
44
|
+
|
|
45
|
+
seal
|
|
46
|
+
end
|
|
47
|
+
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 PaymentOp
|
|
9
|
+
# {
|
|
10
|
+
# AccountID destination; // recipient of the payment
|
|
11
|
+
# Asset asset; // what they end up with
|
|
12
|
+
# int64 amount; // amount they end up with
|
|
13
|
+
# };
|
|
14
|
+
#
|
|
15
|
+
# ===========================================================================
|
|
16
|
+
module Stellar
|
|
17
|
+
class PaymentOp < XDR::Struct
|
|
18
|
+
attribute :destination, AccountID
|
|
19
|
+
attribute :asset, Asset
|
|
20
|
+
attribute :amount, Int64
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This code was automatically generated using xdrgen
|
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
|
3
|
+
|
|
4
|
+
require 'xdr'
|
|
5
|
+
|
|
6
|
+
# === xdr source ============================================================
|
|
7
|
+
#
|
|
8
|
+
# union PaymentResult switch (PaymentResultCode code)
|
|
9
|
+
# {
|
|
10
|
+
# case PAYMENT_SUCCESS:
|
|
11
|
+
# void;
|
|
12
|
+
# default:
|
|
13
|
+
# void;
|
|
14
|
+
# };
|
|
15
|
+
#
|
|
16
|
+
# ===========================================================================
|
|
17
|
+
module Stellar
|
|
18
|
+
class PaymentResult < XDR::Union
|
|
19
|
+
switch_on PaymentResultCode, :code
|
|
20
|
+
|
|
21
|
+
switch :payment_success
|
|
22
|
+
switch :default
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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 PaymentResultCode
|
|
9
|
+
# {
|
|
10
|
+
# // codes considered as "success" for the operation
|
|
11
|
+
# PAYMENT_SUCCESS = 0, // payment successfuly completed
|
|
12
|
+
#
|
|
13
|
+
# // codes considered as "failure" for the operation
|
|
14
|
+
# PAYMENT_MALFORMED = -1, // bad input
|
|
15
|
+
# PAYMENT_UNDERFUNDED = -2, // not enough funds in source account
|
|
16
|
+
# PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account
|
|
17
|
+
# PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer
|
|
18
|
+
# PAYMENT_NO_DESTINATION = -5, // destination account does not exist
|
|
19
|
+
# PAYMENT_NO_TRUST = -6, // destination missing a trust line for asset
|
|
20
|
+
# PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold asset
|
|
21
|
+
# PAYMENT_LINE_FULL = -8, // destination would go above their limit
|
|
22
|
+
# PAYMENT_NO_ISSUER = -9 // missing issuer on asset
|
|
23
|
+
# };
|
|
24
|
+
#
|
|
25
|
+
# ===========================================================================
|
|
26
|
+
module Stellar
|
|
27
|
+
class PaymentResultCode < XDR::Enum
|
|
28
|
+
member :payment_success, 0
|
|
29
|
+
member :payment_malformed, -1
|
|
30
|
+
member :payment_underfunded, -2
|
|
31
|
+
member :payment_src_no_trust, -3
|
|
32
|
+
member :payment_src_not_authorized, -4
|
|
33
|
+
member :payment_no_destination, -5
|
|
34
|
+
member :payment_no_trust, -6
|
|
35
|
+
member :payment_not_authorized, -7
|
|
36
|
+
member :payment_line_full, -8
|
|
37
|
+
member :payment_no_issuer, -9
|
|
38
|
+
|
|
39
|
+
seal
|
|
40
|
+
end
|
|
41
|
+
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 PeerAddress
|
|
9
|
+
# {
|
|
10
|
+
# union switch (IPAddrType type)
|
|
11
|
+
# {
|
|
12
|
+
# case IPv4:
|
|
13
|
+
# opaque ipv4[4];
|
|
14
|
+
# case IPv6:
|
|
15
|
+
# opaque ipv6[16];
|
|
16
|
+
# }
|
|
17
|
+
# ip;
|
|
18
|
+
# uint32 port;
|
|
19
|
+
# uint32 numFailures;
|
|
20
|
+
# };
|
|
21
|
+
#
|
|
22
|
+
# ===========================================================================
|
|
23
|
+
module Stellar
|
|
24
|
+
class PeerAddress < XDR::Struct
|
|
25
|
+
include XDR::Namespace
|
|
26
|
+
|
|
27
|
+
autoload :Ip
|
|
28
|
+
|
|
29
|
+
attribute :ip, Ip
|
|
30
|
+
attribute :port, Uint32
|
|
31
|
+
attribute :num_failures, Uint32
|
|
32
|
+
end
|
|
33
|
+
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
|
+
# union switch (IPAddrType type)
|
|
9
|
+
# {
|
|
10
|
+
# case IPv4:
|
|
11
|
+
# opaque ipv4[4];
|
|
12
|
+
# case IPv6:
|
|
13
|
+
# opaque ipv6[16];
|
|
14
|
+
# }
|
|
15
|
+
#
|
|
16
|
+
# ===========================================================================
|
|
17
|
+
module Stellar
|
|
18
|
+
class PeerAddress
|
|
19
|
+
class Ip < XDR::Union
|
|
20
|
+
switch_on IPAddrType, :type
|
|
21
|
+
|
|
22
|
+
switch :i_pv4, :ipv4
|
|
23
|
+
switch :i_pv6, :ipv6
|
|
24
|
+
|
|
25
|
+
attribute :ipv4, XDR::Opaque[4]
|
|
26
|
+
attribute :ipv6, XDR::Opaque[16]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
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 Price
|
|
9
|
+
# {
|
|
10
|
+
# int32 n; // numerator
|
|
11
|
+
# int32 d; // denominator
|
|
12
|
+
# };
|
|
13
|
+
#
|
|
14
|
+
# ===========================================================================
|
|
15
|
+
module Stellar
|
|
16
|
+
class Price < XDR::Struct
|
|
17
|
+
attribute :n, Int32
|
|
18
|
+
attribute :d, Int32
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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 ProofEntry
|
|
9
|
+
# {
|
|
10
|
+
# AccountID accountID;
|
|
11
|
+
# uint64 lotID;
|
|
12
|
+
# uint64 proofID;
|
|
13
|
+
# uint64 bankID;
|
|
14
|
+
# uint32 quantity;
|
|
15
|
+
#
|
|
16
|
+
# string proof<1000>;
|
|
17
|
+
#
|
|
18
|
+
# // reserved for future use
|
|
19
|
+
# union switch (int v)
|
|
20
|
+
# {
|
|
21
|
+
# case 0:
|
|
22
|
+
# void;
|
|
23
|
+
# }
|
|
24
|
+
# ext;
|
|
25
|
+
# };
|
|
26
|
+
#
|
|
27
|
+
# ===========================================================================
|
|
28
|
+
module Stellar
|
|
29
|
+
class ProofEntry < XDR::Struct
|
|
30
|
+
include XDR::Namespace
|
|
31
|
+
|
|
32
|
+
autoload :Ext
|
|
33
|
+
|
|
34
|
+
attribute :account_id, AccountID
|
|
35
|
+
attribute :lot_id, Uint64
|
|
36
|
+
attribute :proof_id, Uint64
|
|
37
|
+
attribute :bank_id, Uint64
|
|
38
|
+
attribute :quantity, Uint32
|
|
39
|
+
attribute :proof, XDR::String[1000]
|
|
40
|
+
attribute :ext, Ext
|
|
41
|
+
end
|
|
42
|
+
end
|