From 4a230c32b4e49e1a738b905a963185ac9dff02a8 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Mon, 21 Sep 2020 21:23:41 +0200 Subject: [PATCH] [doc] #111: Define the copyright and license statements (runtime) --- duniterpy/__init__.py | 32 ++++++++++++------------- duniterpy/api/bma/__init__.py | 34 +++++++++++++-------------- duniterpy/api/bma/blockchain.py | 34 +++++++++++++-------------- duniterpy/api/bma/network.py | 34 +++++++++++++-------------- duniterpy/api/bma/node.py | 34 +++++++++++++-------------- duniterpy/api/bma/tx.py | 34 +++++++++++++-------------- duniterpy/api/bma/ud.py | 34 +++++++++++++-------------- duniterpy/api/bma/wot.py | 34 +++++++++++++-------------- duniterpy/api/bma/ws.py | 35 ++++++++++++++-------------- duniterpy/api/client.py | 21 +++++++++++++---- duniterpy/api/endpoint.py | 17 ++++++++++++++ duniterpy/api/errors.py | 18 ++++++++++++++ duniterpy/api/ws2p/__init__.py | 34 +++++++++++++-------------- duniterpy/api/ws2p/network.py | 34 +++++++++++++-------------- duniterpy/api/ws2p/requests.py | 8 ++++--- duniterpy/constants.py | 17 ++++++++++++++ duniterpy/documents/__init__.py | 17 ++++++++++++++ duniterpy/documents/block.py | 17 ++++++++++++++ duniterpy/documents/block_uid.py | 17 ++++++++++++++ duniterpy/documents/certification.py | 17 ++++++++++++++ duniterpy/documents/crc_pubkey.py | 17 ++++++++++++++ duniterpy/documents/document.py | 17 ++++++++++++++ duniterpy/documents/identity.py | 17 ++++++++++++++ duniterpy/documents/membership.py | 16 +++++++++++-- duniterpy/documents/peer.py | 17 ++++++++++++++ duniterpy/documents/revocation.py | 17 ++++++++++++++ duniterpy/documents/transaction.py | 17 ++++++++++++++ duniterpy/documents/ws2p/heads.py | 17 ++++++++++++++ duniterpy/documents/ws2p/messages.py | 8 ++++--- duniterpy/grammars/output.py | 17 ++++++++++++++ duniterpy/helpers/money.py | 17 ++++++++++++++ duniterpy/helpers/ws2p.py | 8 ++++--- duniterpy/key/__init__.py | 17 ++++++++++++++ duniterpy/key/ascii_armor.py | 17 ++++++++++++++ duniterpy/key/base58.py | 17 ++++++++++++++ duniterpy/key/constants.py | 17 ++++++++++++++ duniterpy/key/encryption_key.py | 16 +++++++++++-- duniterpy/key/scrypt_params.py | 17 ++++++++++++++ duniterpy/key/signing_key.py | 16 +++++++++++-- duniterpy/key/verifying_key.py | 15 ++++++++++-- duniterpy/tools.py | 17 ++++++++++++++ 41 files changed, 647 insertions(+), 209 deletions(-) diff --git a/duniterpy/__init__.py b/duniterpy/__init__.py index 9931ea2d..b2c33d25 100644 --- a/duniterpy/__init__.py +++ b/duniterpy/__init__.py @@ -1,21 +1,19 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" __author__ = "Caner Candan & inso & vit" __version__ = "0.58.0" diff --git a/duniterpy/api/bma/__init__.py b/duniterpy/api/bma/__init__.py index 9857ef0e..962789ff 100644 --- a/duniterpy/api/bma/__init__.py +++ b/duniterpy/api/bma/__init__.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# Inso <insomniak.fr at gmail.com> +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from . import network, blockchain, tx, wot, node, ud, ws diff --git a/duniterpy/api/bma/blockchain.py b/duniterpy/api/bma/blockchain.py index 4203401a..2705b7d9 100644 --- a/duniterpy/api/bma/blockchain.py +++ b/duniterpy/api/bma/blockchain.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from typing import Union diff --git a/duniterpy/api/bma/network.py b/duniterpy/api/bma/network.py index bdf54d84..1db715f7 100644 --- a/duniterpy/api/bma/network.py +++ b/duniterpy/api/bma/network.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from aiohttp import ClientResponse diff --git a/duniterpy/api/bma/node.py b/duniterpy/api/bma/node.py index 95d45dd2..08dee756 100644 --- a/duniterpy/api/bma/node.py +++ b/duniterpy/api/bma/node.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from duniterpy.api.client import Client diff --git a/duniterpy/api/bma/tx.py b/duniterpy/api/bma/tx.py index 9bb4db60..d4e5c03f 100644 --- a/duniterpy/api/bma/tx.py +++ b/duniterpy/api/bma/tx.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from aiohttp import ClientResponse diff --git a/duniterpy/api/bma/ud.py b/duniterpy/api/bma/ud.py index 4b2653cb..189b3cf3 100644 --- a/duniterpy/api/bma/ud.py +++ b/duniterpy/api/bma/ud.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from duniterpy.api.client import Client diff --git a/duniterpy/api/bma/wot.py b/duniterpy/api/bma/wot.py index cc089732..733b14b7 100644 --- a/duniterpy/api/bma/wot.py +++ b/duniterpy/api/bma/wot.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from aiohttp import ClientResponse diff --git a/duniterpy/api/bma/ws.py b/duniterpy/api/bma/ws.py index e4e1d021..76d87cfe 100644 --- a/duniterpy/api/bma/ws.py +++ b/duniterpy/api/bma/ws.py @@ -1,21 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from duniterpy.api.bma.blockchain import BLOCK_SCHEMA diff --git a/duniterpy/api/client.py b/duniterpy/api/client.py index d41c2f0d..23a3dc17 100644 --- a/duniterpy/api/client.py +++ b/duniterpy/api/client.py @@ -1,7 +1,20 @@ -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# Inso <insomniak.fr at gmail.com> -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import json import logging from typing import Callable, Union, Any, Optional diff --git a/duniterpy/api/endpoint.py b/duniterpy/api/endpoint.py index e171f27a..cde3647e 100644 --- a/duniterpy/api/endpoint.py +++ b/duniterpy/api/endpoint.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re from typing import Any, Optional, TypeVar, Type, Dict diff --git a/duniterpy/api/errors.py b/duniterpy/api/errors.py index 5875cfbb..45c794bf 100644 --- a/duniterpy/api/errors.py +++ b/duniterpy/api/errors.py @@ -1,3 +1,21 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + + class DuniterError(Exception): """ Handle duniter error diff --git a/duniterpy/api/ws2p/__init__.py b/duniterpy/api/ws2p/__init__.py index 09c79049..0590ff8d 100644 --- a/duniterpy/api/ws2p/__init__.py +++ b/duniterpy/api/ws2p/__init__.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# Inso <insomniak.fr at gmail.com> +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from . import network, requests diff --git a/duniterpy/api/ws2p/network.py b/duniterpy/api/ws2p/network.py index d5605730..db9e8606 100644 --- a/duniterpy/api/ws2p/network.py +++ b/duniterpy/api/ws2p/network.py @@ -1,20 +1,20 @@ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Authors: -# Caner Candan <caner@candan.fr>, http://caner.candan.fr -# vit +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import logging from duniterpy.api.client import Client diff --git a/duniterpy/api/ws2p/requests.py b/duniterpy/api/ws2p/requests.py index ab826941..cc968718 100644 --- a/duniterpy/api/ws2p/requests.py +++ b/duniterpy/api/ws2p/requests.py @@ -1,12 +1,14 @@ """ -This program is free software: you can redistribute it and/or modify +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +DuniterPy 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 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/duniterpy/constants.py b/duniterpy/constants.py index 626f3382..494d7900 100644 --- a/duniterpy/constants.py +++ b/duniterpy/constants.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + UID_REGEX = "[A-Za-z0-9_-]{2,100}" PUBKEY_REGEX = "(?![OIl])[1-9A-Za-z]{42,45}" SIGNATURE_REGEX = "[A-Za-z0-9+/]+(?:=|==)?" diff --git a/duniterpy/documents/__init__.py b/duniterpy/documents/__init__.py index 25d684d7..87c10480 100644 --- a/duniterpy/documents/__init__.py +++ b/duniterpy/documents/__init__.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from .block import Block from .block_uid import BlockUID, block_uid from .document import Document, MalformedDocumentError diff --git a/duniterpy/documents/block.py b/duniterpy/documents/block.py index 087cbc07..16e044a7 100644 --- a/duniterpy/documents/block.py +++ b/duniterpy/documents/block.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import base64 import hashlib import re diff --git a/duniterpy/documents/block_uid.py b/duniterpy/documents/block_uid.py index 03509a1a..5cffd3b6 100644 --- a/duniterpy/documents/block_uid.py +++ b/duniterpy/documents/block_uid.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re from typing import Union, TypeVar, Type diff --git a/duniterpy/documents/certification.py b/duniterpy/documents/certification.py index b5cdfd36..d551cc14 100644 --- a/duniterpy/documents/certification.py +++ b/duniterpy/documents/certification.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import base64 import logging import re diff --git a/duniterpy/documents/crc_pubkey.py b/duniterpy/documents/crc_pubkey.py index e9d55cd7..b5acc03e 100644 --- a/duniterpy/documents/crc_pubkey.py +++ b/duniterpy/documents/crc_pubkey.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from typing import TypeVar, Type import base58 diff --git a/duniterpy/documents/document.py b/duniterpy/documents/document.py index 05d19162..06f779a4 100644 --- a/duniterpy/documents/document.py +++ b/duniterpy/documents/document.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import base64 import hashlib import logging diff --git a/duniterpy/documents/identity.py b/duniterpy/documents/identity.py index a3a95cd8..58a19a1e 100644 --- a/duniterpy/documents/identity.py +++ b/duniterpy/documents/identity.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re from typing import Optional, TypeVar, Type diff --git a/duniterpy/documents/membership.py b/duniterpy/documents/membership.py index 632a0221..bf8a6df9 100644 --- a/duniterpy/documents/membership.py +++ b/duniterpy/documents/membership.py @@ -1,8 +1,20 @@ """ -Created on 2 déc. 2014 +Copyright 2014-2020 Vincent Texier <vit@free.fr> -@author: inso +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import re from typing import TypeVar, Type, Optional diff --git a/duniterpy/documents/peer.py b/duniterpy/documents/peer.py index 78e58573..a117fd41 100644 --- a/duniterpy/documents/peer.py +++ b/duniterpy/documents/peer.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re from typing import TypeVar, List, Type diff --git a/duniterpy/documents/revocation.py b/duniterpy/documents/revocation.py index 8292e8d2..990535e5 100644 --- a/duniterpy/documents/revocation.py +++ b/duniterpy/documents/revocation.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import base64 import re from typing import Union, Type, TypeVar diff --git a/duniterpy/documents/transaction.py b/duniterpy/documents/transaction.py index f0f6447e..ec66cdaf 100644 --- a/duniterpy/documents/transaction.py +++ b/duniterpy/documents/transaction.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re from typing import TypeVar, List, Any, Type, Optional, Dict, Union, Tuple diff --git a/duniterpy/documents/ws2p/heads.py b/duniterpy/documents/ws2p/heads.py index 52181152..19c972ad 100644 --- a/duniterpy/documents/ws2p/heads.py +++ b/duniterpy/documents/ws2p/heads.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import re import attr diff --git a/duniterpy/documents/ws2p/messages.py b/duniterpy/documents/ws2p/messages.py index 3842ca6a..7cf02cf7 100644 --- a/duniterpy/documents/ws2p/messages.py +++ b/duniterpy/documents/ws2p/messages.py @@ -1,12 +1,14 @@ """ -This program is free software: you can redistribute it and/or modify +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +DuniterPy 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 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/duniterpy/grammars/output.py b/duniterpy/grammars/output.py index cf2f34f5..a6ec16cb 100644 --- a/duniterpy/grammars/output.py +++ b/duniterpy/grammars/output.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from typing import Optional, TypeVar, Type, Any, Union from pypeg2 import re, attr, Keyword, Enum, contiguous, maybe_some, whitespace, K diff --git a/duniterpy/helpers/money.py b/duniterpy/helpers/money.py index 0a9d0729..adca356e 100644 --- a/duniterpy/helpers/money.py +++ b/duniterpy/helpers/money.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from typing import Union, Any from duniterpy.grammars.output import SIG, CSV, CLTV, XHX, Condition diff --git a/duniterpy/helpers/ws2p.py b/duniterpy/helpers/ws2p.py index 09690567..c43f688b 100644 --- a/duniterpy/helpers/ws2p.py +++ b/duniterpy/helpers/ws2p.py @@ -1,12 +1,14 @@ """ -This program is free software: you can redistribute it and/or modify +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +DuniterPy 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 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License diff --git a/duniterpy/key/__init__.py b/duniterpy/key/__init__.py index cbdf37b8..a116898c 100644 --- a/duniterpy/key/__init__.py +++ b/duniterpy/key/__init__.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from .signing_key import SigningKey from .verifying_key import VerifyingKey from .encryption_key import SecretKey, PublicKey diff --git a/duniterpy/key/ascii_armor.py b/duniterpy/key/ascii_armor.py index 77b87242..122497ef 100644 --- a/duniterpy/key/ascii_armor.py +++ b/duniterpy/key/ascii_armor.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import base64 import libnacl import re diff --git a/duniterpy/key/base58.py b/duniterpy/key/base58.py index cfb8021c..599b8738 100644 --- a/duniterpy/key/base58.py +++ b/duniterpy/key/base58.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from typing import Union import base58 diff --git a/duniterpy/key/constants.py b/duniterpy/key/constants.py index 9c3e3d88..fb78cb86 100644 --- a/duniterpy/key/constants.py +++ b/duniterpy/key/constants.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + # Libnacl crypto_sign_BYTES = 64 diff --git a/duniterpy/key/encryption_key.py b/duniterpy/key/encryption_key.py index 509b63f4..9129b497 100644 --- a/duniterpy/key/encryption_key.py +++ b/duniterpy/key/encryption_key.py @@ -1,8 +1,20 @@ """ -duniter public and private keys +Copyright 2014-2020 Vincent Texier <vit@free.fr> -@author: inso +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. """ + from typing import Union, Optional import libnacl.public diff --git a/duniterpy/key/scrypt_params.py b/duniterpy/key/scrypt_params.py index e4fb0f96..feb49eaa 100644 --- a/duniterpy/key/scrypt_params.py +++ b/duniterpy/key/scrypt_params.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + from typing import Optional from .constants import SCRYPT_PARAMS diff --git a/duniterpy/key/signing_key.py b/duniterpy/key/signing_key.py index 25324e74..a0a7c0c1 100644 --- a/duniterpy/key/signing_key.py +++ b/duniterpy/key/signing_key.py @@ -1,8 +1,20 @@ """ -duniter public and private keys +Copyright 2014-2020 Vincent Texier <vit@free.fr> -@author: inso, vtexier, Moul +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. """ + import base64 import re from typing import Optional, Union, TypeVar, Type diff --git a/duniterpy/key/verifying_key.py b/duniterpy/key/verifying_key.py index 54bbae8b..c227c987 100644 --- a/duniterpy/key/verifying_key.py +++ b/duniterpy/key/verifying_key.py @@ -1,7 +1,18 @@ """ -duniter public and private keys +Copyright 2014-2020 Vincent Texier <vit@free.fr> -@author: inso +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. """ import base64 diff --git a/duniterpy/tools.py b/duniterpy/tools.py index f2bb3b2a..ee25f885 100644 --- a/duniterpy/tools.py +++ b/duniterpy/tools.py @@ -1,3 +1,20 @@ +""" +Copyright 2014-2020 Vincent Texier <vit@free.fr> + +DuniterPy is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +DuniterPy 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + import uuid from typing import Union from libnacl.encode import hex_decode, hex_encode -- GitLab