mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
rebuild protobufs adding ECC_P256 to KeyType
This commit is contained in:
@ -2,20 +2,16 @@
|
||||
@generated by mypy-protobuf. Do not edit manually!
|
||||
isort:skip_file
|
||||
"""
|
||||
|
||||
import builtins
|
||||
import google.protobuf.descriptor
|
||||
import google.protobuf.message
|
||||
import libp2p.crypto.pb.crypto_pb2
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
import typing as typing_extensions
|
||||
else:
|
||||
import typing_extensions
|
||||
import typing
|
||||
|
||||
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
||||
|
||||
@typing_extensions.final
|
||||
@typing.final
|
||||
class Exchange(google.protobuf.message.Message):
|
||||
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
||||
|
||||
@ -30,7 +26,7 @@ class Exchange(google.protobuf.message.Message):
|
||||
id: builtins.bytes | None = ...,
|
||||
pubkey: libp2p.crypto.pb.crypto_pb2.PublicKey | None = ...,
|
||||
) -> None: ...
|
||||
def HasField(self, field_name: typing_extensions.Literal["id", b"id", "pubkey", b"pubkey"]) -> builtins.bool: ...
|
||||
def ClearField(self, field_name: typing_extensions.Literal["id", b"id", "pubkey", b"pubkey"]) -> None: ...
|
||||
def HasField(self, field_name: typing.Literal["id", b"id", "pubkey", b"pubkey"]) -> builtins.bool: ...
|
||||
def ClearField(self, field_name: typing.Literal["id", b"id", "pubkey", b"pubkey"]) -> None: ...
|
||||
|
||||
global___Exchange = Exchange
|
||||
|
||||
@ -182,8 +182,7 @@ class InsecureTransport(BaseSecureTransport):
|
||||
|
||||
def make_exchange_message(pubkey: PublicKey) -> plaintext_pb2.Exchange:
|
||||
pubkey_pb = crypto_pb2.PublicKey(
|
||||
# type ignored - TODO add ECD_P256 to KeyType
|
||||
key_type=pubkey.get_type().value, # type: ignore
|
||||
key_type=pubkey.get_type().value,
|
||||
data=pubkey.to_bytes(),
|
||||
)
|
||||
id_bytes = ID.from_pubkey(pubkey).to_bytes()
|
||||
|
||||
Reference in New Issue
Block a user