Skip to content
Snippets Groups Projects
Commit d067f7d1 authored by Moul's avatar Moul
Browse files

Merge branch '100_pip_install' into 'dev'

100 pip install

See merge request !80
parents 4a4d80ae d0bab244
No related branches found
No related tags found
1 merge request!80100 pip install
File moved
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sys import stderr
from commandlines import Command
from tx import send_transaction
from money import cmd_amount
from cert import send_certification
from commands import currency_info, difficulties, set_network_sort_keys,\
from silkaj.tx import send_transaction
from silkaj.money import cmd_amount
from silkaj.cert import send_certification
from silkaj.commands import currency_info, difficulties, set_network_sort_keys,\
network_info, argos_info, list_issuers
from tools import message_exit
from network_tools import check_port, best_node
from wot import received_sent_certifications, id_pubkey_correspondence
from auth import generate_auth_file
from license import display_license
from constants import SILKAJ_VERSION, G1_SYMBOL, GTEST_SYMBOL, G1_DEFAULT_ENDPOINT, G1_TEST_DEFAULT_ENDPOINT
from silkaj.tools import message_exit
from silkaj.wot import received_sent_certifications, id_pubkey_correspondence
from silkaj.auth import generate_auth_file
from silkaj.license import display_license
from silkaj.constants import SILKAJ_VERSION, G1_SYMBOL, GTEST_SYMBOL, G1_DEFAULT_ENDPOINT, G1_TEST_DEFAULT_ENDPOINT
def usage():
message_exit("Silkaj: command line client for Duniter currencies\
\n\nhelp: -h, --help, --usage \
\nnersion: -v, --version \
\nversion: -v, --version \
\nabout: display informations about the programm\
\n \
\nEndpoint:\
......@@ -98,7 +96,7 @@ def cli():
return ep, cli_args
def manage_cmd(ep, c):
def manage_cmd(ep, cli_args):
if cli_args.subcmd == "about":
about()
......@@ -128,7 +126,7 @@ def manage_cmd(ep, c):
send_transaction(ep, cli_args)
elif cli_args.subcmd == "cert":
send_certification(ep, c)
send_certification(ep, cli_args)
elif cli_args.subcmd == "generate_auth_file":
generate_auth_file(cli_args)
......@@ -153,7 +151,7 @@ def about():
\n @@ @@@ @@@@@@@@@# @@@@ @@(\
\n @@ @@@@ @@@@@@@@@ @@@ @@ Built in Python for Duniter’s currencies: Ğ1 and Ğ1-Test\
\n @@ @@@ @@@@@@@@ @ @@@ @@\
\n @@ @@@ @@@@@@ @@@@ @@ @@ Authors: Moul, Tortue, Jytou\
\n @@ @@@ @@@@@@ @@@@ @@ @@ Authors: moul, tortue, jytou, cebash, cgeek\
\n @@ @@@@ @@@ @@@@@@@ @@ @@\
\n @@ @@@@* @@@@@@@@@ @# @@ Website: https://silkaj.duniter.org\
\n @@ @@@@@ @@@@@@@@@@ @ ,@@\
......@@ -164,8 +162,3 @@ def about():
\n @@@@@@@@@@@@@@@\n")
if __name__ == '__main__':
ep, cli_args = cli()
check_port(ep["port"])
best_node(ep, 1)
manage_cmd(ep, cli_args)
......@@ -3,7 +3,7 @@ from nacl import encoding, signing, hash, bindings
from re import compile, search
from sys import exit
from constants import G1_SYMBOL, GTEST_SYMBOL
from silkaj.constants import G1_SYMBOL, GTEST_SYMBOL
def convert_time(timestamp, kind):
......
......@@ -4,13 +4,13 @@ from time import sleep
import urllib
from tabulate import tabulate
from network_tools import get_request, post_request, get_current_block
from tools import get_currency_symbol, get_publickey_from_seed, sign_document_from_seed,\
from silkaj.network_tools import get_request, post_request, get_current_block
from silkaj.tools import get_currency_symbol, get_publickey_from_seed, sign_document_from_seed,\
check_public_key, message_exit
from auth import auth_method
from wot import get_uid_from_pubkey
from money import get_last_ud_value, get_amount_from_pubkey
from constants import NO_MATCHING_ID
from silkaj.auth import auth_method
from silkaj.wot import get_uid_from_pubkey
from silkaj.money import get_last_ud_value, get_amount_from_pubkey
from silkaj.constants import NO_MATCHING_ID
def send_transaction(ep, cli_args):
......
......@@ -3,9 +3,9 @@ from time import time
from tabulate import tabulate
from collections import OrderedDict
from network_tools import get_request
from tools import message_exit, check_public_key, convert_time
from constants import NO_MATCHING_ID
from silkaj.network_tools import get_request
from silkaj.tools import message_exit, check_public_key, convert_time
from silkaj.constants import NO_MATCHING_ID
def get_sent_certifications(certs, time_first_block, params):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment