auction-ruby-base 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,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 HmacSha256Key
|
9
|
+
# {
|
10
|
+
# opaque key[32];
|
11
|
+
# };
|
12
|
+
#
|
13
|
+
# ===========================================================================
|
14
|
+
module Stellar
|
15
|
+
class HmacSha256Key < XDR::Struct
|
16
|
+
attribute :key, XDR::Opaque[32]
|
17
|
+
end
|
18
|
+
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 HmacSha256Mac
|
9
|
+
# {
|
10
|
+
# opaque mac[32];
|
11
|
+
# };
|
12
|
+
#
|
13
|
+
# ===========================================================================
|
14
|
+
module Stellar
|
15
|
+
class HmacSha256Mac < XDR::Struct
|
16
|
+
attribute :mac, XDR::Opaque[32]
|
17
|
+
end
|
18
|
+
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 InflationPayout // or use PaymentResultAtom to limit types?
|
9
|
+
# {
|
10
|
+
# AccountID destination;
|
11
|
+
# int64 amount;
|
12
|
+
# };
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class InflationPayout < XDR::Struct
|
17
|
+
attribute :destination, AccountID
|
18
|
+
attribute :amount, Int64
|
19
|
+
end
|
20
|
+
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 InflationResult switch (InflationResultCode code)
|
9
|
+
# {
|
10
|
+
# case INFLATION_SUCCESS:
|
11
|
+
# InflationPayout payouts<>;
|
12
|
+
# default:
|
13
|
+
# void;
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class InflationResult < XDR::Union
|
19
|
+
switch_on InflationResultCode, :code
|
20
|
+
|
21
|
+
switch :inflation_success, :payouts
|
22
|
+
switch :default
|
23
|
+
|
24
|
+
attribute :payouts, XDR::VarArray[InflationPayout]
|
25
|
+
end
|
26
|
+
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 InflationResultCode
|
9
|
+
# {
|
10
|
+
# // codes considered as "success" for the operation
|
11
|
+
# INFLATION_SUCCESS = 0,
|
12
|
+
# // codes considered as "failure" for the operation
|
13
|
+
# INFLATION_NOT_TIME = -1
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class InflationResultCode < XDR::Enum
|
19
|
+
member :inflation_success, 0
|
20
|
+
member :inflation_not_time, -1
|
21
|
+
|
22
|
+
seal
|
23
|
+
end
|
24
|
+
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
|
+
# enum IPAddrType
|
9
|
+
# {
|
10
|
+
# IPv4 = 0,
|
11
|
+
# IPv6 = 1
|
12
|
+
# };
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class IPAddrType < XDR::Enum
|
17
|
+
member :i_pv4, 0
|
18
|
+
member :i_pv6, 1
|
19
|
+
|
20
|
+
seal
|
21
|
+
end
|
22
|
+
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
|
+
# struct LedgerEntry
|
9
|
+
# {
|
10
|
+
# uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed
|
11
|
+
#
|
12
|
+
# union switch (LedgerEntryType type)
|
13
|
+
# {
|
14
|
+
# case ACCOUNT:
|
15
|
+
# AccountEntry account;
|
16
|
+
# case TRUSTLINE:
|
17
|
+
# TrustLineEntry trustLine;
|
18
|
+
# case OFFER:
|
19
|
+
# OfferEntry offer;
|
20
|
+
# case LOT:
|
21
|
+
# LotEntry lot;
|
22
|
+
# case PARTICIPANT:
|
23
|
+
# ParticipantEntry participant;
|
24
|
+
# case MESSAGE:
|
25
|
+
# MessageEntry message;
|
26
|
+
# case PROOF:
|
27
|
+
# ProofEntry proof;
|
28
|
+
# }
|
29
|
+
# data;
|
30
|
+
#
|
31
|
+
# // reserved for future use
|
32
|
+
# union switch (int v)
|
33
|
+
# {
|
34
|
+
# case 0:
|
35
|
+
# void;
|
36
|
+
# }
|
37
|
+
# ext;
|
38
|
+
# };
|
39
|
+
#
|
40
|
+
# ===========================================================================
|
41
|
+
module Stellar
|
42
|
+
class LedgerEntry < XDR::Struct
|
43
|
+
include XDR::Namespace
|
44
|
+
|
45
|
+
autoload :Data
|
46
|
+
autoload :Ext
|
47
|
+
|
48
|
+
attribute :last_modified_ledger_seq, Uint32
|
49
|
+
attribute :data, Data
|
50
|
+
attribute :ext, Ext
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,49 @@
|
|
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 (LedgerEntryType type)
|
9
|
+
# {
|
10
|
+
# case ACCOUNT:
|
11
|
+
# AccountEntry account;
|
12
|
+
# case TRUSTLINE:
|
13
|
+
# TrustLineEntry trustLine;
|
14
|
+
# case OFFER:
|
15
|
+
# OfferEntry offer;
|
16
|
+
# case LOT:
|
17
|
+
# LotEntry lot;
|
18
|
+
# case PARTICIPANT:
|
19
|
+
# ParticipantEntry participant;
|
20
|
+
# case MESSAGE:
|
21
|
+
# MessageEntry message;
|
22
|
+
# case PROOF:
|
23
|
+
# ProofEntry proof;
|
24
|
+
# }
|
25
|
+
#
|
26
|
+
# ===========================================================================
|
27
|
+
module Stellar
|
28
|
+
class LedgerEntry
|
29
|
+
class Data < XDR::Union
|
30
|
+
switch_on LedgerEntryType, :type
|
31
|
+
|
32
|
+
switch :account, :account
|
33
|
+
switch :trustline, :trust_line
|
34
|
+
switch :offer, :offer
|
35
|
+
switch :lot, :lot
|
36
|
+
switch :participant, :participant
|
37
|
+
switch :message, :message
|
38
|
+
switch :proof, :proof
|
39
|
+
|
40
|
+
attribute :account, AccountEntry
|
41
|
+
attribute :trust_line, TrustLineEntry
|
42
|
+
attribute :offer, OfferEntry
|
43
|
+
attribute :lot, LotEntry
|
44
|
+
attribute :participant, ParticipantEntry
|
45
|
+
attribute :message, MessageEntry
|
46
|
+
attribute :proof, ProofEntry
|
47
|
+
end
|
48
|
+
end
|
49
|
+
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 LedgerEntry
|
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,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 LedgerEntryChange switch (LedgerEntryChangeType type)
|
9
|
+
# {
|
10
|
+
# case LEDGER_ENTRY_CREATED:
|
11
|
+
# LedgerEntry created;
|
12
|
+
# case LEDGER_ENTRY_UPDATED:
|
13
|
+
# LedgerEntry updated;
|
14
|
+
# case LEDGER_ENTRY_REMOVED:
|
15
|
+
# LedgerKey removed;
|
16
|
+
# case LEDGER_ENTRY_STATE:
|
17
|
+
# LedgerEntry state;
|
18
|
+
# };
|
19
|
+
#
|
20
|
+
# ===========================================================================
|
21
|
+
module Stellar
|
22
|
+
class LedgerEntryChange < XDR::Union
|
23
|
+
switch_on LedgerEntryChangeType, :type
|
24
|
+
|
25
|
+
switch :ledger_entry_created, :created
|
26
|
+
switch :ledger_entry_updated, :updated
|
27
|
+
switch :ledger_entry_removed, :removed
|
28
|
+
switch :ledger_entry_state, :state
|
29
|
+
|
30
|
+
attribute :created, LedgerEntry
|
31
|
+
attribute :updated, LedgerEntry
|
32
|
+
attribute :removed, LedgerKey
|
33
|
+
attribute :state, LedgerEntry
|
34
|
+
end
|
35
|
+
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
|
+
# enum LedgerEntryChangeType
|
9
|
+
# {
|
10
|
+
# LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
|
11
|
+
# LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
|
12
|
+
# LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger
|
13
|
+
# LEDGER_ENTRY_STATE = 3 // value of the entry
|
14
|
+
# };
|
15
|
+
#
|
16
|
+
# ===========================================================================
|
17
|
+
module Stellar
|
18
|
+
class LedgerEntryChangeType < XDR::Enum
|
19
|
+
member :ledger_entry_created, 0
|
20
|
+
member :ledger_entry_updated, 1
|
21
|
+
member :ledger_entry_removed, 2
|
22
|
+
member :ledger_entry_state, 3
|
23
|
+
|
24
|
+
seal
|
25
|
+
end
|
26
|
+
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
|
+
# enum LedgerEntryType
|
9
|
+
# {
|
10
|
+
# ACCOUNT = 0,
|
11
|
+
# TRUSTLINE = 1,
|
12
|
+
# OFFER = 2,
|
13
|
+
# LOT = 3,
|
14
|
+
# PARTICIPANT = 4,
|
15
|
+
# MESSAGE = 5,
|
16
|
+
# PROOF = 6
|
17
|
+
# };
|
18
|
+
#
|
19
|
+
# ===========================================================================
|
20
|
+
module Stellar
|
21
|
+
class LedgerEntryType < XDR::Enum
|
22
|
+
member :account, 0
|
23
|
+
member :trustline, 1
|
24
|
+
member :offer, 2
|
25
|
+
member :lot, 3
|
26
|
+
member :participant, 4
|
27
|
+
member :message, 5
|
28
|
+
member :proof, 6
|
29
|
+
|
30
|
+
seal
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 LedgerHeader
|
9
|
+
# {
|
10
|
+
# uint32 ledgerVersion; // the protocol version of the ledger
|
11
|
+
# Hash previousLedgerHash; // hash of the previous ledger header
|
12
|
+
# StellarValue scpValue; // what consensus agreed to
|
13
|
+
# Hash txSetResultHash; // the TransactionResultSet that led to this ledger
|
14
|
+
# Hash bucketListHash; // hash of the ledger state
|
15
|
+
#
|
16
|
+
# uint32 ledgerSeq; // sequence number of this ledger
|
17
|
+
#
|
18
|
+
# int64 totalCoins; // total number of stroops in existence.
|
19
|
+
# // 10,000,000 stroops in 1 XLM
|
20
|
+
#
|
21
|
+
# int64 feePool; // fees burned since last inflation run
|
22
|
+
# uint32 inflationSeq; // inflation sequence number
|
23
|
+
#
|
24
|
+
# uint64 idPool; // last used global ID, used for generating objects
|
25
|
+
#
|
26
|
+
# uint32 baseFee; // base fee per operation in stroops
|
27
|
+
# uint32 baseReserve; // account base reserve in stroops
|
28
|
+
#
|
29
|
+
# uint32 maxTxSetSize; // maximum size a transaction set can be
|
30
|
+
#
|
31
|
+
# Hash skipList[4]; // hashes of ledgers in the past. allows you to jump back
|
32
|
+
# // in time without walking the chain back ledger by ledger
|
33
|
+
# // each slot contains the oldest ledger that is mod of
|
34
|
+
# // either 50 5000 50000 or 500000 depending on index
|
35
|
+
# // skipList[0] mod(50), skipList[1] mod(5000), etc
|
36
|
+
#
|
37
|
+
# // reserved for future use
|
38
|
+
# union switch (int v)
|
39
|
+
# {
|
40
|
+
# case 0:
|
41
|
+
# void;
|
42
|
+
# }
|
43
|
+
# ext;
|
44
|
+
# };
|
45
|
+
#
|
46
|
+
# ===========================================================================
|
47
|
+
module Stellar
|
48
|
+
class LedgerHeader < XDR::Struct
|
49
|
+
include XDR::Namespace
|
50
|
+
|
51
|
+
autoload :Ext
|
52
|
+
|
53
|
+
attribute :ledger_version, Uint32
|
54
|
+
attribute :previous_ledger_hash, Hash
|
55
|
+
attribute :scp_value, StellarValue
|
56
|
+
attribute :tx_set_result_hash, Hash
|
57
|
+
attribute :bucket_list_hash, Hash
|
58
|
+
attribute :ledger_seq, Uint32
|
59
|
+
attribute :total_coins, Int64
|
60
|
+
attribute :fee_pool, Int64
|
61
|
+
attribute :inflation_seq, Uint32
|
62
|
+
attribute :id_pool, Uint64
|
63
|
+
attribute :base_fee, Uint32
|
64
|
+
attribute :base_reserve, Uint32
|
65
|
+
attribute :max_tx_set_size, Uint32
|
66
|
+
attribute :skip_list, XDR::Array[Hash, 4]
|
67
|
+
attribute :ext, Ext
|
68
|
+
end
|
69
|
+
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 LedgerHeader
|
17
|
+
class Ext < XDR::Union
|
18
|
+
switch_on XDR::Int, :v
|
19
|
+
|
20
|
+
switch 0
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|