Initial version with identity handling
This commit is contained in:
22
mypy-stubs/ed25519/__init__.pyi
Normal file
22
mypy-stubs/ed25519/__init__.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
from .keys import (
|
||||
BadSignatureError,
|
||||
BadPrefixError,
|
||||
create_keypair,
|
||||
SigningKey,
|
||||
VerifyingKey,
|
||||
remove_prefix,
|
||||
to_ascii,
|
||||
from_ascii,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
'BadSignatureError',
|
||||
'BadPrefixError',
|
||||
'create_keypair',
|
||||
'SigningKey',
|
||||
'VerifyingKey',
|
||||
'remove_prefix',
|
||||
'to_ascii',
|
||||
'from_ascii',
|
||||
'__version__'
|
||||
)
|
3
mypy-stubs/ed25519/_version.pyi
Normal file
3
mypy-stubs/ed25519/_version.pyi
Normal file
@@ -0,0 +1,3 @@
|
||||
version_json: str
|
||||
|
||||
def get_versions(): ...
|
32
mypy-stubs/ed25519/keys.pyi
Normal file
32
mypy-stubs/ed25519/keys.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
from typing import Any, Callable, Optional, Tuple
|
||||
|
||||
BadSignatureError: Any
|
||||
|
||||
def create_keypair(entropy: Callable[[int], bytes] = ...) -> Tuple[SigningKey, VerifyingKey]: ...
|
||||
|
||||
class BadPrefixError(Exception): ...
|
||||
|
||||
def remove_prefix(s_bytes: bytes, prefix: bytes) -> bytes: ...
|
||||
def to_ascii(s_bytes: bytes, prefix: str = ..., encoding: str = ...) -> str: ...
|
||||
def from_ascii(s_ascii: str, prefix: str = ..., encoding: str = ...) -> bytes: ...
|
||||
|
||||
class SigningKey:
|
||||
sk_s: bytes
|
||||
vk_s: bytes
|
||||
def __init__(self, sk_s: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> None: ...
|
||||
def to_bytes(self, prefix: str = ...) -> bytes: ...
|
||||
def to_ascii(self, prefix: str = ..., encoding: Optional[str] = ...) -> str: ...
|
||||
def to_seed(self, prefix: str = ...) -> bytes: ...
|
||||
def __eq__(self, them: object) -> bool: ...
|
||||
def get_verifying_key(self) -> VerifyingKey: ...
|
||||
def sign(self, msg: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> bytes: ...
|
||||
|
||||
class VerifyingKey:
|
||||
vk_s: bytes
|
||||
def __init__(self, vk_s: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> None: ...
|
||||
def to_bytes(self, prefix: str = ...) -> bytes: ...
|
||||
def to_ascii(self, prefix: str = ..., encoding: Optional[str] = ...) -> str: ...
|
||||
def __eq__(self, them: object) -> bool: ...
|
||||
def verify(self, sig: bytes, msg: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> bool: ...
|
||||
|
||||
def selftest() -> None: ...
|
Reference in New Issue
Block a user