stellar-base 0.20.0 → 0.23.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -21
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +2 -3
- data/generated/stellar-base-generated.rb +31 -4
- data/generated/stellar/allow_trust_op.rb +3 -2
- data/generated/stellar/authenticated_message.rb +4 -4
- data/generated/stellar/authenticated_message/v0.rb +4 -4
- data/generated/stellar/change_trust_result_code.rb +1 -1
- 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 +9 -5
- 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/manage_buy_offer_result_code.rb +5 -4
- data/generated/stellar/manage_sell_offer_result_code.rb +12 -8
- 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/operation.rb +7 -5
- data/generated/stellar/operation/body.rb +31 -27
- data/generated/stellar/operation_result.rb +5 -3
- data/generated/stellar/operation_result/tr.rb +33 -29
- data/generated/stellar/operation_result_code.rb +3 -3
- data/generated/stellar/operation_type.rb +17 -15
- 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/stellar_message.rb +22 -12
- 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/topology_response_body.rb +25 -0
- data/generated/stellar/transaction.rb +2 -2
- data/generated/stellar/transaction_envelope.rb +17 -8
- data/generated/stellar/transaction_meta.rb +4 -0
- 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 +27 -24
- 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/{base/compat.rb → compat.rb} +6 -7
- 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 +427 -336
- 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 -175
- 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 +61 -211
- data/.gitignore +0 -17
- data/.travis.yml +0 -16
- data/.yardopts +0 -8
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -15
- data/Guardfile +0 -5
- data/Rakefile +0 -4
- data/examples/allow_trust.rb +0 -51
- 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/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 -45
- data/xdr/Stellar-SCP.x +0 -86
- data/xdr/Stellar-ledger-entries.x +0 -295
- data/xdr/Stellar-ledger.x +0 -318
- data/xdr/Stellar-overlay.x +0 -146
- data/xdr/Stellar-transaction.x +0 -834
- data/xdr/Stellar-types.x +0 -81
@@ -0,0 +1,149 @@
|
|
1
|
+
module Stellar
|
2
|
+
class TransactionBuilder
|
3
|
+
attr_reader :source_account, :sequence_number, :base_fee, :time_bounds, :memo, :operations
|
4
|
+
|
5
|
+
def initialize(
|
6
|
+
source_account:,
|
7
|
+
sequence_number:,
|
8
|
+
base_fee: 100,
|
9
|
+
time_bounds: nil,
|
10
|
+
memo: nil,
|
11
|
+
v1: false
|
12
|
+
)
|
13
|
+
raise ArgumentError, "Bad :source_account" unless source_account.is_a?(Stellar::KeyPair)
|
14
|
+
raise ArgumentError, "Bad :sequence_number" unless sequence_number.is_a?(Integer) && sequence_number >= 0
|
15
|
+
raise ArgumentError, "Bad :time_bounds" unless time_bounds.is_a?(Stellar::TimeBounds) || time_bounds.nil?
|
16
|
+
raise ArgumentError, "Bad :base_fee" unless base_fee.is_a?(Integer) && base_fee >= 100
|
17
|
+
|
18
|
+
@source_account = source_account
|
19
|
+
@sequence_number = sequence_number
|
20
|
+
@base_fee = base_fee
|
21
|
+
@time_bounds = time_bounds
|
22
|
+
@memo = make_memo(memo)
|
23
|
+
@operations = []
|
24
|
+
@v1 = v1
|
25
|
+
end
|
26
|
+
|
27
|
+
def build
|
28
|
+
if @time_bounds.nil?
|
29
|
+
raise "TransactionBuilder.time_bounds must be set during initialization or by calling set_timeout"
|
30
|
+
elsif !@time_bounds.min_time.is_a?(Integer) || !@time_bounds.max_time.is_a?(Integer)
|
31
|
+
raise "TimeBounds.min_time and max_time must be Integers"
|
32
|
+
elsif @time_bounds.max_time != 0 && @time_bounds.min_time > @time_bounds.max_time
|
33
|
+
raise "Timebounds.max_time must be greater than min_time"
|
34
|
+
end
|
35
|
+
|
36
|
+
attrs = {
|
37
|
+
fee: @base_fee * @operations.length,
|
38
|
+
seq_num: @sequence_number,
|
39
|
+
time_bounds: @time_bounds,
|
40
|
+
memo: @memo,
|
41
|
+
operations: @operations,
|
42
|
+
ext: Stellar::Transaction::Ext.new(0)
|
43
|
+
}
|
44
|
+
|
45
|
+
tx = if @v1
|
46
|
+
attrs[:source_account] = @source_account.muxed_account
|
47
|
+
Stellar::Transaction.new(attrs)
|
48
|
+
else
|
49
|
+
attrs[:source_account_ed25519] = @source_account.raw_public_key
|
50
|
+
Stellar::TransactionV0.new(attrs)
|
51
|
+
end
|
52
|
+
|
53
|
+
@sequence_number += 1
|
54
|
+
tx
|
55
|
+
end
|
56
|
+
|
57
|
+
def build_fee_bump(inner_txe:)
|
58
|
+
if inner_txe.switch != Stellar::EnvelopeType.envelope_type_tx
|
59
|
+
raise "Invalid inner transaction type, it should be a `envelope_type_tx` but received a #{inner_tx.to_envelope.switch}."
|
60
|
+
end
|
61
|
+
|
62
|
+
inner_tx = inner_txe.tx
|
63
|
+
inner_ops = inner_tx.operations
|
64
|
+
inner_base_fee_rate = inner_tx.fee.fdiv(inner_ops.length)
|
65
|
+
|
66
|
+
# The fee rate for fee bump is at least the fee rate of the inner transaction
|
67
|
+
if @base_fee < inner_base_fee_rate
|
68
|
+
raise "Insufficient base_fee, it should be at least #{inner_base_fee_rate} stroops."
|
69
|
+
end
|
70
|
+
|
71
|
+
Stellar::FeeBumpTransaction.new(
|
72
|
+
fee_source: @source_account.muxed_account,
|
73
|
+
fee: @base_fee * (inner_ops.length + 1),
|
74
|
+
inner_tx: Stellar::FeeBumpTransaction::InnerTx.new(:envelope_type_tx, inner_txe.v1!),
|
75
|
+
ext: Stellar::FeeBumpTransaction::Ext.new(0)
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
def add_operation(operation)
|
80
|
+
raise ArgumentError, "Bad operation" unless operation.is_a? Stellar::Operation
|
81
|
+
@operations.push(operation)
|
82
|
+
self
|
83
|
+
end
|
84
|
+
|
85
|
+
def clear_operations
|
86
|
+
@operations.clear
|
87
|
+
self
|
88
|
+
end
|
89
|
+
|
90
|
+
def set_source_account(account_kp)
|
91
|
+
raise ArgumentError, "Bad source account" unless account_kp.is_a?(Stellar::KeyPair)
|
92
|
+
@source_account = account_kp
|
93
|
+
self
|
94
|
+
end
|
95
|
+
|
96
|
+
def set_sequence_number(seq_num)
|
97
|
+
raise ArgumentError, "Bad sequence number" unless seq_num.is_a?(Integer) && seq_num >= 0
|
98
|
+
@sequence_number = seq_num
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
def set_timeout(timeout)
|
103
|
+
if !timeout.is_a?(Integer) || timeout < 0
|
104
|
+
raise ArgumentError, "Timeout must be a non-negative integer"
|
105
|
+
end
|
106
|
+
|
107
|
+
if @time_bounds.nil?
|
108
|
+
@time_bounds = Stellar::TimeBounds.new(min_time: 0, max_time: nil)
|
109
|
+
end
|
110
|
+
|
111
|
+
@time_bounds.max_time = if timeout == 0
|
112
|
+
timeout
|
113
|
+
else
|
114
|
+
Time.now.to_i + timeout
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
def set_memo(memo)
|
121
|
+
@memo = make_memo(memo)
|
122
|
+
self
|
123
|
+
end
|
124
|
+
|
125
|
+
def set_base_fee(base_fee)
|
126
|
+
raise ArgumentError, "Bad base fee" unless base_fee.is_a?(Integer) && base_fee >= 100
|
127
|
+
@base_fee = base_fee
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
def make_memo(memo)
|
132
|
+
case memo
|
133
|
+
when Stellar::Memo
|
134
|
+
memo
|
135
|
+
when nil
|
136
|
+
Memo.new(:memo_none)
|
137
|
+
when Integer
|
138
|
+
Memo.new(:memo_id, memo)
|
139
|
+
when String
|
140
|
+
Memo.new(:memo_text, memo)
|
141
|
+
when Array
|
142
|
+
t, val = *memo
|
143
|
+
Memo.new(:"memo_#{t}", val)
|
144
|
+
else
|
145
|
+
raise ArgumentError, "Bad :memo"
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -1,23 +1,56 @@
|
|
1
1
|
module Stellar
|
2
2
|
class TransactionEnvelope
|
3
|
+
class << self
|
4
|
+
def v0(tx:, signatures:)
|
5
|
+
v0_envelope = TransactionV0Envelope.new(tx: tx, signatures: signatures)
|
6
|
+
new(:envelope_type_tx_v0, v0_envelope)
|
7
|
+
end
|
8
|
+
|
9
|
+
def v1(tx:, signatures:)
|
10
|
+
v1_envelope = TransactionV1Envelope.new(tx: tx, signatures: signatures)
|
11
|
+
new(:envelope_type_tx, v1_envelope)
|
12
|
+
end
|
13
|
+
|
14
|
+
def fee_bump(tx:, signatures:)
|
15
|
+
fee_bump_envelope = FeeBumpTransactionEnvelope.new(tx: tx, signatures: signatures)
|
16
|
+
new(:envelope_type_tx_fee_bump, fee_bump_envelope)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Delegates any undefined method to the currently set arm
|
21
|
+
def method_missing(method, *args, &block)
|
22
|
+
case switch
|
23
|
+
when EnvelopeType.envelope_type_tx_v0
|
24
|
+
v0!.public_send(method, *args)
|
25
|
+
when EnvelopeType.envelope_type_tx
|
26
|
+
v1!.public_send(method, *args)
|
27
|
+
when EnvelopeType.envelope_type_tx_fee_bump
|
28
|
+
fee_bump!.public_send(method, *args)
|
29
|
+
else
|
30
|
+
super
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def respond_to_missing?(method, include_private = false)
|
35
|
+
["tx", "signatures"].include?(method) || super
|
36
|
+
end
|
3
37
|
|
4
|
-
#
|
5
38
|
# Checks to ensure that every signature for the envelope is
|
6
39
|
# a valid signature of one of the provided `key_pairs`
|
7
|
-
#
|
40
|
+
#
|
8
41
|
# NOTE: this does not do any authorization checks, which requires access to
|
9
42
|
# the current ledger state.
|
10
|
-
#
|
43
|
+
#
|
11
44
|
# @param *key_pairs [Array<Stellar::KeyPair>] The key pairs to check the envelopes signatures against
|
12
|
-
#
|
45
|
+
#
|
13
46
|
# @return [Boolean] true if all signatures are from the provided key_pairs and validly sign the tx's hash
|
14
47
|
def signed_correctly?(*key_pairs)
|
15
48
|
hash = tx.hash
|
16
49
|
return false if signatures.empty?
|
17
50
|
|
18
51
|
key_index = key_pairs.index_by(&:signature_hint)
|
19
|
-
|
20
|
-
signatures.all? do |sig|
|
52
|
+
|
53
|
+
signatures.all? do |sig|
|
21
54
|
key_pair = key_index[sig.hint]
|
22
55
|
break false if key_pair.nil?
|
23
56
|
|
@@ -34,6 +67,5 @@ module Stellar
|
|
34
67
|
merged_tx.signatures = [signatures, other.signatures]
|
35
68
|
merged_tx
|
36
69
|
end
|
37
|
-
|
38
70
|
end
|
39
|
-
end
|
71
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Stellar
|
2
|
+
class TransactionV0
|
3
|
+
include Stellar::Concerns::Transaction
|
4
|
+
|
5
|
+
def to_envelope(*key_pairs)
|
6
|
+
signatures = (key_pairs || []).map(&method(:sign_decorated))
|
7
|
+
|
8
|
+
TransactionEnvelope.v0(signatures: signatures, tx: self)
|
9
|
+
end
|
10
|
+
|
11
|
+
def signature_base_prefix
|
12
|
+
val = Stellar::EnvelopeType.envelope_type_tx_v0
|
13
|
+
|
14
|
+
Stellar.current_network_id + Stellar::EnvelopeType.to_xdr(val)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0
|
18
|
+
# we need a Transaction to generate the signature base
|
19
|
+
def signature_base
|
20
|
+
tx = Stellar::Transaction.from_xdr(
|
21
|
+
# TransactionV0 is a transaction with the AccountID discriminant
|
22
|
+
# stripped off, we need to put it back to build a valid transaction
|
23
|
+
# which we can use to build a TransactionSignaturePayloadTaggedTransaction
|
24
|
+
Stellar::PublicKeyType.to_xdr(Stellar::PublicKeyType.public_key_type_ed25519) + to_xdr
|
25
|
+
)
|
26
|
+
|
27
|
+
tagged_tx = Stellar::TransactionSignaturePayload::TaggedTransaction.new(:envelope_type_tx, tx)
|
28
|
+
|
29
|
+
Stellar::TransactionSignaturePayload.new(
|
30
|
+
network_id: Stellar.current_network_id,
|
31
|
+
tagged_transaction: tagged_tx
|
32
|
+
).to_xdr
|
33
|
+
end
|
34
|
+
|
35
|
+
def source_account
|
36
|
+
source_account_ed25519
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -5,13 +5,13 @@ module Stellar
|
|
5
5
|
attr_reader :i
|
6
6
|
attr_reader :f
|
7
7
|
|
8
|
-
def self.best_r(number, max_precision=MAX_PRECISION)
|
8
|
+
def self.best_r(number, max_precision = MAX_PRECISION)
|
9
9
|
cur_cf = new(number)
|
10
10
|
|
11
11
|
loop do
|
12
|
-
next_cf = cur_cf.extend
|
13
|
-
cur_r
|
14
|
-
next_r
|
12
|
+
next_cf = cur_cf.extend
|
13
|
+
cur_r = cur_cf.to_r(max_precision)
|
14
|
+
next_r = next_cf.to_r(max_precision)
|
15
15
|
|
16
16
|
break cur_r if cur_cf.done? || cur_r == next_r
|
17
17
|
|
@@ -21,9 +21,9 @@ module Stellar
|
|
21
21
|
cur_cf.to_r(max_precision)
|
22
22
|
end
|
23
23
|
|
24
|
-
def initialize(val, parents=[])
|
25
|
-
@i
|
26
|
-
@f
|
24
|
+
def initialize(val, parents = [])
|
25
|
+
@i = val.floor
|
26
|
+
@f = val - @i
|
27
27
|
@parents = parents
|
28
28
|
end
|
29
29
|
|
@@ -43,22 +43,22 @@ module Stellar
|
|
43
43
|
def convergents
|
44
44
|
return @convergents if defined? @convergents
|
45
45
|
|
46
|
-
c = [Fraction.new(0,1), Fraction.new(1,0)]
|
46
|
+
c = [Fraction.new(0, 1), Fraction.new(1, 0)]
|
47
47
|
to_a.each_with_index do |a, i|
|
48
|
-
i
|
48
|
+
i += 2
|
49
49
|
|
50
|
-
h = a * c[i-1].n + c[i-2].n
|
51
|
-
k = a * c[i-1].d + c[i-2].d
|
52
|
-
c << Fraction.new(h,k)
|
50
|
+
h = a * c[i - 1].n + c[i - 2].n
|
51
|
+
k = a * c[i - 1].d + c[i - 2].d
|
52
|
+
c << Fraction.new(h, k)
|
53
53
|
end
|
54
54
|
|
55
55
|
@converegents = c[2..-1]
|
56
56
|
end
|
57
57
|
|
58
|
-
def to_r(max_precision=MAX_PRECISION)
|
59
|
-
fraction = convergents.take_while
|
58
|
+
def to_r(max_precision = MAX_PRECISION)
|
59
|
+
fraction = convergents.take_while { |c|
|
60
60
|
c.n <= max_precision && c.d <= max_precision
|
61
|
-
|
61
|
+
}.last
|
62
62
|
|
63
63
|
Rational(fraction.n, fraction.d)
|
64
64
|
end
|
@@ -67,7 +67,7 @@ module Stellar
|
|
67
67
|
@f == 0
|
68
68
|
end
|
69
69
|
|
70
|
-
def extend(count=1)
|
70
|
+
def extend(count = 1)
|
71
71
|
result = self
|
72
72
|
|
73
73
|
count.times do
|
@@ -78,11 +78,11 @@ module Stellar
|
|
78
78
|
result
|
79
79
|
end
|
80
80
|
|
81
|
-
class Fraction
|
81
|
+
class Fraction
|
82
82
|
attr_reader :n
|
83
83
|
attr_reader :d
|
84
84
|
|
85
|
-
def initialize(n,d)
|
85
|
+
def initialize(n, d)
|
86
86
|
@n = n
|
87
87
|
@d = d
|
88
88
|
end
|
@@ -93,4 +93,4 @@ module Stellar
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
96
|
-
end
|
96
|
+
end
|
data/lib/stellar/util/strkey.rb
CHANGED
@@ -1,33 +1,59 @@
|
|
1
1
|
module Stellar
|
2
2
|
module Util
|
3
|
-
|
4
|
-
require
|
5
|
-
require 'digest/crc16_xmodem'
|
3
|
+
require "base32"
|
4
|
+
require "digest/crc16_xmodem"
|
6
5
|
|
7
6
|
class StrKey
|
8
|
-
|
9
7
|
VERSION_BYTES = {
|
10
|
-
account_id:
|
11
|
-
seed:
|
8
|
+
account_id: [6 << 3].pack("C"), # Base32-encodes to 'G...'
|
9
|
+
seed: [18 << 3].pack("C"), # Base32-encodes to 'S...'
|
12
10
|
pre_auth_tx: [19 << 3].pack("C"), # Base32-encodes to 'T...'
|
13
|
-
hash_x:
|
11
|
+
hash_x: [23 << 3].pack("C") # Base32-encodes to 'X...'
|
14
12
|
}
|
15
13
|
|
16
14
|
def self.check_encode(version, byte_str)
|
17
15
|
version_byte = VERSION_BYTES[version]
|
18
16
|
raise ArgumentError, "Invalid version: #{version}" if version_byte.blank?
|
19
17
|
payload = version_byte + byte_str.dup.force_encoding("BINARY")
|
20
|
-
check
|
21
|
-
|
18
|
+
check = checksum(payload)
|
19
|
+
# TODO: sort out, is it 100% safe to remove padding
|
20
|
+
# SEP-23 says yes, but shit happens
|
21
|
+
Base32.encode(payload + check).tr("=", "")
|
22
|
+
end
|
23
|
+
|
24
|
+
# Converts an Stellar::MuxedAccount to its string representation, forcing the ed25519 representation.
|
25
|
+
# @param [Stellar::MuxedAccount] muxed account
|
26
|
+
# @return [String] "G.."-like address
|
27
|
+
def self.encode_muxed_account(muxed_account)
|
28
|
+
ed25519 = if muxed_account.switch == Stellar::CryptoKeyType.key_type_ed25519
|
29
|
+
muxed_account.ed25519!
|
30
|
+
else
|
31
|
+
muxed_account.med25519!.ed25519
|
32
|
+
end
|
33
|
+
|
34
|
+
check_encode(:account_id, ed25519)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns a Stellar::MuxedAccount, forcing the ed25519 discriminant
|
38
|
+
#
|
39
|
+
# @param [String] address to decode to XDR
|
40
|
+
# @return [Stellar::MuxedAccount] MuxedAccount with ed25519 discriminant
|
41
|
+
def self.decode_muxed_account(strkey)
|
42
|
+
Stellar::MuxedAccount.new(:key_type_ed25519, check_decode(:account_id, strkey))
|
22
43
|
end
|
23
44
|
|
24
45
|
def self.check_decode(expected_version, str)
|
25
|
-
decoded
|
46
|
+
decoded = begin
|
47
|
+
Base32.decode(str)
|
48
|
+
rescue
|
49
|
+
raise ArgumentError, "Invalid base32 string"
|
50
|
+
end
|
26
51
|
version_byte = decoded[0]
|
27
|
-
payload
|
28
|
-
check
|
29
|
-
version
|
52
|
+
payload = decoded[1...-2]
|
53
|
+
check = decoded[-2..-1]
|
54
|
+
version = VERSION_BYTES.key(version_byte)
|
30
55
|
|
56
|
+
raise ArgumentError, "invalid encoded string" if str != Base32.encode(decoded).tr("=", "")
|
31
57
|
raise ArgumentError, "Unexpected version: #{version.inspect}" if version != expected_version
|
32
58
|
raise ArgumentError, "Invalid checksum" if check != checksum(decoded[0...-2])
|
33
59
|
payload
|
@@ -39,7 +65,6 @@ module Stellar
|
|
39
65
|
crc = Digest::CRC16XModem.checksum(bytes)
|
40
66
|
[crc].pack("S<")
|
41
67
|
end
|
42
|
-
|
43
68
|
end
|
44
69
|
end
|
45
70
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stellar-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Fleckenstein
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xdr
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: digest-crc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '0.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '0.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: base32
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rbnacl
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,156 +80,16 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 5.0.0
|
83
|
-
|
84
|
-
name: bundler
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '2.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '2.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '12.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '12.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: xdrgen
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '3.1'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '3.1'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: guard-rspec
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: simplecov
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: octokit
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: netrc
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: yard
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - ">="
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
209
|
-
description:
|
83
|
+
description:
|
210
84
|
email:
|
211
85
|
- scott@stellar.org
|
212
86
|
executables: []
|
213
87
|
extensions: []
|
214
88
|
extra_rdoc_files: []
|
215
89
|
files:
|
216
|
-
- ".gitignore"
|
217
|
-
- ".travis.yml"
|
218
|
-
- ".yardopts"
|
219
90
|
- CHANGELOG.md
|
220
|
-
-
|
221
|
-
- Gemfile
|
222
|
-
- Guardfile
|
223
|
-
- LICENSE.txt
|
91
|
+
- LICENSE
|
224
92
|
- README.md
|
225
|
-
- Rakefile
|
226
|
-
- examples/allow_trust.rb
|
227
|
-
- examples/create_account.rb
|
228
|
-
- examples/low_level_transaction_post.rb
|
229
|
-
- examples/mid_level_transaction_post.rb
|
230
|
-
- examples/non_native_payment.rb
|
231
|
-
- examples/offer.rb
|
232
|
-
- examples/transaction_merge.rb
|
233
93
|
- generated/stellar-base-generated.rb
|
234
94
|
- generated/stellar/account_entry.rb
|
235
95
|
- generated/stellar/account_entry/ext.rb
|
@@ -275,13 +135,23 @@ files:
|
|
275
135
|
- generated/stellar/envelope_type.rb
|
276
136
|
- generated/stellar/error.rb
|
277
137
|
- generated/stellar/error_code.rb
|
138
|
+
- generated/stellar/fee_bump_transaction.rb
|
139
|
+
- generated/stellar/fee_bump_transaction/ext.rb
|
140
|
+
- generated/stellar/fee_bump_transaction/inner_tx.rb
|
141
|
+
- generated/stellar/fee_bump_transaction_envelope.rb
|
278
142
|
- generated/stellar/hello.rb
|
279
143
|
- generated/stellar/hmac_sha256_key.rb
|
280
144
|
- generated/stellar/hmac_sha256_mac.rb
|
281
145
|
- generated/stellar/inflation_payout.rb
|
282
146
|
- generated/stellar/inflation_result.rb
|
283
147
|
- generated/stellar/inflation_result_code.rb
|
148
|
+
- generated/stellar/inner_transaction_result.rb
|
149
|
+
- generated/stellar/inner_transaction_result/ext.rb
|
150
|
+
- generated/stellar/inner_transaction_result/result.rb
|
151
|
+
- generated/stellar/inner_transaction_result_pair.rb
|
284
152
|
- generated/stellar/ip_addr_type.rb
|
153
|
+
- generated/stellar/ledger_close_meta.rb
|
154
|
+
- generated/stellar/ledger_close_meta_v0.rb
|
285
155
|
- generated/stellar/ledger_close_value_signature.rb
|
286
156
|
- generated/stellar/ledger_entry.rb
|
287
157
|
- generated/stellar/ledger_entry/data.rb
|
@@ -317,6 +187,8 @@ files:
|
|
317
187
|
- generated/stellar/memo.rb
|
318
188
|
- generated/stellar/memo_type.rb
|
319
189
|
- generated/stellar/message_type.rb
|
190
|
+
- generated/stellar/muxed_account.rb
|
191
|
+
- generated/stellar/muxed_account/med25519.rb
|
320
192
|
- generated/stellar/offer_entry.rb
|
321
193
|
- generated/stellar/offer_entry/ext.rb
|
322
194
|
- generated/stellar/offer_entry_flags.rb
|
@@ -327,15 +199,20 @@ files:
|
|
327
199
|
- generated/stellar/operation_result/tr.rb
|
328
200
|
- generated/stellar/operation_result_code.rb
|
329
201
|
- generated/stellar/operation_type.rb
|
330
|
-
- generated/stellar/
|
331
|
-
- generated/stellar/
|
332
|
-
- generated/stellar/
|
333
|
-
- generated/stellar/
|
202
|
+
- generated/stellar/path_payment_strict_receive_op.rb
|
203
|
+
- generated/stellar/path_payment_strict_receive_result.rb
|
204
|
+
- generated/stellar/path_payment_strict_receive_result/success.rb
|
205
|
+
- generated/stellar/path_payment_strict_receive_result_code.rb
|
206
|
+
- generated/stellar/path_payment_strict_send_op.rb
|
207
|
+
- generated/stellar/path_payment_strict_send_result.rb
|
208
|
+
- generated/stellar/path_payment_strict_send_result/success.rb
|
209
|
+
- generated/stellar/path_payment_strict_send_result_code.rb
|
334
210
|
- generated/stellar/payment_op.rb
|
335
211
|
- generated/stellar/payment_result.rb
|
336
212
|
- generated/stellar/payment_result_code.rb
|
337
213
|
- generated/stellar/peer_address.rb
|
338
214
|
- generated/stellar/peer_address/ip.rb
|
215
|
+
- generated/stellar/peer_stats.rb
|
339
216
|
- generated/stellar/price.rb
|
340
217
|
- generated/stellar/public_key.rb
|
341
218
|
- generated/stellar/public_key_type.rb
|
@@ -354,6 +231,8 @@ files:
|
|
354
231
|
- generated/stellar/set_options_op.rb
|
355
232
|
- generated/stellar/set_options_result.rb
|
356
233
|
- generated/stellar/set_options_result_code.rb
|
234
|
+
- generated/stellar/signed_survey_request_message.rb
|
235
|
+
- generated/stellar/signed_survey_response_message.rb
|
357
236
|
- generated/stellar/signer.rb
|
358
237
|
- generated/stellar/signer_key.rb
|
359
238
|
- generated/stellar/signer_key_type.rb
|
@@ -362,8 +241,13 @@ files:
|
|
362
241
|
- generated/stellar/stellar_value.rb
|
363
242
|
- generated/stellar/stellar_value/ext.rb
|
364
243
|
- generated/stellar/stellar_value_type.rb
|
244
|
+
- generated/stellar/survey_message_command_type.rb
|
245
|
+
- generated/stellar/survey_request_message.rb
|
246
|
+
- generated/stellar/survey_response_body.rb
|
247
|
+
- generated/stellar/survey_response_message.rb
|
365
248
|
- generated/stellar/threshold_indexes.rb
|
366
249
|
- generated/stellar/time_bounds.rb
|
250
|
+
- generated/stellar/topology_response_body.rb
|
367
251
|
- generated/stellar/transaction.rb
|
368
252
|
- generated/stellar/transaction/ext.rb
|
369
253
|
- generated/stellar/transaction_envelope.rb
|
@@ -373,71 +257,55 @@ files:
|
|
373
257
|
- generated/stellar/transaction_history_result_entry/ext.rb
|
374
258
|
- generated/stellar/transaction_meta.rb
|
375
259
|
- generated/stellar/transaction_meta_v1.rb
|
260
|
+
- generated/stellar/transaction_meta_v2.rb
|
376
261
|
- generated/stellar/transaction_result.rb
|
377
262
|
- generated/stellar/transaction_result/ext.rb
|
378
263
|
- generated/stellar/transaction_result/result.rb
|
379
264
|
- generated/stellar/transaction_result_code.rb
|
265
|
+
- generated/stellar/transaction_result_meta.rb
|
380
266
|
- generated/stellar/transaction_result_pair.rb
|
381
267
|
- generated/stellar/transaction_result_set.rb
|
382
268
|
- generated/stellar/transaction_set.rb
|
383
269
|
- generated/stellar/transaction_signature_payload.rb
|
384
270
|
- generated/stellar/transaction_signature_payload/tagged_transaction.rb
|
271
|
+
- generated/stellar/transaction_v0.rb
|
272
|
+
- generated/stellar/transaction_v0/ext.rb
|
273
|
+
- generated/stellar/transaction_v0_envelope.rb
|
274
|
+
- generated/stellar/transaction_v1_envelope.rb
|
385
275
|
- generated/stellar/trust_line_entry.rb
|
386
276
|
- generated/stellar/trust_line_entry/ext.rb
|
387
277
|
- generated/stellar/trust_line_entry/ext/v1.rb
|
388
278
|
- generated/stellar/trust_line_entry/ext/v1/ext.rb
|
389
279
|
- generated/stellar/trust_line_flags.rb
|
280
|
+
- generated/stellar/upgrade_entry_meta.rb
|
390
281
|
- lib/stellar-base.rb
|
391
282
|
- lib/stellar/account_flags.rb
|
392
283
|
- lib/stellar/asset.rb
|
393
284
|
- lib/stellar/base.rb
|
394
|
-
- lib/stellar/
|
395
|
-
- lib/stellar/
|
285
|
+
- lib/stellar/compat.rb
|
286
|
+
- lib/stellar/concerns/transaction.rb
|
396
287
|
- lib/stellar/convert.rb
|
397
288
|
- lib/stellar/factories.rb
|
289
|
+
- lib/stellar/fee_bump_transaction.rb
|
398
290
|
- lib/stellar/key_pair.rb
|
399
291
|
- lib/stellar/networks.rb
|
400
292
|
- lib/stellar/operation.rb
|
401
|
-
- lib/stellar/
|
293
|
+
- lib/stellar/path_payment_strict_receive_result.rb
|
402
294
|
- lib/stellar/price.rb
|
403
295
|
- lib/stellar/signer_key.rb
|
404
296
|
- lib/stellar/thresholds.rb
|
405
297
|
- lib/stellar/transaction.rb
|
298
|
+
- lib/stellar/transaction_builder.rb
|
406
299
|
- lib/stellar/transaction_envelope.rb
|
300
|
+
- lib/stellar/transaction_v0.rb
|
407
301
|
- lib/stellar/util/continued_fraction.rb
|
408
302
|
- lib/stellar/util/strkey.rb
|
409
|
-
-
|
410
|
-
|
411
|
-
- spec/lib/stellar/asset_spec.rb
|
412
|
-
- spec/lib/stellar/convert_spec.rb
|
413
|
-
- spec/lib/stellar/key_pair_spec.rb
|
414
|
-
- spec/lib/stellar/networks_spec.rb
|
415
|
-
- spec/lib/stellar/operation_spec.rb
|
416
|
-
- spec/lib/stellar/path_payment_result_spec.rb
|
417
|
-
- spec/lib/stellar/price_spec.rb
|
418
|
-
- spec/lib/stellar/signer_key_spec.rb
|
419
|
-
- spec/lib/stellar/thresholds_spec.rb
|
420
|
-
- spec/lib/stellar/transaction_envelope_spec.rb
|
421
|
-
- spec/lib/stellar/transaction_spec.rb
|
422
|
-
- spec/lib/stellar/util/strkey_spec.rb
|
423
|
-
- spec/spec_helper.rb
|
424
|
-
- spec/support/matchers/be_strkey.rb
|
425
|
-
- spec/support/matchers/eq_bytes.rb
|
426
|
-
- spec/support/matchers/have_length.rb
|
427
|
-
- tasks/rspec.rake
|
428
|
-
- tasks/travis.rake
|
429
|
-
- tasks/xdr.rake
|
430
|
-
- xdr/Stellar-SCP.x
|
431
|
-
- xdr/Stellar-ledger-entries.x
|
432
|
-
- xdr/Stellar-ledger.x
|
433
|
-
- xdr/Stellar-overlay.x
|
434
|
-
- xdr/Stellar-transaction.x
|
435
|
-
- xdr/Stellar-types.x
|
436
|
-
homepage: https://github.com/bloom-solutions/ruby-stellar-base
|
303
|
+
- lib/stellar/version.rb
|
304
|
+
homepage: https://github.com/stellar/ruby-stellar-base
|
437
305
|
licenses:
|
438
|
-
- Apache
|
306
|
+
- Apache-2.0
|
439
307
|
metadata: {}
|
440
|
-
post_install_message:
|
308
|
+
post_install_message:
|
441
309
|
rdoc_options: []
|
442
310
|
require_paths:
|
443
311
|
- generated
|
@@ -449,30 +317,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
449
317
|
version: '0'
|
450
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
451
319
|
requirements:
|
452
|
-
- - "
|
320
|
+
- - ">"
|
453
321
|
- !ruby/object:Gem::Version
|
454
|
-
version:
|
322
|
+
version: 1.3.1
|
455
323
|
requirements: []
|
456
|
-
|
457
|
-
|
458
|
-
signing_key:
|
324
|
+
rubygems_version: 3.1.4
|
325
|
+
signing_key:
|
459
326
|
specification_version: 4
|
460
327
|
summary: 'Stellar client library: XDR'
|
461
|
-
test_files:
|
462
|
-
- spec/lib/stellar/account_flags_spec.rb
|
463
|
-
- spec/lib/stellar/asset_spec.rb
|
464
|
-
- spec/lib/stellar/convert_spec.rb
|
465
|
-
- spec/lib/stellar/key_pair_spec.rb
|
466
|
-
- spec/lib/stellar/networks_spec.rb
|
467
|
-
- spec/lib/stellar/operation_spec.rb
|
468
|
-
- spec/lib/stellar/path_payment_result_spec.rb
|
469
|
-
- spec/lib/stellar/price_spec.rb
|
470
|
-
- spec/lib/stellar/signer_key_spec.rb
|
471
|
-
- spec/lib/stellar/thresholds_spec.rb
|
472
|
-
- spec/lib/stellar/transaction_envelope_spec.rb
|
473
|
-
- spec/lib/stellar/transaction_spec.rb
|
474
|
-
- spec/lib/stellar/util/strkey_spec.rb
|
475
|
-
- spec/spec_helper.rb
|
476
|
-
- spec/support/matchers/be_strkey.rb
|
477
|
-
- spec/support/matchers/eq_bytes.rb
|
478
|
-
- spec/support/matchers/have_length.rb
|
328
|
+
test_files: []
|