flow_client 0.2.2 → 0.2.3

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
  SHA256:
3
- metadata.gz: 5af7d7f1ba7669936797c908286ae084ca35d28ce1403767c7e670516391c744
4
- data.tar.gz: 9ece3c471fb71a3bd5fadaac858e72681ee5db0e9259cc6871c4c413e56b2f8a
3
+ metadata.gz: 21de96857e32592f838aa28fb31ab17fa878cf26128ce81a03237d3b7a27d73a
4
+ data.tar.gz: e2b5373fa78c407825aa76e46570125bbc3f6b8794d8162492e0155412a7ea79
5
5
  SHA512:
6
- metadata.gz: 88ba90c30234850aea96ef88fa41592429634a475fce24d931396a17b1214fa6c9e4080e04d754cb7429629e007dff51a6ecf6a94346ccea0ddae02d7af8ddfc
7
- data.tar.gz: 5b3a241597f592be576678ac36e6c2196bb9efca62442c2ba27dd8fb185db70028d30e6185845a122fa7276f43bac21195db3388308413927faad6b7032ebd7b
6
+ metadata.gz: 60b88b194fe808ca5a73469a4036e3cf50eba7a54b561577c371fc76e59b703264d9bd970ae8cbf81b91d39f5bac28abb14611b86a1e5c0d3fd39a761c63d1e9
7
+ data.tar.gz: 6c26d7bf1c8cb8cf26ab2e23b5f506a7f5983b349b00991e3c7cf35a5362c4a3679c3f61c2f89459aff1544bad46b12571210f2994ba9956500294803e22b7b4
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  .vscode/settings.json
13
+ .DS_Store
data/CHANGELOG.md CHANGED
@@ -13,8 +13,12 @@
13
13
  - Added multiple signature support
14
14
  - Added multi-party signing
15
15
  - Added account creation
16
- -
16
+
17
17
  ## [0.2.1] - 2021-11-08
18
18
 
19
19
  - Fixed incorrect CadenceType conversions
20
- - Updated usage examples
20
+ - Updated usage examples
21
+
22
+ ## [0.2.3] - 2022-08-21
23
+
24
+ - Updated dependencies: grpc, grpc-tools, json and openssl
data/Gemfile CHANGED
@@ -9,3 +9,4 @@ gem "guard-rspec", "~> 4.7"
9
9
  gem "rake", "~> 13.0"
10
10
  gem "rspec", "~> 3.0"
11
11
  gem "rubocop", "~> 1.22"
12
+ gem 'simplecov'
data/Gemfile.lock CHANGED
@@ -1,28 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flow_client (0.2.2)
5
- grpc
6
- grpc-tools
7
- json
8
- openssl
9
- rlp
4
+ flow_client (0.2.3)
5
+ grpc (~> 1.48.0)
6
+ grpc-tools (~> 1.48.0)
7
+ json (~> 2.6.2)
8
+ openssl (~> 3.0.0)
9
+ rlp (~> 0.7.3)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
15
  coderay (1.1.3)
16
- diff-lcs (1.4.4)
17
- ffi (1.15.4)
18
- formatador (0.3.0)
19
- google-protobuf (3.19.1-x86_64-darwin)
20
- googleapis-common-protos-types (1.3.0)
16
+ diff-lcs (1.5.0)
17
+ docile (1.4.0)
18
+ ffi (1.15.5)
19
+ formatador (1.1.0)
20
+ google-protobuf (3.21.6)
21
+ googleapis-common-protos-types (1.4.0)
21
22
  google-protobuf (~> 3.14)
22
- grpc (1.41.0-universal-darwin)
23
- google-protobuf (~> 3.17)
23
+ grpc (1.48.0)
24
+ google-protobuf (~> 3.19)
24
25
  googleapis-common-protos-types (~> 1.0)
25
- grpc-tools (1.41.0)
26
+ grpc-tools (1.48.0)
26
27
  guard (2.18.0)
27
28
  formatador (>= 0.2.4)
28
29
  listen (>= 2.7, < 4.0)
@@ -37,9 +38,8 @@ GEM
37
38
  guard (~> 2.1)
38
39
  guard-compat (~> 1.1)
39
40
  rspec (>= 2.99.0, < 4.0)
