stellar-base 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 4bcdc8dd8ee4878dd631b013811444a2ae4cb55a3642beffc0e6a27edf78af0b
4
- data.tar.gz: 46aa0348b3b4548af1ef03f1658990d479ae1f56c84bbb37c1b80017acb0e265
2
+ SHA1:
3
+ metadata.gz: 84d9b7f78094eff3a6f0b067340a987c0ed2efdb
4
+ data.tar.gz: 60d395839f2456d187dfebbee668c8a4cf53d034
5
5
  SHA512:
6
- metadata.gz: 7f67e3c1932f6ee43eb4b366f48873d19d6304115eb9ea4a47e4ca8dc17b0a25e2bc5129bc139ea94eb51e7ad3421d87ed1310cf758a88663b73096cb51c7ea6
7
- data.tar.gz: f358ae8b004e7291e9beb56d12774a06ae60b1779b37583be1b6969aafbd5ecc2687e9ad86742674dba03dd5cb96649d93520c5ccc3bc36cff2c62d51c54ad81
6
+ metadata.gz: 5daef45a10aa39f8b453100e5472217e8876f5b4e1fbe4e5434fde7766c74f30ea1843504557e38a724900a63bde2e6b07414aa9173ce5f264cab11c3741bde8
7
+ data.tar.gz: 85c73b1c64ddc490bf6527c10ddb1d679379ebadbe56ce71e66a9c989ded04506c53ddb51724e50279003ccfd507935cd2dece183a836882163e8d134bd3584f
@@ -4,6 +4,10 @@ rvm:
4
4
  - 2.3.3
5
5
  - 2.4.0
6
6
  - 2.5.1
7
+ before_install:
8
+ - sudo add-apt-repository -y ppa:chris-lea/libsodium
9
+ - sudo apt-get -y update
10
+ - sudo apt-get install -y libsodium-dev
7
11
  script: bundle exec rake travis
8
12
  notifications:
9
13
  slack:
