mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 06:04:21 +01:00
Removes apps folder
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,7 +7,7 @@ conf.py
|
|||||||
bitcoin.conf*
|
bitcoin.conf*
|
||||||
*__pycache__
|
*__pycache__
|
||||||
.pending*
|
.pending*
|
||||||
apps/cli/*.json
|
cli/*.json
|
||||||
appointments/
|
appointments/
|
||||||
test.py
|
test.py
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import apps.cli.conf as conf
|
import cli.conf as conf
|
||||||
from common.tools import extend_paths, check_conf_fields, setup_logging, setup_data_folder
|
from common.tools import extend_paths, check_conf_fields, setup_logging, setup_data_folder
|
||||||
|
|
||||||
LOG_PREFIX = "cli"
|
LOG_PREFIX = "cli"
|
||||||
@@ -10,8 +10,8 @@ from coincurve import PublicKey
|
|||||||
from getopt import getopt, GetoptError
|
from getopt import getopt, GetoptError
|
||||||
from requests import ConnectTimeout, ConnectionError
|
from requests import ConnectTimeout, ConnectionError
|
||||||
|
|
||||||
from apps.cli import config, LOG_PREFIX
|
from cli import config, LOG_PREFIX
|
||||||
from apps.cli.help import help_add_appointment, help_get_appointment
|
from cli.help import help_add_appointment, help_get_appointment
|
||||||
from common.blob import Blob
|
from common.blob import Blob
|
||||||
|
|
||||||
import common.cryptographer
|
import common.cryptographer
|
||||||
@@ -7,8 +7,16 @@ from cryptography.hazmat.primitives import serialization
|
|||||||
from cryptography.hazmat.primitives.asymmetric import ec
|
from cryptography.hazmat.primitives.asymmetric import ec
|
||||||
|
|
||||||
|
|
||||||
# Simple tool to generate an ECDSA private key using the secp256k1 curve and save private and public keys
|
"""
|
||||||
# as 'teos_sk.der' 'and teos_pk.der', respectively.
|
Simple too to generate an ECDSA key pair using the secp256k1 curve and store it on disk.
|
||||||
|
|
||||||
|
Default output dir = .
|
||||||
|
Default key naming = teos_sk.der and teos_pk.der
|
||||||
|
|
||||||
|
The output dir and naming can be changed using the -n and -d command line options, respectively.
|
||||||
|
|
||||||
|
DISCLAIMER: Use this for testing only, using keys generated from this file in production is highly unadvised.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def save_sk(sk, filename):
|
def save_sk(sk, filename):
|
||||||
@@ -30,7 +38,7 @@ def save_pk(pk, filename):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
name = "teos"
|
name = "teos"
|
||||||
output_dir = "."
|
output_dir = "apps"
|
||||||
|
|
||||||
opts, _ = getopt(argv[1:], "n:d:", ["name", "dir"])
|
opts, _ = getopt(argv[1:], "n:d:", ["name", "dir"])
|
||||||
for opt, arg in opts:
|
for opt, arg in opts:
|
||||||
@@ -11,8 +11,8 @@ from common.appointment import Appointment
|
|||||||
from common.cryptographer import Cryptographer
|
from common.cryptographer import Cryptographer
|
||||||
|
|
||||||
from common.blob import Blob
|
from common.blob import Blob
|
||||||
import apps.cli.teos_cli as teos_cli
|
import cli.teos_cli as teos_cli
|
||||||
from test.apps.cli.unit.conftest import get_random_value_hex
|
from test.cli.unit.conftest import get_random_value_hex
|
||||||
|
|
||||||
common.cryptographer.logger = Logger(actor="Cryptographer", log_name_prefix=teos_cli.LOG_PREFIX)
|
common.cryptographer.logger = Logger(actor="Cryptographer", log_name_prefix=teos_cli.LOG_PREFIX)
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ from riemann.tx import Tx
|
|||||||
|
|
||||||
|
|
||||||
from teos import HOST, PORT
|
from teos import HOST, PORT
|
||||||
from apps.cli import teos_cli
|
from cli import teos_cli
|
||||||
from common.blob import Blob
|
from common.blob import Blob
|
||||||
|
|
||||||
import common.cryptographer
|
import common.cryptographer
|
||||||
@@ -21,7 +21,7 @@ from test.teos.e2e.conftest import (
|
|||||||
create_penalty_tx,
|
create_penalty_tx,
|
||||||
run_teosd,
|
run_teosd,
|
||||||
)
|
)
|
||||||
from apps.cli import config as cli_conf
|
from cli import config as cli_conf
|
||||||
|
|
||||||
common.cryptographer.logger = Logger(actor="Cryptographer", log_name_prefix="")
|
common.cryptographer.logger = Logger(actor="Cryptographer", log_name_prefix="")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user