40
- ipaddr (1.2.3)
41
- json (2.6.1)
42
- listen (3.7.0)
41
+ json (2.6.2)
42
+ listen (3.7.1)
43
43
  rb-fsevent (~> 0.10, >= 0.10.3)
44
44
  rb-inotify (~> 0.9, >= 0.9.10)
45
45
  lumberjack (1.2.8)
@@ -48,53 +48,59 @@ GEM
48
48
  notiffany (0.1.3)
49
49
  nenv (~> 0.1)
50
50
  shellany (~> 0.0)
51
- openssl (2.2.1)
52
- ipaddr
53
- parallel (1.21.0)
54
- parser (3.0.2.0)
51
+ openssl (3.0.1)
52
+ parallel (1.22.1)
53
+ parser (3.1.2.1)
55
54
  ast (~> 2.4.1)
56
55
  pry (0.14.1)
57
56
  coderay (~> 1.1)
58
57
  method_source (~> 1.0)
59
- rainbow (3.0.0)
58
+ rainbow (3.1.1)
60
59
  rake (13.0.6)
61
- rb-fsevent (0.11.0)
60
+ rb-fsevent (0.11.2)
62
61
  rb-inotify (0.10.1)
63
62
  ffi (~> 1.0)
64
- regexp_parser (2.1.1)
63
+ regexp_parser (2.5.0)
65
64
  rexml (3.2.5)
66
65
  rlp (0.7.3)
67
- rspec (3.10.0)
68
- rspec-core (~> 3.10.0)
69
- rspec-expectations (~> 3.10.0)
70
- rspec-mocks (~> 3.10.0)
71
- rspec-core (3.10.1)
72
- rspec-support (~> 3.10.0)
73
- rspec-expectations (3.10.1)
66
+ rspec (3.11.0)
67
+ rspec-core (~> 3.11.0)
68
+ rspec-expectations (~> 3.11.0)
69
+ rspec-mocks (~> 3.11.0)
70
+ rspec-core (3.11.0)
71
+ rspec-support (~> 3.11.0)
72
+ rspec-expectations (3.11.1)
74
73
  diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.10.0)
76
- rspec-mocks (3.10.2)
74
+ rspec-support (~> 3.11.0)
75
+ rspec-mocks (3.11.1)
77
76
  diff-lcs (>= 1.2.0, < 2.0)
78
- rspec-support (~> 3.10.0)
79
- rspec-support (3.10.3)
80
- rubocop (1.22.3)
77
+ rspec-support (~> 3.11.0)
78
+ rspec-support (3.11.1)
79
+ rubocop (1.36.0)
80
+ json (~> 2.3)
81
81
  parallel (~> 1.10)
82
- parser (>= 3.0.0.0)
82
+ parser (>= 3.1.2.1)
83
83
  rainbow (>= 2.2.2, < 4.0)
84
84
  regexp_parser (>= 1.8, < 3.0)
85
- rexml
86
- rubocop-ast (>= 1.12.0, < 2.0)
85
+ rexml (>= 3.2.5, < 4.0)
86
+ rubocop-ast (>= 1.20.1, < 2.0)
87
87
  ruby-progressbar (~> 1.7)
88
88
  unicode-display_width (>= 1.4.0, < 3.0)
89
- rubocop-ast (1.13.0)
90
- parser (>= 3.0.1.1)
89
+ rubocop-ast (1.21.0)
90
+ parser (>= 3.1.1.0)
91
91
  ruby-progressbar (1.11.0)
92
92
  shellany (0.0.1)
93
- thor (1.1.0)
94
- unicode-display_width (2.1.0)
93
+ simplecov (0.21.2)
94
+ docile (~> 1.1)
95
+ simplecov-html (~> 0.11)
96
+ simplecov_json_formatter (~> 0.1)
97
+ simplecov-html (0.12.3)
98
+ simplecov_json_formatter (0.1.4)
99
+ thor (1.2.1)
100
+ unicode-display_width (2.3.0)
95
101
 
96
102
  PLATFORMS
97
- x86_64-darwin-20
103
+ ruby
98
104
 
99
105
  DEPENDENCIES
100
106
  flow_client!
@@ -102,6 +108,7 @@ DEPENDENCIES
102
108
  rake (~> 13.0)
103
109
  rspec (~> 3.0)
104
110
  rubocop (~> 1.22)
111
+ simplecov
105
112
 
106
113
  BUNDLED WITH
