"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2019 Shift Cryptosecurity AG
Copyright 2020 Shift Crypto AG

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from . import antiklepto_pb2
import builtins
import collections.abc
from . import common_pb2
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _BTCCoin:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _BTCCoinEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_BTCCoin.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    BTC: _BTCCoin.ValueType  # 0
    TBTC: _BTCCoin.ValueType  # 1
    LTC: _BTCCoin.ValueType  # 2
    TLTC: _BTCCoin.ValueType  # 3
    RBTC: _BTCCoin.ValueType  # 4
    """Regtest"""

class BTCCoin(_BTCCoin, metaclass=_BTCCoinEnumTypeWrapper): ...

BTC: BTCCoin.ValueType  # 0
TBTC: BTCCoin.ValueType  # 1
LTC: BTCCoin.ValueType  # 2
TLTC: BTCCoin.ValueType  # 3
RBTC: BTCCoin.ValueType  # 4
"""Regtest"""
global___BTCCoin = BTCCoin

class _BTCOutputType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _BTCOutputTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_BTCOutputType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    UNKNOWN: _BTCOutputType.ValueType  # 0
    P2PKH: _BTCOutputType.ValueType  # 1
    P2SH: _BTCOutputType.ValueType  # 2
    P2WPKH: _BTCOutputType.ValueType  # 3
    P2WSH: _BTCOutputType.ValueType  # 4
    P2TR: _BTCOutputType.ValueType  # 5

class BTCOutputType(_BTCOutputType, metaclass=_BTCOutputTypeEnumTypeWrapper): ...

UNKNOWN: BTCOutputType.ValueType  # 0
P2PKH: BTCOutputType.ValueType  # 1
P2SH: BTCOutputType.ValueType  # 2
P2WPKH: BTCOutputType.ValueType  # 3
P2WSH: BTCOutputType.ValueType  # 4
P2TR: BTCOutputType.ValueType  # 5
global___BTCOutputType = BTCOutputType

