# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: okapi/security/v1/security.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import List

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase


@dataclass(eq=False, repr=False)
class CreateOberonKeyRequest(betterproto.Message):
    """Create an Oberon Compatible Secret Key"""

    seed: bytes = betterproto.bytes_field(1)


@dataclass(eq=False, repr=False)
class CreateOberonKeyResponse(betterproto.Message):
    """Contains the oberon secret key bytes"""

    sk: bytes = betterproto.bytes_field(2)
    pk: bytes = betterproto.bytes_field(3)


@dataclass(eq=False, repr=False)
class CreateOberonTokenRequest(betterproto.Message):
    """Create a new oberon token"""

    sk: bytes = betterproto.bytes_field(1)
    data: bytes = betterproto.bytes_field(2)
    blinding: List[bytes] = betterproto.bytes_field(3)


@dataclass(eq=False, repr=False)
class CreateOberonTokenResponse(betterproto.Message):
    """Contains the token with optional blinding"""

    token: bytes = betterproto.bytes_field(1)


@dataclass(eq=False, repr=False)
class CreateOberonProofRequest(betterproto.Message):
    """Create a proof that holder knows the token"""

    data: bytes = betterproto.bytes_field(1)
    token: bytes = betterproto.bytes_field(2)
    blinding: List[bytes] = betterproto.bytes_field(3)
    nonce: bytes = betterproto.bytes_field(4)


@dataclass(eq=False, repr=False)
class CreateOberonProofResponse(betterproto.Message):
    """Contains the token proof"""

    proof: bytes = betterproto.bytes_field(2)


@dataclass(eq=False, repr=False)
class VerifyOberonProofRequest(betterproto.Message):
    """Verify the presented proof is valid"""

    proof: bytes = betterproto.bytes_field(1)
    data: bytes = betterproto.bytes_field(2)
    nonce: bytes = betterproto.bytes_field(3)
    pk: bytes = betterproto.bytes_field(4)


@dataclass(eq=False, repr=False)
class VerifyOberonProofResponse(betterproto.Message):
    """Contains the status of the proof validation"""

    valid: bool = betterproto.bool_field(1)


@dataclass(eq=False, repr=False)
class BlindOberonTokenRequest(betterproto.Message):
    """Blind an oberon token"""

    token: bytes = betterproto.bytes_field(1)
    blinding: List[bytes] = betterproto.bytes_field(2)


@dataclass(eq=False, repr=False)
class BlindOberonTokenResponse(betterproto.Message):
    """Contains the blinded token reply"""

    token: bytes = betterproto.bytes_field(1)


@dataclass(eq=False, repr=False)
class UnBlindOberonTokenRequest(betterproto.Message):
    """UnBlind an oberon token"""

    token: bytes = betterproto.bytes_field(1)
    blinding: List[bytes] = betterproto.bytes_field(2)


@dataclass(eq=False, repr=False)
class UnBlindOberonTokenResponse(betterproto.Message):
    """Contains the unblinded token reply"""

    token: bytes = betterproto.bytes_field(1)
