diff --git a/duniterpy/api/ws2p/__init__.py b/duniterpy/api/ws2p/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..09c79049209da90a8a0199f954c6c32c06d6ff46 --- /dev/null +++ b/duniterpy/api/ws2p/__init__.py @@ -0,0 +1,25 @@ +# +# 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> +import logging +from . import network, requests + +__all__ = ["network", "requests"] + +PROTOCOL_VERSION = 1 + +logger = logging.getLogger("duniter") diff --git a/duniterpy/api/ws2p/requests.py b/duniterpy/api/ws2p/requests.py index 59ae17911fdb88a902ad0c08e5a100b4ff36c0fb..2586253cb1d5374eeb785a66fbc17e2bb3755203 100644 --- a/duniterpy/api/ws2p/requests.py +++ b/duniterpy/api/ws2p/requests.py @@ -1,8 +1,5 @@ import json import re -from typing import Optional - -from duniterpy.helpers import get_ws2p_challenge from duniterpy.api.bma.blockchain import BLOCK_SCHEMA, BLOCKS_SCHEMA ERROR_RESPONSE_SCHEMA = { @@ -96,7 +93,7 @@ REQUIREMENTS_SCHEMA = { }, "pendingCerts": { "type": "array", - "items" : { + "items": { "type": "object", "properties": { "block": {"type": "number"}, @@ -118,7 +115,7 @@ REQUIREMENTS_SCHEMA = { }, "pendingMemberships": { "type": "array", - "items" : { + "items": { "type": "object", "properties": { "block": {"type": "string"},