bitbox_api/
shiftcrypto.bitbox02.rs

1// This file is @generated by prost-build.
2#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
3#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct PubResponse {
6    #[prost(string, tag = "1")]
7    pub r#pub: ::prost::alloc::string::String,
8}
9#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
10#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct PubsResponse {
13    #[prost(string, repeated, tag = "1")]
14    pub pubs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
15}
16#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
17#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
18#[derive(Clone, Copy, PartialEq, ::prost::Message)]
19pub struct RootFingerprintRequest {}
20#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
21#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct RootFingerprintResponse {
24    #[prost(bytes = "vec", tag = "1")]
25    #[cfg_attr(feature = "wasm", serde(deserialize_with = "hex::serde::deserialize"))]
26    pub fingerprint: ::prost::alloc::vec::Vec<u8>,
27}
28/// See <https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki.>
29/// version field dropped as it will set dynamically based on the context (xpub, ypub, etc.).
30#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
31#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct XPub {
34    #[prost(bytes = "vec", tag = "1")]
35    pub depth: ::prost::alloc::vec::Vec<u8>,
36    #[prost(bytes = "vec", tag = "2")]
37    pub parent_fingerprint: ::prost::alloc::vec::Vec<u8>,
38    #[prost(uint32, tag = "3")]
39    pub child_num: u32,
40    #[prost(bytes = "vec", tag = "4")]
41    pub chain_code: ::prost::alloc::vec::Vec<u8>,
42    #[prost(bytes = "vec", tag = "5")]
43    pub public_key: ::prost::alloc::vec::Vec<u8>,
44}
45/// This message exists for use in oneof or repeated fields, where one can't inline `repeated uint32` due to protobuf rules.
46#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
47#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct Keypath {
50    #[prost(uint32, repeated, tag = "1")]
51    #[cfg_attr(
52        feature = "wasm",
53        serde(deserialize_with = "crate::keypath::serde_deserialize")
54    )]
55    pub keypath: ::prost::alloc::vec::Vec<u32>,
56}
57#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
58#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
59#[cfg_attr(feature = "wasm", serde(try_from = "crate::btc::KeyOriginInfo"))]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct KeyOriginInfo {
62    #[prost(bytes = "vec", tag = "1")]
63    pub root_fingerprint: ::prost::alloc::vec::Vec<u8>,
64    #[prost(uint32, repeated, tag = "2")]
65    #[cfg_attr(
66        feature = "wasm",
67        serde(deserialize_with = "crate::keypath::serde_deserialize")
68    )]
69    pub keypath: ::prost::alloc::vec::Vec<u32>,
70    #[prost(message, optional, tag = "3")]
71    pub xpub: ::core::option::Option<XPub>,
72}
73#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
74#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
75#[derive(Clone, Copy, PartialEq, ::prost::Message)]
76pub struct CheckBackupRequest {
77    #[prost(bool, tag = "1")]
78    pub silent: bool,
79}
80#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
81#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct CheckBackupResponse {
84    #[prost(string, tag = "1")]
85    pub id: ::prost::alloc::string::String,
86}
87/// Timestamp must be in UTC
88#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
89#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
90#[derive(Clone, Copy, PartialEq, ::prost::Message)]
91pub struct CreateBackupRequest {
92    #[prost(uint32, tag = "1")]
93    pub timestamp: u32,
94    #[prost(int32, tag = "2")]
95    pub timezone_offset: i32,
96}
97#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
98#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
99#[derive(Clone, Copy, PartialEq, ::prost::Message)]
100pub struct ListBackupsRequest {}
101#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
102#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct BackupInfo {
105    #[prost(string, tag = "1")]
106    pub id: ::prost::alloc::string::String,
107    #[prost(uint32, tag = "2")]
108    pub timestamp: u32,
109    /// uint32 timezone_offset = 3;
110    #[prost(string, tag = "4")]
111    pub name: ::prost::alloc::string::String,
112}
113#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
114#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct ListBackupsResponse {
117    #[prost(message, repeated, tag = "1")]
118    pub info: ::prost::alloc::vec::Vec<BackupInfo>,
119}
120#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
121#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct RestoreBackupRequest {
124    #[prost(string, tag = "1")]
125    pub id: ::prost::alloc::string::String,
126    #[prost(uint32, tag = "2")]
127    pub timestamp: u32,
128    #[prost(int32, tag = "3")]
129    pub timezone_offset: i32,
130}
131#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
132#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
133#[derive(Clone, Copy, PartialEq, ::prost::Message)]
134pub struct CheckSdCardRequest {}
135#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
136#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
137#[derive(Clone, Copy, PartialEq, ::prost::Message)]
138pub struct CheckSdCardResponse {
139    #[prost(bool, tag = "1")]
140    pub inserted: bool,
141}
142#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
143#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
144#[derive(Clone, Copy, PartialEq, ::prost::Message)]
145pub struct DeviceInfoRequest {}
146#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
147#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct DeviceInfoResponse {
150    #[prost(string, tag = "1")]
151    pub name: ::prost::alloc::string::String,
152    #[prost(bool, tag = "2")]
153    pub initialized: bool,
154    #[prost(string, tag = "3")]
155    pub version: ::prost::alloc::string::String,
156    #[prost(bool, tag = "4")]
157    pub mnemonic_passphrase_enabled: bool,
158    #[prost(uint32, tag = "5")]
159    pub monotonic_increments_remaining: u32,
160    /// From v9.6.0: "ATECC608A" or "ATECC608B".
161    #[prost(string, tag = "6")]
162    pub securechip_model: ::prost::alloc::string::String,
163    /// Only present in Bluetooth-enabled devices.
164    #[prost(message, optional, tag = "7")]
165    pub bluetooth: ::core::option::Option<device_info_response::Bluetooth>,
166}
167/// Nested message and enum types in `DeviceInfoResponse`.
168pub mod device_info_response {
169    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
170    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
171    #[derive(Clone, PartialEq, ::prost::Message)]
172    pub struct Bluetooth {
173        /// Hash of the currently active Bluetooth firmware on the device.
174        #[prost(bytes = "vec", tag = "1")]
175        pub firmware_hash: ::prost::alloc::vec::Vec<u8>,
176        /// Firmware version, formated as an unsigned integer "1", "2", etc.
177        #[prost(string, tag = "2")]
178        pub firmware_version: ::prost::alloc::string::String,
179        /// True if Bluetooth is enabled
180        #[prost(bool, tag = "3")]
181        pub enabled: bool,
182    }
183}
184#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
185#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
186#[derive(Clone, Copy, PartialEq, ::prost::Message)]
187pub struct InsertRemoveSdCardRequest {
188    #[prost(enumeration = "insert_remove_sd_card_request::SdCardAction", tag = "1")]
189    pub action: i32,
190}
191/// Nested message and enum types in `InsertRemoveSDCardRequest`.
192pub mod insert_remove_sd_card_request {
193    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
194    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
195    #[derive(
196        Clone,
197        Copy,
198        Debug,
199        PartialEq,
200        Eq,
201        Hash,
202        PartialOrd,
203        Ord,
204        ::prost::Enumeration
205    )]
206    #[repr(i32)]
207    pub enum SdCardAction {
208        RemoveCard = 0,
209        InsertCard = 1,
210    }
211    impl SdCardAction {
212        /// String value of the enum field names used in the ProtoBuf definition.
213        ///
214        /// The values are not transformed in any way and thus are considered stable
215        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
216        pub fn as_str_name(&self) -> &'static str {
217            match self {
218                Self::RemoveCard => "REMOVE_CARD",
219                Self::InsertCard => "INSERT_CARD",
220            }
221        }
222        /// Creates an enum from field names used in the ProtoBuf definition.
223        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
224            match value {
225                "REMOVE_CARD" => Some(Self::RemoveCard),
226                "INSERT_CARD" => Some(Self::InsertCard),
227                _ => None,
228            }
229        }
230    }
231}
232#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
233#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
235pub struct ResetRequest {}
236#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
237#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct SetDeviceLanguageRequest {
240    #[prost(string, tag = "1")]
241    pub language: ::prost::alloc::string::String,
242}
243#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
244#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct SetDeviceNameRequest {
247    #[prost(string, tag = "1")]
248    pub name: ::prost::alloc::string::String,
249}
250#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
251#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct SetPasswordRequest {
254    #[prost(bytes = "vec", tag = "1")]
255    pub entropy: ::prost::alloc::vec::Vec<u8>,
256}
257#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
258#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
259#[derive(Clone, Copy, PartialEq, ::prost::Message)]
260pub struct ChangePasswordRequest {}
261#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
262#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
263#[derive(Clone, Copy, PartialEq, ::prost::Message)]
264pub struct BluetoothToggleEnabledRequest {}
265#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
266#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
267#[derive(Clone, Copy, PartialEq, ::prost::Message)]
268pub struct BluetoothUpgradeInitRequest {
269    #[prost(uint32, tag = "1")]
270    pub firmware_length: u32,
271}
272#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
273#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
274#[derive(Clone, PartialEq, ::prost::Message)]
275pub struct BluetoothChunkRequest {
276    #[prost(bytes = "vec", tag = "1")]
277    pub data: ::prost::alloc::vec::Vec<u8>,
278}
279#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
280#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
281#[derive(Clone, Copy, PartialEq, ::prost::Message)]
282pub struct BluetoothSuccess {}
283#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
284#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
285#[derive(Clone, Copy, PartialEq, ::prost::Message)]
286pub struct BluetoothRequestChunkResponse {
287    #[prost(uint32, tag = "1")]
288    pub offset: u32,
289    #[prost(uint32, tag = "2")]
290    pub length: u32,
291}
292#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
293#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct BluetoothRequest {
296    #[prost(oneof = "bluetooth_request::Request", tags = "1, 2, 3")]
297    pub request: ::core::option::Option<bluetooth_request::Request>,
298}
299/// Nested message and enum types in `BluetoothRequest`.
300pub mod bluetooth_request {
301    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
302    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
303    #[derive(Clone, PartialEq, ::prost::Oneof)]
304    pub enum Request {
305        #[prost(message, tag = "1")]
306        UpgradeInit(super::BluetoothUpgradeInitRequest),
307        #[prost(message, tag = "2")]
308        Chunk(super::BluetoothChunkRequest),
309        #[prost(message, tag = "3")]
310        ToggleEnabled(super::BluetoothToggleEnabledRequest),
311    }
312}
313#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
314#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
315#[derive(Clone, Copy, PartialEq, ::prost::Message)]
316pub struct BluetoothResponse {
317    #[prost(oneof = "bluetooth_response::Response", tags = "1, 2")]
318    pub response: ::core::option::Option<bluetooth_response::Response>,
319}
320/// Nested message and enum types in `BluetoothResponse`.
321pub mod bluetooth_response {
322    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
323    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
324    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
325    pub enum Response {
326        #[prost(message, tag = "1")]
327        Success(super::BluetoothSuccess),
328        #[prost(message, tag = "2")]
329        RequestChunk(super::BluetoothRequestChunkResponse),
330    }
331}
332#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
333#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct AntiKleptoHostNonceCommitment {
336    #[prost(bytes = "vec", tag = "1")]
337    pub commitment: ::prost::alloc::vec::Vec<u8>,
338}
339#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
340#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct AntiKleptoSignerCommitment {
343    #[prost(bytes = "vec", tag = "1")]
344    pub commitment: ::prost::alloc::vec::Vec<u8>,
345}
346#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
347#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
348#[derive(Clone, PartialEq, ::prost::Message)]
349pub struct AntiKleptoSignatureRequest {
350    #[prost(bytes = "vec", tag = "1")]
351    pub host_nonce: ::prost::alloc::vec::Vec<u8>,
352}
353#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
354#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
355#[cfg_attr(feature = "wasm", serde(try_from = "crate::btc::SerdeScriptConfig"))]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct BtcScriptConfig {
358    #[prost(oneof = "btc_script_config::Config", tags = "1, 2, 3")]
359    pub config: ::core::option::Option<btc_script_config::Config>,
360}
361/// Nested message and enum types in `BTCScriptConfig`.
362pub mod btc_script_config {
363    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
364    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
365    #[derive(Clone, PartialEq, ::prost::Message)]
366    pub struct Multisig {
367        #[prost(uint32, tag = "1")]
368        pub threshold: u32,
369        /// xpubs are acount-level xpubs. Addresses are going to be derived from it using: `m/<change>/<receive>`.
370        /// The number of xpubs defines the number of cosigners.
371        #[prost(message, repeated, tag = "2")]
372        pub xpubs: ::prost::alloc::vec::Vec<super::XPub>,
373        /// Index to the xpub of our keystore in xpubs. The keypath to it is provided via
374        /// BTCPubRequest/BTCSignInit.
375        #[prost(uint32, tag = "3")]
376        pub our_xpub_index: u32,
377        #[prost(enumeration = "multisig::ScriptType", tag = "4")]
378        pub script_type: i32,
379    }
380    /// Nested message and enum types in `Multisig`.
381    pub mod multisig {
382        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
383        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
384        #[derive(
385            Clone,
386            Copy,
387            Debug,
388            PartialEq,
389            Eq,
390            Hash,
391            PartialOrd,
392            Ord,
393            ::prost::Enumeration
394        )]
395        #[repr(i32)]
396        pub enum ScriptType {
397            /// native segwit v0 multisig (bech32 addresses)
398            P2wsh = 0,
399            /// wrapped segwit for legacy address compatibility
400            P2wshP2sh = 1,
401        }
402        impl ScriptType {
403            /// String value of the enum field names used in the ProtoBuf definition.
404            ///
405            /// The values are not transformed in any way and thus are considered stable
406            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
407            pub fn as_str_name(&self) -> &'static str {
408                match self {
409                    Self::P2wsh => "P2WSH",
410                    Self::P2wshP2sh => "P2WSH_P2SH",
411                }
412            }
413            /// Creates an enum from field names used in the ProtoBuf definition.
414            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
415                match value {
416                    "P2WSH" => Some(Self::P2wsh),
417                    "P2WSH_P2SH" => Some(Self::P2wshP2sh),
418                    _ => None,
419                }
420            }
421        }
422    }
423    /// A policy as specified by 'Wallet policies':
424    /// <https://github.com/bitcoin/bips/pull/1389>
425    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
426    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
427    #[derive(Clone, PartialEq, ::prost::Message)]
428    pub struct Policy {
429        #[prost(string, tag = "1")]
430        pub policy: ::prost::alloc::string::String,
431        #[prost(message, repeated, tag = "2")]
432        pub keys: ::prost::alloc::vec::Vec<super::KeyOriginInfo>,
433    }
434    /// SimpleType is a "simple" script: one public key, no additional inputs.
435    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
436    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
437    #[derive(
438        Clone,
439        Copy,
440        Debug,
441        PartialEq,
442        Eq,
443        Hash,
444        PartialOrd,
445        Ord,
446        ::prost::Enumeration
447    )]
448    #[repr(i32)]
449    pub enum SimpleType {
450        P2wpkhP2sh = 0,
451        P2wpkh = 1,
452        P2tr = 2,
453    }
454    impl SimpleType {
455        /// String value of the enum field names used in the ProtoBuf definition.
456        ///
457        /// The values are not transformed in any way and thus are considered stable
458        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
459        pub fn as_str_name(&self) -> &'static str {
460            match self {
461                Self::P2wpkhP2sh => "P2WPKH_P2SH",
462                Self::P2wpkh => "P2WPKH",
463                Self::P2tr => "P2TR",
464            }
465        }
466        /// Creates an enum from field names used in the ProtoBuf definition.
467        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
468            match value {
469                "P2WPKH_P2SH" => Some(Self::P2wpkhP2sh),
470                "P2WPKH" => Some(Self::P2wpkh),
471                "P2TR" => Some(Self::P2tr),
472                _ => None,
473            }
474        }
475    }
476    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
477    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
478    #[derive(Clone, PartialEq, ::prost::Oneof)]
479    pub enum Config {
480        #[prost(enumeration = "SimpleType", tag = "1")]
481        #[cfg_attr(
482            feature = "wasm",
483            serde(deserialize_with = "crate::btc::serde_deserialize_simple_type")
484        )]
485        SimpleType(i32),
486        #[prost(message, tag = "2")]
487        #[cfg_attr(
488            feature = "wasm",
489            serde(deserialize_with = "crate::btc::serde_deserialize_multisig")
490        )]
491        Multisig(Multisig),
492        #[prost(message, tag = "3")]
493        Policy(Policy),
494    }
495}
496#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
497#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct BtcPubRequest {
500    #[prost(enumeration = "BtcCoin", tag = "1")]
501    pub coin: i32,
502    #[prost(uint32, repeated, tag = "2")]
503    #[cfg_attr(
504        feature = "wasm",
505        serde(deserialize_with = "crate::keypath::serde_deserialize")
506    )]
507    pub keypath: ::prost::alloc::vec::Vec<u32>,
508    #[prost(bool, tag = "5")]
509    pub display: bool,
510    #[prost(oneof = "btc_pub_request::Output", tags = "3, 4")]
511    pub output: ::core::option::Option<btc_pub_request::Output>,
512}
513/// Nested message and enum types in `BTCPubRequest`.
514pub mod btc_pub_request {
515    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
516    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
517    #[derive(
518        Clone,
519        Copy,
520        Debug,
521        PartialEq,
522        Eq,
523        Hash,
524        PartialOrd,
525        Ord,
526        ::prost::Enumeration
527    )]
528    #[repr(i32)]
529    pub enum XPubType {
530        Tpub = 0,
531        Xpub = 1,
532        Ypub = 2,
533        /// zpub
534        Zpub = 3,
535        /// vpub
536        Vpub = 4,
537        Upub = 5,
538        /// Vpub
539        #[cfg_attr(feature = "wasm", serde(rename = "Vpub"))]
540        CapitalVpub = 6,
541        /// Zpub
542        #[cfg_attr(feature = "wasm", serde(rename = "Zpub"))]
543        CapitalZpub = 7,
544        /// Upub
545        #[cfg_attr(feature = "wasm", serde(rename = "Upub"))]
546        CapitalUpub = 8,
547        /// Ypub
548        #[cfg_attr(feature = "wasm", serde(rename = "Ypub"))]
549        CapitalYpub = 9,
550    }
551    impl XPubType {
552        /// String value of the enum field names used in the ProtoBuf definition.
553        ///
554        /// The values are not transformed in any way and thus are considered stable
555        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
556        pub fn as_str_name(&self) -> &'static str {
557            match self {
558                Self::Tpub => "TPUB",
559                Self::Xpub => "XPUB",
560                Self::Ypub => "YPUB",
561                Self::Zpub => "ZPUB",
562                Self::Vpub => "VPUB",
563                Self::Upub => "UPUB",
564                Self::CapitalVpub => "CAPITAL_VPUB",
565                Self::CapitalZpub => "CAPITAL_ZPUB",
566                Self::CapitalUpub => "CAPITAL_UPUB",
567                Self::CapitalYpub => "CAPITAL_YPUB",
568            }
569        }
570        /// Creates an enum from field names used in the ProtoBuf definition.
571        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
572            match value {
573                "TPUB" => Some(Self::Tpub),
574                "XPUB" => Some(Self::Xpub),
575                "YPUB" => Some(Self::Ypub),
576                "ZPUB" => Some(Self::Zpub),
577                "VPUB" => Some(Self::Vpub),
578                "UPUB" => Some(Self::Upub),
579                "CAPITAL_VPUB" => Some(Self::CapitalVpub),
580                "CAPITAL_ZPUB" => Some(Self::CapitalZpub),
581                "CAPITAL_UPUB" => Some(Self::CapitalUpub),
582                "CAPITAL_YPUB" => Some(Self::CapitalYpub),
583                _ => None,
584            }
585        }
586    }
587    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
588    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
589    #[derive(Clone, PartialEq, ::prost::Oneof)]
590    pub enum Output {
591        #[prost(enumeration = "XPubType", tag = "3")]
592        XpubType(i32),
593        #[prost(message, tag = "4")]
594        ScriptConfig(super::BtcScriptConfig),
595    }
596}
597#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
598#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct BtcXpubsRequest {
601    #[prost(enumeration = "BtcCoin", tag = "1")]
602    pub coin: i32,
603    #[prost(enumeration = "btc_xpubs_request::XPubType", tag = "2")]
604    pub xpub_type: i32,
605    #[prost(message, repeated, tag = "3")]
606    pub keypaths: ::prost::alloc::vec::Vec<Keypath>,
607}
608/// Nested message and enum types in `BTCXpubsRequest`.
609pub mod btc_xpubs_request {
610    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
611    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
612    #[derive(
613        Clone,
614        Copy,
615        Debug,
616        PartialEq,
617        Eq,
618        Hash,
619        PartialOrd,
620        Ord,
621        ::prost::Enumeration
622    )]
623    #[repr(i32)]
624    pub enum XPubType {
625        Unknown = 0,
626        Xpub = 1,
627        Tpub = 2,
628    }
629    impl XPubType {
630        /// String value of the enum field names used in the ProtoBuf definition.
631        ///
632        /// The values are not transformed in any way and thus are considered stable
633        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
634        pub fn as_str_name(&self) -> &'static str {
635            match self {
636                Self::Unknown => "UNKNOWN",
637                Self::Xpub => "XPUB",
638                Self::Tpub => "TPUB",
639            }
640        }
641        /// Creates an enum from field names used in the ProtoBuf definition.
642        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
643            match value {
644                "UNKNOWN" => Some(Self::Unknown),
645                "XPUB" => Some(Self::Xpub),
646                "TPUB" => Some(Self::Tpub),
647                _ => None,
648            }
649        }
650    }
651}
652#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
653#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct BtcScriptConfigWithKeypath {
656    #[prost(message, optional, tag = "2")]
657    pub script_config: ::core::option::Option<BtcScriptConfig>,
658    #[prost(uint32, repeated, tag = "3")]
659    #[cfg_attr(
660        feature = "wasm",
661        serde(deserialize_with = "crate::keypath::serde_deserialize")
662    )]
663    pub keypath: ::prost::alloc::vec::Vec<u32>,
664}
665#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
666#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct BtcSignInitRequest {
669    #[prost(enumeration = "BtcCoin", tag = "1")]
670    pub coin: i32,
671    /// used script configs in inputs and changes
672    #[prost(message, repeated, tag = "2")]
673    pub script_configs: ::prost::alloc::vec::Vec<BtcScriptConfigWithKeypath>,
674    /// must be 1 or 2
675    #[prost(uint32, tag = "4")]
676    pub version: u32,
677    #[prost(uint32, tag = "5")]
678    pub num_inputs: u32,
679    #[prost(uint32, tag = "6")]
680    pub num_outputs: u32,
681    /// must be <500000000
682    #[prost(uint32, tag = "7")]
683    pub locktime: u32,
684    #[prost(enumeration = "btc_sign_init_request::FormatUnit", tag = "8")]
685    pub format_unit: i32,
686    #[prost(bool, tag = "9")]
687    pub contains_silent_payment_outputs: bool,
688    /// used script configs for outputs that send to an address of the same keystore, but not
689    /// necessarily the same account (as defined by `script_configs` above).
690    #[prost(message, repeated, tag = "10")]
691    pub output_script_configs: ::prost::alloc::vec::Vec<BtcScriptConfigWithKeypath>,
692}
693/// Nested message and enum types in `BTCSignInitRequest`.
694pub mod btc_sign_init_request {
695    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
696    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
697    #[derive(
698        Clone,
699        Copy,
700        Debug,
701        PartialEq,
702        Eq,
703        Hash,
704        PartialOrd,
705        Ord,
706        ::prost::Enumeration
707    )]
708    #[repr(i32)]
709    pub enum FormatUnit {
710        /// According to `coin` (BTC, LTC, etc.).
711        Default = 0,
712        /// Only valid for BTC/TBTC, formats as "sat"/"tsat".
713        Sat = 1,
714    }
715    impl FormatUnit {
716        /// String value of the enum field names used in the ProtoBuf definition.
717        ///
718        /// The values are not transformed in any way and thus are considered stable
719        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
720        pub fn as_str_name(&self) -> &'static str {
721            match self {
722                Self::Default => "DEFAULT",
723                Self::Sat => "SAT",
724            }
725        }
726        /// Creates an enum from field names used in the ProtoBuf definition.
727        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
728            match value {
729                "DEFAULT" => Some(Self::Default),
730                "SAT" => Some(Self::Sat),
731                _ => None,
732            }
733        }
734    }
735}
736#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
737#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct BtcSignNextResponse {
740    #[prost(enumeration = "btc_sign_next_response::Type", tag = "1")]
741    pub r#type: i32,
742    /// index of the current input or output
743    #[prost(uint32, tag = "2")]
744    pub index: u32,
745    /// only as a response to BTCSignInputRequest
746    #[prost(bool, tag = "3")]
747    pub has_signature: bool,
748    /// 64 bytes (32 bytes big endian R, 32 bytes big endian S). Only if has_signature is true.
749    #[prost(bytes = "vec", tag = "4")]
750    pub signature: ::prost::alloc::vec::Vec<u8>,
751    /// Previous tx's input/output index in case of PREV_INPUT or PREV_OUTPUT, for the input at `index`.
752    #[prost(uint32, tag = "5")]
753    pub prev_index: u32,
754    #[prost(message, optional, tag = "6")]
755    pub anti_klepto_signer_commitment: ::core::option::Option<
756        AntiKleptoSignerCommitment,
757    >,
758    /// Generated output. The host *must* verify its correctness using `silent_payment_dleq_proof`.
759    #[prost(bytes = "vec", tag = "7")]
760    pub generated_output_pkscript: ::prost::alloc::vec::Vec<u8>,
761    #[prost(bytes = "vec", tag = "8")]
762    pub silent_payment_dleq_proof: ::prost::alloc::vec::Vec<u8>,
763}
764/// Nested message and enum types in `BTCSignNextResponse`.
765pub mod btc_sign_next_response {
766    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
767    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
768    #[derive(
769        Clone,
770        Copy,
771        Debug,
772        PartialEq,
773        Eq,
774        Hash,
775        PartialOrd,
776        Ord,
777        ::prost::Enumeration
778    )]
779    #[repr(i32)]
780    pub enum Type {
781        Input = 0,
782        Output = 1,
783        Done = 2,
784        /// For the previous transaction at input `index`.
785        PrevtxInit = 3,
786        PrevtxInput = 4,
787        PrevtxOutput = 5,
788        HostNonce = 6,
789        PaymentRequest = 7,
790    }
791    impl Type {
792        /// String value of the enum field names used in the ProtoBuf definition.
793        ///
794        /// The values are not transformed in any way and thus are considered stable
795        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
796        pub fn as_str_name(&self) -> &'static str {
797            match self {
798                Self::Input => "INPUT",
799                Self::Output => "OUTPUT",
800                Self::Done => "DONE",
801                Self::PrevtxInit => "PREVTX_INIT",
802                Self::PrevtxInput => "PREVTX_INPUT",
803                Self::PrevtxOutput => "PREVTX_OUTPUT",
804                Self::HostNonce => "HOST_NONCE",
805                Self::PaymentRequest => "PAYMENT_REQUEST",
806            }
807        }
808        /// Creates an enum from field names used in the ProtoBuf definition.
809        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
810            match value {
811                "INPUT" => Some(Self::Input),
812                "OUTPUT" => Some(Self::Output),
813                "DONE" => Some(Self::Done),
814                "PREVTX_INIT" => Some(Self::PrevtxInit),
815                "PREVTX_INPUT" => Some(Self::PrevtxInput),
816                "PREVTX_OUTPUT" => Some(Self::PrevtxOutput),
817                "HOST_NONCE" => Some(Self::HostNonce),
818                "PAYMENT_REQUEST" => Some(Self::PaymentRequest),
819                _ => None,
820            }
821        }
822    }
823}
824#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
825#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
826#[derive(Clone, PartialEq, ::prost::Message)]
827pub struct BtcSignInputRequest {
828    #[prost(bytes = "vec", tag = "1")]
829    pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
830    #[prost(uint32, tag = "2")]
831    pub prev_out_index: u32,
832    #[prost(uint64, tag = "3")]
833    pub prev_out_value: u64,
834    /// must be 0xffffffff-2, 0xffffffff-1 or 0xffffffff
835    #[prost(uint32, tag = "4")]
836    pub sequence: u32,
837    /// all inputs must be ours.
838    #[prost(uint32, repeated, tag = "6")]
839    #[cfg_attr(
840        feature = "wasm",
841        serde(deserialize_with = "crate::keypath::serde_deserialize")
842    )]
843    pub keypath: ::prost::alloc::vec::Vec<u32>,
844    /// References a script config from BTCSignInitRequest
845    #[prost(uint32, tag = "7")]
846    pub script_config_index: u32,
847    #[prost(message, optional, tag = "8")]
848    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
849}
850#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
851#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
852#[derive(Clone, PartialEq, ::prost::Message)]
853pub struct BtcSignOutputRequest {
854    #[prost(bool, tag = "1")]
855    pub ours: bool,
856    /// if ours is false
857    #[prost(enumeration = "BtcOutputType", tag = "2")]
858    pub r#type: i32,
859    /// 20 bytes for p2pkh, p2sh, pw2wpkh. 32 bytes for p2wsh.
860    #[prost(uint64, tag = "3")]
861    pub value: u64,
862    /// if ours is false. Renamed from `hash`.
863    #[prost(bytes = "vec", tag = "4")]
864    pub payload: ::prost::alloc::vec::Vec<u8>,
865    /// if ours is true
866    #[prost(uint32, repeated, tag = "5")]
867    #[cfg_attr(
868        feature = "wasm",
869        serde(deserialize_with = "crate::keypath::serde_deserialize")
870    )]
871    pub keypath: ::prost::alloc::vec::Vec<u32>,
872    /// If ours is true and `output_script_config_index` is absent. References a script config from
873    /// BTCSignInitRequest. This allows change output identification and allows us to identify
874    /// non-change outputs to the same account, so we can display this info to the user.
875    #[prost(uint32, tag = "6")]
876    pub script_config_index: u32,
877    #[prost(uint32, optional, tag = "7")]
878    pub payment_request_index: ::core::option::Option<u32>,
879    /// If provided, `type` and `payload` is ignored. The generated output pkScript is returned in
880    /// BTCSignNextResponse. `contains_silent_payment_outputs` in the init request must be true.
881    #[prost(message, optional, tag = "8")]
882    pub silent_payment: ::core::option::Option<btc_sign_output_request::SilentPayment>,
883    /// If ours is true. If set, `script_config_index` is ignored. References an output script config
884    /// from BTCSignInitRequest. This enables verification that an output belongs to the same keystore,
885    /// even if it is from a different account than we spend from, allowing us to display this info to
886    /// the user.
887    #[prost(uint32, optional, tag = "9")]
888    pub output_script_config_index: ::core::option::Option<u32>,
889}
890/// Nested message and enum types in `BTCSignOutputRequest`.
891pub mod btc_sign_output_request {
892    /// <https://github.com/bitcoin/bips/blob/master/bip-0352.mediawiki>
893    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
894    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
895    #[derive(Clone, PartialEq, ::prost::Message)]
896    pub struct SilentPayment {
897        #[prost(string, tag = "1")]
898        pub address: ::prost::alloc::string::String,
899    }
900}
901#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
902#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
903#[derive(Clone, PartialEq, ::prost::Message)]
904pub struct BtcScriptConfigRegistration {
905    #[prost(enumeration = "BtcCoin", tag = "1")]
906    pub coin: i32,
907    #[prost(message, optional, tag = "2")]
908    pub script_config: ::core::option::Option<BtcScriptConfig>,
909    /// Unused for policy registrations.
910    #[prost(uint32, repeated, tag = "3")]
911    #[cfg_attr(
912        feature = "wasm",
913        serde(deserialize_with = "crate::keypath::serde_deserialize")
914    )]
915    pub keypath: ::prost::alloc::vec::Vec<u32>,
916}
917#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
918#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
919#[derive(Clone, Copy, PartialEq, ::prost::Message)]
920pub struct BtcSuccess {}
921#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
922#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
923#[derive(Clone, PartialEq, ::prost::Message)]
924pub struct BtcIsScriptConfigRegisteredRequest {
925    #[prost(message, optional, tag = "1")]
926    pub registration: ::core::option::Option<BtcScriptConfigRegistration>,
927}
928#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
929#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
930#[derive(Clone, Copy, PartialEq, ::prost::Message)]
931pub struct BtcIsScriptConfigRegisteredResponse {
932    #[prost(bool, tag = "1")]
933    pub is_registered: bool,
934}
935#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
936#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
937#[derive(Clone, PartialEq, ::prost::Message)]
938pub struct BtcRegisterScriptConfigRequest {
939    #[prost(message, optional, tag = "1")]
940    pub registration: ::core::option::Option<BtcScriptConfigRegistration>,
941    /// If empty, the name is entered on the device instead.
942    #[prost(string, tag = "2")]
943    pub name: ::prost::alloc::string::String,
944    #[prost(enumeration = "btc_register_script_config_request::XPubType", tag = "3")]
945    pub xpub_type: i32,
946}
947/// Nested message and enum types in `BTCRegisterScriptConfigRequest`.
948pub mod btc_register_script_config_request {
949    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
950    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
951    #[derive(
952        Clone,
953        Copy,
954        Debug,
955        PartialEq,
956        Eq,
957        Hash,
958        PartialOrd,
959        Ord,
960        ::prost::Enumeration
961    )]
962    #[repr(i32)]
963    pub enum XPubType {
964        /// Automatically choose to match Electrum's xpub format (e.g. Zpub/Vpub for p2wsh multisig mainnet/testnet).
965        AutoElectrum = 0,
966        /// Always xpub for mainnets, tpub for testnets.
967        AutoXpubTpub = 1,
968    }
969    impl XPubType {
970        /// String value of the enum field names used in the ProtoBuf definition.
971        ///
972        /// The values are not transformed in any way and thus are considered stable
973        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
974        pub fn as_str_name(&self) -> &'static str {
975            match self {
976                Self::AutoElectrum => "AUTO_ELECTRUM",
977                Self::AutoXpubTpub => "AUTO_XPUB_TPUB",
978            }
979        }
980        /// Creates an enum from field names used in the ProtoBuf definition.
981        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
982            match value {
983                "AUTO_ELECTRUM" => Some(Self::AutoElectrum),
984                "AUTO_XPUB_TPUB" => Some(Self::AutoXpubTpub),
985                _ => None,
986            }
987        }
988    }
989}
990#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
991#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
992#[derive(Clone, Copy, PartialEq, ::prost::Message)]
993pub struct BtcPrevTxInitRequest {
994    #[prost(uint32, tag = "1")]
995    pub version: u32,
996    #[prost(uint32, tag = "2")]
997    pub num_inputs: u32,
998    #[prost(uint32, tag = "3")]
999    pub num_outputs: u32,
1000    #[prost(uint32, tag = "4")]
1001    pub locktime: u32,
1002}
1003#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1004#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1005#[derive(Clone, PartialEq, ::prost::Message)]
1006pub struct BtcPrevTxInputRequest {
1007    #[prost(bytes = "vec", tag = "1")]
1008    pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
1009    #[prost(uint32, tag = "2")]
1010    pub prev_out_index: u32,
1011    #[prost(bytes = "vec", tag = "3")]
1012    pub signature_script: ::prost::alloc::vec::Vec<u8>,
1013    #[prost(uint32, tag = "4")]
1014    pub sequence: u32,
1015}
1016#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1017#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct BtcPrevTxOutputRequest {
1020    #[prost(uint64, tag = "1")]
1021    pub value: u64,
1022    #[prost(bytes = "vec", tag = "2")]
1023    pub pubkey_script: ::prost::alloc::vec::Vec<u8>,
1024}
1025#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1026#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1027#[derive(Clone, PartialEq, ::prost::Message)]
1028pub struct BtcPaymentRequestRequest {
1029    #[prost(string, tag = "1")]
1030    pub recipient_name: ::prost::alloc::string::String,
1031    #[prost(message, repeated, tag = "2")]
1032    pub memos: ::prost::alloc::vec::Vec<btc_payment_request_request::Memo>,
1033    #[prost(bytes = "vec", tag = "3")]
1034    pub nonce: ::prost::alloc::vec::Vec<u8>,
1035    #[prost(uint64, tag = "4")]
1036    pub total_amount: u64,
1037    #[prost(bytes = "vec", tag = "5")]
1038    pub signature: ::prost::alloc::vec::Vec<u8>,
1039}
1040/// Nested message and enum types in `BTCPaymentRequestRequest`.
1041pub mod btc_payment_request_request {
1042    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1043    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1044    #[derive(Clone, PartialEq, ::prost::Message)]
1045    pub struct Memo {
1046        #[prost(oneof = "memo::Memo", tags = "1")]
1047        pub memo: ::core::option::Option<memo::Memo>,
1048    }
1049    /// Nested message and enum types in `Memo`.
1050    pub mod memo {
1051        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1052        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1053        #[derive(Clone, PartialEq, ::prost::Message)]
1054        pub struct TextMemo {
1055            #[prost(string, tag = "1")]
1056            pub note: ::prost::alloc::string::String,
1057        }
1058        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1059        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1060        #[derive(Clone, PartialEq, ::prost::Oneof)]
1061        pub enum Memo {
1062            #[prost(message, tag = "1")]
1063            TextMemo(TextMemo),
1064        }
1065    }
1066}
1067#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1068#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1069#[derive(Clone, PartialEq, ::prost::Message)]
1070pub struct BtcSignMessageRequest {
1071    #[prost(enumeration = "BtcCoin", tag = "1")]
1072    pub coin: i32,
1073    #[prost(message, optional, tag = "2")]
1074    pub script_config: ::core::option::Option<BtcScriptConfigWithKeypath>,
1075    #[prost(bytes = "vec", tag = "3")]
1076    pub msg: ::prost::alloc::vec::Vec<u8>,
1077    #[prost(message, optional, tag = "4")]
1078    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
1079}
1080#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1081#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1082#[derive(Clone, PartialEq, ::prost::Message)]
1083pub struct BtcSignMessageResponse {
1084    /// 65 bytes (32 bytes big endian R, 32 bytes big endian S, 1 recid).
1085    #[prost(bytes = "vec", tag = "1")]
1086    pub signature: ::prost::alloc::vec::Vec<u8>,
1087}
1088#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1089#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1090#[derive(Clone, PartialEq, ::prost::Message)]
1091pub struct BtcRequest {
1092    #[prost(oneof = "btc_request::Request", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
1093    pub request: ::core::option::Option<btc_request::Request>,
1094}
1095/// Nested message and enum types in `BTCRequest`.
1096pub mod btc_request {
1097    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1098    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1099    #[derive(Clone, PartialEq, ::prost::Oneof)]
1100    pub enum Request {
1101        #[prost(message, tag = "1")]
1102        IsScriptConfigRegistered(super::BtcIsScriptConfigRegisteredRequest),
1103        #[prost(message, tag = "2")]
1104        RegisterScriptConfig(super::BtcRegisterScriptConfigRequest),
1105        #[prost(message, tag = "3")]
1106        PrevtxInit(super::BtcPrevTxInitRequest),
1107        #[prost(message, tag = "4")]
1108        PrevtxInput(super::BtcPrevTxInputRequest),
1109        #[prost(message, tag = "5")]
1110        PrevtxOutput(super::BtcPrevTxOutputRequest),
1111        #[prost(message, tag = "6")]
1112        SignMessage(super::BtcSignMessageRequest),
1113        #[prost(message, tag = "7")]
1114        AntikleptoSignature(super::AntiKleptoSignatureRequest),
1115        #[prost(message, tag = "8")]
1116        PaymentRequest(super::BtcPaymentRequestRequest),
1117        #[prost(message, tag = "9")]
1118        Xpubs(super::BtcXpubsRequest),
1119    }
1120}
1121#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1122#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1123#[derive(Clone, PartialEq, ::prost::Message)]
1124pub struct BtcResponse {
1125    #[prost(oneof = "btc_response::Response", tags = "1, 2, 3, 4, 5, 6")]
1126    pub response: ::core::option::Option<btc_response::Response>,
1127}
1128/// Nested message and enum types in `BTCResponse`.
1129pub mod btc_response {
1130    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1131    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1132    #[derive(Clone, PartialEq, ::prost::Oneof)]
1133    pub enum Response {
1134        #[prost(message, tag = "1")]
1135        Success(super::BtcSuccess),
1136        #[prost(message, tag = "2")]
1137        IsScriptConfigRegistered(super::BtcIsScriptConfigRegisteredResponse),
1138        #[prost(message, tag = "3")]
1139        SignNext(super::BtcSignNextResponse),
1140        #[prost(message, tag = "4")]
1141        SignMessage(super::BtcSignMessageResponse),
1142        #[prost(message, tag = "5")]
1143        AntikleptoSignerCommitment(super::AntiKleptoSignerCommitment),
1144        #[prost(message, tag = "6")]
1145        Pubs(super::PubsResponse),
1146    }
1147}
1148#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1149#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1150#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1151#[repr(i32)]
1152pub enum BtcCoin {
1153    Btc = 0,
1154    Tbtc = 1,
1155    Ltc = 2,
1156    Tltc = 3,
1157    /// Regtest
1158    Rbtc = 4,
1159}
1160impl BtcCoin {
1161    /// String value of the enum field names used in the ProtoBuf definition.
1162    ///
1163    /// The values are not transformed in any way and thus are considered stable
1164    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1165    pub fn as_str_name(&self) -> &'static str {
1166        match self {
1167            Self::Btc => "BTC",
1168            Self::Tbtc => "TBTC",
1169            Self::Ltc => "LTC",
1170            Self::Tltc => "TLTC",
1171            Self::Rbtc => "RBTC",
1172        }
1173    }
1174    /// Creates an enum from field names used in the ProtoBuf definition.
1175    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1176        match value {
1177            "BTC" => Some(Self::Btc),
1178            "TBTC" => Some(Self::Tbtc),
1179            "LTC" => Some(Self::Ltc),
1180            "TLTC" => Some(Self::Tltc),
1181            "RBTC" => Some(Self::Rbtc),
1182            _ => None,
1183        }
1184    }
1185}
1186#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1187#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1188#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1189#[repr(i32)]
1190pub enum BtcOutputType {
1191    Unknown = 0,
1192    P2pkh = 1,
1193    P2sh = 2,
1194    P2wpkh = 3,
1195    P2wsh = 4,
1196    P2tr = 5,
1197    OpReturn = 6,
1198}
1199impl BtcOutputType {
1200    /// String value of the enum field names used in the ProtoBuf definition.
1201    ///
1202    /// The values are not transformed in any way and thus are considered stable
1203    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1204    pub fn as_str_name(&self) -> &'static str {
1205        match self {
1206            Self::Unknown => "UNKNOWN",
1207            Self::P2pkh => "P2PKH",
1208            Self::P2sh => "P2SH",
1209            Self::P2wpkh => "P2WPKH",
1210            Self::P2wsh => "P2WSH",
1211            Self::P2tr => "P2TR",
1212            Self::OpReturn => "OP_RETURN",
1213        }
1214    }
1215    /// Creates an enum from field names used in the ProtoBuf definition.
1216    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1217        match value {
1218            "UNKNOWN" => Some(Self::Unknown),
1219            "P2PKH" => Some(Self::P2pkh),
1220            "P2SH" => Some(Self::P2sh),
1221            "P2WPKH" => Some(Self::P2wpkh),
1222            "P2WSH" => Some(Self::P2wsh),
1223            "P2TR" => Some(Self::P2tr),
1224            "OP_RETURN" => Some(Self::OpReturn),
1225            _ => None,
1226        }
1227    }
1228}
1229#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1230#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1231#[derive(Clone, PartialEq, ::prost::Message)]
1232pub struct CardanoXpubsRequest {
1233    #[prost(message, repeated, tag = "1")]
1234    pub keypaths: ::prost::alloc::vec::Vec<Keypath>,
1235}
1236#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1237#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1238#[derive(Clone, PartialEq, ::prost::Message)]
1239pub struct CardanoXpubsResponse {
1240    #[prost(bytes = "vec", repeated, tag = "1")]
1241    pub xpubs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1242}
1243#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1244#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1245#[cfg_attr(feature = "wasm", serde(try_from = "crate::cardano::SerdeScriptConfig"))]
1246#[derive(Clone, PartialEq, ::prost::Message)]
1247pub struct CardanoScriptConfig {
1248    /// Entries correspond to address types as described in:
1249    /// <https://github.com/cardano-foundation/CIPs/blob/6c249ef48f8f5b32efc0ec768fadf4321f3173f2/CIP-0019/CIP-0019.md>
1250    /// See also:
1251    /// <https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L137>
1252    #[prost(oneof = "cardano_script_config::Config", tags = "1")]
1253    pub config: ::core::option::Option<cardano_script_config::Config>,
1254}
1255/// Nested message and enum types in `CardanoScriptConfig`.
1256pub mod cardano_script_config {
1257    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1258    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1259    #[derive(Clone, PartialEq, ::prost::Message)]
1260    pub struct PkhSkh {
1261        #[prost(uint32, repeated, tag = "1")]
1262        #[cfg_attr(
1263            feature = "wasm",
1264            serde(deserialize_with = "crate::keypath::serde_deserialize")
1265        )]
1266        pub keypath_payment: ::prost::alloc::vec::Vec<u32>,
1267        #[prost(uint32, repeated, tag = "2")]
1268        #[cfg_attr(
1269            feature = "wasm",
1270            serde(deserialize_with = "crate::keypath::serde_deserialize")
1271        )]
1272        pub keypath_stake: ::prost::alloc::vec::Vec<u32>,
1273    }
1274    /// Entries correspond to address types as described in:
1275    /// <https://github.com/cardano-foundation/CIPs/blob/6c249ef48f8f5b32efc0ec768fadf4321f3173f2/CIP-0019/CIP-0019.md>
1276    /// See also:
1277    /// <https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L137>
1278    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1279    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1280    #[derive(Clone, PartialEq, ::prost::Oneof)]
1281    pub enum Config {
1282        /// Shelley PaymentKeyHash & StakeKeyHash
1283        #[prost(message, tag = "1")]
1284        PkhSkh(PkhSkh),
1285    }
1286}
1287#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1288#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1289#[derive(Clone, PartialEq, ::prost::Message)]
1290pub struct CardanoAddressRequest {
1291    #[prost(enumeration = "CardanoNetwork", tag = "1")]
1292    pub network: i32,
1293    #[prost(bool, tag = "2")]
1294    pub display: bool,
1295    #[prost(message, optional, tag = "3")]
1296    pub script_config: ::core::option::Option<CardanoScriptConfig>,
1297}
1298/// Max allowed transaction size is 16384 bytes according to
1299/// <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0009/CIP-0009.md.> Unlike with BTC, we
1300/// can fit the whole request in RAM and don't need to stream.
1301///
1302/// See also: <https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L50>
1303#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1304#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1305#[derive(Clone, PartialEq, ::prost::Message)]
1306pub struct CardanoSignTransactionRequest {
1307    #[prost(enumeration = "CardanoNetwork", tag = "1")]
1308    #[cfg_attr(
1309        feature = "wasm",
1310        serde(deserialize_with = "crate::cardano::serde_deserialize_network")
1311    )]
1312    pub network: i32,
1313    #[prost(message, repeated, tag = "2")]
1314    pub inputs: ::prost::alloc::vec::Vec<cardano_sign_transaction_request::Input>,
1315    #[prost(message, repeated, tag = "3")]
1316    pub outputs: ::prost::alloc::vec::Vec<cardano_sign_transaction_request::Output>,
1317    #[prost(uint64, tag = "4")]
1318    pub fee: u64,
1319    #[prost(uint64, tag = "5")]
1320    pub ttl: u64,
1321    #[prost(message, repeated, tag = "6")]
1322    pub certificates: ::prost::alloc::vec::Vec<
1323        cardano_sign_transaction_request::Certificate,
1324    >,
1325    #[prost(message, repeated, tag = "7")]
1326    pub withdrawals: ::prost::alloc::vec::Vec<
1327        cardano_sign_transaction_request::Withdrawal,
1328    >,
1329    #[prost(uint64, tag = "8")]
1330    pub validity_interval_start: u64,
1331    /// include ttl even if it is zero
1332    #[prost(bool, tag = "9")]
1333    #[cfg_attr(feature = "wasm", serde(rename = "allowZeroTTL"))]
1334    pub allow_zero_ttl: bool,
1335    /// Tag arrays in the transaction serialization with the 258 tag.
1336    /// See <https://github.com/IntersectMBO/cardano-ledger/blob/6e2d37cc0f47bd02e89b4ce9f78b59c35c958e96/eras/conway/impl/cddl-files/extra.cddl#L5>
1337    #[prost(bool, tag = "10")]
1338    pub tag_cbor_sets: bool,
1339}
1340/// Nested message and enum types in `CardanoSignTransactionRequest`.
1341pub mod cardano_sign_transaction_request {
1342    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1343    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1344    #[derive(Clone, PartialEq, ::prost::Message)]
1345    pub struct Input {
1346        #[prost(uint32, repeated, tag = "1")]
1347        #[cfg_attr(
1348            feature = "wasm",
1349            serde(deserialize_with = "crate::keypath::serde_deserialize")
1350        )]
1351        pub keypath: ::prost::alloc::vec::Vec<u32>,
1352        #[prost(bytes = "vec", tag = "2")]
1353        pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
1354        #[prost(uint32, tag = "3")]
1355        pub prev_out_index: u32,
1356    }
1357    /// <https://github.com/input-output-hk/cardano-ledger/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L358>
1358    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1359    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1360    #[derive(Clone, PartialEq, ::prost::Message)]
1361    pub struct AssetGroup {
1362        #[prost(bytes = "vec", tag = "1")]
1363        pub policy_id: ::prost::alloc::vec::Vec<u8>,
1364        #[prost(message, repeated, tag = "2")]
1365        pub tokens: ::prost::alloc::vec::Vec<asset_group::Token>,
1366    }
1367    /// Nested message and enum types in `AssetGroup`.
1368    pub mod asset_group {
1369        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1370        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1371        #[derive(Clone, PartialEq, ::prost::Message)]
1372        pub struct Token {
1373            #[prost(bytes = "vec", tag = "1")]
1374            pub asset_name: ::prost::alloc::vec::Vec<u8>,
1375            /// Number of tokens transacted of this asset.
1376            #[prost(uint64, tag = "2")]
1377            pub value: u64,
1378        }
1379    }
1380    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1381    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1382    #[cfg_attr(feature = "wasm", serde(default))]
1383    #[derive(Clone, PartialEq, ::prost::Message)]
1384    pub struct Output {
1385        #[prost(string, tag = "1")]
1386        pub encoded_address: ::prost::alloc::string::String,
1387        #[prost(uint64, tag = "2")]
1388        pub value: u64,
1389        /// Optional. If provided, this is validated as a change output.
1390        #[prost(message, optional, tag = "3")]
1391        pub script_config: ::core::option::Option<super::CardanoScriptConfig>,
1392        #[prost(message, repeated, tag = "4")]
1393        pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
1394    }
1395    /// See <https://github.com/IntersectMBO/cardano-ledger/blob/cardano-ledger-conway-1.12.0.0/eras/conway/impl/cddl-files/conway.cddl#L273>
1396    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1397    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1398    #[cfg_attr(feature = "wasm", serde(try_from = "crate::cardano::SerdeCert"))]
1399    #[derive(Clone, PartialEq, ::prost::Message)]
1400    pub struct Certificate {
1401        #[prost(oneof = "certificate::Cert", tags = "1, 2, 3, 10")]
1402        pub cert: ::core::option::Option<certificate::Cert>,
1403    }
1404    /// Nested message and enum types in `Certificate`.
1405    pub mod certificate {
1406        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1407        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1408        #[derive(Clone, PartialEq, ::prost::Message)]
1409        pub struct StakeDelegation {
1410            #[prost(uint32, repeated, tag = "1")]
1411            #[cfg_attr(
1412                feature = "wasm",
1413                serde(deserialize_with = "crate::keypath::serde_deserialize")
1414            )]
1415            pub keypath: ::prost::alloc::vec::Vec<u32>,
1416            #[prost(bytes = "vec", tag = "2")]
1417            pub pool_keyhash: ::prost::alloc::vec::Vec<u8>,
1418        }
1419        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1420        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1421        #[derive(Clone, PartialEq, ::prost::Message)]
1422        pub struct VoteDelegation {
1423            /// keypath in this instance refers to stake credential
1424            #[prost(uint32, repeated, tag = "1")]
1425            #[cfg_attr(
1426                feature = "wasm",
1427                serde(deserialize_with = "crate::keypath::serde_deserialize")
1428            )]
1429            pub keypath: ::prost::alloc::vec::Vec<u32>,
1430            #[prost(enumeration = "vote_delegation::CardanoDRepType", tag = "2")]
1431            #[cfg_attr(
1432                feature = "wasm",
1433                serde(deserialize_with = "crate::cardano::serde_deserialize_drep_type")
1434            )]
1435            pub r#type: i32,
1436            #[prost(bytes = "vec", optional, tag = "3")]
1437            pub drep_credhash: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
1438        }
1439        /// Nested message and enum types in `VoteDelegation`.
1440        pub mod vote_delegation {
1441            #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1442            #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1443            #[derive(
1444                Clone,
1445                Copy,
1446                Debug,
1447                PartialEq,
1448                Eq,
1449                Hash,
1450                PartialOrd,
1451                Ord,
1452                ::prost::Enumeration
1453            )]
1454            #[repr(i32)]
1455            pub enum CardanoDRepType {
1456                KeyHash = 0,
1457                ScriptHash = 1,
1458                AlwaysAbstain = 2,
1459                AlwaysNoConfidence = 3,
1460            }
1461            impl CardanoDRepType {
1462                /// String value of the enum field names used in the ProtoBuf definition.
1463                ///
1464                /// The values are not transformed in any way and thus are considered stable
1465                /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1466                pub fn as_str_name(&self) -> &'static str {
1467                    match self {
1468                        Self::KeyHash => "KEY_HASH",
1469                        Self::ScriptHash => "SCRIPT_HASH",
1470                        Self::AlwaysAbstain => "ALWAYS_ABSTAIN",
1471                        Self::AlwaysNoConfidence => "ALWAYS_NO_CONFIDENCE",
1472                    }
1473                }
1474                /// Creates an enum from field names used in the ProtoBuf definition.
1475                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1476                    match value {
1477                        "KEY_HASH" => Some(Self::KeyHash),
1478                        "SCRIPT_HASH" => Some(Self::ScriptHash),
1479                        "ALWAYS_ABSTAIN" => Some(Self::AlwaysAbstain),
1480                        "ALWAYS_NO_CONFIDENCE" => Some(Self::AlwaysNoConfidence),
1481                        _ => None,
1482                    }
1483                }
1484            }
1485        }
1486        #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1487        #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1488        #[derive(Clone, PartialEq, ::prost::Oneof)]
1489        pub enum Cert {
1490            #[prost(message, tag = "1")]
1491            StakeRegistration(super::super::Keypath),
1492            #[prost(message, tag = "2")]
1493            StakeDeregistration(super::super::Keypath),
1494            #[prost(message, tag = "3")]
1495            StakeDelegation(StakeDelegation),
1496            #[prost(message, tag = "10")]
1497            VoteDelegation(VoteDelegation),
1498        }
1499    }
1500    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1501    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1502    #[derive(Clone, PartialEq, ::prost::Message)]
1503    pub struct Withdrawal {
1504        #[prost(uint32, repeated, tag = "1")]
1505        #[cfg_attr(
1506            feature = "wasm",
1507            serde(deserialize_with = "crate::keypath::serde_deserialize")
1508        )]
1509        pub keypath: ::prost::alloc::vec::Vec<u32>,
1510        #[prost(uint64, tag = "2")]
1511        pub value: u64,
1512    }
1513}
1514#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1515#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1516#[derive(Clone, PartialEq, ::prost::Message)]
1517pub struct CardanoSignTransactionResponse {
1518    #[prost(message, repeated, tag = "1")]
1519    pub shelley_witnesses: ::prost::alloc::vec::Vec<
1520        cardano_sign_transaction_response::ShelleyWitness,
1521    >,
1522}
1523/// Nested message and enum types in `CardanoSignTransactionResponse`.
1524pub mod cardano_sign_transaction_response {
1525    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1526    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1527    #[derive(Clone, PartialEq, ::prost::Message)]
1528    pub struct ShelleyWitness {
1529        #[prost(bytes = "vec", tag = "1")]
1530        pub public_key: ::prost::alloc::vec::Vec<u8>,
1531        #[prost(bytes = "vec", tag = "2")]
1532        pub signature: ::prost::alloc::vec::Vec<u8>,
1533    }
1534}
1535#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1536#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1537#[derive(Clone, PartialEq, ::prost::Message)]
1538pub struct CardanoRequest {
1539    #[prost(oneof = "cardano_request::Request", tags = "1, 2, 3")]
1540    pub request: ::core::option::Option<cardano_request::Request>,
1541}
1542/// Nested message and enum types in `CardanoRequest`.
1543pub mod cardano_request {
1544    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1545    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1546    #[derive(Clone, PartialEq, ::prost::Oneof)]
1547    pub enum Request {
1548        #[prost(message, tag = "1")]
1549        Xpubs(super::CardanoXpubsRequest),
1550        #[prost(message, tag = "2")]
1551        Address(super::CardanoAddressRequest),
1552        #[prost(message, tag = "3")]
1553        SignTransaction(super::CardanoSignTransactionRequest),
1554    }
1555}
1556#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1557#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1558#[derive(Clone, PartialEq, ::prost::Message)]
1559pub struct CardanoResponse {
1560    #[prost(oneof = "cardano_response::Response", tags = "1, 2, 3")]
1561    pub response: ::core::option::Option<cardano_response::Response>,
1562}
1563/// Nested message and enum types in `CardanoResponse`.
1564pub mod cardano_response {
1565    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1566    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1567    #[derive(Clone, PartialEq, ::prost::Oneof)]
1568    pub enum Response {
1569        #[prost(message, tag = "1")]
1570        Xpubs(super::CardanoXpubsResponse),
1571        #[prost(message, tag = "2")]
1572        Pub(super::PubResponse),
1573        #[prost(message, tag = "3")]
1574        SignTransaction(super::CardanoSignTransactionResponse),
1575    }
1576}
1577#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1578#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1579#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1580#[repr(i32)]
1581pub enum CardanoNetwork {
1582    #[cfg_attr(feature = "wasm", serde(rename = "mainnet"))]
1583    CardanoMainnet = 0,
1584    #[cfg_attr(feature = "wasm", serde(rename = "testnet"))]
1585    CardanoTestnet = 1,
1586}
1587impl CardanoNetwork {
1588    /// String value of the enum field names used in the ProtoBuf definition.
1589    ///
1590    /// The values are not transformed in any way and thus are considered stable
1591    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1592    pub fn as_str_name(&self) -> &'static str {
1593        match self {
1594            Self::CardanoMainnet => "CardanoMainnet",
1595            Self::CardanoTestnet => "CardanoTestnet",
1596        }
1597    }
1598    /// Creates an enum from field names used in the ProtoBuf definition.
1599    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1600        match value {
1601            "CardanoMainnet" => Some(Self::CardanoMainnet),
1602            "CardanoTestnet" => Some(Self::CardanoTestnet),
1603            _ => None,
1604        }
1605    }
1606}
1607#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1608#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1609#[derive(Clone, PartialEq, ::prost::Message)]
1610pub struct EthPubRequest {
1611    #[prost(uint32, repeated, tag = "1")]
1612    #[cfg_attr(
1613        feature = "wasm",
1614        serde(deserialize_with = "crate::keypath::serde_deserialize")
1615    )]
1616    pub keypath: ::prost::alloc::vec::Vec<u32>,
1617    /// Deprecated: use chain_id instead.
1618    #[prost(enumeration = "EthCoin", tag = "2")]
1619    pub coin: i32,
1620    #[prost(enumeration = "eth_pub_request::OutputType", tag = "3")]
1621    pub output_type: i32,
1622    #[prost(bool, tag = "4")]
1623    pub display: bool,
1624    #[prost(bytes = "vec", tag = "5")]
1625    pub contract_address: ::prost::alloc::vec::Vec<u8>,
1626    /// If non-zero, `coin` is ignored and `chain_id` is used to identify the network.
1627    #[prost(uint64, tag = "6")]
1628    pub chain_id: u64,
1629}
1630/// Nested message and enum types in `ETHPubRequest`.
1631pub mod eth_pub_request {
1632    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1633    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1634    #[derive(
1635        Clone,
1636        Copy,
1637        Debug,
1638        PartialEq,
1639        Eq,
1640        Hash,
1641        PartialOrd,
1642        Ord,
1643        ::prost::Enumeration
1644    )]
1645    #[repr(i32)]
1646    pub enum OutputType {
1647        Address = 0,
1648        Xpub = 1,
1649    }
1650    impl OutputType {
1651        /// String value of the enum field names used in the ProtoBuf definition.
1652        ///
1653        /// The values are not transformed in any way and thus are considered stable
1654        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1655        pub fn as_str_name(&self) -> &'static str {
1656            match self {
1657                Self::Address => "ADDRESS",
1658                Self::Xpub => "XPUB",
1659            }
1660        }
1661        /// Creates an enum from field names used in the ProtoBuf definition.
1662        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1663            match value {
1664                "ADDRESS" => Some(Self::Address),
1665                "XPUB" => Some(Self::Xpub),
1666                _ => None,
1667            }
1668        }
1669    }
1670}
1671/// TX payload for "legacy" (EIP-155) transactions: <https://eips.ethereum.org/EIPS/eip-155>
1672#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1673#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1674#[derive(Clone, PartialEq, ::prost::Message)]
1675pub struct EthSignRequest {
1676    /// Deprecated: use chain_id instead.
1677    #[prost(enumeration = "EthCoin", tag = "1")]
1678    pub coin: i32,
1679    #[prost(uint32, repeated, tag = "2")]
1680    #[cfg_attr(
1681        feature = "wasm",
1682        serde(deserialize_with = "crate::keypath::serde_deserialize")
1683    )]
1684    pub keypath: ::prost::alloc::vec::Vec<u32>,
1685    /// smallest big endian serialization, max. 16 bytes
1686    #[prost(bytes = "vec", tag = "3")]
1687    pub nonce: ::prost::alloc::vec::Vec<u8>,
1688    /// smallest big endian serialization, max. 16 bytes
1689    #[prost(bytes = "vec", tag = "4")]
1690    pub gas_price: ::prost::alloc::vec::Vec<u8>,
1691    /// smallest big endian serialization, max. 16 bytes
1692    #[prost(bytes = "vec", tag = "5")]
1693    pub gas_limit: ::prost::alloc::vec::Vec<u8>,
1694    /// 20 byte recipient
1695    #[prost(bytes = "vec", tag = "6")]
1696    pub recipient: ::prost::alloc::vec::Vec<u8>,
1697    /// smallest big endian serialization, max. 32 bytes
1698    #[prost(bytes = "vec", tag = "7")]
1699    pub value: ::prost::alloc::vec::Vec<u8>,
1700    #[prost(bytes = "vec", tag = "8")]
1701    pub data: ::prost::alloc::vec::Vec<u8>,
1702    #[prost(message, optional, tag = "9")]
1703    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
1704    /// If non-zero, `coin` is ignored and `chain_id` is used to identify the network.
1705    #[prost(uint64, tag = "10")]
1706    pub chain_id: u64,
1707    #[prost(enumeration = "EthAddressCase", tag = "11")]
1708    pub address_case: i32,
1709}
1710/// TX payload for an EIP-1559 (type 2) transaction: <https://eips.ethereum.org/EIPS/eip-1559>
1711#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1712#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1713#[derive(Clone, PartialEq, ::prost::Message)]
1714pub struct EthSignEip1559Request {
1715    #[prost(uint64, tag = "1")]
1716    pub chain_id: u64,
1717    #[prost(uint32, repeated, tag = "2")]
1718    #[cfg_attr(
1719        feature = "wasm",
1720        serde(deserialize_with = "crate::keypath::serde_deserialize")
1721    )]
1722    pub keypath: ::prost::alloc::vec::Vec<u32>,
1723    /// smallest big endian serialization, max. 16 bytes
1724    #[prost(bytes = "vec", tag = "3")]
1725    pub nonce: ::prost::alloc::vec::Vec<u8>,
1726    /// smallest big endian serialization, max. 16 bytes
1727    #[prost(bytes = "vec", tag = "4")]
1728    pub max_priority_fee_per_gas: ::prost::alloc::vec::Vec<u8>,
1729    /// smallest big endian serialization, max. 16 bytes
1730    #[prost(bytes = "vec", tag = "5")]
1731    pub max_fee_per_gas: ::prost::alloc::vec::Vec<u8>,
1732    /// smallest big endian serialization, max. 16 bytes
1733    #[prost(bytes = "vec", tag = "6")]
1734    pub gas_limit: ::prost::alloc::vec::Vec<u8>,
1735    /// 20 byte recipient
1736    #[prost(bytes = "vec", tag = "7")]
1737    pub recipient: ::prost::alloc::vec::Vec<u8>,
1738    /// smallest big endian serialization, max. 32 bytes
1739    #[prost(bytes = "vec", tag = "8")]
1740    pub value: ::prost::alloc::vec::Vec<u8>,
1741    #[prost(bytes = "vec", tag = "9")]
1742    pub data: ::prost::alloc::vec::Vec<u8>,
1743    #[prost(message, optional, tag = "10")]
1744    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
1745    #[prost(enumeration = "EthAddressCase", tag = "11")]
1746    pub address_case: i32,
1747}
1748#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1749#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1750#[derive(Clone, PartialEq, ::prost::Message)]
1751pub struct EthSignMessageRequest {
1752    /// Deprecated: use chain_id instead.
1753    #[prost(enumeration = "EthCoin", tag = "1")]
1754    pub coin: i32,
1755    #[prost(uint32, repeated, tag = "2")]
1756    #[cfg_attr(
1757        feature = "wasm",
1758        serde(deserialize_with = "crate::keypath::serde_deserialize")
1759    )]
1760    pub keypath: ::prost::alloc::vec::Vec<u32>,
1761    #[prost(bytes = "vec", tag = "3")]
1762    pub msg: ::prost::alloc::vec::Vec<u8>,
1763    #[prost(message, optional, tag = "4")]
1764    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
1765    /// If non-zero, `coin` is ignored and `chain_id` is used to identify the network.
1766    #[prost(uint64, tag = "5")]
1767    pub chain_id: u64,
1768}
1769#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1770#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1771#[derive(Clone, PartialEq, ::prost::Message)]
1772pub struct EthSignResponse {
1773    /// 65 bytes, last byte is the recid
1774    #[prost(bytes = "vec", tag = "1")]
1775    pub signature: ::prost::alloc::vec::Vec<u8>,
1776}
1777#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1778#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1779#[derive(Clone, PartialEq, ::prost::Message)]
1780pub struct EthSignTypedMessageRequest {
1781    #[prost(uint64, tag = "1")]
1782    pub chain_id: u64,
1783    #[prost(uint32, repeated, tag = "2")]
1784    #[cfg_attr(
1785        feature = "wasm",
1786        serde(deserialize_with = "crate::keypath::serde_deserialize")
1787    )]
1788    pub keypath: ::prost::alloc::vec::Vec<u32>,
1789    #[prost(message, repeated, tag = "3")]
1790    pub types: ::prost::alloc::vec::Vec<eth_sign_typed_message_request::StructType>,
1791    #[prost(string, tag = "4")]
1792    pub primary_type: ::prost::alloc::string::String,
1793    #[prost(message, optional, tag = "5")]
1794    pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
1795}
1796/// Nested message and enum types in `ETHSignTypedMessageRequest`.
1797pub mod eth_sign_typed_message_request {
1798    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1799    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1800    #[derive(Clone, PartialEq, ::prost::Message)]
1801    pub struct MemberType {
1802        #[prost(enumeration = "DataType", tag = "1")]
1803        pub r#type: i32,
1804        #[prost(uint32, tag = "2")]
1805        pub size: u32,
1806        /// if type==STRUCT, name of struct type.
1807        #[prost(string, tag = "3")]
1808        pub struct_name: ::prost::alloc::string::String,
1809        /// if type==ARRAY, type of elements
1810        #[prost(message, optional, boxed, tag = "4")]
1811        pub array_type: ::core::option::Option<::prost::alloc::boxed::Box<MemberType>>,
1812    }
1813    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1814    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1815    #[derive(Clone, PartialEq, ::prost::Message)]
1816    pub struct Member {
1817        #[prost(string, tag = "1")]
1818        pub name: ::prost::alloc::string::String,
1819        #[prost(message, optional, tag = "2")]
1820        pub r#type: ::core::option::Option<MemberType>,
1821    }
1822    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1823    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1824    #[derive(Clone, PartialEq, ::prost::Message)]
1825    pub struct StructType {
1826        #[prost(string, tag = "1")]
1827        pub name: ::prost::alloc::string::String,
1828        #[prost(message, repeated, tag = "2")]
1829        pub members: ::prost::alloc::vec::Vec<Member>,
1830    }
1831    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1832    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1833    #[derive(
1834        Clone,
1835        Copy,
1836        Debug,
1837        PartialEq,
1838        Eq,
1839        Hash,
1840        PartialOrd,
1841        Ord,
1842        ::prost::Enumeration
1843    )]
1844    #[repr(i32)]
1845    pub enum DataType {
1846        Unknown = 0,
1847        Bytes = 1,
1848        Uint = 2,
1849        Int = 3,
1850        Bool = 4,
1851        Address = 5,
1852        String = 6,
1853        Array = 7,
1854        Struct = 8,
1855    }
1856    impl DataType {
1857        /// String value of the enum field names used in the ProtoBuf definition.
1858        ///
1859        /// The values are not transformed in any way and thus are considered stable
1860        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1861        pub fn as_str_name(&self) -> &'static str {
1862            match self {
1863                Self::Unknown => "UNKNOWN",
1864                Self::Bytes => "BYTES",
1865                Self::Uint => "UINT",
1866                Self::Int => "INT",
1867                Self::Bool => "BOOL",
1868                Self::Address => "ADDRESS",
1869                Self::String => "STRING",
1870                Self::Array => "ARRAY",
1871                Self::Struct => "STRUCT",
1872            }
1873        }
1874        /// Creates an enum from field names used in the ProtoBuf definition.
1875        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1876            match value {
1877                "UNKNOWN" => Some(Self::Unknown),
1878                "BYTES" => Some(Self::Bytes),
1879                "UINT" => Some(Self::Uint),
1880                "INT" => Some(Self::Int),
1881                "BOOL" => Some(Self::Bool),
1882                "ADDRESS" => Some(Self::Address),
1883                "STRING" => Some(Self::String),
1884                "ARRAY" => Some(Self::Array),
1885                "STRUCT" => Some(Self::Struct),
1886                _ => None,
1887            }
1888        }
1889    }
1890}
1891#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1892#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1893#[derive(Clone, PartialEq, ::prost::Message)]
1894pub struct EthTypedMessageValueResponse {
1895    #[prost(enumeration = "eth_typed_message_value_response::RootObject", tag = "1")]
1896    pub root_object: i32,
1897    #[prost(uint32, repeated, tag = "2")]
1898    pub path: ::prost::alloc::vec::Vec<u32>,
1899}
1900/// Nested message and enum types in `ETHTypedMessageValueResponse`.
1901pub mod eth_typed_message_value_response {
1902    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1903    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1904    #[derive(
1905        Clone,
1906        Copy,
1907        Debug,
1908        PartialEq,
1909        Eq,
1910        Hash,
1911        PartialOrd,
1912        Ord,
1913        ::prost::Enumeration
1914    )]
1915    #[repr(i32)]
1916    pub enum RootObject {
1917        Unknown = 0,
1918        Domain = 1,
1919        Message = 2,
1920    }
1921    impl RootObject {
1922        /// String value of the enum field names used in the ProtoBuf definition.
1923        ///
1924        /// The values are not transformed in any way and thus are considered stable
1925        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1926        pub fn as_str_name(&self) -> &'static str {
1927            match self {
1928                Self::Unknown => "UNKNOWN",
1929                Self::Domain => "DOMAIN",
1930                Self::Message => "MESSAGE",
1931            }
1932        }
1933        /// Creates an enum from field names used in the ProtoBuf definition.
1934        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1935            match value {
1936                "UNKNOWN" => Some(Self::Unknown),
1937                "DOMAIN" => Some(Self::Domain),
1938                "MESSAGE" => Some(Self::Message),
1939                _ => None,
1940            }
1941        }
1942    }
1943}
1944#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1945#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1946#[derive(Clone, PartialEq, ::prost::Message)]
1947pub struct EthTypedMessageValueRequest {
1948    #[prost(bytes = "vec", tag = "1")]
1949    pub value: ::prost::alloc::vec::Vec<u8>,
1950}
1951#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1952#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1953#[derive(Clone, PartialEq, ::prost::Message)]
1954pub struct EthRequest {
1955    #[prost(oneof = "eth_request::Request", tags = "1, 2, 3, 4, 5, 6, 7")]
1956    pub request: ::core::option::Option<eth_request::Request>,
1957}
1958/// Nested message and enum types in `ETHRequest`.
1959pub mod eth_request {
1960    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1961    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1962    #[derive(Clone, PartialEq, ::prost::Oneof)]
1963    pub enum Request {
1964        #[prost(message, tag = "1")]
1965        Pub(super::EthPubRequest),
1966        #[prost(message, tag = "2")]
1967        Sign(super::EthSignRequest),
1968        #[prost(message, tag = "3")]
1969        SignMsg(super::EthSignMessageRequest),
1970        #[prost(message, tag = "4")]
1971        AntikleptoSignature(super::AntiKleptoSignatureRequest),
1972        #[prost(message, tag = "5")]
1973        SignTypedMsg(super::EthSignTypedMessageRequest),
1974        #[prost(message, tag = "6")]
1975        TypedMsgValue(super::EthTypedMessageValueRequest),
1976        #[prost(message, tag = "7")]
1977        SignEip1559(super::EthSignEip1559Request),
1978    }
1979}
1980#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1981#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1982#[derive(Clone, PartialEq, ::prost::Message)]
1983pub struct EthResponse {
1984    #[prost(oneof = "eth_response::Response", tags = "1, 2, 3, 4")]
1985    pub response: ::core::option::Option<eth_response::Response>,
1986}
1987/// Nested message and enum types in `ETHResponse`.
1988pub mod eth_response {
1989    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
1990    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
1991    #[derive(Clone, PartialEq, ::prost::Oneof)]
1992    pub enum Response {
1993        #[prost(message, tag = "1")]
1994        Pub(super::PubResponse),
1995        #[prost(message, tag = "2")]
1996        Sign(super::EthSignResponse),
1997        #[prost(message, tag = "3")]
1998        AntikleptoSignerCommitment(super::AntiKleptoSignerCommitment),
1999        #[prost(message, tag = "4")]
2000        TypedMsgValue(super::EthTypedMessageValueResponse),
2001    }
2002}
2003/// Kept for backwards compatibility. Use chain_id instead, introduced in v9.10.0.
2004#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2005#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2006#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2007#[repr(i32)]
2008pub enum EthCoin {
2009    Eth = 0,
2010    /// Removed in v9.14.0 - deprecated
2011    RopstenEth = 1,
2012    /// Removed in v9.14.0 - deprecated
2013    RinkebyEth = 2,
2014}
2015impl EthCoin {
2016    /// String value of the enum field names used in the ProtoBuf definition.
2017    ///
2018    /// The values are not transformed in any way and thus are considered stable
2019    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2020    pub fn as_str_name(&self) -> &'static str {
2021        match self {
2022            Self::Eth => "ETH",
2023            Self::RopstenEth => "RopstenETH",
2024            Self::RinkebyEth => "RinkebyETH",
2025        }
2026    }
2027    /// Creates an enum from field names used in the ProtoBuf definition.
2028    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2029        match value {
2030            "ETH" => Some(Self::Eth),
2031            "RopstenETH" => Some(Self::RopstenEth),
2032            "RinkebyETH" => Some(Self::RinkebyEth),
2033            _ => None,
2034        }
2035    }
2036}
2037#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2038#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2039#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2040#[repr(i32)]
2041pub enum EthAddressCase {
2042    Mixed = 0,
2043    Upper = 1,
2044    Lower = 2,
2045}
2046impl EthAddressCase {
2047    /// String value of the enum field names used in the ProtoBuf definition.
2048    ///
2049    /// The values are not transformed in any way and thus are considered stable
2050    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2051    pub fn as_str_name(&self) -> &'static str {
2052        match self {
2053            Self::Mixed => "ETH_ADDRESS_CASE_MIXED",
2054            Self::Upper => "ETH_ADDRESS_CASE_UPPER",
2055            Self::Lower => "ETH_ADDRESS_CASE_LOWER",
2056        }
2057    }
2058    /// Creates an enum from field names used in the ProtoBuf definition.
2059    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2060        match value {
2061            "ETH_ADDRESS_CASE_MIXED" => Some(Self::Mixed),
2062            "ETH_ADDRESS_CASE_UPPER" => Some(Self::Upper),
2063            "ETH_ADDRESS_CASE_LOWER" => Some(Self::Lower),
2064            _ => None,
2065        }
2066    }
2067}
2068#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2069#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2070#[derive(Clone, PartialEq, ::prost::Message)]
2071pub struct ElectrumEncryptionKeyRequest {
2072    #[prost(uint32, repeated, tag = "1")]
2073    #[cfg_attr(
2074        feature = "wasm",
2075        serde(deserialize_with = "crate::keypath::serde_deserialize")
2076    )]
2077    pub keypath: ::prost::alloc::vec::Vec<u32>,
2078}
2079#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2080#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2081#[derive(Clone, PartialEq, ::prost::Message)]
2082pub struct ElectrumEncryptionKeyResponse {
2083    #[prost(string, tag = "1")]
2084    pub key: ::prost::alloc::string::String,
2085}
2086#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2087#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2088#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2089pub struct Bip85Request {
2090    #[prost(oneof = "bip85_request::App", tags = "1, 2")]
2091    pub app: ::core::option::Option<bip85_request::App>,
2092}
2093/// Nested message and enum types in `BIP85Request`.
2094pub mod bip85_request {
2095    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2096    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2097    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2098    pub struct AppLn {
2099        #[prost(uint32, tag = "1")]
2100        pub account_number: u32,
2101    }
2102    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2103    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2104    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2105    pub enum App {
2106        #[prost(message, tag = "1")]
2107        Bip39(()),
2108        #[prost(message, tag = "2")]
2109        Ln(AppLn),
2110    }
2111}
2112#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2113#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2114#[derive(Clone, PartialEq, ::prost::Message)]
2115pub struct Bip85Response {
2116    #[prost(oneof = "bip85_response::App", tags = "1, 2")]
2117    pub app: ::core::option::Option<bip85_response::App>,
2118}
2119/// Nested message and enum types in `BIP85Response`.
2120pub mod bip85_response {
2121    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2122    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2123    #[derive(Clone, PartialEq, ::prost::Oneof)]
2124    pub enum App {
2125        #[prost(message, tag = "1")]
2126        Bip39(()),
2127        #[prost(bytes, tag = "2")]
2128        Ln(::prost::alloc::vec::Vec<u8>),
2129    }
2130}
2131#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2132#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2133#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2134pub struct ShowMnemonicRequest {}
2135#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2136#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2137#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2138pub struct RestoreFromMnemonicRequest {
2139    #[prost(uint32, tag = "1")]
2140    pub timestamp: u32,
2141    #[prost(int32, tag = "2")]
2142    pub timezone_offset: i32,
2143}
2144#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2145#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2146#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2147pub struct SetMnemonicPassphraseEnabledRequest {
2148    #[prost(bool, tag = "1")]
2149    pub enabled: bool,
2150}
2151#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2152#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2153#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2154pub struct RebootRequest {
2155    #[prost(enumeration = "reboot_request::Purpose", tag = "1")]
2156    pub purpose: i32,
2157}
2158/// Nested message and enum types in `RebootRequest`.
2159pub mod reboot_request {
2160    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2161    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2162    #[derive(
2163        Clone,
2164        Copy,
2165        Debug,
2166        PartialEq,
2167        Eq,
2168        Hash,
2169        PartialOrd,
2170        Ord,
2171        ::prost::Enumeration
2172    )]
2173    #[repr(i32)]
2174    pub enum Purpose {
2175        Upgrade = 0,
2176        Settings = 1,
2177    }
2178    impl Purpose {
2179        /// String value of the enum field names used in the ProtoBuf definition.
2180        ///
2181        /// The values are not transformed in any way and thus are considered stable
2182        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2183        pub fn as_str_name(&self) -> &'static str {
2184            match self {
2185                Self::Upgrade => "UPGRADE",
2186                Self::Settings => "SETTINGS",
2187            }
2188        }
2189        /// Creates an enum from field names used in the ProtoBuf definition.
2190        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2191            match value {
2192                "UPGRADE" => Some(Self::Upgrade),
2193                "SETTINGS" => Some(Self::Settings),
2194                _ => None,
2195            }
2196        }
2197    }
2198}
2199/// Deprecated, last used in v1.0.0
2200#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2201#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2202#[derive(Clone, PartialEq, ::prost::Message)]
2203pub struct PerformAttestationRequest {
2204    /// 32 bytes challenge.
2205    #[prost(bytes = "vec", tag = "1")]
2206    pub challenge: ::prost::alloc::vec::Vec<u8>,
2207}
2208/// Deprecated, last used in v1.0.0
2209#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2210#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2211#[derive(Clone, PartialEq, ::prost::Message)]
2212pub struct PerformAttestationResponse {
2213    #[prost(bytes = "vec", tag = "1")]
2214    pub bootloader_hash: ::prost::alloc::vec::Vec<u8>,
2215    #[prost(bytes = "vec", tag = "2")]
2216    pub device_pubkey: ::prost::alloc::vec::Vec<u8>,
2217    #[prost(bytes = "vec", tag = "3")]
2218    pub certificate: ::prost::alloc::vec::Vec<u8>,
2219    #[prost(bytes = "vec", tag = "4")]
2220    pub root_pubkey_identifier: ::prost::alloc::vec::Vec<u8>,
2221    #[prost(bytes = "vec", tag = "5")]
2222    pub challenge_signature: ::prost::alloc::vec::Vec<u8>,
2223}
2224#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2225#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2226#[derive(Clone, PartialEq, ::prost::Message)]
2227pub struct Error {
2228    #[prost(int32, tag = "1")]
2229    pub code: i32,
2230    #[prost(string, tag = "2")]
2231    pub message: ::prost::alloc::string::String,
2232}
2233#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2234#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2235#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2236pub struct Success {}
2237#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2238#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2239#[derive(Clone, PartialEq, ::prost::Message)]
2240pub struct Request {
2241    #[prost(
2242        oneof = "request::Request",
2243        tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30"
2244    )]
2245    pub request: ::core::option::Option<request::Request>,
2246}
2247/// Nested message and enum types in `Request`.
2248pub mod request {
2249    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2250    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2251    #[derive(Clone, PartialEq, ::prost::Oneof)]
2252    pub enum Request {
2253        /// removed: RandomNumberRequest random_number = 1;
2254        #[prost(message, tag = "2")]
2255        DeviceName(super::SetDeviceNameRequest),
2256        #[prost(message, tag = "3")]
2257        DeviceLanguage(super::SetDeviceLanguageRequest),
2258        #[prost(message, tag = "4")]
2259        DeviceInfo(super::DeviceInfoRequest),
2260        #[prost(message, tag = "5")]
2261        SetPassword(super::SetPasswordRequest),
2262        #[prost(message, tag = "6")]
2263        CreateBackup(super::CreateBackupRequest),
2264        #[prost(message, tag = "7")]
2265        ShowMnemonic(super::ShowMnemonicRequest),
2266        #[prost(message, tag = "8")]
2267        BtcPub(super::BtcPubRequest),
2268        #[prost(message, tag = "9")]
2269        BtcSignInit(super::BtcSignInitRequest),
2270        #[prost(message, tag = "10")]
2271        BtcSignInput(super::BtcSignInputRequest),
2272        #[prost(message, tag = "11")]
2273        BtcSignOutput(super::BtcSignOutputRequest),
2274        #[prost(message, tag = "12")]
2275        InsertRemoveSdcard(super::InsertRemoveSdCardRequest),
2276        #[prost(message, tag = "13")]
2277        CheckSdcard(super::CheckSdCardRequest),
2278        #[prost(message, tag = "14")]
2279        SetMnemonicPassphraseEnabled(super::SetMnemonicPassphraseEnabledRequest),
2280        #[prost(message, tag = "15")]
2281        ListBackups(super::ListBackupsRequest),
2282        #[prost(message, tag = "16")]
2283        RestoreBackup(super::RestoreBackupRequest),
2284        #[prost(message, tag = "17")]
2285        PerformAttestation(super::PerformAttestationRequest),
2286        #[prost(message, tag = "18")]
2287        Reboot(super::RebootRequest),
2288        #[prost(message, tag = "19")]
2289        CheckBackup(super::CheckBackupRequest),
2290        #[prost(message, tag = "20")]
2291        Eth(super::EthRequest),
2292        #[prost(message, tag = "21")]
2293        Reset(super::ResetRequest),
2294        #[prost(message, tag = "22")]
2295        RestoreFromMnemonic(super::RestoreFromMnemonicRequest),
2296        /// removed: BitBoxBaseRequest bitboxbase = 23;
2297        #[prost(message, tag = "24")]
2298        Fingerprint(super::RootFingerprintRequest),
2299        #[prost(message, tag = "25")]
2300        Btc(super::BtcRequest),
2301        #[prost(message, tag = "26")]
2302        ElectrumEncryptionKey(super::ElectrumEncryptionKeyRequest),
2303        #[prost(message, tag = "27")]
2304        Cardano(super::CardanoRequest),
2305        #[prost(message, tag = "28")]
2306        Bip85(super::Bip85Request),
2307        #[prost(message, tag = "29")]
2308        Bluetooth(super::BluetoothRequest),
2309        #[prost(message, tag = "30")]
2310        ChangePassword(super::ChangePasswordRequest),
2311    }
2312}
2313#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2314#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2315#[derive(Clone, PartialEq, ::prost::Message)]
2316pub struct Response {
2317    #[prost(
2318        oneof = "response::Response",
2319        tags = "1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17"
2320    )]
2321    pub response: ::core::option::Option<response::Response>,
2322}
2323/// Nested message and enum types in `Response`.
2324pub mod response {
2325    #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
2326    #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
2327    #[derive(Clone, PartialEq, ::prost::Oneof)]
2328    pub enum Response {
2329        #[prost(message, tag = "1")]
2330        Success(super::Success),
2331        #[prost(message, tag = "2")]
2332        Error(super::Error),
2333        /// removed: RandomNumberResponse random_number = 3;
2334        #[prost(message, tag = "4")]
2335        DeviceInfo(super::DeviceInfoResponse),
2336        #[prost(message, tag = "5")]
2337        Pub(super::PubResponse),
2338        #[prost(message, tag = "6")]
2339        BtcSignNext(super::BtcSignNextResponse),
2340        #[prost(message, tag = "7")]
2341        ListBackups(super::ListBackupsResponse),
2342        #[prost(message, tag = "8")]
2343        CheckBackup(super::CheckBackupResponse),
2344        #[prost(message, tag = "9")]
2345        PerformAttestation(super::PerformAttestationResponse),
2346        #[prost(message, tag = "10")]
2347        CheckSdcard(super::CheckSdCardResponse),
2348        #[prost(message, tag = "11")]
2349        Eth(super::EthResponse),
2350        #[prost(message, tag = "12")]
2351        Fingerprint(super::RootFingerprintResponse),
2352        #[prost(message, tag = "13")]
2353        Btc(super::BtcResponse),
2354        #[prost(message, tag = "14")]
2355        ElectrumEncryptionKey(super::ElectrumEncryptionKeyResponse),
2356        #[prost(message, tag = "15")]
2357        Cardano(super::CardanoResponse),
2358        #[prost(message, tag = "16")]
2359        Bip85(super::Bip85Response),
2360        #[prost(message, tag = "17")]
2361        Bluetooth(super::BluetoothResponse),
2362    }
2363}