From 9cf4e4babdc7cb8e4cdbcc0afd29584c6ce18306 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Mon, 7 Jan 2019 17:11:15 +0100 Subject: [PATCH] =?UTF-8?q?[enh]=20#132:=C2=A0Add=20a=20license=20notice?= =?UTF-8?q?=20as=20a=20header=20of=20every=20source=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/silkaj | 17 +++++++++++++++++ silkaj/__init__.py | 17 +++++++++++++++++ silkaj/auth.py | 17 +++++++++++++++++ silkaj/blockchain_tools.py | 17 +++++++++++++++++ silkaj/cert.py | 17 +++++++++++++++++ silkaj/cli_tools.py | 28 ++++++++++++++++++++-------- silkaj/commands.py | 17 +++++++++++++++++ silkaj/constants.py | 17 +++++++++++++++++ silkaj/crypto_tools.py | 17 +++++++++++++++++ silkaj/license.py | 17 +++++++++++++++++ silkaj/money.py | 17 +++++++++++++++++ silkaj/network_tools.py | 17 +++++++++++++++++ silkaj/tools.py | 17 +++++++++++++++++ silkaj/tx.py | 17 +++++++++++++++++ silkaj/wot.py | 17 +++++++++++++++++ 15 files changed, 258 insertions(+), 8 deletions(-) diff --git a/bin/silkaj b/bin/silkaj index 542ff7fb..ad32119e 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 775d1576..4a5c4f33 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 e9c336f1..3025265a 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 3698bd3d..fb7ad8cb 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 f821cc1f..c2ae84eb 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 e2e7d9c7..4633ef23 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 89c9499a..ed985d75 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 9f61e5b0..3a879f38 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 d9dad991..2951d940 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 cb0a19e7..55467fd8 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 87cff602..c6b93424 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 85e98606..8784fd13 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 cf5f700a..aa7355de 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 89bc50b7..0e37d6f3 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 db926b3b..4d1b25e8 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 -- GitLab