107
- 2.2.26
114
+ 2.3.13
data/flow_client.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.description = "A Ruby client for the Flow blockchain"
12
12
  spec.homepage = "https://github.com/glucode/flow_client"
13
13
  spec.license = "MIT"
14
- spec.required_ruby_version = ">= 2.6.0"
14
+ spec.required_ruby_version = ">= 2.7.2"
15
15
 
16
16
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
17
17
 
@@ -29,12 +29,16 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
 
31
31
  # Uncomment to register a new dependency of your gem
32
- spec.add_dependency "grpc"
33
- spec.add_dependency "grpc-tools"
34
- spec.add_dependency "json"
35
- spec.add_dependency "openssl"
36
- spec.add_dependency "rlp"
32
+ spec.add_runtime_dependency "grpc", "~> 1.48.0"
33
+ spec.add_runtime_dependency "grpc-tools", "~> 1.48.0"
34
+ spec.add_runtime_dependency "json", "~> 2.6.2"
35
+ spec.add_runtime_dependency "openssl", "~> 3.0.0"
36
+ spec.add_runtime_dependency "rlp", "~> 0.7.3"
37
+
38
+ spec.add_development_dependency "simplecov"
37
39
 
38
40
  # For more information and examples about making a new gem, checkout our
39
41
  # guide at: https://bundler.io/guides/creating_gem.html
42
+
43
+ spec.platform = Gem::Platform::RUBY
40
44
  end
@@ -16,9 +16,9 @@ module FlowClient
16
16
  :payer_address,
17
17
  :authorizer_addresses,
18
18
  :address_aliases,
19
- :proposal_key
20
-
21
- attr_reader :envelope_signatures, :payload_signatures
19
+ :proposal_key,
20
+ :envelope_signatures,
21
+ :payload_signatures
22
22
 
23
23
  def initialize
24
24
  @authorizer_addresses = []
@@ -105,7 +105,7 @@ module FlowClient
105
105
  end
106
106
 
107
107
  protected
108
-
108
+
109
109
  def resolved_script
110
110
  FlowClient::Utils.substitute_address_aliases(@script, @address_aliases)
111
111
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlowClient
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
data/template.md CHANGED
@@ -706,7 +706,7 @@ signer = FlowClient::LocalSigner.new("4d9287571c8bff7482ffc27ef68d5b4990f9bd009a
706
706
  # Generate a public key for the new account
707
707
  _private_key, public_key = FlowClient::Crypto.generate_key_pair(FlowClient::Crypto::Curves::P256)
708
708
  # Create the account
709
- res = client.create_account([public_key], { "ContractName": "<contract cadence code>" }, payer_account, signer)
709
+ new_account = client.create_account([public_key], { "ContractName": "<contract cadence code>" }, payer_account, signer)
710
710
  ```
711
711
 
712
712
  ```ruby
@@ -722,7 +722,8 @@ After the account creation transaction has been submitted you can retrieve the n
722
722
  The new account address will be emitted in a system-level `flow.AccountCreated` event.
723
723
 
724
724
  ```ruby
725
- res.address
725
+ new_account = client.create_account([public_key], { "ContractName": "<contract cadence code>" }, payer_account, signer)
726
+ new_account.address
726
727
  ```
727
728
 
728
729
  ### Generate Keys
metadata CHANGED
@@ -1,79 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flow_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico du Plessis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2022-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.48.0
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: '0'
26
+ version: 1.48.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: grpc-tools
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.48.0
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: 1.48.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 2.6.2
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: 2.6.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: openssl
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 3.0.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'
68
+ version: 3.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rlp
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.7.3
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.7.3
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: '0'
76
- type: :runtime
90
+ type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
@@ -164,14 +178,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
178
  requirements:
165
179
  - - ">="
166
180
  - !ruby/object:Gem::Version
167
- version: 2.6.0
181
+ version: 2.7.2
168
182
  required_rubygems_version: !ruby/object:Gem::Requirement
169
183
  requirements:
170
184
  - - ">="
171
185
  - !ruby/object:Gem::Version
172
186
  version: '0'
173
187
  requirements: []
174
- rubygems_version: 3.2.15
188
+ rubygems_version: 3.3.20
175
189
  signing_key:
176
190
  specification_version: 4
177
191
  summary: A Ruby client for the Flow blockchain