near_api 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/near_api/status.rb +25 -0
- data/lib/near_api/version.rb +1 -1
- data/lib/near_api.rb +7 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc403c86a44e7bd759b4c71d8bf7499fbf5145c06d2a680811e2dea09fd1dada
|
4
|
+
data.tar.gz: b72df18eee4fec70ccc3f500255fa933a391b29606f564fd4264983369c81311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba8d6c54f88f826e475105ff0bb64d59d57a35a0cdc3b196b69d43acddfcd3f9bbcd7af7eb6753704ca4b964f61fa13a0d21c280522de8f34fa55caad6cf2e4
|
7
|
+
data.tar.gz: 6d00755fa74f570b0acfbe51e64ca5e95c36b643a8c29509df0e6bcb0040de983ea638b319f927e1b9933581a551395257f56d11a92f3591b070ca330c6bbed6
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class NearApi::Status
|
4
|
+
def initialize(config = NearApi.config)
|
5
|
+
@api = NearApi::Api.new(config)
|
6
|
+
end
|
7
|
+
|
8
|
+
def transaction_status(transaction_hash, key: NearApi.key)
|
9
|
+
params = [transaction_hash, key.signer_id]
|
10
|
+
call_api('tx', params)
|
11
|
+
end
|
12
|
+
|
13
|
+
def final_transaction_status(transaction_hash, key: NearApi.key)
|
14
|
+
params = [transaction_hash, key.signer_id]
|
15
|
+
call_api('EXPERIMENTAL_tx_status', params)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
attr_reader :api
|
21
|
+
|
22
|
+
def call_api(method, params)
|
23
|
+
api.json_rpc(method, params)
|
24
|
+
end
|
25
|
+
end
|
data/lib/near_api/version.rb
CHANGED
data/lib/near_api.rb
CHANGED
@@ -3,14 +3,15 @@
|
|
3
3
|
require 'uri'
|
4
4
|
require 'net/https'
|
5
5
|
require 'json'
|
6
|
-
require
|
6
|
+
require 'base64'
|
7
7
|
require 'borsh'
|
8
|
-
require_relative
|
9
|
-
require_relative
|
10
|
-
require_relative
|
8
|
+
require_relative 'near_api/version'
|
9
|
+
require_relative 'near_api/key'
|
10
|
+
require_relative 'near_api/status'
|
11
|
+
require_relative 'near_api/action'
|
11
12
|
require_relative 'near_api/query'
|
12
|
-
require_relative
|
13
|
-
require_relative
|
13
|
+
require_relative 'near_api/action/function_call'
|
14
|
+
require_relative 'near_api/config'
|
14
15
|
require_relative 'near_api/api'
|
15
16
|
require_relative "near_api/base58"
|
16
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: near_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Serg Tyatin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: borsh-rb
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/near_api/config.rb
|
90
90
|
- lib/near_api/key.rb
|
91
91
|
- lib/near_api/query.rb
|
92
|
+
- lib/near_api/status.rb
|
92
93
|
- lib/near_api/version.rb
|
93
94
|
- near_api.gemspec
|
94
95
|
homepage: https://github.com/2rba/near_api
|