tezos_client 0.3.4 → 0.3.5
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tezos_client.rb +16 -0
- data/lib/tezos_client/operations/reveal_operation.rb +28 -0
- data/lib/tezos_client/rpc_interface/helper.rb +12 -0
- data/lib/tezos_client/version.rb +1 -1
- 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: 7d1d6790b992b28425dfb31b5adf2ac4a8be51e795d4904a6fe9431a1d9b6cf4
|
4
|
+
data.tar.gz: 339f4a6d1b663ec0cf8260de0643d4ff2301c36a1004826c371f212bc89d38af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1258f27f5abca93ac30b74cee05b1cbeaa1ef4502f97fa862d08b981943d7e80dcc07c6a3246014915cd020afabf970bc5e46e71ce1aa581a0461528037579dc
|
7
|
+
data.tar.gz: 64914a51eef3383745247d0681ed5fcdfbb9115d614d718a950efcf247fdeb9af7c4f64eb159c93ecc5ae6f29c37bebea7bebbd43d6e48682f24d3738f6309a7
|
data/Gemfile.lock
CHANGED
data/lib/tezos_client.rb
CHANGED
@@ -17,6 +17,7 @@ require "tezos_client/operations/origination_operation"
|
|
17
17
|
require "tezos_client/operations/transaction_operation"
|
18
18
|
require "tezos_client/operations/transactions_operation"
|
19
19
|
require "tezos_client/operations/activate_account_operation"
|
20
|
+
require "tezos_client/operations/reveal_operation"
|
20
21
|
|
21
22
|
require "tezos_client/client_interface"
|
22
23
|
require "tezos_client/rpc_interface"
|
@@ -127,6 +128,21 @@ class TezosClient
|
|
127
128
|
).test_and_broadcast
|
128
129
|
end
|
129
130
|
|
131
|
+
def reveal_pubkey(secret_key:, **args)
|
132
|
+
|
133
|
+
public_key = secret_key_to_public_key(secret_key)
|
134
|
+
from = public_key_to_address(public_key)
|
135
|
+
|
136
|
+
RevealOperation.new(
|
137
|
+
liquidity_interface: liquidity_interface,
|
138
|
+
rpc_interface: rpc_interface,
|
139
|
+
public_key: public_key,
|
140
|
+
from: from,
|
141
|
+
secret_key: secret_key,
|
142
|
+
**args
|
143
|
+
).test_and_broadcast
|
144
|
+
end
|
145
|
+
|
130
146
|
def call_contract(args)
|
131
147
|
parameters = args.fetch(:parameters)
|
132
148
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class TezosClient
|
2
|
+
class RevealOperation < Operation
|
3
|
+
|
4
|
+
def initialize_operation_args
|
5
|
+
@operation_args = default_args.merge(
|
6
|
+
**@init_args,
|
7
|
+
operation_kind: operation_kind,
|
8
|
+
branch: branch,
|
9
|
+
counter: counter
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
def operation_kind
|
15
|
+
:reveal
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def default_args
|
21
|
+
{
|
22
|
+
gas_limit: 0.1,
|
23
|
+
storage_limit: 0,
|
24
|
+
fee: 0.05
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -62,6 +62,18 @@ class TezosClient
|
|
62
62
|
}
|
63
63
|
end
|
64
64
|
|
65
|
+
def reveal_operation(args)
|
66
|
+
{
|
67
|
+
kind: "reveal",
|
68
|
+
source: args.fetch(:from),
|
69
|
+
fee: args.fetch(:fee).to_satoshi.to_s,
|
70
|
+
counter: args.fetch(:counter).to_s,
|
71
|
+
gas_limit: args.fetch(:gas_limit).to_satoshi.to_s,
|
72
|
+
storage_limit: args.fetch(:storage_limit).to_satoshi.to_s,
|
73
|
+
public_key: args.fetch(:public_key)
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
65
77
|
def operation(args)
|
66
78
|
operation_kind = args.fetch(:operation_kind) { raise ArgumentError, ":operation_kind argument missing" }
|
67
79
|
send("#{operation_kind}_operation", args)
|
data/lib/tezos_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tezos_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre Michard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- lib/tezos_client/operation.rb
|
230
230
|
- lib/tezos_client/operations/activate_account_operation.rb
|
231
231
|
- lib/tezos_client/operations/origination_operation.rb
|
232
|
+
- lib/tezos_client/operations/reveal_operation.rb
|
232
233
|
- lib/tezos_client/operations/transaction_operation.rb
|
233
234
|
- lib/tezos_client/operations/transactions_operation.rb
|
234
235
|
- lib/tezos_client/rpc_interface.rb
|