stellar-base 0.19.0 → 0.23.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +68 -210
- data/.gitignore +0 -17
- data/.travis.yml +0 -13
- 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
data/xdr/Stellar-types.x
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
// Copyright 2015 Stellar Development Foundation and contributors. Licensed
|
2
|
-
// under the Apache License, Version 2.0. See the COPYING file at the root
|
3
|
-
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
|
4
|
-
|
5
|
-
namespace stellar
|
6
|
-
{
|
7
|
-
|
8
|
-
typedef opaque Hash[32];
|
9
|
-
typedef opaque uint256[32];
|
10
|
-
|
11
|
-
typedef unsigned int uint32;
|
12
|
-
typedef int int32;
|
13
|
-
|
14
|
-
typedef unsigned hyper uint64;
|
15
|
-
typedef hyper int64;
|
16
|
-
|
17
|
-
enum CryptoKeyType
|
18
|
-
{
|
19
|
-
KEY_TYPE_ED25519 = 0,
|
20
|
-
KEY_TYPE_PRE_AUTH_TX = 1,
|
21
|
-
KEY_TYPE_HASH_X = 2
|
22
|
-
};
|
23
|
-
|
24
|
-
enum PublicKeyType
|
25
|
-
{
|
26
|
-
PUBLIC_KEY_TYPE_ED25519 = KEY_TYPE_ED25519
|
27
|
-
};
|
28
|
-
|
29
|
-
enum SignerKeyType
|
30
|
-
{
|
31
|
-
SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519,
|
32
|
-
SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX,
|
33
|
-
SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X
|
34
|
-
};
|
35
|
-
|
36
|
-
union PublicKey switch (PublicKeyType type)
|
37
|
-
{
|
38
|
-
case PUBLIC_KEY_TYPE_ED25519:
|
39
|
-
uint256 ed25519;
|
40
|
-
};
|
41
|
-
|
42
|
-
union SignerKey switch (SignerKeyType type)
|
43
|
-
{
|
44
|
-
case SIGNER_KEY_TYPE_ED25519:
|
45
|
-
uint256 ed25519;
|
46
|
-
case SIGNER_KEY_TYPE_PRE_AUTH_TX:
|
47
|
-
/* SHA-256 Hash of TransactionSignaturePayload structure */
|
48
|
-
uint256 preAuthTx;
|
49
|
-
case SIGNER_KEY_TYPE_HASH_X:
|
50
|
-
/* Hash of random 256 bit preimage X */
|
51
|
-
uint256 hashX;
|
52
|
-
};
|
53
|
-
|
54
|
-
// variable size as the size depends on the signature scheme used
|
55
|
-
typedef opaque Signature<64>;
|
56
|
-
|
57
|
-
typedef opaque SignatureHint[4];
|
58
|
-
|
59
|
-
typedef PublicKey NodeID;
|
60
|
-
|
61
|
-
struct Curve25519Secret
|
62
|
-
{
|
63
|
-
opaque key[32];
|
64
|
-
};
|
65
|
-
|
66
|
-
struct Curve25519Public
|
67
|
-
{
|
68
|
-
opaque key[32];
|
69
|
-
};
|
70
|
-
|
71
|
-
struct HmacSha256Key
|
72
|
-
{
|
73
|
-
opaque key[32];
|
74
|
-
};
|
75
|
-
|
76
|
-
struct HmacSha256Mac
|
77
|
-
{
|
78
|
-
opaque mac[32];
|
79
|
-
};
|
80
|
-
|
81
|
-
}
|