@@ -6,7 +6,25 @@ file. This project adheres to [Semantic Versioning](http://semver.org/).
6
6
  As this project is pre 1.0, breaking changes may happen for minor version
7
7
  bumps. A breaking change will get clearly notified in this log.
8
8
 
9
- ## [unreleased](https://github.com/stellar/ruby-stellar-base/compare/v0.15.0...master)
9
+ ## [0.18.0](https://github.com/stellar/ruby-stellar-base/compare/v0.17.0...v0.18.0)
10
+ ### Added
11
+ - Update XDR definitions for stellar-core v10.0.0 (introduces Liabilities and other changes to support asset-backed offers as per [CAP-0003 Specification](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0003.md#specification))
12
+ - Add factories for ledger, transaction, operation.
13
+
14
+ ### Changed
15
+ - Use rbnacl instead of rbnacl-libsodium (the latter has been [deprecated](https://github.com/crypto-rb/rbnacl-libsodium/issues/29))
16
+
17
+ ## [0.17.0](https://github.com/stellar/ruby-stellar-base/compare/v0.16.0...v0.17.0)
18
+ ### Fixed
19
+ - Rename `Stellar::SignerKey#onetime_signer` helper to `Stellar::SignerKey#hash_x`, add preimage validations
20
+
21
+ ## [0.16.0](https://github.com/stellar/ruby-stellar-base/compare/v0.15.0...v0.16.0)
22
+ ### Added
23
+ - Create co-signers conveniently using helpers `ed25519(keypair)`, `preauthorized_transaction(tx)` and `onetime_signer(preimage)` from `Stellar::SignerKey` module
24
+ - Merge two transactions with `Stellar::TransactionEnvelope#merge`
25
+
26
+ ### Fixed
27
+ - Source account overriding in Stellar::Transaction#to_operations
10
28
 
11
29
  ## [0.15.0](https://github.com/stellar/ruby-stellar-base/compare/v0.14.0...v0.15.0)
12
30
  ### Added
data/README.md CHANGED
@@ -70,6 +70,14 @@ Stellar::Util::StrKey.check_decode(:seed, encoded) # => throws ArgumentError: Un
70
70
 
71
71
  ```
72
72
 
73
+ During development of your app, you may include the [FactoryBot](https://github.com/thoughtbot/factory_bot) definitions in your specs:
74
+
75
+ ```ruby
76
+ require "stellar-base/factories"
77
+ ```
78
+
79
+ See the factories file for information on what factories are available.
80
+
73
81
  ## Updating Generated Code
74
82
 
75
83
  The generated code of this library must be refreshed each time the Stellar network's protocol is updated. To perform this task, run `rake xdr:update`, which will download the latest `.x` files into the `xdr` folder and will run `xdrgen` to regenerate the built ruby code.
@@ -37,6 +37,7 @@ module Stellar
37
37
  autoload :AssetType
38
38
  autoload :Asset
39
39
  autoload :Price
40
+ autoload :Liabilities
40
41
  autoload :ThresholdIndexes
41
42
  autoload :LedgerEntryType
42
43
  autoload :Signer
@@ -28,6 +28,18 @@ require 'xdr'
28
28
  # {
29
29
  # case 0:
30
30
  # void;
31
+ # case 1:
32
+ # struct
33
+ # {
34
+ # Liabilities liabilities;
35
+ #
36
+ # union switch (int v)
37
+ # {
38
+ # case 0:
39
+ # void;
40
+ # }
41
+ # ext;
42
+ # } v1;
31
43
  # }
32
44
  # ext;
33
45
  # };
@@ -9,16 +9,34 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 1:
13
+ # struct
14
+ # {
15
+ # Liabilities liabilities;
16
+ #
17
+ # union switch (int v)
18
+ # {
19
+ # case 0:
20
+ # void;
21
+ # }
22
+ # ext;
23
+ # } v1;
12
24
  # }
13
25
  #
14
26
  # ===========================================================================
15
27
  module Stellar
16
28
  class AccountEntry
17
29
  class Ext < XDR::Union
30
+ include XDR::Namespace
31
+
32
+ autoload :V1
33
+
18
34
  switch_on XDR::Int, :v
19
35
 
20
36
  switch 0
37
+ switch 1, :v1
21
38
 
39
+ attribute :v1, V1
22
40
  end
23
41
  end
24
42
  end
@@ -0,0 +1,34 @@
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
+ # Liabilities liabilities;
11
+ #
12
+ # union switch (int v)
13
+ # {
14
+ # case 0:
15
+ # void;
16
+ # }
17
+ # ext;
18
+ # }
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class AccountEntry
23
+ class Ext
24
+ class V1 < XDR::Struct
25
+ include XDR::Namespace
26
+
27
+ autoload :Ext
28
+
29
+ attribute :liabilities, Liabilities
30
+ attribute :ext, Ext
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,28 @@
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 AccountEntry
17
+ class Ext
18
+ class V1
19
+ class Ext < XDR::Union
20
+ switch_on XDR::Int, :v
21
+
22
+ switch 0
23
+
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -14,7 +14,9 @@ require 'xdr'
14
14
  # ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
15
15
  # ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
16
16
  # ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers
17
- # ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5 // sequence number is over max allowed
17
+ # ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5, // sequence number is over max allowed
18
+ # ACCOUNT_MERGE_DEST_FULL = -6 // can't add source balance to
19
+ # // destination balance
18
20
  # };
19
21
  #
20
22
  # ===========================================================================
@@ -26,6 +28,7 @@ module Stellar
26
28
  member :account_merge_immutable_set, -3
27
29
  member :account_merge_has_sub_entries, -4
28
30
  member :account_merge_seqnum_too_far, -5
31
+ member :account_merge_dest_full, -6
29
32
 
30
33
  seal
31
34
  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 Liabilities
9
+ # {
10
+ # int64 buying;
11
+ # int64 selling;
12
+ # };
13
+ #
14
+ # ===========================================================================
15
+ module Stellar
16
+ class Liabilities < XDR::Struct
17
+ attribute :buying, Int64
18
+ attribute :selling, Int64
19
+ end
20
+ end
@@ -10,7 +10,7 @@ require 'xdr'
10
10
  # case SIGNER_KEY_TYPE_ED25519:
11
11
  # uint256 ed25519;
12
12
  # case SIGNER_KEY_TYPE_PRE_AUTH_TX:
13
- # /* Hash of Transaction structure */
13
+ # /* SHA-256 Hash of TransactionSignaturePayload structure */
14
14
  # uint256 preAuthTx;
15
15
  # case SIGNER_KEY_TYPE_HASH_X:
16
16
  # /* Hash of random 256 bit preimage X */
@@ -20,6 +20,18 @@ require 'xdr'
20
20
  # {
21
21
  # case 0:
22
22
  # void;
23
+ # case 1:
24
+ # struct
25
+ # {
26
+ # Liabilities liabilities;
27
+ #
28
+ # union switch (int v)
29
+ # {
30
+ # case 0:
31
+ # void;
32
+ # }
33
+ # ext;
34
+ # } v1;
23
35
  # }
24
36
  # ext;
25
37
  # };
@@ -9,16 +9,34 @@ require 'xdr'
9
9
  # {
10
10
  # case 0:
11
11
  # void;
12
+ # case 1:
13
+ # struct
14
+ # {
15
+ # Liabilities liabilities;
16
+ #
17
+ # union switch (int v)
18
+ # {
19
+ # case 0:
20
+ # void;
21
+ # }
22
+ # ext;
23
+ # } v1;
12
24
  # }
13
25
  #
14
26
  # ===========================================================================
15
27
  module Stellar
16
28
  class TrustLineEntry
17
29
  class Ext < XDR::Union
30
+ include XDR::Namespace
31
+
32
+ autoload :V1
33
+
18
34
  switch_on XDR::Int, :v
19
35
 
20
36
  switch 0
37
+ switch 1, :v1
21
38
 
39
+ attribute :v1, V1
22
40
  end
23
41
  end
24
42
  end
@@ -0,0 +1,34 @@
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
+ # Liabilities liabilities;
11
+ #
12
+ # union switch (int v)
13
+ # {
14
+ # case 0:
15
+ # void;
16
+ # }
17
+ # ext;
18
+ # }
19
+ #
20
+ # ===========================================================================
21
+ module Stellar
22
+ class TrustLineEntry
23
+ class Ext
24
+ class V1 < XDR::Struct
25
+ include XDR::Namespace
26
+
27
+ autoload :Ext
28
+
29
+ attribute :liabilities, Liabilities
30
+ attribute :ext, Ext
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,28 @@
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 TrustLineEntry
17
+ class Ext
18
+ class V1
19
+ class Ext < XDR::Union
20
+ switch_on XDR::Int, :v
21
+
22
+ switch 0
23
+
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,5 +1,5 @@
1
1
  require 'xdr'
2
- require 'rbnacl/libsodium'
2
+ require 'rbnacl'
3
3
  require 'digest/sha2'
4
4
  require 'active_support/core_ext/object/blank'
5
5
  require 'active_support/core_ext/enumerable'
@@ -1,5 +1,5 @@
1
1
  module Stellar
2
2
  module Base
3
- VERSION = "0.17.0"
3
+ VERSION = "0.18.0"
4
4
  end
5
5
  end
@@ -0,0 +1,61 @@
1
+ FactoryBot.define do
2
+
3
+ factory :stellar_ledger, class: Hyperclient::Resource do
4
+ initialize_with { new(attributes.stringify_keys, nil, nil) }
5
+
6
+ id { "ec168d452542589dbc2d0eb6d58c74b9bb2ccb93bba879a3b3fa73fdfa730182" }
7
+ paging_token { "12884901888" }
8
+ hash { "ec168d452542589dbc2d0eb6d58c74b9bb2ccb93bba879a3b3fa73fdfa730182" }
9
+ prev_hash { "fe0f6bea5f341344fdb5bc6fc4ad719dd63071d9203e9a1e7f17c68ea1ecebde" }
10
+ sequence { 3 }
11
+ transaction_count { 1 }
12
+ operation_count { 3 }
13
+ closed_at { "2015-09-30T17:15:54Z" }
14
+ total_coins { "100000000000.0000000" }
15
+ fee_pool { "0.0000300" }
16
+ base_fee_in_stroops { 100 }
17
+ base_reserve_in_stroops { 100000000 }
18
+ max_tx_set_size { 500 }
19
+ protocol_version { 1 }
20
+ header_xdr { "AAAAAf4Pa+pfNBNE/bW8b8StcZ3WMHHZID6aHn8Xxo6h7OveT8tCuFMOgNdZYJOIRVDug1f8O8Px/nC6paZHVl6SYykAAAAAVgwYygAAAAAAAAAAxAXcAjsE7UPy10Zx5GA7wF8NZPwXAURqCwJYjORMFD1ShdgmDrQnA6TSdmQnqUysyyhS7Px10zUmUf01qfuKPgAAAAMN4Lazp2QAAAAAAAAAAAEsAAAAAAAAAAAAAAAAAAAAZAX14QAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }
21
+ end
22
+
23
+ factory :stellar_transaction, class: Hyperclient::Resource do
24
+ initialize_with { new(attributes.stringify_keys, nil, nil) }
25
+
26
+ memo { "hello world" }
27
+ id { "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" }
28
+ paging_token { "12884905984" }
29
+ hash { "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" }
30
+ ledger { 3 }
31
+ created_at { "2015-09-30T17:15:54Z" }
32
+ source_account { "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" }
33
+ source_account_sequence { "1" }
34
+ fee_paid { 300 }
35
+ operation_count { 3 }
36
+ envelope_xdr { "AAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhAAABLAAAAAAAAAABAAAAAAAAAAEAAAALaGVsbG8gd29ybGQAAAAAAwAAAAAAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAAAAAAAAQAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAN4Lazj4x61AAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLaqcIQAAAEBKwqWy3TaOxoGnfm9eUjfTRBvPf34dvDA0Nf+B8z4zBob90UXtuCqmQqwMCyH+okOI3c05br3khkH0yP4kCwcE" }
37
+ result_xdr { "AAAAAAAAASwAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAA=" }
38
+ result_meta_xdr { "AAAAAAAAAAMAAAACAAAAAAAAAAMAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhDeC2s5t4PNQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQAAAAAL68IAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAL68IAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrObeDzUAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAwAAAAAAAAAAAZRyYo7njrknFNItA5CWPCTZJ+oAmZlIbokfrC2qnCEAAAAAC+vCAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" }
39
+ fee_meta_xdr { "AAAAAgAAAAMAAAABAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnY/7UAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==" }
40
+ memo_type { "text" }
41
+ signatures do
42
+ [ "SsKlst02jsaBp35vXlI300Qbz39+HbwwNDX/gfM+MwaG/dFF7bgqpkKsDAsh/qJDiN3NOW695IZB9Mj+JAsHBA==" ]
43
+ end
44
+ end
45
+
46
+ factory :stellar_operation, class: Hyperclient::Resource do
47
+ initialize_with { new(attributes.stringify_keys, nil, nil) }
48
+
49
+ id { "12884905985" }
50
+ paging_token { "12884905985" }
51
+ source_account { "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" }
52
+ type { "create_account" }
53
+ type_i { 0 }
54
+ created_at { "2015-09-30T17:15:54Z" }
55
+ transaction_hash { "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" }
56
+ starting_balance { "20.0000000" }
57
+ funder { "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" }
58
+ account { "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB" }
59
+ end
60
+
61
+ end
@@ -18,8 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.add_dependency "xdr", "~> 3.0.0"
19
19
  spec.add_dependency "digest-crc"
20
20
  spec.add_dependency "base32"
21
- spec.add_dependency "rbnacl"
22
- spec.add_dependency "rbnacl-libsodium", "~> 1.0.16"
21
+ spec.add_dependency "rbnacl", ">= 6.0"
23
22
  spec.add_dependency "activesupport", ">= 5.2.0"
24
23
 
25
24
  spec.add_development_dependency "bundler", "~> 1.7"
@@ -12,7 +12,7 @@ typedef opaque Thresholds[4];
12
12
  typedef string string32<32>;
13
13
  typedef string string64<64>;
14
14
  typedef int64 SequenceNumber;
15
- typedef opaque DataValue<64>;
15
+ typedef opaque DataValue<64>;
16
16
 
17
17
  enum AssetType
18
18
  {
@@ -50,6 +50,12 @@ struct Price
50
50
  int32 d; // denominator
51
51
  };
52
52
 
53
+ struct Liabilities
54
+ {
55
+ int64 buying;
56
+ int64 selling;
57
+ };
58
+
53
59
  // the 'Thresholds' type is packed uint8_t values
54
60
  // defined by these indexes
55
61
  enum ThresholdIndexes
@@ -123,6 +129,18 @@ struct AccountEntry
123
129
  {
124
130
  case 0:
125
131
  void;
132
+ case 1:
133
+ struct
134
+ {
135
+ Liabilities liabilities;
136
+
137
+ union switch (int v)
138
+ {
139
+ case 0:
140
+ void;
141
+ }
142
+ ext;
143
+ } v1;
126
144
  }
127
145
  ext;
128
146
  };
@@ -139,7 +157,6 @@ enum TrustLineFlags
139
157
  AUTHORIZED_FLAG = 1
140
158
  };
141
159
 
142
-
143
160
  // mask for all trustline flags
144
161
  const MASK_TRUSTLINE_FLAGS = 1;
145
162
 
@@ -158,6 +175,18 @@ struct TrustLineEntry
158
175
  {
159
176
  case 0:
160
177
  void;
178
+ case 1:
179
+ struct
180
+ {
181
+ Liabilities liabilities;
182
+
183
+ union switch (int v)
184
+ {
185
+ case 0:
186
+ void;
187
+ }
188
+ ext;
189
+ } v1;
161
190
  }
162
191
  ext;
163
192
  };
@@ -221,7 +250,6 @@ struct DataEntry
221
250
  ext;
222
251
  };
223
252
 
224
-
225
253
  struct LedgerEntry
226
254
  {
227
255
  uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed
@@ -226,6 +226,8 @@ struct ManageDataOp
226
226
 
227
227
  increases the sequence to a given level
228
228
 
229
+ Threshold: low
230
+
229
231
  Result: BumpSequenceResult
230
232
  */
231
233
 
@@ -608,7 +610,9 @@ enum AccountMergeResultCode
608
610
  ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist
609
611
  ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set
610
612
  ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers
611
- ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5 // sequence number is over max allowed
613
+ ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5, // sequence number is over max allowed
614
+ ACCOUNT_MERGE_DEST_FULL = -6 // can't add source balance to
615
+ // destination balance
612
616
  };
613
617
 
614
618
  union AccountMergeResult switch (AccountMergeResultCode code)
@@ -44,7 +44,7 @@ union SignerKey switch (SignerKeyType type)
44
44
  case SIGNER_KEY_TYPE_ED25519:
45
45
  uint256 ed25519;
46
46
  case SIGNER_KEY_TYPE_PRE_AUTH_TX:
47
- /* Hash of Transaction structure */
47
+ /* SHA-256 Hash of TransactionSignaturePayload structure */
48
48
  uint256 preAuthTx;
49
49
  case SIGNER_KEY_TYPE_HASH_X:
50
50
  /* Hash of random 256 bit preimage X */
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.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-30 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xdr
@@ -58,28 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '6.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rbnacl-libsodium
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 1.0.16
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 1.0.16
68
+ version: '6.0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: activesupport
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -246,6 +232,8 @@ files:
246
232
  - generated/stellar-base-generated.rb
247
233
  - generated/stellar/account_entry.rb
248
234
  - generated/stellar/account_entry/ext.rb
235
+ - generated/stellar/account_entry/ext/v1.rb
236
+ - generated/stellar/account_entry/ext/v1/ext.rb
249
237
  - generated/stellar/account_flags.rb
250
238
  - generated/stellar/account_merge_result.rb
251
239
  - generated/stellar/account_merge_result_code.rb
@@ -309,6 +297,7 @@ files:
309
297
  - generated/stellar/ledger_scp_messages.rb
310
298
  - generated/stellar/ledger_upgrade.rb
311
299
  - generated/stellar/ledger_upgrade_type.rb
300
+ - generated/stellar/liabilities.rb
312
301
  - generated/stellar/manage_data_op.rb
313
302
  - generated/stellar/manage_data_result.rb
314
303
  - generated/stellar/manage_data_result_code.rb
@@ -387,6 +376,8 @@ files:
387
376
  - generated/stellar/transaction_signature_payload/tagged_transaction.rb
388
377
  - generated/stellar/trust_line_entry.rb
389
378
  - generated/stellar/trust_line_entry/ext.rb
379
+ - generated/stellar/trust_line_entry/ext/v1.rb
380
+ - generated/stellar/trust_line_entry/ext/v1/ext.rb
390
381
  - generated/stellar/trust_line_flags.rb
391
382
  - lib/stellar-base.rb
392
383
  - lib/stellar/account_flags.rb
@@ -394,6 +385,7 @@ files:
394
385
  - lib/stellar/base.rb
395
386
  - lib/stellar/base/version.rb
396
387
  - lib/stellar/convert.rb
388
+ - lib/stellar/factories.rb
397
389
  - lib/stellar/key_pair.rb
398
390
  - lib/stellar/networks.rb
399
391
  - lib/stellar/operation.rb
@@ -453,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
453
445
  version: '0'
454
446
  requirements: []
455
447
  rubyforge_project:
456
- rubygems_version: 2.7.6
448
+ rubygems_version: 2.5.1
457
449
  signing_key:
458
450
  specification_version: 4
459
451
  summary: 'Stellar client library: XDR'