@typing.final
class BTCScriptConfig(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _SimpleType:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _SimpleTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCScriptConfig._SimpleType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        P2WPKH_P2SH: BTCScriptConfig._SimpleType.ValueType  # 0
        P2WPKH: BTCScriptConfig._SimpleType.ValueType  # 1
        P2TR: BTCScriptConfig._SimpleType.ValueType  # 2

    class SimpleType(_SimpleType, metaclass=_SimpleTypeEnumTypeWrapper):
        """SimpleType is a "simple" script: one public key, no additional inputs."""

    P2WPKH_P2SH: BTCScriptConfig.SimpleType.ValueType  # 0
    P2WPKH: BTCScriptConfig.SimpleType.ValueType  # 1
    P2TR: BTCScriptConfig.SimpleType.ValueType  # 2

    @typing.final
    class Multisig(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class _ScriptType:
            ValueType = typing.NewType("ValueType", builtins.int)
            V: typing_extensions.TypeAlias = ValueType

        class _ScriptTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCScriptConfig.Multisig._ScriptType.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            P2WSH: BTCScriptConfig.Multisig._ScriptType.ValueType  # 0
            """native segwit v0 multisig (bech32 addresses)"""
            P2WSH_P2SH: BTCScriptConfig.Multisig._ScriptType.ValueType  # 1
            """wrapped segwit for legacy address compatibility"""

        class ScriptType(_ScriptType, metaclass=_ScriptTypeEnumTypeWrapper): ...
        P2WSH: BTCScriptConfig.Multisig.ScriptType.ValueType  # 0
        """native segwit v0 multisig (bech32 addresses)"""
        P2WSH_P2SH: BTCScriptConfig.Multisig.ScriptType.ValueType  # 1
        """wrapped segwit for legacy address compatibility"""

        THRESHOLD_FIELD_NUMBER: builtins.int
        XPUBS_FIELD_NUMBER: builtins.int
        OUR_XPUB_INDEX_FIELD_NUMBER: builtins.int
        SCRIPT_TYPE_FIELD_NUMBER: builtins.int
        threshold: builtins.int
        our_xpub_index: builtins.int
        """Index to the xpub of our keystore in xpubs. The keypath to it is provided via
        BTCPubRequest/BTCSignInit.
        """
        script_type: global___BTCScriptConfig.Multisig.ScriptType.ValueType
        @property
        def xpubs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[common_pb2.XPub]:
            """xpubs are acount-level xpubs. Addresses are going to be derived from it using: `m/<change>/<receive>`.
            The number of xpubs defines the number of cosigners.
            """

        def __init__(
            self,
            *,
            threshold: builtins.int = ...,
            xpubs: collections.abc.Iterable[common_pb2.XPub] | None = ...,
            our_xpub_index: builtins.int = ...,
            script_type: global___BTCScriptConfig.Multisig.ScriptType.ValueType = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["our_xpub_index", b"our_xpub_index", "script_type", b"script_type", "threshold", b"threshold", "xpubs", b"xpubs"]) -> None: ...

    @typing.final
    class Policy(google.protobuf.message.Message):
        """A policy as specified by 'Wallet policies':
        https://github.com/bitcoin/bips/pull/1389
        """

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        POLICY_FIELD_NUMBER: builtins.int
        KEYS_FIELD_NUMBER: builtins.int
        policy: builtins.str
        @property
        def keys(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[common_pb2.KeyOriginInfo]: ...
        def __init__(
            self,
            *,
            policy: builtins.str = ...,
            keys: collections.abc.Iterable[common_pb2.KeyOriginInfo] | None = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["keys", b"keys", "policy", b"policy"]) -> None: ...

    SIMPLE_TYPE_FIELD_NUMBER: builtins.int
    MULTISIG_FIELD_NUMBER: builtins.int
    POLICY_FIELD_NUMBER: builtins.int
    simple_type: global___BTCScriptConfig.SimpleType.ValueType
    @property
    def multisig(self) -> global___BTCScriptConfig.Multisig: ...
    @property
    def policy(self) -> global___BTCScriptConfig.Policy: ...
    def __init__(
        self,
        *,
        simple_type: global___BTCScriptConfig.SimpleType.ValueType = ...,
        multisig: global___BTCScriptConfig.Multisig | None = ...,
        policy: global___BTCScriptConfig.Policy | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["config", b"config", "multisig", b"multisig", "policy", b"policy", "simple_type", b"simple_type"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["config", b"config", "multisig", b"multisig", "policy", b"policy", "simple_type", b"simple_type"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["config", b"config"]) -> typing.Literal["simple_type", "multisig", "policy"] | None: ...

global___BTCScriptConfig = BTCScriptConfig

@typing.final
class BTCPubRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _XPubType:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _XPubTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCPubRequest._XPubType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        TPUB: BTCPubRequest._XPubType.ValueType  # 0
        XPUB: BTCPubRequest._XPubType.ValueType  # 1
        YPUB: BTCPubRequest._XPubType.ValueType  # 2
        ZPUB: BTCPubRequest._XPubType.ValueType  # 3
        """zpub"""
        VPUB: BTCPubRequest._XPubType.ValueType  # 4
        """vpub"""
        UPUB: BTCPubRequest._XPubType.ValueType  # 5
        CAPITAL_VPUB: BTCPubRequest._XPubType.ValueType  # 6
        """Vpub"""
        CAPITAL_ZPUB: BTCPubRequest._XPubType.ValueType  # 7
        """Zpub"""
        CAPITAL_UPUB: BTCPubRequest._XPubType.ValueType  # 8
        """Upub"""
        CAPITAL_YPUB: BTCPubRequest._XPubType.ValueType  # 9
        """Ypub"""

    class XPubType(_XPubType, metaclass=_XPubTypeEnumTypeWrapper): ...
    TPUB: BTCPubRequest.XPubType.ValueType  # 0
    XPUB: BTCPubRequest.XPubType.ValueType  # 1
    YPUB: BTCPubRequest.XPubType.ValueType  # 2
    ZPUB: BTCPubRequest.XPubType.ValueType  # 3
    """zpub"""
    VPUB: BTCPubRequest.XPubType.ValueType  # 4
    """vpub"""
    UPUB: BTCPubRequest.XPubType.ValueType  # 5
    CAPITAL_VPUB: BTCPubRequest.XPubType.ValueType  # 6
    """Vpub"""
    CAPITAL_ZPUB: BTCPubRequest.XPubType.ValueType  # 7
    """Zpub"""
    CAPITAL_UPUB: BTCPubRequest.XPubType.ValueType  # 8
    """Upub"""
    CAPITAL_YPUB: BTCPubRequest.XPubType.ValueType  # 9
    """Ypub"""

    COIN_FIELD_NUMBER: builtins.int
    KEYPATH_FIELD_NUMBER: builtins.int
    XPUB_TYPE_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIG_FIELD_NUMBER: builtins.int
    DISPLAY_FIELD_NUMBER: builtins.int
    coin: global___BTCCoin.ValueType
    xpub_type: global___BTCPubRequest.XPubType.ValueType
    display: builtins.bool
    @property
    def keypath(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    @property
    def script_config(self) -> global___BTCScriptConfig: ...
    def __init__(
        self,
        *,
        coin: global___BTCCoin.ValueType = ...,
        keypath: collections.abc.Iterable[builtins.int] | None = ...,
        xpub_type: global___BTCPubRequest.XPubType.ValueType = ...,
        script_config: global___BTCScriptConfig | None = ...,
        display: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["output", b"output", "script_config", b"script_config", "xpub_type", b"xpub_type"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["coin", b"coin", "display", b"display", "keypath", b"keypath", "output", b"output", "script_config", b"script_config", "xpub_type", b"xpub_type"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["output", b"output"]) -> typing.Literal["xpub_type", "script_config"] | None: ...

global___BTCPubRequest = BTCPubRequest

@typing.final
class BTCScriptConfigWithKeypath(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SCRIPT_CONFIG_FIELD_NUMBER: builtins.int
    KEYPATH_FIELD_NUMBER: builtins.int
    @property
    def script_config(self) -> global___BTCScriptConfig: ...
    @property
    def keypath(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    def __init__(
        self,
        *,
        script_config: global___BTCScriptConfig | None = ...,
        keypath: collections.abc.Iterable[builtins.int] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["script_config", b"script_config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["keypath", b"keypath", "script_config", b"script_config"]) -> None: ...

global___BTCScriptConfigWithKeypath = BTCScriptConfigWithKeypath

@typing.final
class BTCSignInitRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _FormatUnit:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _FormatUnitEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCSignInitRequest._FormatUnit.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        DEFAULT: BTCSignInitRequest._FormatUnit.ValueType  # 0
        """According to `coin` (BTC, LTC, etc.)."""
        SAT: BTCSignInitRequest._FormatUnit.ValueType  # 1
        """Only valid for BTC/TBTC, formats as "sat"/"tsat"."""

    class FormatUnit(_FormatUnit, metaclass=_FormatUnitEnumTypeWrapper): ...
    DEFAULT: BTCSignInitRequest.FormatUnit.ValueType  # 0
    """According to `coin` (BTC, LTC, etc.)."""
    SAT: BTCSignInitRequest.FormatUnit.ValueType  # 1
    """Only valid for BTC/TBTC, formats as "sat"/"tsat"."""

    COIN_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIGS_FIELD_NUMBER: builtins.int
    VERSION_FIELD_NUMBER: builtins.int
    NUM_INPUTS_FIELD_NUMBER: builtins.int
    NUM_OUTPUTS_FIELD_NUMBER: builtins.int
    LOCKTIME_FIELD_NUMBER: builtins.int
    FORMAT_UNIT_FIELD_NUMBER: builtins.int
    CONTAINS_SILENT_PAYMENT_OUTPUTS_FIELD_NUMBER: builtins.int
    OUTPUT_SCRIPT_CONFIGS_FIELD_NUMBER: builtins.int
    coin: global___BTCCoin.ValueType
    version: builtins.int
    """must be 1 or 2"""
    num_inputs: builtins.int
    num_outputs: builtins.int
    locktime: builtins.int
    """must be <500000000"""
    format_unit: global___BTCSignInitRequest.FormatUnit.ValueType
    contains_silent_payment_outputs: builtins.bool
    @property
    def script_configs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BTCScriptConfigWithKeypath]:
        """used script configs in inputs and changes"""

    @property
    def output_script_configs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BTCScriptConfigWithKeypath]:
        """used script configs for outputs that send to an address of the same keystore, but not
        necessarily the same account (as defined by `script_configs` above).
        """

    def __init__(
        self,
        *,
        coin: global___BTCCoin.ValueType = ...,
        script_configs: collections.abc.Iterable[global___BTCScriptConfigWithKeypath] | None = ...,
        version: builtins.int = ...,
        num_inputs: builtins.int = ...,
        num_outputs: builtins.int = ...,
        locktime: builtins.int = ...,
        format_unit: global___BTCSignInitRequest.FormatUnit.ValueType = ...,
        contains_silent_payment_outputs: builtins.bool = ...,
        output_script_configs: collections.abc.Iterable[global___BTCScriptConfigWithKeypath] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["coin", b"coin", "contains_silent_payment_outputs", b"contains_silent_payment_outputs", "format_unit", b"format_unit", "locktime", b"locktime", "num_inputs", b"num_inputs", "num_outputs", b"num_outputs", "output_script_configs", b"output_script_configs", "script_configs", b"script_configs", "version", b"version"]) -> None: ...

global___BTCSignInitRequest = BTCSignInitRequest

@typing.final
class BTCSignNextResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _Type:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCSignNextResponse._Type.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        INPUT: BTCSignNextResponse._Type.ValueType  # 0
        OUTPUT: BTCSignNextResponse._Type.ValueType  # 1
        DONE: BTCSignNextResponse._Type.ValueType  # 2
        PREVTX_INIT: BTCSignNextResponse._Type.ValueType  # 3
        """For the previous transaction at input `index`."""
        PREVTX_INPUT: BTCSignNextResponse._Type.ValueType  # 4
        PREVTX_OUTPUT: BTCSignNextResponse._Type.ValueType  # 5
        HOST_NONCE: BTCSignNextResponse._Type.ValueType  # 6
        PAYMENT_REQUEST: BTCSignNextResponse._Type.ValueType  # 7

    class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
    INPUT: BTCSignNextResponse.Type.ValueType  # 0
    OUTPUT: BTCSignNextResponse.Type.ValueType  # 1
    DONE: BTCSignNextResponse.Type.ValueType  # 2
    PREVTX_INIT: BTCSignNextResponse.Type.ValueType  # 3
    """For the previous transaction at input `index`."""
    PREVTX_INPUT: BTCSignNextResponse.Type.ValueType  # 4
    PREVTX_OUTPUT: BTCSignNextResponse.Type.ValueType  # 5
    HOST_NONCE: BTCSignNextResponse.Type.ValueType  # 6
    PAYMENT_REQUEST: BTCSignNextResponse.Type.ValueType  # 7

    TYPE_FIELD_NUMBER: builtins.int
    INDEX_FIELD_NUMBER: builtins.int
    HAS_SIGNATURE_FIELD_NUMBER: builtins.int
    SIGNATURE_FIELD_NUMBER: builtins.int
    PREV_INDEX_FIELD_NUMBER: builtins.int
    ANTI_KLEPTO_SIGNER_COMMITMENT_FIELD_NUMBER: builtins.int
    GENERATED_OUTPUT_PKSCRIPT_FIELD_NUMBER: builtins.int
    SILENT_PAYMENT_DLEQ_PROOF_FIELD_NUMBER: builtins.int
    type: global___BTCSignNextResponse.Type.ValueType
    index: builtins.int
    """index of the current input or output"""
    has_signature: builtins.bool
    """only as a response to BTCSignInputRequest"""
    signature: builtins.bytes
    """64 bytes (32 bytes big endian R, 32 bytes big endian S). Only if has_signature is true."""
    prev_index: builtins.int
    """Previous tx's input/output index in case of PREV_INPUT or PREV_OUTPUT, for the input at `index`."""
    generated_output_pkscript: builtins.bytes
    """Generated output. The host *must* verify its correctness using `silent_payment_dleq_proof`."""
    silent_payment_dleq_proof: builtins.bytes
    @property
    def anti_klepto_signer_commitment(self) -> antiklepto_pb2.AntiKleptoSignerCommitment: ...
    def __init__(
        self,
        *,
        type: global___BTCSignNextResponse.Type.ValueType = ...,
        index: builtins.int = ...,
        has_signature: builtins.bool = ...,
        signature: builtins.bytes = ...,
        prev_index: builtins.int = ...,
        anti_klepto_signer_commitment: antiklepto_pb2.AntiKleptoSignerCommitment | None = ...,
        generated_output_pkscript: builtins.bytes = ...,
        silent_payment_dleq_proof: builtins.bytes = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["anti_klepto_signer_commitment", b"anti_klepto_signer_commitment"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["anti_klepto_signer_commitment", b"anti_klepto_signer_commitment", "generated_output_pkscript", b"generated_output_pkscript", "has_signature", b"has_signature", "index", b"index", "prev_index", b"prev_index", "signature", b"signature", "silent_payment_dleq_proof", b"silent_payment_dleq_proof", "type", b"type"]) -> None: ...

global___BTCSignNextResponse = BTCSignNextResponse

@typing.final
class BTCSignInputRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PREVOUTHASH_FIELD_NUMBER: builtins.int
    PREVOUTINDEX_FIELD_NUMBER: builtins.int
    PREVOUTVALUE_FIELD_NUMBER: builtins.int
    SEQUENCE_FIELD_NUMBER: builtins.int
    KEYPATH_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIG_INDEX_FIELD_NUMBER: builtins.int
    HOST_NONCE_COMMITMENT_FIELD_NUMBER: builtins.int
    prevOutHash: builtins.bytes
    prevOutIndex: builtins.int
    prevOutValue: builtins.int
    sequence: builtins.int
    """must be 0xffffffff-2, 0xffffffff-1 or 0xffffffff"""
    script_config_index: builtins.int
    """References a script config from BTCSignInitRequest"""
    @property
    def keypath(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
        """all inputs must be ours."""

    @property
    def host_nonce_commitment(self) -> antiklepto_pb2.AntiKleptoHostNonceCommitment: ...
    def __init__(
        self,
        *,
        prevOutHash: builtins.bytes = ...,
        prevOutIndex: builtins.int = ...,
        prevOutValue: builtins.int = ...,
        sequence: builtins.int = ...,
        keypath: collections.abc.Iterable[builtins.int] | None = ...,
        script_config_index: builtins.int = ...,
        host_nonce_commitment: antiklepto_pb2.AntiKleptoHostNonceCommitment | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["host_nonce_commitment", b"host_nonce_commitment"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["host_nonce_commitment", b"host_nonce_commitment", "keypath", b"keypath", "prevOutHash", b"prevOutHash", "prevOutIndex", b"prevOutIndex", "prevOutValue", b"prevOutValue", "script_config_index", b"script_config_index", "sequence", b"sequence"]) -> None: ...

global___BTCSignInputRequest = BTCSignInputRequest

@typing.final
class BTCSignOutputRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class SilentPayment(google.protobuf.message.Message):
        """https://github.com/bitcoin/bips/blob/master/bip-0352.mediawiki"""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        ADDRESS_FIELD_NUMBER: builtins.int
        address: builtins.str
        def __init__(
            self,
            *,
            address: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["address", b"address"]) -> None: ...

    OURS_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    VALUE_FIELD_NUMBER: builtins.int
    PAYLOAD_FIELD_NUMBER: builtins.int
    KEYPATH_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIG_INDEX_FIELD_NUMBER: builtins.int
    PAYMENT_REQUEST_INDEX_FIELD_NUMBER: builtins.int
    SILENT_PAYMENT_FIELD_NUMBER: builtins.int
    OUTPUT_SCRIPT_CONFIG_INDEX_FIELD_NUMBER: builtins.int
    ours: builtins.bool
    type: global___BTCOutputType.ValueType
    """if ours is false"""
    value: builtins.int
    """20 bytes for p2pkh, p2sh, pw2wpkh. 32 bytes for p2wsh."""
    payload: builtins.bytes
    """if ours is false. Renamed from `hash`."""
    script_config_index: builtins.int
    """If ours is true and `output_script_config_index` is absent. References a script config from
    BTCSignInitRequest. This allows change output identification and allows us to identify
    non-change outputs to the same account, so we can display this info to the user.
    """
    payment_request_index: builtins.int
    output_script_config_index: builtins.int
    """If ours is true. If set, `script_config_index` is ignored. References an output script config
    from BTCSignInitRequest. This enables verification that an output belongs to the same keystore,
    even if it is from a different account than we spend from, allowing us to display this info to
    the user.
    """
    @property
    def keypath(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
        """if ours is true"""

    @property
    def silent_payment(self) -> global___BTCSignOutputRequest.SilentPayment:
        """If provided, `type` and `payload` is ignored. The generated output pkScript is returned in
        BTCSignNextResponse. `contains_silent_payment_outputs` in the init request must be true.
        """

    def __init__(
        self,
        *,
        ours: builtins.bool = ...,
        type: global___BTCOutputType.ValueType = ...,
        value: builtins.int = ...,
        payload: builtins.bytes = ...,
        keypath: collections.abc.Iterable[builtins.int] | None = ...,
        script_config_index: builtins.int = ...,
        payment_request_index: builtins.int | None = ...,
        silent_payment: global___BTCSignOutputRequest.SilentPayment | None = ...,
        output_script_config_index: builtins.int | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_output_script_config_index", b"_output_script_config_index", "_payment_request_index", b"_payment_request_index", "output_script_config_index", b"output_script_config_index", "payment_request_index", b"payment_request_index", "silent_payment", b"silent_payment"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_output_script_config_index", b"_output_script_config_index", "_payment_request_index", b"_payment_request_index", "keypath", b"keypath", "ours", b"ours", "output_script_config_index", b"output_script_config_index", "payload", b"payload", "payment_request_index", b"payment_request_index", "script_config_index", b"script_config_index", "silent_payment", b"silent_payment", "type", b"type", "value", b"value"]) -> None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_output_script_config_index", b"_output_script_config_index"]) -> typing.Literal["output_script_config_index"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_payment_request_index", b"_payment_request_index"]) -> typing.Literal["payment_request_index"] | None: ...

global___BTCSignOutputRequest = BTCSignOutputRequest

@typing.final
class BTCScriptConfigRegistration(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    COIN_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIG_FIELD_NUMBER: builtins.int
    KEYPATH_FIELD_NUMBER: builtins.int
    coin: global___BTCCoin.ValueType
    @property
    def script_config(self) -> global___BTCScriptConfig: ...
    @property
    def keypath(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
        """Unused for policy registrations."""

    def __init__(
        self,
        *,
        coin: global___BTCCoin.ValueType = ...,
        script_config: global___BTCScriptConfig | None = ...,
        keypath: collections.abc.Iterable[builtins.int] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["script_config", b"script_config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["coin", b"coin", "keypath", b"keypath", "script_config", b"script_config"]) -> None: ...

global___BTCScriptConfigRegistration = BTCScriptConfigRegistration

@typing.final
class BTCSuccess(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...

global___BTCSuccess = BTCSuccess

@typing.final
class BTCIsScriptConfigRegisteredRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REGISTRATION_FIELD_NUMBER: builtins.int
    @property
    def registration(self) -> global___BTCScriptConfigRegistration: ...
    def __init__(
        self,
        *,
        registration: global___BTCScriptConfigRegistration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["registration", b"registration"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["registration", b"registration"]) -> None: ...

global___BTCIsScriptConfigRegisteredRequest = BTCIsScriptConfigRegisteredRequest

@typing.final
class BTCIsScriptConfigRegisteredResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    IS_REGISTERED_FIELD_NUMBER: builtins.int
    is_registered: builtins.bool
    def __init__(
        self,
        *,
        is_registered: builtins.bool = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["is_registered", b"is_registered"]) -> None: ...

global___BTCIsScriptConfigRegisteredResponse = BTCIsScriptConfigRegisteredResponse

@typing.final
class BTCRegisterScriptConfigRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _XPubType:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _XPubTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BTCRegisterScriptConfigRequest._XPubType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        AUTO_ELECTRUM: BTCRegisterScriptConfigRequest._XPubType.ValueType  # 0
        """Automatically choose to match Electrum's xpub format (e.g. Zpub/Vpub for p2wsh multisig mainnet/testnet)."""
        AUTO_XPUB_TPUB: BTCRegisterScriptConfigRequest._XPubType.ValueType  # 1
        """Always xpub for mainnets, tpub for testnets."""

    class XPubType(_XPubType, metaclass=_XPubTypeEnumTypeWrapper): ...
    AUTO_ELECTRUM: BTCRegisterScriptConfigRequest.XPubType.ValueType  # 0
    """Automatically choose to match Electrum's xpub format (e.g. Zpub/Vpub for p2wsh multisig mainnet/testnet)."""
    AUTO_XPUB_TPUB: BTCRegisterScriptConfigRequest.XPubType.ValueType  # 1
    """Always xpub for mainnets, tpub for testnets."""

    REGISTRATION_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    XPUB_TYPE_FIELD_NUMBER: builtins.int
    name: builtins.str
    """If empty, the name is entered on the device instead."""
    xpub_type: global___BTCRegisterScriptConfigRequest.XPubType.ValueType
    @property
    def registration(self) -> global___BTCScriptConfigRegistration: ...
    def __init__(
        self,
        *,
        registration: global___BTCScriptConfigRegistration | None = ...,
        name: builtins.str = ...,
        xpub_type: global___BTCRegisterScriptConfigRequest.XPubType.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["registration", b"registration"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["name", b"name", "registration", b"registration", "xpub_type", b"xpub_type"]) -> None: ...

global___BTCRegisterScriptConfigRequest = BTCRegisterScriptConfigRequest

@typing.final
class BTCPrevTxInitRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VERSION_FIELD_NUMBER: builtins.int
    NUM_INPUTS_FIELD_NUMBER: builtins.int
    NUM_OUTPUTS_FIELD_NUMBER: builtins.int
    LOCKTIME_FIELD_NUMBER: builtins.int
    version: builtins.int
    num_inputs: builtins.int
    num_outputs: builtins.int
    locktime: builtins.int
    def __init__(
        self,
        *,
        version: builtins.int = ...,
        num_inputs: builtins.int = ...,
        num_outputs: builtins.int = ...,
        locktime: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["locktime", b"locktime", "num_inputs", b"num_inputs", "num_outputs", b"num_outputs", "version", b"version"]) -> None: ...

global___BTCPrevTxInitRequest = BTCPrevTxInitRequest

@typing.final
class BTCPrevTxInputRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PREV_OUT_HASH_FIELD_NUMBER: builtins.int
    PREV_OUT_INDEX_FIELD_NUMBER: builtins.int
    SIGNATURE_SCRIPT_FIELD_NUMBER: builtins.int
    SEQUENCE_FIELD_NUMBER: builtins.int
    prev_out_hash: builtins.bytes
    prev_out_index: builtins.int
    signature_script: builtins.bytes
    sequence: builtins.int
    def __init__(
        self,
        *,
        prev_out_hash: builtins.bytes = ...,
        prev_out_index: builtins.int = ...,
        signature_script: builtins.bytes = ...,
        sequence: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["prev_out_hash", b"prev_out_hash", "prev_out_index", b"prev_out_index", "sequence", b"sequence", "signature_script", b"signature_script"]) -> None: ...

global___BTCPrevTxInputRequest = BTCPrevTxInputRequest

@typing.final
class BTCPrevTxOutputRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VALUE_FIELD_NUMBER: builtins.int
    PUBKEY_SCRIPT_FIELD_NUMBER: builtins.int
    value: builtins.int
    pubkey_script: builtins.bytes
    def __init__(
        self,
        *,
        value: builtins.int = ...,
        pubkey_script: builtins.bytes = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["pubkey_script", b"pubkey_script", "value", b"value"]) -> None: ...

global___BTCPrevTxOutputRequest = BTCPrevTxOutputRequest

@typing.final
class BTCPaymentRequestRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class Memo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        @typing.final
        class TextMemo(google.protobuf.message.Message):
            DESCRIPTOR: google.protobuf.descriptor.Descriptor

            NOTE_FIELD_NUMBER: builtins.int
            note: builtins.str
            def __init__(
                self,
                *,
                note: builtins.str = ...,
            ) -> None: ...
            def ClearField(self, field_name: typing.Literal["note", b"note"]) -> None: ...

        TEXT_MEMO_FIELD_NUMBER: builtins.int
        @property
        def text_memo(self) -> global___BTCPaymentRequestRequest.Memo.TextMemo: ...
        def __init__(
            self,
            *,
            text_memo: global___BTCPaymentRequestRequest.Memo.TextMemo | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["memo", b"memo", "text_memo", b"text_memo"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["memo", b"memo", "text_memo", b"text_memo"]) -> None: ...
        def WhichOneof(self, oneof_group: typing.Literal["memo", b"memo"]) -> typing.Literal["text_memo"] | None: ...

    RECIPIENT_NAME_FIELD_NUMBER: builtins.int
    MEMOS_FIELD_NUMBER: builtins.int
    NONCE_FIELD_NUMBER: builtins.int
    TOTAL_AMOUNT_FIELD_NUMBER: builtins.int
    SIGNATURE_FIELD_NUMBER: builtins.int
    recipient_name: builtins.str
    nonce: builtins.bytes
    total_amount: builtins.int
    signature: builtins.bytes
    @property
    def memos(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BTCPaymentRequestRequest.Memo]: ...
    def __init__(
        self,
        *,
        recipient_name: builtins.str = ...,
        memos: collections.abc.Iterable[global___BTCPaymentRequestRequest.Memo] | None = ...,
        nonce: builtins.bytes = ...,
        total_amount: builtins.int = ...,
        signature: builtins.bytes = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["memos", b"memos", "nonce", b"nonce", "recipient_name", b"recipient_name", "signature", b"signature", "total_amount", b"total_amount"]) -> None: ...

global___BTCPaymentRequestRequest = BTCPaymentRequestRequest

@typing.final
class BTCSignMessageRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    COIN_FIELD_NUMBER: builtins.int
    SCRIPT_CONFIG_FIELD_NUMBER: builtins.int
    MSG_FIELD_NUMBER: builtins.int
    HOST_NONCE_COMMITMENT_FIELD_NUMBER: builtins.int
    coin: global___BTCCoin.ValueType
    msg: builtins.bytes
    @property
    def script_config(self) -> global___BTCScriptConfigWithKeypath: ...
    @property
    def host_nonce_commitment(self) -> antiklepto_pb2.AntiKleptoHostNonceCommitment: ...
    def __init__(
        self,
        *,
        coin: global___BTCCoin.ValueType = ...,
        script_config: global___BTCScriptConfigWithKeypath | None = ...,
        msg: builtins.bytes = ...,
        host_nonce_commitment: antiklepto_pb2.AntiKleptoHostNonceCommitment | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["host_nonce_commitment", b"host_nonce_commitment", "script_config", b"script_config"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["coin", b"coin", "host_nonce_commitment", b"host_nonce_commitment", "msg", b"msg", "script_config", b"script_config"]) -> None: ...

global___BTCSignMessageRequest = BTCSignMessageRequest

@typing.final
class BTCSignMessageResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SIGNATURE_FIELD_NUMBER: builtins.int
    signature: builtins.bytes
    """65 bytes (32 bytes big endian R, 32 bytes big endian S, 1 recid)."""
    def __init__(
        self,
        *,
        signature: builtins.bytes = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["signature", b"signature"]) -> None: ...

global___BTCSignMessageResponse = BTCSignMessageResponse

@typing.final
class BTCRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    IS_SCRIPT_CONFIG_REGISTERED_FIELD_NUMBER: builtins.int
    REGISTER_SCRIPT_CONFIG_FIELD_NUMBER: builtins.int
    PREVTX_INIT_FIELD_NUMBER: builtins.int
    PREVTX_INPUT_FIELD_NUMBER: builtins.int
    PREVTX_OUTPUT_FIELD_NUMBER: builtins.int
    SIGN_MESSAGE_FIELD_NUMBER: builtins.int
    ANTIKLEPTO_SIGNATURE_FIELD_NUMBER: builtins.int
    PAYMENT_REQUEST_FIELD_NUMBER: builtins.int
    @property
    def is_script_config_registered(self) -> global___BTCIsScriptConfigRegisteredRequest: ...
    @property
    def register_script_config(self) -> global___BTCRegisterScriptConfigRequest: ...
    @property
    def prevtx_init(self) -> global___BTCPrevTxInitRequest: ...
    @property
    def prevtx_input(self) -> global___BTCPrevTxInputRequest: ...
    @property
    def prevtx_output(self) -> global___BTCPrevTxOutputRequest: ...
    @property
    def sign_message(self) -> global___BTCSignMessageRequest: ...
    @property
    def antiklepto_signature(self) -> antiklepto_pb2.AntiKleptoSignatureRequest: ...
    @property
    def payment_request(self) -> global___BTCPaymentRequestRequest: ...
    def __init__(
        self,
        *,
        is_script_config_registered: global___BTCIsScriptConfigRegisteredRequest | None = ...,
        register_script_config: global___BTCRegisterScriptConfigRequest | None = ...,
        prevtx_init: global___BTCPrevTxInitRequest | None = ...,
        prevtx_input: global___BTCPrevTxInputRequest | None = ...,
        prevtx_output: global___BTCPrevTxOutputRequest | None = ...,
        sign_message: global___BTCSignMessageRequest | None = ...,
        antiklepto_signature: antiklepto_pb2.AntiKleptoSignatureRequest | None = ...,
        payment_request: global___BTCPaymentRequestRequest | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["antiklepto_signature", b"antiklepto_signature", "is_script_config_registered", b"is_script_config_registered", "payment_request", b"payment_request", "prevtx_init", b"prevtx_init", "prevtx_input", b"prevtx_input", "prevtx_output", b"prevtx_output", "register_script_config", b"register_script_config", "request", b"request", "sign_message", b"sign_message"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["antiklepto_signature", b"antiklepto_signature", "is_script_config_registered", b"is_script_config_registered", "payment_request", b"payment_request", "prevtx_init", b"prevtx_init", "prevtx_input", b"prevtx_input", "prevtx_output", b"prevtx_output", "register_script_config", b"register_script_config", "request", b"request", "sign_message", b"sign_message"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["request", b"request"]) -> typing.Literal["is_script_config_registered", "register_script_config", "prevtx_init", "prevtx_input", "prevtx_output", "sign_message", "antiklepto_signature", "payment_request"] | None: ...

global___BTCRequest = BTCRequest

@typing.final
class BTCResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SUCCESS_FIELD_NUMBER: builtins.int
    IS_SCRIPT_CONFIG_REGISTERED_FIELD_NUMBER: builtins.int
    SIGN_NEXT_FIELD_NUMBER: builtins.int
    SIGN_MESSAGE_FIELD_NUMBER: builtins.int
    ANTIKLEPTO_SIGNER_COMMITMENT_FIELD_NUMBER: builtins.int
    @property
    def success(self) -> global___BTCSuccess: ...
    @property
    def is_script_config_registered(self) -> global___BTCIsScriptConfigRegisteredResponse: ...
    @property
    def sign_next(self) -> global___BTCSignNextResponse: ...
    @property
    def sign_message(self) -> global___BTCSignMessageResponse: ...
    @property
    def antiklepto_signer_commitment(self) -> antiklepto_pb2.AntiKleptoSignerCommitment: ...
    def __init__(
        self,
        *,
        success: global___BTCSuccess | None = ...,
        is_script_config_registered: global___BTCIsScriptConfigRegisteredResponse | None = ...,
        sign_next: global___BTCSignNextResponse | None = ...,
        sign_message: global___BTCSignMessageResponse | None = ...,
        antiklepto_signer_commitment: antiklepto_pb2.AntiKleptoSignerCommitment | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["antiklepto_signer_commitment", b"antiklepto_signer_commitment", "is_script_config_registered", b"is_script_config_registered", "response", b"response", "sign_message", b"sign_message", "sign_next", b"sign_next", "success", b"success"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["antiklepto_signer_commitment", b"antiklepto_signer_commitment", "is_script_config_registered", b"is_script_config_registered", "response", b"response", "sign_message", b"sign_message", "sign_next", b"sign_next", "success", b"success"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["response", b"response"]) -> typing.Literal["success", "is_script_config_registered", "sign_next", "sign_message", "antiklepto_signer_commitment"] | None: ...

global___BTCResponse = BTCResponse
