sequence-sdk 2.pre.rc.1 → 2.rc.2

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
- SHA256:
3
- metadata.gz: aa8125eb52fe8dbf7b905442ded7cae137c144161723ec224fffde4640dee208
4
- data.tar.gz: 283e350688c0bea9a07c375ae6502743f0ceb50442a2a9398bc2673604c67736
2
+ SHA1:
3
+ metadata.gz: 80046724787cef42cc5cfe5b48be511642f5a172
4
+ data.tar.gz: a5adced85eb8e1b2b308b80d5f5503ac81a6f43f
5
5
  SHA512:
6
- metadata.gz: 7e3209b59c2b9e36a8c8e9e19926a923c23080cb31d46bed62425e2d4bde804b1924889caa3c4c8d0242e91c2d7622bd129ef44be388f6bbf8633a195b465737
7
- data.tar.gz: c1d1a73d56753146d5c78788743d553cd0c74975d133bad62ea8586787b5fc3d87efddd47a78a7feb53bece656643eb4b3d069f18fff2f8c3c5af4316bf0df16
6
+ metadata.gz: fdf382e4fe52769f2bd41411b3b8d976f91be421cee167f1ae654ac47c0cdc9fdc8f8644566b1056e1abe9d8086f8dd92abea602c1d3e5968b971c87dbcbf616
7
+ data.tar.gz: 91bb7b0f99a1dd0a1e01e2ec0912e36638fceddedacb607d931df017da075ad7d921677181448b00a8d5d78d3f75e6b7654e607ed7c84d068eb03ff7118592c3
data/README.md CHANGED
@@ -14,7 +14,7 @@ for the language's schedule for security and bug fixes.
14
14
  Add the following to your `Gemfile`:
15
15
 
16
16
  ```ruby
17
- gem 'sequence-sdk', '~> 2-rc.1'
17
+ gem 'sequence-sdk', '~> 2.rc.2'
18
18
  ```
19
19
 
20
20
  ### In your code
@@ -6,8 +6,7 @@ require_relative './query'
6
6
  require_relative './response_object'
7
7
 
8
8
  module Sequence
9
- # An account is an object in Sequence that tracks ownership of tokens on a
10
- # blockchain by creating and tracking control programs.
9
+ # A container that holds tokens in a ledger.
11
10
  class Account < ResponseObject
12
11
  # @!attribute [r] id
13
12
  # Unique identifier of the account.
@@ -15,14 +14,13 @@ module Sequence
15
14
  attrib :id
16
15
 
17
16
  # @!attribute [r] key_ids
18
- # The set of key IDs used for signing transactions that spend from the
19
- # account.
17
+ # The list of IDs for the keys that control the account.
20
18
  # @return [Array<String>]
21
19
  attrib(:key_ids)
22
20
 
23
21
  # @!attribute [r] quorum
24
- # The number of keys required to sign transactions that spend from the
25
- # account.
22
+ # The number of keys required to sign transactions that transfer or retire
23
+ # tokens from the account.
26
24
  # @return [Integer]
27
25
  attrib :quorum
28
26
 
@@ -38,12 +36,13 @@ module Sequence
38
36
  class ClientModule < Sequence::ClientModule
39
37
  # Create a new account in the ledger.
40
38
  # @param key_ids [Array<String>]
41
- # The key IDs used for signing transactions that spend from the account.
39
+ # The list of IDs for the keys that control the account.
42
40
  # @param id [String]
43
41
  # Unique identifier. Auto-generated if not specified.
44
42
  # @param quorum [Integer]
45
- # The number of keys required to sign transactions that spend from the
46
- # account. Defaults to the number of keys provided.
43
+ # The number of keys required to sign transactions that transfer or
44
+ # retire tokens from the account. Defaults to the number of keys
45
+ # provided.
47
46
  # @param tags [Hash]
48
47
  # User-specified key-value data describing the account.
49
48
  # @return [Account]
@@ -8,7 +8,7 @@ require_relative './query'
8
8
  require_relative './response_object'
9
9
 
10
10
  module Sequence
11
- # A type or class of value that can be tracked on a ledger.
11
+ # A taxonomy used to differentiate different types of tokens in a ledger.
12
12
  class Flavor < ResponseObject
13
13
  # @!attribute [r] id
14
14
  # Unique identifier of the flavor.
@@ -16,8 +16,7 @@ module Sequence
16
16
  attrib :id
17
17
 
18
18
  # @!attribute [r] key_ids
19
- # The set of key IDs used to sign transactions that issue tokens of the
20
- # flavor.
19
+ # The list of IDs for the keys that control the flavor.
21
20
  # @return [Array<String>]
22
21
  attrib(:key_ids)
23
22
 
data/lib/sequence/page.rb CHANGED
@@ -24,11 +24,11 @@ module Sequence
24
24
 
25
25
  def initialize(raw_attribs, translate)
26
26
  super(raw_attribs)
27
- @items = @items.map { |i| translate.call(i) }
27
+ @items = (@items || []).map { |i| translate.call(i) }
28
28
  end
29
29
 
30
30
  def each
31
- @items.to_a.each do |item|
31
+ @items.each do |item|
32
32
  yield item
33
33
  end
34
34
  end
@@ -42,8 +42,6 @@ module Sequence
42
42
  raise NotImplementedError
43
43
  end
44
44
 
45
- alias all to_a
46
-
47
45
  # @private
48
46
  def pages
49
47
  PageQuery.new(client, query, method(:fetch), method(:translate))
@@ -88,8 +86,6 @@ module Sequence
88
86
  def page
89
87
  Page.new(@fetch.call(@query), @translate)
90
88
  end
91
-
92
- alias all to_a
93
89
  end
94
90
  end
95
91
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sequence
4
- VERSION = '2-rc.1'
4
+ VERSION = '2.rc.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequence-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.pre.rc.1
4
+ version: 2.rc.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chain Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  version: 1.3.1
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.7.3
184
+ rubygems_version: 2.6.13
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: SDK for Sequence