Find issuer pubkey from dunikey with natools
This commit is contained in:
parent
a3b1049ecc
commit
cf07310837
7
pay.py
7
pay.py
|
@ -5,19 +5,20 @@ from shutil import copyfile
|
|||
if not os.path.isfile("userEnv.py"):
|
||||
copyfile("userEnv.py.template", "userEnv.py")
|
||||
from termcolor import colored
|
||||
from userEnv import issuer, dunikey, node
|
||||
from userEnv import dunikey, node
|
||||
from natools import fmt, sign, get_privkey
|
||||
from gql import gql, Client
|
||||
from gql.transport.aiohttp import AIOHTTPTransport
|
||||
|
||||
if not (issuer) or not (dunikey):
|
||||
print("Please set your pubkey and path to you pubsec keychain in userEnv.py file.")
|
||||
if not (dunikey):
|
||||
print("Please set the path to your pubsec keychain in userEnv.py file.")
|
||||
sys.exit(1)
|
||||
|
||||
# Define Duniter GVA node
|
||||
transport = AIOHTTPTransport(url=node)
|
||||
client = Client(transport=transport, fetch_schema_from_transport=True)
|
||||
|
||||
issuer = get_privkey(dunikey, "pubsec").pubkey
|
||||
recipient = sys.argv[1]
|
||||
amount = int(sys.argv[2])
|
||||
if len(sys.argv) > 3:
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
issuer = "" # Clé publique Ḡ1 de l'émetteur du message
|
||||
dunikey = "" # Chemin de la clé privé Ḡ1 de l'émetteur, au format PubSec
|
||||
node = "https://g1.librelois.fr/gva" # Noeud duniter ayant GVA activé
|
||||
|
|
Reference in New Issue