mirror of https://github.com/nucypher/nucypher.git
Optimize imports for the entire codebase
parent
a935dc8e2d
commit
3b4e9b47dc
|
@ -20,7 +20,7 @@ from decimal import Decimal, localcontext
|
|||
from math import log
|
||||
from typing import Tuple
|
||||
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, NucypherTokenAgent, StakingEscrowAgent, AdjudicatorAgent, \
|
||||
from nucypher.blockchain.eth.agents import AdjudicatorAgent, ContractAgency, NucypherTokenAgent, StakingEscrowAgent, \
|
||||
WorkLockAgent
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
|
|
|
@ -15,63 +15,63 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import csv
|
||||
import json
|
||||
import traceback
|
||||
|
||||
import click
|
||||
import csv
|
||||
import maya
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
from constant_sorrow.constants import FULL, NO_WORKER_BONDED, WORKER_NOT_RUNNING
|
||||
from decimal import Decimal
|
||||
from typing import Tuple, List, Dict, Optional
|
||||
|
||||
import click
|
||||
import maya
|
||||
from eth_tester.exceptions import TransactionFailed as TestTransactionFailed
|
||||
from eth_utils import is_checksum_address, to_checksum_address, to_canonical_address
|
||||
from eth_utils import to_canonical_address, to_checksum_address
|
||||
from twisted.logger import Logger
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
from web3 import Web3
|
||||
from web3.exceptions import ValidationError
|
||||
|
||||
from constant_sorrow.constants import (
|
||||
WORKER_NOT_RUNNING,
|
||||
NO_WORKER_BONDED,
|
||||
FULL
|
||||
)
|
||||
from nucypher.blockchain.economics import StandardTokenEconomics, EconomicsFactory, BaseEconomics
|
||||
from nucypher.blockchain.economics import BaseEconomics, EconomicsFactory, StandardTokenEconomics
|
||||
from nucypher.blockchain.eth.agents import (
|
||||
NucypherTokenAgent,
|
||||
StakingEscrowAgent,
|
||||
PolicyManagerAgent,
|
||||
AdjudicatorAgent,
|
||||
ContractAgency,
|
||||
PreallocationEscrowAgent,
|
||||
MultiSigAgent,
|
||||
NucypherTokenAgent,
|
||||
PolicyManagerAgent,
|
||||
PreallocationEscrowAgent,
|
||||
StakingEscrowAgent,
|
||||
WorkLockAgent
|
||||
)
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.decorators import only_me, save_receipt, validate_checksum_address
|
||||
from nucypher.blockchain.eth.deployers import (
|
||||
NucypherTokenDeployer,
|
||||
StakingEscrowDeployer,
|
||||
PolicyManagerDeployer,
|
||||
StakingInterfaceDeployer,
|
||||
AdjudicatorDeployer,
|
||||
BaseContractDeployer,
|
||||
WorklockDeployer,
|
||||
MultiSigDeployer,
|
||||
StakingInterfaceRouterDeployer
|
||||
NucypherTokenDeployer,
|
||||
PolicyManagerDeployer,
|
||||
StakingEscrowDeployer,
|
||||
StakingInterfaceDeployer,
|
||||
StakingInterfaceRouterDeployer,
|
||||
WorklockDeployer
|
||||
)
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainDeployerInterface, BlockchainInterfaceFactory
|
||||
from nucypher.blockchain.eth.multisig import Authorization, Proposal
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry, IndividualAllocationRegistry
|
||||
from nucypher.blockchain.eth.signers import Web3Signer, Signer, KeystoreSigner
|
||||
from nucypher.blockchain.eth.signers import KeystoreSigner, Signer, Web3Signer
|
||||
from nucypher.blockchain.eth.token import NU, Stake, StakeList, WorkTracker
|
||||
from nucypher.blockchain.eth.utils import datetime_to_period, calculate_period_duration, datetime_at_period, \
|
||||
from nucypher.blockchain.eth.utils import (
|
||||
calculate_period_duration,
|
||||
datetime_at_period,
|
||||
datetime_to_period,
|
||||
prettify_eth_amount
|
||||
)
|
||||
from nucypher.characters.banners import STAKEHOLDER_BANNER
|
||||
from nucypher.characters.control.emitters import StdoutEmitter
|
||||
from nucypher.cli.painting.transactions import paint_receipt_summary
|
||||
from nucypher.cli.painting.deployment import paint_contract_deployment, paint_input_allocation_file
|
||||
from nucypher.cli.painting.transactions import paint_receipt_summary
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
||||
from nucypher.crypto.powers import TransactingPower
|
||||
from nucypher.network.nicknames import nickname_from_seed
|
||||
|
|
|
@ -17,27 +17,19 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
import importlib
|
||||
import random
|
||||
from typing import Generator, List, Tuple, Union, Dict, Optional
|
||||
|
||||
import math
|
||||
from constant_sorrow.constants import NO_CONTRACT_AVAILABLE
|
||||
from eth_utils.address import to_checksum_address
|
||||
from twisted.logger import Logger
|
||||
from typing import Dict, Generator, List, Tuple, Union
|
||||
from web3.contract import Contract
|
||||
|
||||
from nucypher.blockchain.eth.constants import (
|
||||
DISPATCHER_CONTRACT_NAME,
|
||||
STAKING_ESCROW_CONTRACT_NAME,
|
||||
POLICY_MANAGER_CONTRACT_NAME,
|
||||
PREALLOCATION_ESCROW_CONTRACT_NAME,
|
||||
STAKING_INTERFACE_CONTRACT_NAME,
|
||||
STAKING_INTERFACE_ROUTER_CONTRACT_NAME,
|
||||
ADJUDICATOR_CONTRACT_NAME,
|
||||
NUCYPHER_TOKEN_CONTRACT_NAME,
|
||||
MULTISIG_CONTRACT_NAME,
|
||||
ETH_ADDRESS_BYTE_LENGTH,
|
||||
NULL_ADDRESS
|
||||
)
|
||||
from nucypher.blockchain.eth.constants import (ADJUDICATOR_CONTRACT_NAME, DISPATCHER_CONTRACT_NAME,
|
||||
ETH_ADDRESS_BYTE_LENGTH, MULTISIG_CONTRACT_NAME,
|
||||
NUCYPHER_TOKEN_CONTRACT_NAME, NULL_ADDRESS, POLICY_MANAGER_CONTRACT_NAME,
|
||||
PREALLOCATION_ESCROW_CONTRACT_NAME, STAKING_ESCROW_CONTRACT_NAME,
|
||||
STAKING_INTERFACE_CONTRACT_NAME, STAKING_INTERFACE_ROUTER_CONTRACT_NAME)
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.events import ContractEvents
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory
|
||||
|
|
|
@ -16,20 +16,18 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
from typing import Union
|
||||
|
||||
import maya
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
from constant_sorrow.constants import NOT_RUNNING, UNKNOWN_DEVELOPMENT_CHAIN_ID
|
||||
from cytoolz.dicttoolz import dissoc
|
||||
from eth_account import Account
|
||||
from eth_account.messages import encode_defunct
|
||||
from eth_utils import to_canonical_address
|
||||
from eth_utils import to_checksum_address
|
||||
from eth_utils import to_canonical_address, to_checksum_address
|
||||
from geth import LoggingMixin
|
||||
from geth.accounts import get_accounts, create_new_account
|
||||
from geth.accounts import create_new_account, get_accounts
|
||||
from geth.chain import (
|
||||
get_chain_data_dir,
|
||||
initialize_chain,
|
||||
|
@ -38,9 +36,9 @@ from geth.chain import (
|
|||
)
|
||||
from geth.process import BaseGethProcess
|
||||
from twisted.logger import Logger
|
||||
from typing import Union
|
||||
from web3 import Web3
|
||||
|
||||
from nucypher.blockchain.eth.signers import ClefSigner
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT, DEPLOY_DIR, USER_LOG_DIR
|
||||
|
||||
UNKNOWN_DEVELOPMENT_CHAIN_ID.bool_value(True)
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import eth_utils
|
||||
import functools
|
||||
import inspect
|
||||
from datetime import datetime
|
||||
|
||||
from twisted.logger import Logger
|
||||
from typing import Callable
|
||||
import inspect
|
||||
import eth_utils
|
||||
|
||||
from nucypher.crypto.api import keccak_digest
|
||||
|
||||
__VERIFIED_ADDRESSES = set()
|
||||
|
||||
|
|
|
@ -17,31 +17,16 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
from collections import OrderedDict
|
||||
from typing import Tuple, Dict, List
|
||||
|
||||
from constant_sorrow.constants import (
|
||||
CONTRACT_NOT_DEPLOYED,
|
||||
NO_DEPLOYER_CONFIGURED,
|
||||
NO_BENEFICIARY,
|
||||
BARE,
|
||||
IDLE,
|
||||
FULL
|
||||
)
|
||||
from constant_sorrow.constants import (BARE, CONTRACT_NOT_DEPLOYED, FULL, IDLE, NO_BENEFICIARY, NO_DEPLOYER_CONFIGURED)
|
||||
from typing import Dict, List, Tuple
|
||||
from web3 import Web3
|
||||
from web3.contract import Contract
|
||||
|
||||
from nucypher.blockchain.economics import StandardTokenEconomics, BaseEconomics
|
||||
from nucypher.blockchain.eth.agents import (
|
||||
EthereumContractAgent,
|
||||
StakingEscrowAgent,
|
||||
NucypherTokenAgent,
|
||||
PolicyManagerAgent,
|
||||
PreallocationEscrowAgent,
|
||||
AdjudicatorAgent,
|
||||
WorkLockAgent,
|
||||
MultiSigAgent,
|
||||
ContractAgency
|
||||
)
|
||||
from nucypher.blockchain.economics import BaseEconomics, StandardTokenEconomics
|
||||
from nucypher.blockchain.eth.agents import (AdjudicatorAgent, ContractAgency, EthereumContractAgent, MultiSigAgent,
|
||||
NucypherTokenAgent, PolicyManagerAgent, PreallocationEscrowAgent,
|
||||
StakingEscrowAgent, WorkLockAgent)
|
||||
from nucypher.blockchain.eth.constants import DISPATCHER_CONTRACT_NAME, NULL_ADDRESS, STAKING_ESCROW_CONTRACT_NAME
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.interfaces import (
|
||||
|
@ -49,8 +34,7 @@ from nucypher.blockchain.eth.interfaces import (
|
|||
BlockchainInterfaceFactory,
|
||||
VersionedContract,
|
||||
)
|
||||
from nucypher.blockchain.eth.registry import AllocationRegistry
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.registry import AllocationRegistry, BaseContractRegistry
|
||||
|
||||
|
||||
class BaseContractDeployer:
|
||||
|
|
|
@ -24,44 +24,29 @@ import os
|
|||
import pprint
|
||||
import requests
|
||||
import time
|
||||
from constant_sorrow.constants import (
|
||||
NO_BLOCKCHAIN_CONNECTION,
|
||||
NO_COMPILATION_PERFORMED,
|
||||
UNKNOWN_TX_STATUS,
|
||||
NO_PROVIDER_PROCESS,
|
||||
READ_ONLY_INTERFACE,
|
||||
INSUFFICIENT_ETH
|
||||
)
|
||||
from constant_sorrow.constants import (INSUFFICIENT_ETH, NO_BLOCKCHAIN_CONNECTION, NO_COMPILATION_PERFORMED,
|
||||
NO_PROVIDER_PROCESS, READ_ONLY_INTERFACE, UNKNOWN_TX_STATUS)
|
||||
from eth_tester import EthereumTester
|
||||
from eth_tester.exceptions import TransactionFailed as TestTransactionFailed
|
||||
from eth_utils import to_checksum_address
|
||||
from twisted.logger import Logger
|
||||
from typing import List, Callable
|
||||
from typing import Tuple
|
||||
from typing import Union
|
||||
from typing import Callable, List, Tuple, Union
|
||||
from urllib.parse import urlparse
|
||||
from web3 import Web3, WebsocketProvider, HTTPProvider, IPCProvider, middleware
|
||||
from web3.contract import ContractConstructor, Contract
|
||||
from web3.contract import ContractFunction
|
||||
from web3.exceptions import TimeExhausted
|
||||
from web3.exceptions import ValidationError
|
||||
from web3 import HTTPProvider, IPCProvider, Web3, WebsocketProvider, middleware
|
||||
from web3.contract import Contract, ContractConstructor, ContractFunction
|
||||
from web3.exceptions import TimeExhausted, ValidationError
|
||||
from web3.gas_strategies import time_based
|
||||
from web3.middleware import geth_poa_middleware
|
||||
|
||||
from nucypher.blockchain.eth.clients import EthereumClient, POA_CHAINS
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.providers import (
|
||||
_get_test_geth_parity_provider,
|
||||
_get_auto_provider,
|
||||
_get_infura_provider,
|
||||
_get_IPC_provider,
|
||||
_get_websocket_provider,
|
||||
_get_HTTP_provider, _get_mock_test_provider, _get_pyevm_test_provider
|
||||
)
|
||||
from nucypher.blockchain.eth.providers import (_get_HTTP_provider, _get_IPC_provider, _get_auto_provider,
|
||||
_get_infura_provider, _get_mock_test_provider, _get_pyevm_test_provider,
|
||||
_get_test_geth_parity_provider, _get_websocket_provider)
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.sol.compile import SolidityCompiler
|
||||
from nucypher.blockchain.eth.utils import prettify_eth_amount, get_transaction_name
|
||||
from nucypher.characters.control.emitters import StdoutEmitter, JSONRPCStdoutEmitter
|
||||
from nucypher.blockchain.eth.utils import get_transaction_name, prettify_eth_amount
|
||||
from nucypher.characters.control.emitters import JSONRPCStdoutEmitter, StdoutEmitter
|
||||
from nucypher.utilities.logging import GlobalLoggerSettings
|
||||
|
||||
Web3Providers = Union[IPCProvider, WebsocketProvider, HTTPProvider, EthereumTester]
|
||||
|
|
|
@ -17,11 +17,11 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
import json
|
||||
from collections import namedtuple
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
from bytestring_splitter import BytestringSplitter
|
||||
from eth_abi.packed import encode_single_packed
|
||||
from eth_account import Account
|
||||
from typing import Any, Dict, Tuple
|
||||
from web3 import Web3
|
||||
from web3.contract import Contract, ContractFunction
|
||||
|
||||
|
|
|
@ -14,15 +14,12 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from typing import Union
|
||||
|
||||
import os
|
||||
from eth_tester import EthereumTester, PyEVMBackend
|
||||
from eth_tester.backends.mock.main import MockBackend
|
||||
from typing import Union
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from eth_tester import EthereumTester
|
||||
from eth_tester import PyEVMBackend
|
||||
from web3 import WebsocketProvider, HTTPProvider, IPCProvider
|
||||
from web3 import HTTPProvider, IPCProvider, WebsocketProvider
|
||||
from web3.exceptions import InfuraKeyNotFound
|
||||
from web3.providers.eth_tester.main import EthereumTesterProvider
|
||||
|
||||
|
|
|
@ -14,19 +14,19 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
from json import JSONDecodeError
|
||||
from os.path import abspath, dirname
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
import requests
|
||||
import shutil
|
||||
import tempfile
|
||||
from abc import ABC, abstractmethod
|
||||
from json import JSONDecodeError
|
||||
from os.path import dirname, abspath
|
||||
from typing import Union, Iterator, List, Dict, Type, Tuple
|
||||
|
||||
import requests
|
||||
from constant_sorrow.constants import REGISTRY_COMMITTED, NO_REGISTRY_SOURCE
|
||||
from constant_sorrow.constants import NO_REGISTRY_SOURCE, REGISTRY_COMMITTED
|
||||
from twisted.logger import Logger
|
||||
from typing import Dict, Iterator, List, Tuple, Type, Union
|
||||
|
||||
from nucypher.blockchain.eth.constants import PREALLOCATION_ESCROW_CONTRACT_NAME
|
||||
from nucypher.blockchain.eth.networks import NetworksInventory
|
||||
|
|
|
@ -14,25 +14,23 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from pathlib import Path
|
||||
|
||||
import json
|
||||
import os
|
||||
from abc import ABC, abstractmethod
|
||||
from json import JSONDecodeError
|
||||
from typing import Dict, Tuple
|
||||
from typing import List
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import os
|
||||
import sys
|
||||
from abc import ABC, abstractmethod
|
||||
from cytoolz.dicttoolz import dissoc
|
||||
from eth_account import Account
|
||||
from eth_account.messages import encode_defunct
|
||||
from eth_account.signers.local import LocalAccount
|
||||
from eth_utils import is_address, to_checksum_address, apply_formatters_to_dict
|
||||
from eth_utils import apply_formatters_to_dict, is_address, to_checksum_address
|
||||
from hexbytes import HexBytes
|
||||
from pathlib import Path
|
||||
from twisted.logger import Logger
|
||||
from web3 import Web3, IPCProvider
|
||||
from typing import Dict, List, Tuple
|
||||
from urllib.parse import urlparse
|
||||
from web3 import IPCProvider, Web3
|
||||
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
|
|
|
@ -17,22 +17,16 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
from _pydecimal import Decimal
|
||||
from collections import UserList
|
||||
from typing import Dict
|
||||
from typing import Union, Tuple, Callable
|
||||
|
||||
import maya
|
||||
from constant_sorrow.constants import (
|
||||
NEW_STAKE,
|
||||
NO_STAKING_RECEIPT,
|
||||
NOT_STAKING,
|
||||
EMPTY_STAKING_SLOT,
|
||||
UNKNOWN_WORKER_STATUS
|
||||
)
|
||||
from constant_sorrow.constants import (EMPTY_STAKING_SLOT, NEW_STAKE, NOT_STAKING, NO_STAKING_RECEIPT,
|
||||
UNKNOWN_WORKER_STATUS)
|
||||
from eth_utils import currency, is_checksum_address
|
||||
from twisted.internet import task, reactor
|
||||
from twisted.internet import reactor, task
|
||||
from twisted.logger import Logger
|
||||
from typing import Callable, Dict, Tuple, Union
|
||||
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.utils import datetime_at_period
|
||||
|
|
|
@ -15,12 +15,11 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from decimal import Decimal
|
||||
from typing import Union
|
||||
|
||||
import maya
|
||||
from constant_sorrow.constants import UNKNOWN_DEVELOPMENT_CHAIN_ID
|
||||
from eth_utils import is_address, to_checksum_address, is_hex
|
||||
from decimal import Decimal
|
||||
from eth_utils import is_address, is_hex, to_checksum_address
|
||||
from typing import Union
|
||||
from web3 import Web3
|
||||
from web3.contract import ContractConstructor, ContractFunction
|
||||
|
||||
|
|
|
@ -16,48 +16,28 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
import contextlib
|
||||
from contextlib import suppress
|
||||
from typing import Dict, ClassVar, Set
|
||||
from typing import Optional
|
||||
from typing import Union, List
|
||||
|
||||
from bytestring_splitter import BytestringSplitter
|
||||
from constant_sorrow import default_constant_splitter
|
||||
from constant_sorrow.constants import (
|
||||
DO_NOT_SIGN,
|
||||
NO_BLOCKCHAIN_CONNECTION,
|
||||
NO_CONTROL_PROTOCOL,
|
||||
NO_DECRYPTION_PERFORMED,
|
||||
NO_NICKNAME,
|
||||
NO_SIGNING_POWER,
|
||||
SIGNATURE_TO_FOLLOW,
|
||||
SIGNATURE_IS_ON_CIPHERTEXT,
|
||||
STRANGER,
|
||||
FEDERATED_ONLY
|
||||
)
|
||||
from constant_sorrow.constants import (DO_NOT_SIGN, NO_BLOCKCHAIN_CONNECTION, NO_CONTROL_PROTOCOL,
|
||||
NO_DECRYPTION_PERFORMED, NO_NICKNAME, NO_SIGNING_POWER,
|
||||
SIGNATURE_IS_ON_CIPHERTEXT, SIGNATURE_TO_FOLLOW, STRANGER)
|
||||
from cryptography.exceptions import InvalidSignature
|
||||
from eth_keys import KeyAPI as EthKeyAPI
|
||||
from eth_utils import to_checksum_address, to_canonical_address
|
||||
from eth_utils import to_canonical_address, to_checksum_address
|
||||
from typing import ClassVar, Dict, List, Optional, Set, Union
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.signing import Signature
|
||||
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry, InMemoryContractRegistry
|
||||
from nucypher.blockchain.eth.signers import Signer
|
||||
from nucypher.characters.control.controllers import JSONRPCController, CLIController
|
||||
from nucypher.characters.control.controllers import CLIController, JSONRPCController
|
||||
from nucypher.config.keyring import NucypherKeyring
|
||||
from nucypher.config.node import CharacterConfiguration
|
||||
from nucypher.crypto.api import encrypt_and_sign
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.powers import (
|
||||
CryptoPower,
|
||||
SigningPower,
|
||||
DecryptingPower,
|
||||
NoSigningPower,
|
||||
CryptoPowerUp,
|
||||
DelegatingPower
|
||||
)
|
||||
from nucypher.crypto.signing import signature_splitter, StrangerStamp, SignatureStamp
|
||||
from nucypher.crypto.powers import (CryptoPower, CryptoPowerUp, DecryptingPower, DelegatingPower, NoSigningPower,
|
||||
SigningPower)
|
||||
from nucypher.crypto.signing import SignatureStamp, StrangerStamp, signature_splitter
|
||||
from nucypher.network.middleware import RestMiddleware
|
||||
from nucypher.network.nicknames import nickname_from_seed
|
||||
from nucypher.network.nodes import Learner
|
||||
|
|
|
@ -1,33 +1,30 @@
|
|||
import json
|
||||
import os
|
||||
from datetime import datetime, timedelta
|
||||
from decimal import Decimal
|
||||
|
||||
import eth_utils
|
||||
import math
|
||||
import maya
|
||||
import os
|
||||
import time
|
||||
from constant_sorrow.constants import NOT_RUNNING, NO_DATABASE_AVAILABLE
|
||||
from datetime import datetime, timedelta
|
||||
from decimal import Decimal
|
||||
from flask import Flask, Response
|
||||
from hendrix.deploy.base import HendrixDeploy
|
||||
from nacl.hash import sha256
|
||||
from sqlalchemy import create_engine, or_
|
||||
from twisted.internet import threads, reactor
|
||||
from twisted.internet import reactor, threads
|
||||
from twisted.internet.task import LoopingCall
|
||||
from twisted.logger import Logger
|
||||
|
||||
from nucypher.blockchain.economics import EconomicsFactory
|
||||
from nucypher.blockchain.eth.actors import NucypherTokenActor
|
||||
from nucypher.blockchain.eth.agents import (
|
||||
NucypherTokenAgent,
|
||||
ContractAgency
|
||||
)
|
||||
from nucypher.blockchain.eth.agents import (ContractAgency, NucypherTokenAgent)
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
from nucypher.characters.banners import FELIX_BANNER, NU_BANNER
|
||||
from nucypher.characters.base import Character
|
||||
from nucypher.config.constants import TEMPLATES_DIR, MAX_UPLOAD_CONTENT_LENGTH
|
||||
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH, TEMPLATES_DIR
|
||||
from nucypher.crypto.powers import SigningPower, TransactingPower
|
||||
from nucypher.datastore.threading import ThreadedSession
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import inspect
|
||||
import json
|
||||
from abc import ABC, abstractmethod
|
||||
from json import JSONDecodeError
|
||||
|
||||
import inspect
|
||||
import maya
|
||||
from flask import Response, Flask
|
||||
from abc import ABC, abstractmethod
|
||||
from flask import Flask, Response
|
||||
from hendrix.deploy.base import HendrixDeploy
|
||||
from twisted.internet import reactor, stdio
|
||||
from twisted.logger import Logger
|
||||
|
||||
from nucypher.characters.control.emitters import StdoutEmitter, WebEmitter, JSONRPCStdoutEmitter
|
||||
from nucypher.characters.control.emitters import JSONRPCStdoutEmitter, StdoutEmitter, WebEmitter
|
||||
from nucypher.characters.control.interfaces import CharacterPublicInterface
|
||||
from nucypher.characters.control.specifications.exceptions import SpecificationError
|
||||
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH
|
||||
from nucypher.cli.processes import JSONRPCLineReceiver
|
||||
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH
|
||||
from tests.utils.controllers import JSONRPCTestClient
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
import io
|
||||
import json
|
||||
import os
|
||||
|
||||
import sys
|
||||
from functools import partial
|
||||
from typing import Callable, Union
|
||||
|
||||
import click
|
||||
import os
|
||||
from flask import Response
|
||||
from functools import partial
|
||||
from twisted.logger import Logger
|
||||
from typing import Callable, Union
|
||||
|
||||
import nucypher
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import functools
|
||||
from base64 import b64decode
|
||||
from typing import Union
|
||||
|
||||
import maya
|
||||
from typing import Union
|
||||
from umbral.keys import UmbralPublicKey
|
||||
|
||||
from nucypher.characters.control.specifications import alice, bob, enrico
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import click
|
||||
from marshmallow import validates_schema
|
||||
|
||||
from nucypher.characters.control.specifications.exceptions import (
|
||||
InvalidInputData, InvalidArgumentCombo)
|
||||
from nucypher.characters.control.specifications import fields
|
||||
from nucypher.characters.control.specifications.base import BaseSchema
|
||||
from nucypher.characters.control.specifications.exceptions import (
|
||||
InvalidArgumentCombo)
|
||||
from nucypher.cli import options, types
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from functools import wraps
|
||||
from marshmallow import INCLUDE, Schema
|
||||
|
||||
from marshmallow import Schema, INCLUDE, EXCLUDE
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import click
|
||||
from nucypher.cli import options
|
||||
|
||||
from nucypher.characters.control.specifications import fields
|
||||
from nucypher.characters.control.specifications.base import BaseSchema
|
||||
from nucypher.cli import options
|
||||
|
||||
|
||||
class JoinPolicy(BaseSchema): #TODO: this doesn't have a cli implementation
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import click
|
||||
from nucypher.cli import options
|
||||
|
||||
from nucypher.characters.control.specifications import fields
|
||||
from nucypher.characters.control.specifications.base import BaseSchema
|
||||
from nucypher.cli import options
|
||||
|
||||
|
||||
class EncryptMessage(BaseSchema):
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
from base64 import b64decode, b64encode
|
||||
from base64 import b64encode
|
||||
|
||||
from marshmallow import fields
|
||||
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
|
||||
class Cleartext(BaseField, fields.String):
|
||||
|
||||
def _serialize(self, value, attr, data, **kwargs):
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from marshmallow import fields
|
||||
import maya
|
||||
from marshmallow import fields
|
||||
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
from marshmallow import fields
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData, InvalidNativeDataTypes
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
|
||||
class Key(BaseField, fields.Field):
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
from marshmallow import fields
|
||||
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
|
||||
class Label(BaseField, fields.Field):
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
from base64 import b64decode, b64encode
|
||||
|
||||
from marshmallow import fields
|
||||
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData, InvalidNativeDataTypes
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
from nucypher.crypto.kits import UmbralMessageKit as UmbralMessageKitClass
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData, InvalidNativeDataTypes
|
||||
|
||||
|
||||
class UmbralMessageKit(BaseField, fields.Field):
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import click
|
||||
from marshmallow import fields
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
from nucypher.cli import types
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
from marshmallow import fields
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
from marshmallow import fields
|
||||
|
||||
from nucypher.characters.control.specifications.exceptions import InvalidInputData, InvalidNativeDataTypes
|
||||
from nucypher.crypto.signing import Signature
|
||||
from nucypher.characters.control.specifications.fields.base import BaseField
|
||||
from nucypher.crypto.constants import KECCAK_DIGEST_LENGTH
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.signing import Signature
|
||||
|
||||
|
||||
class TreasureMap(BaseField, fields.Field):
|
||||
|
|
|
@ -16,31 +16,30 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import json
|
||||
from base64 import b64encode, b64decode
|
||||
from base64 import b64decode, b64encode
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from functools import partial
|
||||
from json.decoder import JSONDecodeError
|
||||
from random import shuffle
|
||||
from typing import Dict, Iterable, List, Set, Tuple, Union
|
||||
|
||||
import maya
|
||||
import time
|
||||
from bytestring_splitter import BytestringKwargifier, BytestringSplittingError
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from bytestring_splitter import BytestringKwargifier, BytestringSplitter, BytestringSplittingError, \
|
||||
VariableLengthBytestring
|
||||
from constant_sorrow import constants
|
||||
from constant_sorrow.constants import INCLUDED_IN_BYTESTRING, PUBLIC_ONLY, STRANGER_ALICE
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
|
||||
from cryptography.hazmat.primitives.serialization import Encoding
|
||||
from cryptography.x509 import load_pem_x509_certificate, Certificate, NameOID
|
||||
from cryptography.x509 import Certificate, NameOID, load_pem_x509_certificate
|
||||
from datetime import datetime
|
||||
from eth_utils import to_checksum_address
|
||||
from flask import request, Response
|
||||
from flask import Response, request
|
||||
from functools import partial
|
||||
from json.decoder import JSONDecodeError
|
||||
from sqlalchemy.exc import OperationalError
|
||||
from twisted.internet import stdio, reactor
|
||||
from twisted.internet import threads
|
||||
from twisted.internet import reactor, stdio, threads
|
||||
from twisted.internet.task import LoopingCall
|
||||
from twisted.logger import Logger
|
||||
from typing import Dict, Iterable, List, Set, Tuple, Union
|
||||
from umbral import pre
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.kfrags import KFrag
|
||||
|
@ -49,7 +48,7 @@ from umbral.signing import Signature
|
|||
|
||||
import nucypher
|
||||
from nucypher.blockchain.eth.actors import BlockchainPolicyAuthor, Worker
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.signers import Web3Signer
|
||||
|
@ -62,22 +61,21 @@ from nucypher.characters.control.controllers import (
|
|||
from nucypher.characters.control.emitters import StdoutEmitter
|
||||
from nucypher.characters.control.interfaces import AliceInterface, BobInterface, EnricoInterface
|
||||
from nucypher.cli.processes import UrsulaCommandProtocol
|
||||
from nucypher.config.storages import NodeStorage, ForgetfulNodeStorage
|
||||
from nucypher.crypto.api import keccak_digest, encrypt_and_sign
|
||||
from nucypher.crypto.constants import PUBLIC_KEY_LENGTH, PUBLIC_ADDRESS_LENGTH
|
||||
from nucypher.config.storages import ForgetfulNodeStorage, NodeStorage
|
||||
from nucypher.crypto.api import encrypt_and_sign, keccak_digest
|
||||
from nucypher.crypto.constants import PUBLIC_ADDRESS_LENGTH, PUBLIC_KEY_LENGTH
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.powers import SigningPower, DecryptingPower, DelegatingPower, TransactingPower, PowerUpError
|
||||
from nucypher.crypto.powers import DecryptingPower, DelegatingPower, PowerUpError, SigningPower, TransactingPower
|
||||
from nucypher.crypto.signing import InvalidSignature
|
||||
from nucypher.datastore.keypairs import HostingKeypair
|
||||
from nucypher.datastore.threading import ThreadedSession
|
||||
from nucypher.network.exceptions import NodeSeemsToBeDown
|
||||
from nucypher.network.middleware import RestMiddleware
|
||||
from nucypher.network.nicknames import nickname_from_seed
|
||||
from nucypher.network.nodes import NodeSprout
|
||||
from nucypher.network.nodes import Teacher
|
||||
from nucypher.network.nodes import NodeSprout, Teacher
|
||||
from nucypher.network.protocols import InterfaceInfo, parse_node_uri
|
||||
from nucypher.network.trackers import AvailabilityTracker
|
||||
from nucypher.network.server import ProxyRESTServer, TLSHostingPower, make_rest_app
|
||||
from nucypher.network.trackers import AvailabilityTracker
|
||||
|
||||
|
||||
class Alice(Character, BlockchainPolicyAuthor):
|
||||
|
|
|
@ -15,11 +15,11 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from copy import copy
|
||||
from unittest.mock import patch
|
||||
|
||||
from eth_tester.exceptions import ValidationError
|
||||
from unittest.mock import patch
|
||||
|
||||
from nucypher.characters.lawful import Ursula, Alice
|
||||
from nucypher.characters.lawful import Alice, Ursula
|
||||
from nucypher.crypto.powers import CryptoPower, SigningPower
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD, MOCK_URSULA_DB_FILEPATH
|
||||
from tests.utils.middleware import EvilMiddleWare
|
||||
|
|
|
@ -40,8 +40,12 @@ from nucypher.characters.control.emitters import StdoutEmitter
|
|||
from nucypher.cli.actions.auth import get_client_password
|
||||
from nucypher.cli.actions.confirm import confirm_deployment
|
||||
from nucypher.cli.actions.select import select_client_account
|
||||
from nucypher.cli.actions.utils import (deployer_pre_launch_warnings, ensure_config_root, establish_deployer_registry,
|
||||
initialize_deployer_interface)
|
||||
from nucypher.cli.actions.utils import (
|
||||
deployer_pre_launch_warnings,
|
||||
ensure_config_root,
|
||||
establish_deployer_registry,
|
||||
initialize_deployer_interface
|
||||
)
|
||||
from nucypher.cli.config import group_general_config
|
||||
from nucypher.cli.literature import (
|
||||
CANNOT_OVERWRITE_REGISTRY,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import json
|
||||
|
||||
import os
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Union
|
||||
|
||||
from constant_sorrow.constants import (
|
||||
UNKNOWN_VERSION
|
||||
)
|
||||
from typing import Union
|
||||
|
||||
from nucypher.config import constants
|
||||
|
||||
|
|
|
@ -17,14 +17,13 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
from constant_sorrow.constants import (
|
||||
UNINITIALIZED_CONFIGURATION
|
||||
)
|
||||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
|
||||
from cryptography.x509 import Certificate
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
from nucypher.blockchain.eth.actors import StakeHolder
|
||||
from nucypher.blockchain.eth.signers import Signer
|
||||
|
|
|
@ -16,10 +16,10 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
import os
|
||||
from collections import namedtuple
|
||||
from os.path import abspath, dirname
|
||||
|
||||
import os
|
||||
from appdirs import AppDirs
|
||||
|
||||
import nucypher
|
||||
|
|
|
@ -17,14 +17,12 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
import base64
|
||||
import contextlib
|
||||
import json
|
||||
import os
|
||||
import stat
|
||||
from json import JSONDecodeError
|
||||
from os.path import abspath
|
||||
from typing import ClassVar, Tuple, Callable, Union, Dict, List
|
||||
|
||||
from constant_sorrow.constants import FEDERATED_ADDRESS
|
||||
from constant_sorrow.constants import KEYRING_LOCKED
|
||||
import os
|
||||
from constant_sorrow.constants import FEDERATED_ADDRESS, KEYRING_LOCKED
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.backends.openssl.ec import _EllipticCurvePrivateKey
|
||||
|
@ -40,17 +38,13 @@ from eth_utils import to_checksum_address
|
|||
from nacl.exceptions import CryptoError
|
||||
from nacl.secret import SecretBox
|
||||
from twisted.logger import Logger
|
||||
from umbral.keys import UmbralPrivateKey, UmbralPublicKey, UmbralKeyingMaterial, derive_key_from_password
|
||||
from typing import Callable, ClassVar, Dict, List, Tuple, Union
|
||||
from umbral.keys import UmbralKeyingMaterial, UmbralPrivateKey, UmbralPublicKey, derive_key_from_password
|
||||
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
||||
from nucypher.crypto.api import generate_teacher_certificate
|
||||
from nucypher.crypto.constants import BLAKE2B
|
||||
from nucypher.crypto.powers import (
|
||||
SigningPower,
|
||||
DecryptingPower,
|
||||
KeyPairBasedPower,
|
||||
DerivedKeyBasedPower
|
||||
)
|
||||
from nucypher.crypto.powers import (DecryptingPower, DerivedKeyBasedPower, KeyPairBasedPower, SigningPower)
|
||||
from nucypher.network.server import TLSHostingPower
|
||||
|
||||
FILE_ENCODING = 'utf-8'
|
||||
|
|
|
@ -17,18 +17,11 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
from constant_sorrow.constants import (DEVELOPMENT_CONFIGURATION, FEDERATED_ADDRESS, LIVE_CONFIGURATION,
|
||||
NO_BLOCKCHAIN_CONNECTION, NO_KEYRING_ATTACHED, UNINITIALIZED_CONFIGURATION)
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import List, Set, Union, Callable
|
||||
|
||||
from constant_sorrow.constants import (
|
||||
UNINITIALIZED_CONFIGURATION,
|
||||
NO_BLOCKCHAIN_CONNECTION,
|
||||
LIVE_CONFIGURATION,
|
||||
NO_KEYRING_ATTACHED,
|
||||
DEVELOPMENT_CONFIGURATION,
|
||||
FEDERATED_ADDRESS
|
||||
)
|
||||
from twisted.logger import Logger
|
||||
from typing import Callable, List, Set, Union
|
||||
from umbral.signing import Signature
|
||||
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory
|
||||
|
@ -41,8 +34,8 @@ from nucypher.blockchain.eth.registry import (
|
|||
from nucypher.blockchain.eth.signers import Signer
|
||||
from nucypher.config.base import BaseConfiguration
|
||||
from nucypher.config.keyring import NucypherKeyring
|
||||
from nucypher.config.storages import NodeStorage, ForgetfulNodeStorage, LocalFileBasedNodeStorage
|
||||
from nucypher.crypto.powers import CryptoPowerUp, CryptoPower
|
||||
from nucypher.config.storages import ForgetfulNodeStorage, LocalFileBasedNodeStorage, NodeStorage
|
||||
from nucypher.crypto.powers import CryptoPower, CryptoPowerUp
|
||||
from nucypher.network.middleware import RestMiddleware
|
||||
|
||||
|
||||
|
|
|
@ -15,20 +15,20 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import binascii
|
||||
import os
|
||||
import sqlite3
|
||||
import tempfile
|
||||
from abc import abstractmethod, ABC
|
||||
from typing import Callable, Tuple, Union, Set, Any
|
||||
|
||||
import OpenSSL
|
||||
import binascii
|
||||
import os
|
||||
import tempfile
|
||||
from abc import ABC, abstractmethod
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.serialization import Encoding
|
||||
from cryptography.x509 import Certificate, NameOID
|
||||
from eth_utils import is_checksum_address
|
||||
from twisted.logger import Logger
|
||||
from typing import Any, Callable, Set, Tuple, Union
|
||||
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
|
|
|
@ -14,11 +14,9 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import datetime
|
||||
from ipaddress import IPv4Address
|
||||
from random import SystemRandom
|
||||
from typing import Tuple
|
||||
|
||||
import datetime
|
||||
import sha3
|
||||
from constant_sorrow import constants
|
||||
from cryptography import x509
|
||||
|
@ -33,7 +31,9 @@ from cryptography.x509 import Certificate
|
|||
from cryptography.x509.oid import NameOID
|
||||
from eth_account import Account
|
||||
from eth_account.messages import encode_defunct
|
||||
from eth_utils import to_checksum_address, is_checksum_address
|
||||
from eth_utils import is_checksum_address, to_checksum_address
|
||||
from ipaddress import IPv4Address
|
||||
from typing import Tuple
|
||||
from umbral import pre
|
||||
from umbral.keys import UmbralPrivateKey, UmbralPublicKey
|
||||
from umbral.signing import Signature
|
||||
|
|
|
@ -14,9 +14,10 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from constant_sorrow.constants import UNKNOWN_SENDER, NOT_SIGNED
|
||||
from bytestring_splitter import BytestringKwargifier, VariableLengthBytestring
|
||||
from nucypher.crypto.splitters import key_splitter, capsule_splitter
|
||||
from constant_sorrow.constants import NOT_SIGNED, UNKNOWN_SENDER
|
||||
|
||||
from nucypher.crypto.splitters import capsule_splitter, key_splitter
|
||||
|
||||
|
||||
class CryptoKit:
|
||||
|
|
|
@ -17,17 +17,16 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import inspect
|
||||
from typing import List, Tuple, Optional
|
||||
|
||||
from hexbytes import HexBytes
|
||||
from typing import List, Optional, Tuple
|
||||
from umbral import pre
|
||||
from umbral.keys import UmbralPublicKey, UmbralPrivateKey, UmbralKeyingMaterial
|
||||
from umbral.keys import UmbralKeyingMaterial, UmbralPrivateKey, UmbralPublicKey
|
||||
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory, BlockchainInterface
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface, BlockchainInterfaceFactory
|
||||
from nucypher.blockchain.eth.signers import Signer, Web3Signer
|
||||
from nucypher.datastore import keypairs
|
||||
from nucypher.datastore.keypairs import SigningKeypair, DecryptingKeypair
|
||||
from nucypher.datastore.keypairs import DecryptingKeypair, SigningKeypair
|
||||
|
||||
|
||||
class PowerUpError(TypeError):
|
||||
|
|
|
@ -19,7 +19,7 @@ from umbral.config import default_params
|
|||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.pre import Capsule
|
||||
|
||||
from nucypher.crypto.constants import PUBLIC_KEY_LENGTH, CAPSULE_LENGTH
|
||||
from nucypher.crypto.constants import CAPSULE_LENGTH, PUBLIC_KEY_LENGTH
|
||||
|
||||
key_splitter = BytestringSplitter((UmbralPublicKey, PUBLIC_KEY_LENGTH))
|
||||
capsule_splitter = BytestringSplitter((Capsule, CAPSULE_LENGTH, {"params": default_params()}))
|
||||
|
|
|
@ -15,10 +15,9 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from typing import Any, Union
|
||||
|
||||
from coincurve import PublicKey
|
||||
from eth_keys import KeyAPI as EthKeyAPI
|
||||
from typing import Any, Union
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.point import Point
|
||||
from umbral.signing import Signature
|
||||
|
|
|
@ -16,13 +16,12 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
import maya
|
||||
from bytestring_splitter import BytestringSplitter
|
||||
from datetime import datetime
|
||||
from sqlalchemy.exc import OperationalError
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
from typing import List
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.kfrags import KFrag
|
||||
|
||||
|
|
|
@ -15,10 +15,7 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import (
|
||||
Column, Integer, LargeBinary, ForeignKey, Boolean, DateTime
|
||||
)
|
||||
from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Integer, LargeBinary)
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from nucypher.crypto.utils import fingerprint_from_key
|
||||
|
|
|
@ -15,7 +15,6 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import base64
|
||||
from typing import Union
|
||||
|
||||
import sha3
|
||||
from OpenSSL.SSL import TLSv1_2_METHOD
|
||||
|
@ -24,6 +23,7 @@ from constant_sorrow import constants
|
|||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
from hendrix.deploy.tls import HendrixDeployTLS
|
||||
from hendrix.facilities.services import ExistingKeyTLSContextFactory
|
||||
from typing import Union
|
||||
from umbral import pre
|
||||
from umbral.keys import UmbralPrivateKey, UmbralPublicKey
|
||||
from umbral.signing import Signature, Signer
|
||||
|
|
|
@ -14,7 +14,7 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from sqlalchemy.orm import sessionmaker, scoped_session
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
|
||||
|
||||
class ThreadedSession:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import requests, socket
|
||||
import requests
|
||||
import socket
|
||||
|
||||
NodeSeemsToBeDown = (requests.exceptions.ConnectionError,
|
||||
requests.exceptions.ReadTimeout,
|
||||
|
|
|
@ -16,17 +16,15 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
import requests
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
import requests
|
||||
import time
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from constant_sorrow.constants import CERTIFICATE_NOT_SAVED, EXEMPT_FROM_VERIFICATION
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from twisted.logger import Logger
|
||||
|
||||
from umbral.cfrags import CapsuleFrag
|
||||
from umbral.signing import Signature
|
||||
|
||||
|
|
|
@ -15,50 +15,39 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import binascii
|
||||
import contextlib
|
||||
import random
|
||||
from collections import defaultdict, OrderedDict
|
||||
from collections import deque
|
||||
from collections import namedtuple
|
||||
from collections import OrderedDict, defaultdict, deque, namedtuple
|
||||
from contextlib import suppress
|
||||
from typing import Set, Tuple, Union
|
||||
|
||||
import binascii
|
||||
import maya
|
||||
import requests
|
||||
import time
|
||||
from bytestring_splitter import BytestringSplitter, PartiallyKwargifiedBytes
|
||||
from bytestring_splitter import VariableLengthBytestring, BytestringSplittingError
|
||||
from bytestring_splitter import BytestringSplitter, BytestringSplittingError, PartiallyKwargifiedBytes, \
|
||||
VariableLengthBytestring
|
||||
from constant_sorrow import constant_or_bytes
|
||||
from constant_sorrow.constants import (
|
||||
NO_KNOWN_NODES,
|
||||
NOT_SIGNED,
|
||||
NEVER_SEEN,
|
||||
NO_STORAGE_AVAILIBLE,
|
||||
FLEET_STATES_MATCH,
|
||||
CERTIFICATE_NOT_SAVED,
|
||||
UNKNOWN_FLEET_STATE
|
||||
)
|
||||
from constant_sorrow.constants import (CERTIFICATE_NOT_SAVED, FLEET_STATES_MATCH, NEVER_SEEN, NOT_SIGNED,
|
||||
NO_KNOWN_NODES, NO_STORAGE_AVAILIBLE, UNKNOWN_FLEET_STATE)
|
||||
from cryptography.x509 import Certificate
|
||||
from eth_utils import to_checksum_address
|
||||
from requests.exceptions import SSLError
|
||||
from twisted.internet import reactor, defer
|
||||
from twisted.internet import task
|
||||
from twisted.internet import defer, reactor, task
|
||||
from twisted.internet.threads import deferToThread
|
||||
from twisted.logger import Logger
|
||||
|
||||
import nucypher
|
||||
from typing import Set, Tuple, Union
|
||||
from umbral.signing import Signature
|
||||
|
||||
import nucypher
|
||||
from nucypher.blockchain.economics import EconomicsFactory
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from nucypher.config.constants import SeednodeMetadata
|
||||
from nucypher.config.storages import ForgetfulNodeStorage
|
||||
from nucypher.crypto.api import keccak_digest, verify_eip_191, recover_address_eip_191
|
||||
from nucypher.crypto.api import keccak_digest, recover_address_eip_191, verify_eip_191
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.powers import TransactingPower, SigningPower, DecryptingPower, NoSigningPower
|
||||
from nucypher.crypto.powers import DecryptingPower, NoSigningPower, SigningPower, TransactingPower
|
||||
from nucypher.crypto.signing import signature_splitter
|
||||
from nucypher.network import LEARNING_LOOP_VERSION
|
||||
from nucypher.network.exceptions import NodeSeemsToBeDown
|
||||
|
|
|
@ -14,11 +14,9 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from eth_utils import is_checksum_address
|
||||
|
||||
from bytestring_splitter import VariableLengthBytestring
|
||||
from eth_utils import is_checksum_address
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
||||
class SuspiciousActivity(RuntimeError):
|
||||
|
|
|
@ -16,33 +16,28 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import binascii
|
||||
import json
|
||||
import os
|
||||
from typing import Tuple
|
||||
|
||||
import requests
|
||||
from bytestring_splitter import BytestringSplitter
|
||||
from constant_sorrow import constants
|
||||
from constant_sorrow.constants import FLEET_STATES_MATCH, NO_KNOWN_NODES
|
||||
from constant_sorrow.constants import NO_BLOCKCHAIN_CONNECTION
|
||||
from flask import Flask, Response, request
|
||||
from flask import jsonify
|
||||
from constant_sorrow.constants import FLEET_STATES_MATCH, NO_BLOCKCHAIN_CONNECTION, NO_KNOWN_NODES
|
||||
from flask import Flask, Response, jsonify, request
|
||||
from hendrix.experience import crosstown_traffic
|
||||
from jinja2 import Template, TemplateError
|
||||
from twisted.logger import Logger
|
||||
from typing import Tuple
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.kfrags import KFrag
|
||||
from web3.exceptions import TimeExhausted
|
||||
|
||||
import nucypher
|
||||
from nucypher.config.storages import ForgetfulNodeStorage
|
||||
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH
|
||||
from nucypher.config.storages import ForgetfulNodeStorage
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.powers import KeyPairBasedPower, PowerUpError
|
||||
from nucypher.crypto.signing import InvalidSignature
|
||||
from nucypher.crypto.utils import canonical_address_from_umbral_key
|
||||
from nucypher.datastore.keypairs import HostingKeypair
|
||||
from nucypher.datastore.datastore import NotFound
|
||||
from nucypher.datastore.keypairs import HostingKeypair
|
||||
from nucypher.datastore.threading import ThreadedSession
|
||||
from nucypher.network import LEARNING_LOOP_VERSION
|
||||
from nucypher.network.exceptions import NodeSeemsToBeDown
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import random
|
||||
from typing import Union
|
||||
|
||||
import maya
|
||||
from twisted.internet import reactor
|
||||
from twisted.internet.task import LoopingCall
|
||||
from twisted.logger import Logger
|
||||
from typing import Union
|
||||
|
||||
from nucypher.network.exceptions import NodeSeemsToBeDown
|
||||
from nucypher.network.middleware import RestMiddleware
|
||||
|
|
|
@ -16,19 +16,18 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
import binascii
|
||||
import json
|
||||
from collections import OrderedDict
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
import binascii
|
||||
import maya
|
||||
import msgpack
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring, BytestringSplittingError
|
||||
from constant_sorrow.constants import CFRAG_NOT_RETAINED
|
||||
from constant_sorrow.constants import NO_DECRYPTION_PERFORMED
|
||||
from bytestring_splitter import BytestringSplitter, BytestringSplittingError, VariableLengthBytestring
|
||||
from constant_sorrow.constants import CFRAG_NOT_RETAINED, NO_DECRYPTION_PERFORMED
|
||||
from cryptography.hazmat.backends.openssl import backend
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
from eth_utils import to_canonical_address, to_checksum_address
|
||||
from typing import List, Optional, Tuple
|
||||
from umbral.cfrags import CapsuleFrag
|
||||
from umbral.config import default_params
|
||||
from umbral.curvebn import CurveBN
|
||||
|
@ -36,11 +35,11 @@ from umbral.keys import UmbralPublicKey
|
|||
from umbral.pre import Capsule
|
||||
|
||||
from nucypher.characters.lawful import Bob, Character
|
||||
from nucypher.crypto.api import keccak_digest, encrypt_and_sign
|
||||
from nucypher.crypto.constants import PUBLIC_ADDRESS_LENGTH, KECCAK_DIGEST_LENGTH
|
||||
from nucypher.crypto.api import encrypt_and_sign, keccak_digest
|
||||
from nucypher.crypto.constants import KECCAK_DIGEST_LENGTH, PUBLIC_ADDRESS_LENGTH
|
||||
from nucypher.crypto.kits import UmbralMessageKit
|
||||
from nucypher.crypto.signing import Signature, InvalidSignature, signature_splitter
|
||||
from nucypher.crypto.splitters import key_splitter, capsule_splitter
|
||||
from nucypher.crypto.signing import InvalidSignature, Signature, signature_splitter
|
||||
from nucypher.crypto.splitters import capsule_splitter, key_splitter
|
||||
from nucypher.crypto.utils import (canonical_address_from_umbral_key,
|
||||
get_coordinates_as_bytes,
|
||||
get_signature_recovery_value)
|
||||
|
|
|
@ -16,21 +16,21 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import random
|
||||
from abc import abstractmethod, ABC
|
||||
from collections import OrderedDict, deque
|
||||
from typing import Generator, Set, List
|
||||
|
||||
import maya
|
||||
from abc import ABC, abstractmethod
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from constant_sorrow.constants import NOT_SIGNED, UNKNOWN_KFRAG, FEDERATED_POLICY, UNKNOWN_ARRANGEMENTS
|
||||
from constant_sorrow.constants import NOT_SIGNED, UNKNOWN_KFRAG
|
||||
from twisted.logger import Logger
|
||||
from typing import Generator, List, Set
|
||||
from umbral.keys import UmbralPublicKey
|
||||
from umbral.kfrags import KFrag
|
||||
|
||||
from nucypher.blockchain.eth.actors import BlockchainPolicyAuthor
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent, PolicyManagerAgent
|
||||
from nucypher.blockchain.eth.agents import PolicyManagerAgent, StakingEscrowAgent
|
||||
from nucypher.characters.lawful import Alice, Ursula
|
||||
from nucypher.crypto.api import secure_random, keccak_digest
|
||||
from nucypher.crypto.api import keccak_digest, secure_random
|
||||
from nucypher.crypto.constants import PUBLIC_KEY_LENGTH
|
||||
from nucypher.crypto.kits import RevocationKit
|
||||
from nucypher.crypto.powers import DecryptingPower, SigningPower
|
||||
|
|
|
@ -15,16 +15,15 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import pathlib
|
||||
from contextlib import contextmanager
|
||||
|
||||
from twisted.logger import FileLogObserver, jsonFileLogObserver, formatEvent, formatEventAsClassicLogText
|
||||
from twisted.logger import LogLevel
|
||||
from twisted.logger import globalLogPublisher
|
||||
import pathlib
|
||||
from twisted.logger import FileLogObserver, LogLevel, formatEvent, formatEventAsClassicLogText, globalLogPublisher, \
|
||||
jsonFileLogObserver
|
||||
from twisted.python.logfile import LogFile
|
||||
|
||||
import nucypher
|
||||
from nucypher.config.constants import USER_LOG_DIR, NUCYPHER_SENTRY_ENDPOINT
|
||||
from nucypher.config.constants import NUCYPHER_SENTRY_ENDPOINT, USER_LOG_DIR
|
||||
|
||||
ONE_MEGABYTE = 1_048_576
|
||||
MAXIMUM_LOG_SIZE = ONE_MEGABYTE * 10
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
from eth_utils import is_checksum_address
|
||||
from eth_utils import to_checksum_address
|
||||
from eth_utils import is_checksum_address, to_checksum_address
|
||||
|
||||
from nucypher.blockchain.eth.actors import ContractAdministrator
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface, BlockchainDeployerInterface, \
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainDeployerInterface, BlockchainInterface, \
|
||||
BlockchainInterfaceFactory
|
||||
from nucypher.crypto.api import verify_eip_191
|
||||
|
||||
|
||||
#
|
||||
# NOTE: This module is skipped on CI
|
||||
#
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import shutil
|
||||
|
||||
import json
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
import shutil
|
||||
from cytoolz.dicttoolz import assoc
|
||||
from eth_account import Account
|
||||
from eth_account._utils.transactions import Transaction
|
||||
from eth_utils import to_checksum_address
|
||||
from hexbytes import HexBytes
|
||||
from pathlib import Path
|
||||
|
||||
from nucypher.blockchain.eth.signers import KeystoreSigner, Signer
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
import datetime
|
||||
|
||||
import pytest
|
||||
from web3 import HTTPProvider, IPCProvider, WebsocketProvider
|
||||
|
||||
from nucypher.blockchain.eth.clients import (
|
||||
EthereumClient,
|
||||
GethClient,
|
||||
ParityClient,
|
||||
GanacheClient,
|
||||
InfuraClient,
|
||||
PUBLIC_CHAINS
|
||||
)
|
||||
from nucypher.blockchain.eth.clients import (EthereumClient, GanacheClient, GethClient, InfuraClient, PUBLIC_CHAINS,
|
||||
ParityClient)
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
from nucypher.utilities.sandbox.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils import to_canonical_address, to_wei
|
||||
|
|
|
@ -17,14 +17,12 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
|
||||
from umbral.config import default_params
|
||||
from umbral.curvebn import CurveBN
|
||||
from umbral.keys import UmbralPrivateKey
|
||||
from umbral.point import Point
|
||||
from umbral.random_oracles import hash_to_curvebn, ExtendedKeccak
|
||||
from umbral.random_oracles import ExtendedKeccak, hash_to_curvebn
|
||||
from umbral.signing import Signer
|
||||
|
||||
from nucypher.crypto.signing import SignatureStamp
|
||||
|
|
|
@ -17,20 +17,18 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from cryptography.hazmat.backends.openssl import backend
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
from eth_account.account import Account
|
||||
from eth_account.messages import encode_defunct, SignableMessage, HexBytes
|
||||
from eth_account.messages import HexBytes, SignableMessage, encode_defunct
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils import to_normalized_address, to_checksum_address, to_canonical_address
|
||||
|
||||
from eth_utils import to_canonical_address, to_checksum_address, to_normalized_address
|
||||
from umbral.keys import UmbralPrivateKey
|
||||
from umbral.signing import Signer
|
||||
|
||||
from nucypher.crypto.api import keccak_digest, verify_eip_191
|
||||
from nucypher.crypto.utils import get_signature_recovery_value, canonical_address_from_umbral_key
|
||||
from nucypher.crypto.utils import canonical_address_from_umbral_key, get_signature_recovery_value
|
||||
|
||||
ALGORITHM_KECCAK256 = 0
|
||||
ALGORITHM_SHA256 = 1
|
||||
|
|
|
@ -17,11 +17,9 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
|
||||
from umbral import pre, keys
|
||||
from umbral import keys, pre
|
||||
from umbral.signing import Signer
|
||||
|
||||
|
||||
|
|
|
@ -17,19 +17,15 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils import keccak
|
||||
from typing import Tuple
|
||||
from web3.contract import Contract
|
||||
|
||||
from umbral.keys import UmbralPrivateKey
|
||||
from umbral.point import Point
|
||||
from web3.contract import Contract
|
||||
|
||||
from nucypher.crypto.api import sha256_digest
|
||||
|
||||
|
||||
ALGORITHM_KECCAK256 = 0
|
||||
ALGORITHM_SHA256 = 1
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils import to_canonical_address
|
||||
|
|
|
@ -17,7 +17,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
|
||||
|
|
|
@ -15,12 +15,11 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def token(testerchain, deploy_contract):
|
||||
# Create an ERC20 token
|
||||
|
|
|
@ -24,7 +24,7 @@ from web3.contract import Contract
|
|||
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
from tests.utils.solidity import to_bytes32, get_mapping_entry_location, get_array_data_location
|
||||
from tests.utils.solidity import get_array_data_location, get_mapping_entry_location, to_bytes32
|
||||
|
||||
LOCK_RE_STAKE_UNTIL_PERIOD_FIELD = 4
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import contextlib
|
||||
import os
|
||||
|
||||
import os
|
||||
import pytest
|
||||
import requests
|
||||
from web3.exceptions import ValidationError
|
||||
|
||||
from nucypher.blockchain.eth.deployers import NucypherTokenDeployer, StakingEscrowDeployer, PolicyManagerDeployer, \
|
||||
AdjudicatorDeployer, BaseContractDeployer
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterfaceFactory, BlockchainDeployerInterface
|
||||
from nucypher.blockchain.eth.deployers import AdjudicatorDeployer, BaseContractDeployer, NucypherTokenDeployer, \
|
||||
PolicyManagerDeployer, StakingEscrowDeployer
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainDeployerInterface, BlockchainInterfaceFactory
|
||||
from nucypher.blockchain.eth.registry import InMemoryContractRegistry
|
||||
from nucypher.blockchain.eth.sol.compile import SolidityCompiler, SourceDirs
|
||||
from nucypher.crypto.powers import TransactingPower
|
||||
|
|
|
@ -26,7 +26,7 @@ from nucypher.characters.control.emitters import StdoutEmitter
|
|||
from nucypher.crypto.powers import TransactingPower
|
||||
# Prevents TesterBlockchain to be picked up by py.test as a test class
|
||||
from tests.utils.blockchain import TesterBlockchain as _TesterBlockchain
|
||||
from tests.utils.constants import NUMBER_OF_ALLOCATIONS_IN_TESTS, INSECURE_DEVELOPMENT_PASSWORD
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD, NUMBER_OF_ALLOCATIONS_IN_TESTS
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
|
|
|
@ -16,11 +16,10 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from umbral.keys import UmbralPrivateKey
|
||||
from umbral.signing import Signer
|
||||
|
||||
from nucypher.blockchain.eth.actors import Staker, Investigator
|
||||
from nucypher.blockchain.eth.actors import Investigator, Staker
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.token import NU
|
||||
from nucypher.crypto.signing import SignatureStamp
|
||||
|
|
|
@ -16,13 +16,11 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import PropertyMock, patch
|
||||
|
||||
from nucypher.blockchain.eth.actors import Trustee
|
||||
from nucypher.blockchain.eth.agents import MultiSigAgent
|
||||
from nucypher.blockchain.eth.deployers import MultiSigDeployer
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface
|
||||
|
||||
from unittest.mock import PropertyMock, patch
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
|
|
|
@ -16,7 +16,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from umbral.keys import UmbralPrivateKey
|
||||
from umbral.signing import Signer
|
||||
|
||||
|
|
|
@ -14,9 +14,8 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os
|
||||
|
||||
import maya
|
||||
import os
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils import is_checksum_address, to_wei
|
||||
|
|
|
@ -15,9 +15,10 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from collections import Counter
|
||||
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.economics import BaseEconomics
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS, STAKING_ESCROW_CONTRACT_NAME
|
||||
|
|
|
@ -16,12 +16,11 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from eth_utils.address import to_checksum_address, is_address
|
||||
from eth_utils.address import is_address, to_checksum_address
|
||||
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.constants import NULL_ADDRESS
|
||||
from nucypher.blockchain.eth.registry import BaseContractRegistry
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
|
||||
from nucypher.blockchain.eth.agents import WorkLockAgent, ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent, WorkLockAgent
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainInterface
|
||||
|
||||
|
||||
|
|
|
@ -17,11 +17,8 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.deployers import (NucypherTokenDeployer,
|
||||
StakingEscrowDeployer,
|
||||
PolicyManagerDeployer,
|
||||
AdjudicatorDeployer,
|
||||
StakingInterfaceDeployer)
|
||||
from nucypher.blockchain.eth.deployers import (AdjudicatorDeployer, NucypherTokenDeployer, PolicyManagerDeployer,
|
||||
StakingEscrowDeployer, StakingInterfaceDeployer)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
|
|
@ -16,16 +16,13 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
from constant_sorrow import constants
|
||||
from eth_tester.exceptions import TransactionFailed
|
||||
|
||||
from nucypher.blockchain.eth.actors import Staker
|
||||
from nucypher.blockchain.eth.agents import NucypherTokenAgent, StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.deployers import (NucypherTokenDeployer,
|
||||
StakingEscrowDeployer,
|
||||
PolicyManagerDeployer,
|
||||
AdjudicatorDeployer,
|
||||
BaseContractDeployer)
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, NucypherTokenAgent, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.deployers import (AdjudicatorDeployer, BaseContractDeployer, NucypherTokenDeployer,
|
||||
PolicyManagerDeployer, StakingEscrowDeployer)
|
||||
from nucypher.crypto.powers import TransactingPower
|
||||
from tests.utils.blockchain import token_airdrop
|
||||
from tests.utils.constants import DEVELOPMENT_TOKEN_AIRDROP_AMOUNT, INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
|
|
@ -15,12 +15,11 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.deployers import PreallocationEscrowDeployer, StakingInterfaceDeployer
|
||||
from nucypher.blockchain.eth.deployers import PreallocationEscrowDeployer
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
|
|
|
@ -14,19 +14,13 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from eth_utils import keccak
|
||||
from constant_sorrow import constants
|
||||
|
||||
from nucypher.blockchain.eth.agents import NucypherTokenAgent, StakingEscrowAgent, AdjudicatorAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.deployers import (NucypherTokenDeployer,
|
||||
StakingEscrowDeployer,
|
||||
PolicyManagerDeployer,
|
||||
AdjudicatorDeployer,
|
||||
BaseContractDeployer,
|
||||
DispatcherDeployer)
|
||||
from nucypher.blockchain.eth.agents import AdjudicatorAgent, ContractAgency, NucypherTokenAgent, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.deployers import (AdjudicatorDeployer, BaseContractDeployer, NucypherTokenDeployer,
|
||||
PolicyManagerDeployer, StakingEscrowDeployer)
|
||||
|
||||
|
||||
@pytest.mark.slow()
|
||||
|
|
|
@ -15,16 +15,9 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
|
||||
import pytest
|
||||
from eth_utils import keccak
|
||||
|
||||
from nucypher.blockchain.eth.agents import PolicyManagerAgent, StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, PolicyManagerAgent, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.constants import POLICY_MANAGER_CONTRACT_NAME
|
||||
from nucypher.blockchain.eth.deployers import (
|
||||
PolicyManagerDeployer,
|
||||
DispatcherDeployer
|
||||
)
|
||||
from nucypher.blockchain.eth.deployers import (DispatcherDeployer, PolicyManagerDeployer)
|
||||
|
||||
|
||||
def test_policy_manager_deployment(policy_manager_deployer, staking_escrow_deployer, deployment_progress):
|
||||
|
|
|
@ -18,16 +18,9 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.deployers import (
|
||||
PreallocationEscrowDeployer,
|
||||
StakingInterfaceDeployer,
|
||||
StakingInterfaceRouterDeployer,
|
||||
NucypherTokenDeployer,
|
||||
StakingEscrowDeployer,
|
||||
PolicyManagerDeployer,
|
||||
AdjudicatorDeployer
|
||||
)
|
||||
from nucypher.crypto.api import keccak_digest
|
||||
from nucypher.blockchain.eth.deployers import (AdjudicatorDeployer, NucypherTokenDeployer, PolicyManagerDeployer,
|
||||
PreallocationEscrowDeployer, StakingEscrowDeployer,
|
||||
StakingInterfaceDeployer, StakingInterfaceRouterDeployer)
|
||||
|
||||
preallocation_escrow_contracts = list()
|
||||
NUMBER_OF_PREALLOCATIONS = 50
|
||||
|
|
|
@ -15,14 +15,10 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from constant_sorrow.constants import BARE
|
||||
from eth_utils import keccak
|
||||
|
||||
from nucypher.blockchain.eth.agents import StakingEscrowAgent, ContractAgency
|
||||
from nucypher.blockchain.eth.deployers import (StakingEscrowDeployer,
|
||||
DispatcherDeployer)
|
||||
from nucypher.crypto.api import keccak_digest
|
||||
from nucypher.blockchain.eth.agents import ContractAgency, StakingEscrowAgent
|
||||
from nucypher.blockchain.eth.deployers import (DispatcherDeployer, StakingEscrowDeployer)
|
||||
|
||||
|
||||
def test_staking_escrow_deployment(staking_escrow_deployer, deployment_progress):
|
||||
|
|
|
@ -14,9 +14,9 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os
|
||||
from os.path import dirname, abspath
|
||||
from os.path import abspath, dirname
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.interfaces import BlockchainDeployerInterface
|
||||
|
@ -25,13 +25,9 @@ from nucypher.blockchain.eth.sol.compile import SolidityCompiler, SourceDirs
|
|||
from nucypher.crypto.powers import TransactingPower
|
||||
# Prevents TesterBlockchain to be picked up by py.test as a test class
|
||||
from tests.utils.blockchain import TesterBlockchain as _TesterBlockchain
|
||||
from tests.utils.constants import (
|
||||
DEVELOPMENT_ETH_AIRDROP_AMOUNT,
|
||||
NUMBER_OF_ETH_TEST_ACCOUNTS,
|
||||
NUMBER_OF_STAKERS_IN_BLOCKCHAIN_TESTS,
|
||||
NUMBER_OF_URSULAS_IN_BLOCKCHAIN_TESTS,
|
||||
INSECURE_DEVELOPMENT_PASSWORD
|
||||
)
|
||||
from tests.utils.constants import (DEVELOPMENT_ETH_AIRDROP_AMOUNT, INSECURE_DEVELOPMENT_PASSWORD,
|
||||
NUMBER_OF_ETH_TEST_ACCOUNTS, NUMBER_OF_STAKERS_IN_BLOCKCHAIN_TESTS,
|
||||
NUMBER_OF_URSULAS_IN_BLOCKCHAIN_TESTS)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
|
|
@ -15,12 +15,9 @@ You should have received a copy of the GNU Affero General Public License
|
|||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from eth_utils import to_checksum_address
|
||||
|
||||
from nucypher.blockchain.eth.decorators import validate_checksum_address, InvalidChecksumAddress
|
||||
from nucypher.blockchain.eth.decorators import InvalidChecksumAddress, validate_checksum_address
|
||||
|
||||
|
||||
def test_validate_checksum_address(get_random_checksum_address):
|
||||
|
|
|
@ -16,11 +16,12 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
from nucypher.blockchain.eth.constants import PREALLOCATION_ESCROW_CONTRACT_NAME
|
||||
from nucypher.blockchain.eth.interfaces import BaseContractRegistry
|
||||
from nucypher.blockchain.eth.registry import LocalContractRegistry, IndividualAllocationRegistry
|
||||
from nucypher.blockchain.eth.registry import IndividualAllocationRegistry, LocalContractRegistry
|
||||
from tests.utils.constants import TEMPORARY_DOMAIN
|
||||
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@ GNU Affero General Public License for more details.
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from os.path import abspath, dirname
|
||||
|
||||
import os
|
||||
from os.path import dirname, abspath
|
||||
|
||||
from nucypher.blockchain.eth.deployers import NucypherTokenDeployer
|
||||
from nucypher.blockchain.eth.sol.compile import SolidityCompiler, SourceDirs
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from decimal import InvalidOperation, Decimal
|
||||
|
||||
import pytest
|
||||
from decimal import Decimal, InvalidOperation
|
||||
from web3 import Web3
|
||||
|
||||
from nucypher.blockchain.eth.token import NU, Stake
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
from base64 import b64encode
|
||||
|
||||
import datetime
|
||||
import maya
|
||||
import pytest
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from base64 import b64encode
|
||||
|
||||
import pytest
|
||||
|
||||
from base64 import b64encode
|
||||
from nucypher.policy.collections import TreasureMap
|
||||
from nucypher.crypto.powers import DecryptingPower, SigningPower
|
||||
from nucypher.characters.lawful import Ursula
|
||||
from nucypher.characters.control.interfaces import AliceInterface, BobInterface, EnricoInterface
|
||||
from nucypher.crypto.powers import DecryptingPower, SigningPower
|
||||
from nucypher.policy.collections import TreasureMap
|
||||
|
||||
|
||||
def get_fields(interface, method_name):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
import json
|
||||
from base64 import b64encode, b64decode
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
import datetime
|
||||
import maya
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
from base64 import b64encode
|
||||
|
||||
import datetime
|
||||
import maya
|
||||
import pytest
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
import json
|
||||
from base64 import b64encode, b64decode
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
import datetime
|
||||
import maya
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
|
|
|
@ -16,17 +16,16 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import datetime
|
||||
import os
|
||||
|
||||
import maya
|
||||
import os
|
||||
import pytest
|
||||
from umbral.kfrags import KFrag
|
||||
|
||||
from nucypher.characters.lawful import Bob, Enrico
|
||||
from nucypher.config.characters import AliceConfiguration
|
||||
from nucypher.crypto.api import keccak_digest
|
||||
from nucypher.crypto.powers import SigningPower, DecryptingPower
|
||||
from nucypher.policy.collections import Revocation, PolicyCredential
|
||||
from nucypher.crypto.powers import DecryptingPower, SigningPower
|
||||
from nucypher.policy.collections import PolicyCredential, Revocation
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
from tests.utils.middleware import MockRestMiddleware
|
||||
|
||||
|
|
|
@ -23,10 +23,9 @@ from umbral.cfrags import CapsuleFrag
|
|||
from umbral.kfrags import KFrag
|
||||
|
||||
from nucypher.crypto.kits import PolicyMessageKit
|
||||
from tests.utils.middleware import NodeIsDownMiddleware
|
||||
from nucypher.crypto.powers import DecryptingPower
|
||||
from tests.utils.constants import TEMPORARY_DOMAIN
|
||||
from tests.utils.middleware import MockRestMiddleware
|
||||
from tests.utils.middleware import MockRestMiddleware, NodeIsDownMiddleware
|
||||
|
||||
|
||||
def test_bob_cannot_follow_the_treasure_map_in_isolation(enacted_federated_policy, federated_bob):
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
import datetime
|
||||
import os
|
||||
|
||||
import maya
|
||||
import os
|
||||
import pytest
|
||||
import time
|
||||
|
||||
from constant_sorrow.constants import NO_DECRYPTION_PERFORMED
|
||||
from twisted.internet.task import Clock
|
||||
|
||||
from nucypher.characters.lawful import Bob, Ursula
|
||||
from nucypher.characters.lawful import Enrico
|
||||
from nucypher.characters.lawful import Bob, Enrico, Ursula
|
||||
from nucypher.policy.collections import TreasureMap
|
||||
from tests.utils.constants import (
|
||||
NUMBER_OF_URSULAS_IN_DEVELOPMENT_NETWORK,
|
||||
MOCK_POLICY_DEFAULT_M,
|
||||
TEMPORARY_DOMAIN
|
||||
)
|
||||
from tests.utils.constants import (MOCK_POLICY_DEFAULT_M, NUMBER_OF_URSULAS_IN_DEVELOPMENT_NETWORK, TEMPORARY_DOMAIN)
|
||||
from tests.utils.middleware import MockRestMiddleware
|
||||
|
||||
|
||||
|
|
|
@ -23,14 +23,10 @@ from eth_account._utils.transactions import Transaction
|
|||
from eth_utils import to_checksum_address
|
||||
|
||||
from nucypher.blockchain.eth.signers import Web3Signer
|
||||
from nucypher.characters.lawful import Alice, Character, Bob
|
||||
from nucypher.characters.lawful import Enrico
|
||||
from nucypher.characters.lawful import Alice, Bob, Character, Enrico
|
||||
from nucypher.crypto import api
|
||||
from nucypher.crypto.api import verify_eip_191
|
||||
from nucypher.crypto.powers import (CryptoPower,
|
||||
SigningPower,
|
||||
NoSigningPower,
|
||||
TransactingPower)
|
||||
from nucypher.crypto.powers import (CryptoPower, NoSigningPower, SigningPower, TransactingPower)
|
||||
from tests.utils.constants import INSECURE_DEVELOPMENT_PASSWORD
|
||||
|
||||
"""
|
||||
|
|
|
@ -16,7 +16,6 @@ along with nucypher. If not, see <https://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
import datetime
|
||||
|
||||
import maya
|
||||
import pytest
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue