diff --git a/bin/silkaj b/bin/silkaj index 542ff7fb85067ce74b4d21f0c8108490055570be..ad32119eb80b5aa97412f9caaa6ea4734fa24356 100755 --- a/bin/silkaj +++ b/bin/silkaj @@ -1,5 +1,22 @@ #!/usr/bin/env python3 +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from sys import exit from silkaj.cli_tools import manage_cmd diff --git a/silkaj/__init__.py b/silkaj/__init__.py index 775d1576f8ea4c5ea3ed9820688908fc98e61d45..4a5c4f335e52065aeb987eceb717dc24989d726a 100644 --- a/silkaj/__init__.py +++ b/silkaj/__init__.py @@ -1 +1,18 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + name = "silkaj" diff --git a/silkaj/auth.py b/silkaj/auth.py index e9c336f133dce43d4249156bfcd5be7f8fbe7b02..3025265a402cb0adab9334ba5a522ad89456d129 100644 --- a/silkaj/auth.py +++ b/silkaj/auth.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from silkaj.crypto_tools import get_publickey_from_seed, b58_decode, xor_bytes from silkaj.tools import message_exit from nacl import encoding diff --git a/silkaj/blockchain_tools.py b/silkaj/blockchain_tools.py index 3698bd3dccf1ac2b59e57ab1d7f466af7103c8a3..fb7ad8cb6c019beb176296575d1c2e3343fcde53 100644 --- a/silkaj/blockchain_tools.py +++ b/silkaj/blockchain_tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from silkaj.network_tools import get_request diff --git a/silkaj/cert.py b/silkaj/cert.py index f821cc1f4dc3f104fe4b04da2bd1145dc00cdac9..c2ae84ebafec0751dab57cc07b632fea5fcf5381 100644 --- a/silkaj/cert.py +++ b/silkaj/cert.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + import urllib from time import time from tabulate import tabulate diff --git a/silkaj/cli_tools.py b/silkaj/cli_tools.py index e2e7d9c7bce14fae320f2871d5da0adb2e244fce..4633ef233a4791f8bc208ed8b50c63be2fb419d4 100644 --- a/silkaj/cli_tools.py +++ b/silkaj/cli_tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + # -*- coding: utf-8 -*- import click @@ -42,8 +59,7 @@ from silkaj.constants import ( "--auth-scrypt", is_flag=True, help="Scrypt authentication: default method" ) @click.option( - "--nrp", - help="Scrypt parameters seperated by commas: defaults N,r,p: 4096,16,1", + "--nrp", help="Scrypt parameters seperated by commas: defaults N,r,p: 4096,16,1" ) @click.option( "--auth-file", is_flag=True, help="Authentication file. Defaults to: './authfile'" @@ -52,9 +68,7 @@ from silkaj.constants import ( @click.option("--auth-seed", is_flag=True, help="Seed authentication") @click.option("--auth-wif", is_flag=True, help="WIF and EWIF authentication methods") @click.pass_context -def cli( - ctx, peer, gtest, auth_scrypt, nrp, auth_file, file, auth_seed, auth_wif -): +def cli(ctx, peer, gtest, auth_scrypt, nrp, auth_file, file, auth_seed, auth_wif): ctx.obj = dict() ctx.ensure_object(dict) ctx.obj["PEER"] = peer @@ -89,9 +103,7 @@ def cliArgos(): argos_info() -@cli.command( - "authfile", help="Generate file to store the seed of the account" -) +@cli.command("authfile", help="Generate file to store the seed of the account") @click.option("--file", help="Path file") def cliGenerateAuthFile(file): generate_auth_file(file) diff --git a/silkaj/commands.py b/silkaj/commands.py index 89c9499aa2f165786e7ad1cd5244852121e1586e..ed985d758ad2c79cff6335eb5c91ad341d37462d 100644 --- a/silkaj/commands.py +++ b/silkaj/commands.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from datetime import datetime from time import sleep from os import system, popen diff --git a/silkaj/constants.py b/silkaj/constants.py index 9f61e5b0795b85b17e2cdb5ef9e97522cbc0b474..3a879f3813288c3bcb81f7eb044424d1b14d041d 100644 --- a/silkaj/constants.py +++ b/silkaj/constants.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + SILKAJ_VERSION = "0.6.4" NO_MATCHING_ID = "No matching identity" G1_SYMBOL = "Ğ1" diff --git a/silkaj/crypto_tools.py b/silkaj/crypto_tools.py index d9dad99134e7019dda64c2948096c0b44f466486..2951d94019aaaec12bfe2277c852952b718a9cb0 100644 --- a/silkaj/crypto_tools.py +++ b/silkaj/crypto_tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from nacl import encoding, signing, hash, bindings from re import compile, search diff --git a/silkaj/license.py b/silkaj/license.py index cb0a19e792c97bfe4f7c56eec40cf84d3f00168f..55467fd85e930861a61816e4ac260b21fdb2c0ae 100644 --- a/silkaj/license.py +++ b/silkaj/license.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + import webbrowser from pydoc import pager from sys import exit diff --git a/silkaj/money.py b/silkaj/money.py index 87cff6021753d6890ff61125965297e191593b46..c6b9342461c3e12ec92ce1942425eaab90828a39 100644 --- a/silkaj/money.py +++ b/silkaj/money.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + import click from silkaj.network_tools import get_request, HeadBlock from silkaj.crypto_tools import get_publickey_from_seed diff --git a/silkaj/network_tools.py b/silkaj/network_tools.py index 85e9860601c85054d8cd63dbc033e74c1ac58d64..8784fd13ae7758bbdf758b0210834beb7950a67f 100644 --- a/silkaj/network_tools.py +++ b/silkaj/network_tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from __future__ import unicode_literals from ipaddress import ip_address from json import loads diff --git a/silkaj/tools.py b/silkaj/tools.py index cf5f700a76d75bee0d81603c1ce89a0355069941..aa7355de79c845355dfc120383e6e2696b82ed3c 100644 --- a/silkaj/tools.py +++ b/silkaj/tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from datetime import datetime from sys import exit diff --git a/silkaj/tx.py b/silkaj/tx.py index 89bc50b7fdf7e4ae01cea24eb63badb77e7e2207..0e37d6f3d470273f328273da97783c781d35c73f 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from re import compile, search import math from time import sleep diff --git a/silkaj/wot.py b/silkaj/wot.py index db926b3bf421a56771caed93b96234e84cc8565b..4d1b25e8efbee0611897f4e6be6a4538447892d2 100644 --- a/silkaj/wot.py +++ b/silkaj/wot.py @@ -1,3 +1,20 @@ +""" +Copyright 2016-2019 Maël Azimi <m.a@moul.re> + +Silkaj is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Silkaj is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with Silkaj. If not, see <https://www.gnu.org/licenses/>. +""" + from time import time from tabulate import tabulate from collections import OrderedDict