Esempio n. 1
0
def ecc_backend():
    return NativeECCBackend()
Esempio n. 2
0
def native_key_api():
    return KeyAPI(backend=NativeECCBackend())
Esempio n. 3
0
 def key_api(cls):
     return KeyAPI(backend=NativeECCBackend())
Esempio n. 4
0
import os

import pytest

from eth_keys import KeyAPI
from eth_keys.backends import CoinCurveECCBackend
from eth_keys.backends import NativeECCBackend

from eth_utils import (
    keccak, )

MSG = b'message'
MSGHASH = keccak(MSG)

backends = [
    NativeECCBackend(),
]

try:
    import coincurve
    backends.append(CoinCurveECCBackend())
except ImportError:
    if 'REQUIRE_COINCURVE' in os.environ:
        raise


def backend_id_fn(backend):
    return type(backend).__name__


@pytest.fixture(params=backends, ids=backend_id_fn)
Esempio n. 5
0
def native_backend():
    return NativeECCBackend()