ark-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ark/client/block.rb +1 -1
- data/lib/ark/client/delegate.rb +9 -9
- data/lib/ark/client/multisignature.rb +1 -1
- data/lib/ark/client/peer.rb +1 -1
- data/lib/ark/client/transaction.rb +2 -2
- data/lib/ark/configurable.rb +0 -1
- data/lib/ark/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e62fcaebc0560c5fdff792fb6cb5fca12121dc3
|
4
|
+
data.tar.gz: 1a9ca145747901c2a6c39cf81db84811a3c6aeae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '099aa916715bb20d1ed7a3b5b5710092e875e308bed7ed4f3cf5537f84527ae861540cbb6ae3bdc2fed341d627081154b177087ff8689e9ae50718cb49da7e36'
|
7
|
+
data.tar.gz: ef043d00b539854894e3663944436846d042eb26549ed607f066652aa61e87cad8c053011fe3cae0a90a0ddb6c07bcf8574039e7f5d1b3059933569a2ad9f761
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
## Development
|
21
21
|
|
22
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then,
|
22
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, copy and edit the contents of the `.env.example` file into a file called `.env`. This file represents your network and account details. You can then run the tests using `rake spec`. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
23
23
|
|
24
24
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
25
25
|
|
data/lib/ark/client/block.rb
CHANGED
data/lib/ark/client/delegate.rb
CHANGED
@@ -5,19 +5,19 @@ module Ark
|
|
5
5
|
get('api/delegates/count')
|
6
6
|
end
|
7
7
|
|
8
|
-
def search_delegates(q, parameters
|
8
|
+
def search_delegates(q, parameters = {})
|
9
9
|
get('api/delegates/search', {q: q}.merge(parameters))
|
10
10
|
end
|
11
11
|
|
12
|
-
def delegate_voters(publicKey, parameters
|
12
|
+
def delegate_voters(publicKey, parameters = {})
|
13
13
|
get('api/delegates/voters', {publicKey: publicKey}.merge(parameters))
|
14
14
|
end
|
15
15
|
|
16
|
-
def delegate(parameters
|
16
|
+
def delegate(parameters = {})
|
17
17
|
get('api/delegates/get', parameters)
|
18
18
|
end
|
19
19
|
|
20
|
-
def delegates(parameters
|
20
|
+
def delegates(parameters = {})
|
21
21
|
get('api/delegates', parameters)
|
22
22
|
end
|
23
23
|
|
@@ -29,7 +29,7 @@ module Ark
|
|
29
29
|
get('api/delegates/forging/getForgedByAccount', {generatorPublicKey: generatorPublicKey})
|
30
30
|
end
|
31
31
|
|
32
|
-
def create_delegate(secret, username, secondSecret
|
32
|
+
def create_delegate(secret, username, secondSecret = nil)
|
33
33
|
transaction = buildTransaction(
|
34
34
|
'delegate.createDelegate', {
|
35
35
|
:secret => secret,
|
@@ -40,7 +40,7 @@ module Ark
|
|
40
40
|
post('peer/transactions', {:transactions => [transaction]})
|
41
41
|
end
|
42
42
|
|
43
|
-
def vote_for_delegate(secret, delegates, secondSecret
|
43
|
+
def vote_for_delegate(secret, delegates, secondSecret = nil)
|
44
44
|
transaction = buildTransaction(
|
45
45
|
'vote.createVote', {
|
46
46
|
:secret => secret,
|
@@ -55,15 +55,15 @@ module Ark
|
|
55
55
|
get('api/delegates/getNextForgers')
|
56
56
|
end
|
57
57
|
|
58
|
-
def enable_forging(secret, parameters
|
58
|
+
def enable_forging(secret, parameters = {})
|
59
59
|
post('api/delegates/forging/enable', {:secret => secret}.merge(parameters))
|
60
60
|
end
|
61
61
|
|
62
|
-
def disable_forging(secret, parameters
|
62
|
+
def disable_forging(secret, parameters = {})
|
63
63
|
post('api/delegates/forging/disable', {:secret => secret}.merge(parameters))
|
64
64
|
end
|
65
65
|
|
66
|
-
def forging_status(publicKey, parameters
|
66
|
+
def forging_status(publicKey, parameters = {})
|
67
67
|
post('api/delegates/forging/disable', {:publicKey => publicKey}.merge(parameters))
|
68
68
|
end
|
69
69
|
end
|
@@ -5,7 +5,7 @@ module Ark
|
|
5
5
|
get('api/multisignatures/pending', {:publicKey => publicKey})
|
6
6
|
end
|
7
7
|
|
8
|
-
def multi_signature_sign(transactionId, secret, parameters
|
8
|
+
def multi_signature_sign(transactionId, secret, parameters = {})
|
9
9
|
post('api/multisignatures/sign', {:transactionId => transactionId, :secret => secret}.merge(parameters))
|
10
10
|
end
|
11
11
|
|
data/lib/ark/client/peer.rb
CHANGED
@@ -5,7 +5,7 @@ module Ark
|
|
5
5
|
get('api/transactions/get', {:id => id})
|
6
6
|
end
|
7
7
|
|
8
|
-
def transactions(parameters
|
8
|
+
def transactions(parameters = {})
|
9
9
|
get('api/transactions', parameters)
|
10
10
|
end
|
11
11
|
|
@@ -13,7 +13,7 @@ module Ark
|
|
13
13
|
get('api/transactions/unconfirmed/get', {:id => id})
|
14
14
|
end
|
15
15
|
|
16
|
-
def unconfirmed_transactions(parameters
|
16
|
+
def unconfirmed_transactions(parameters = {})
|
17
17
|
get('api/transactions/unconfirmed', parameters)
|
18
18
|
end
|
19
19
|
|
data/lib/ark/configurable.rb
CHANGED
data/lib/ark/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ark-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Faust
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
175
|
+
rubygems_version: 2.5.2
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: An Ark Client for Ruby
|