stellar-base 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9698e9734a6385fd6a52e3d8a4c9208c8f7c702b
4
- data.tar.gz: 2355dd45c7a31c97f29b775f6ee58f25872faada
3
+ metadata.gz: 32763151cf45342771f5f3412ae9ff0967e5d0d5
4
+ data.tar.gz: 2f78674303fa257d37365a9df00dd42b3e1fbf9b
5
5
  SHA512:
6
- metadata.gz: 8d455190a25adb9e2c31982b60e0fd663c6ee3b724b832c8104a9c0de9127ac1ddb3e88e6a5b9676750b95c34dff8fad35477e3b58162fe749f2b8ef6bb0556c
7
- data.tar.gz: 18608bceb72184220f144e928b4fd2b7a6febfa79ddb07f9cdbc8473d7ffe9a988685d10d1b4fc362241a70b882c69ec5ad1122d4d880ef6be03063757d5c98d
6
+ metadata.gz: 8cc19aa393dbb3be1b735dd08013d62e2eab150844fe85284207a58cae317e8d5a069632217714aee444d013819fa64660aa884bb6f1a2d70bf261184ba40155
7
+ data.tar.gz: 1bd52247f06363990f6752ef1aea8fd6a09418afae67c1e36fcb31323ac1859b566c8008508cb0af2f84179e01ed9772804c5859476a8ba6f0ff3d0cd548088e
@@ -16,7 +16,7 @@ destination = RbNaCl::SigningKey.new("allmylifemyhearthasbeensearching")
16
16
 
17
17
  tx = Stellar::Transaction.new
18
18
  tx.account = master.verify_key.to_bytes
19
- tx.max_fee = 1000
19
+ tx.fee = 1000
20
20
  tx.seq_num = 1
21
21
  tx.max_ledger = 1000
22
22
  tx.min_ledger = 0
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-05-12T09:08:23-07:00
1
+ # Automatically generated on 2015-05-12T13:13:19-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -11,9 +11,6 @@ require 'xdr'
11
11
  # Currency currency; // what they end up with
12
12
  # int64 amount; // amount they end up with
13
13
  #
14
- # opaque memo<32>;
15
- # opaque sourceMemo<32>; // used to return a payment
16
- #
17
14
  # // payment over path
18
15
  # Currency path<5>; // what hops it must go through to get there
19
16
  # int64 sendMax; // the maximum amount of the source currency (==path[0]) to
@@ -27,8 +24,6 @@ module Stellar
27
24
  attribute :destination, AccountID
28
25
  attribute :currency, Currency
29
26
  attribute :amount, Int64
30
- attribute :memo, XDR::VarOpaque[32]
31
- attribute :source_memo, XDR::VarOpaque[32]
32
27
  attribute :path, XDR::VarArray[Currency, 5]
33
28
  attribute :send_max, Int64
34
29
  end
@@ -1,4 +1,4 @@
1
- # Automatically generated on 2015-05-12T09:08:23-07:00
1
+ # Automatically generated on 2015-05-12T13:13:19-07:00
2
2
  # DO NOT EDIT or your changes may be overwritten
3
3
 
4
4
  require 'xdr'
@@ -10,9 +10,8 @@ require 'xdr'
10
10
  # // account used to run the transaction
11
11
  # AccountID sourceAccount;
12
12
  #
13
- # // maximum fee this transaction can collect
14
- # // the transaction is aborted if the fee is higher
15
- # int32 maxFee;
13
+ # // the fee the sourceAccount will pay
14
+ # int32 fee;
16
15
  #
17
16
  # // sequence number to consume in the account
18
17
  # SequenceNumber seqNum;
@@ -30,7 +29,7 @@ require 'xdr'
30
29
  module Stellar
31
30
  class Transaction < XDR::Struct
32
31
  attribute :source_account, AccountID
33
- attribute :max_fee, Int32
32
+ attribute :fee, Int32
34
33
  attribute :seq_num, SequenceNumber
35
34
  attribute :min_ledger, Uint32
36
35
  attribute :max_ledger, Uint32
@@ -1,5 +1,5 @@
1
1
  module Stellar
2
2
  module Base
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -25,8 +25,6 @@ module Stellar
25
25
  end
26
26
 
27
27
  def apply_defaults
28
- self.source_memo ||= ""
29
- self.memo ||= ""
30
28
  end
31
29
 
32
30
  end
@@ -74,16 +74,16 @@ module Stellar
74
74
  def self.for_account(attributes={})
75
75
  account = attributes[:account]
76
76
  sequence = attributes[:sequence]
77
- max_fee = attributes[:max_fee]
77
+ fee = attributes[:fee]
78
78
 
79
79
  raise ArgumentError, "Bad :account" unless account.is_a?(KeyPair) && account.sign?
80
80
  raise ArgumentError, "Bad :sequence #{sequence}" unless sequence.is_a?(Integer)
81
- raise ArgumentError, "Bad :max_fee #{sequence}" if max_fee.present? && !max_fee.is_a?(Integer)
81
+ raise ArgumentError, "Bad :fee #{sequence}" if fee.present? && !fee.is_a?(Integer)
82
82
 
83
83
  new.tap do |result|
84
- result.seq_num = sequence
85
- result.max_fee = max_fee
86
- result.source_account = account.public_key
84
+ result.seq_num = sequence
85
+ result.fee = fee
86
+ result.source_account = account.public_key
87
87
  result.apply_defaults
88
88
  end
89
89
  end
@@ -132,7 +132,7 @@ module Stellar
132
132
 
133
133
  def apply_defaults
134
134
  self.operations ||= []
135
- self.max_fee ||= 10
135
+ self.fee ||= 10
136
136
  self.min_ledger ||= 0
137
137
  self.max_ledger ||= 2**32 - 1
138
138
  self.memo ||= Memo.new(:memo_type_none)
@@ -4,7 +4,7 @@ describe Stellar::Transaction do
4
4
  subject do
5
5
  Stellar::Transaction.new({
6
6
  source_account: "\x00" * 32,
7
- max_fee: 10,
7
+ fee: 10,
8
8
  seq_num: 1,
9
9
  max_ledger: 10,
10
10
  min_ledger: 0,
@@ -39,9 +39,6 @@ struct PaymentOp
39
39
  Currency currency; // what they end up with
40
40
  int64 amount; // amount they end up with
41
41
 
42
- opaque memo<32>;
43
- opaque sourceMemo<32>; // used to return a payment
44
-
45
42
  // payment over path
46
43
  Currency path<5>; // what hops it must go through to get there
47
44
  int64 sendMax; // the maximum amount of the source currency (==path[0]) to
@@ -212,9 +209,8 @@ struct Transaction
212
209
  // account used to run the transaction
213
210
  AccountID sourceAccount;
214
211
 
215
- // maximum fee this transaction can collect
216
- // the transaction is aborted if the fee is higher
217
- int32 maxFee;
212
+ // the fee the sourceAccount will pay
213
+ int32 fee;
218
214
 
219
215
  // sequence number to consume in the account
220
216
  SequenceNumber seqNum;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein