-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major changes to switch-keys uploading to make it easier to test on r…
…emote servers.
- Loading branch information
1 parent
21e0727
commit 2216850
Showing
6 changed files
with
214 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
path_to_cli_wallet = | ||
|
||
wallet_password = | ||
|
||
remote_ws = "ws:// | ||
|
||
private_active_key = | ||
|
||
witnessname = | ||
|
||
producer_number = | ||
|
||
rpc_port = "8093" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import sys | ||
import json | ||
from grapheneapi import GrapheneWebsocket, GrapheneWebsocketProtocol | ||
import time | ||
import config | ||
import subprocess | ||
|
||
rpc = GrapheneWebsocket("localhost", config.rpc_port, "", "") | ||
local_port = "127.0.0.1:" + config.rpc_port | ||
|
||
def openProducer(): | ||
subprocess.call(["screen","-dmS","wallet"+config.producer_number,config.path_to_cli_wallet,"-H",local_port,"-s",config.remote_ws]) | ||
|
||
def unlockWallet(): | ||
rpc.unlock(config.wallet_password) | ||
|
||
def setPassword(): | ||
rpc.set_password(config.wallet_password) | ||
|
||
def importActiveKey(): | ||
rpc.import_key(config.witnessname, config.private_active_key) | ||
|
||
def getSigningKey(): | ||
witness = rpc.get_witness(config.witnessname) | ||
signingKey = witness["signing-key"] | ||
return signingKey | ||
|
||
def setSigningKey(signingKey): | ||
rpc.update_witness(config.witnessname,"",signingKey,"true") | ||
|
||
|
||
def info(): | ||
info = rpc.info() | ||
part = info["participation"] | ||
return part |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
path_to_cli_wallet = | ||
|
||
wallet_password = | ||
|
||
remote_ws = "ws:// | ||
|
||
private_active_key = | ||
|
||
witnessname = | ||
|
||
producer_number = 2 | ||
|
||
rpc_port = "8094" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import sys | ||
import json | ||
from grapheneapi import GrapheneWebsocket, GrapheneWebsocketProtocol | ||
import time | ||
import config | ||
import subprocess | ||
|
||
rpc = GrapheneWebsocket("localhost", config.rpc_port, "", "") | ||
local_port = "127.0.0.1:" + config.rpc_port | ||
|
||
def openProducer(): | ||
subprocess.call(["screen","-dmS","wallet"+config.producer_number,config.path_to_cli_wallet,"-H",local_port,"-s",config.remote_ws]) | ||
|
||
def unlockWallet(): | ||
rpc.unlock(config.wallet_password) | ||
|
||
def setPassword(): | ||
rpc.set_password(config.wallet_password) | ||
|
||
def importActiveKey(): | ||
rpc.import_key(config.witnessname, config.private_active_key) | ||
|
||
def getSigningKey(): | ||
witness = rpc.get_witness(config.witnessname) | ||
signingKey = witness["signing-key"] | ||
return signingKey | ||
|
||
def setSigningKey(signingKey): | ||
rpc.update_witness(config.witnessname,"",signingKey,"true") | ||
|
||
|
||
def info(): | ||
info = rpc.info() | ||
part = info["participation"] | ||
return part |
Oops, something went wrong.