harmony-api 0.1.2 → 0.1.3
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/harmony/api/v1/client.rb +1 -0
- data/lib/harmony/api/v1/contracts/contract.rb +2 -2
- data/lib/harmony/api/v1/cross_sharding/cross_shard.rb +3 -3
- data/lib/harmony/api/v1/filters/filter.rb +5 -5
- data/lib/harmony/api/v1/logs/log.rb +1 -1
- data/lib/harmony/api/v1/staking/transaction.rb +2 -2
- data/lib/harmony/api/v1/staking/utility.rb +1 -1
- data/lib/harmony/api/v1/transactions/error.rb +1 -1
- data/lib/harmony/api/version.rb +1 -1
- data/lib/harmony/api.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a791e91f0d85db68948698f39978e0755c8d7ea87c651c53b46a92108ec41cd1
|
4
|
+
data.tar.gz: 6c2be4817ad70e4036f1d4c8b9fc3a3331ead5898d871affe62da53c465a8329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15cc179f9e1fe5966630a27d4f819e3ecdd265febfbbcedf56a6eaa77b24ae6645982d631c345eba9d94d0fcda120ea973dd7a956a2e5a897414032873299325
|
7
|
+
data.tar.gz: dd3282020d57d77d866c5a56c169789e6e54fbc0cd4a99dfe2a680522db8b653d598434e87c3a86a6d849ee47c3799e2dd86ace3f61b439f6b60047a1487ae12
|
data/README.md
CHANGED
@@ -17,6 +17,7 @@ module Harmony
|
|
17
17
|
include ::Harmony::Api::V1::Transactions::Error
|
18
18
|
include ::Harmony::Api::V1::Staking::Validator
|
19
19
|
include ::Harmony::Api::V1::Staking::Delegator
|
20
|
+
include ::Harmony::Api::V1::Staking::Transaction
|
20
21
|
include ::Harmony::Api::V1::Staking::Utility
|
21
22
|
include ::Harmony::Api::V1::Staking::Error
|
22
23
|
include ::Harmony::Api::V1::Contracts::Contract
|
@@ -18,13 +18,13 @@ module Harmony
|
|
18
18
|
# call contract method
|
19
19
|
def call(address)
|
20
20
|
params = [{ to: address }, 'latest']
|
21
|
-
response(post('
|
21
|
+
response(post('call', params: params))
|
22
22
|
end
|
23
23
|
|
24
24
|
# get deployed contract's byte code
|
25
25
|
def get_code(address)
|
26
26
|
params = [address, 'latest']
|
27
|
-
response(post('
|
27
|
+
response(post('getCode', params: params))
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -20,15 +20,15 @@ module Harmony
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def get_pending_cx_receipts
|
23
|
-
response(post('
|
23
|
+
response(post('getPendingCXReceipts'))
|
24
24
|
end
|
25
25
|
|
26
26
|
def get_cx_receipt_by_hash(hash)
|
27
|
-
response(post('
|
27
|
+
response(post('getCXReceiptByHash', params: [hash]))
|
28
28
|
end
|
29
29
|
|
30
30
|
def resend_cx(hash)
|
31
|
-
response(post('
|
31
|
+
response(post('resendCx', params: [hash]))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -9,25 +9,25 @@ module Harmony
|
|
9
9
|
# If the filter could not be found an empty array of logs is returned.
|
10
10
|
def get_filter_logs(filter_id)
|
11
11
|
params = [Harmony::Api::Utilities.int_to_hex(filter_id)]
|
12
|
-
response(post('
|
12
|
+
response(post('getFilterLogs', params: params))
|
13
13
|
end
|
14
14
|
|
15
15
|
def get_filter_changes(filter_id)
|
16
16
|
params = [Harmony::Api::Utilities.int_to_hex(filter_id)]
|
17
|
-
response(post('
|
17
|
+
response(post('getFilterChanges', params: params))
|
18
18
|
end
|
19
19
|
|
20
20
|
def new_filter(block_hash)
|
21
|
-
response(post('
|
21
|
+
response(post('newFilter', params: [block_hash]))
|
22
22
|
end
|
23
23
|
|
24
24
|
def new_pending_transaction_filter(topics: [])
|
25
25
|
params = [{ topics: topics }]
|
26
|
-
response(post('
|
26
|
+
response(post('newPendingTransactionFilter', params: params))
|
27
27
|
end
|
28
28
|
|
29
29
|
def new_block_filter(_block_hash)
|
30
|
-
response(post('
|
30
|
+
response(post('newBlockFilter'))
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -9,13 +9,13 @@ module Harmony
|
|
9
9
|
response(post('sendRawStakingTransaction', params: [hash]))
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def get_staking_transaction_by_hash(hash)
|
13
13
|
response(post('getStakingTransactionByHash', params: [hash]))
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_staking_transaction_by_block_number_and_index(block_number, index)
|
17
17
|
params = [Harmony::Api::Utilities.int_to_hex(block_number), Harmony::Api::Utilities.int_to_hex(index)]
|
18
|
-
response(post('
|
18
|
+
response(post('getStakingTransactionByBlockNumberAndIndex', params: params))
|
19
19
|
end
|
20
20
|
|
21
21
|
def get_staking_transaction_by_block_hash_and_index(hash, index)
|
data/lib/harmony/api/version.rb
CHANGED
data/lib/harmony/api.rb
CHANGED
@@ -19,6 +19,7 @@ require 'harmony/api/v1/transactions/transaction'
|
|
19
19
|
require 'harmony/api/v1/transactions/error'
|
20
20
|
require 'harmony/api/v1/staking/validator'
|
21
21
|
require 'harmony/api/v1/staking/delegator'
|
22
|
+
require 'harmony/api/v1/staking/transaction'
|
22
23
|
require 'harmony/api/v1/staking/utility'
|
23
24
|
require 'harmony/api/v1/staking/error'
|
24
25
|
require 'harmony/api/v1/contracts/contract'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harmony-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Johnsson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|