#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PubResponse {
#[prost(string, tag = "1")]
pub r#pub: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RootFingerprintRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RootFingerprintResponse {
#[prost(bytes = "vec", tag = "1")]
#[cfg_attr(feature = "wasm", serde(deserialize_with = "hex::serde::deserialize"))]
pub fingerprint: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct XPub {
#[prost(bytes = "vec", tag = "1")]
pub depth: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub parent_fingerprint: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub child_num: u32,
#[prost(bytes = "vec", tag = "4")]
pub chain_code: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub public_key: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Keypath {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[cfg_attr(feature = "wasm", serde(try_from = "crate::btc::KeyOriginInfo"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyOriginInfo {
#[prost(bytes = "vec", tag = "1")]
pub root_fingerprint: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(message, optional, tag = "3")]
pub xpub: ::core::option::Option<XPub>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckBackupRequest {
#[prost(bool, tag = "1")]
pub silent: bool,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckBackupResponse {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupRequest {
#[prost(uint32, tag = "1")]
pub timestamp: u32,
#[prost(int32, tag = "2")]
pub timezone_offset: i32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupInfo {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub timestamp: u32,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
#[prost(message, repeated, tag = "1")]
pub info: ::prost::alloc::vec::Vec<BackupInfo>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreBackupRequest {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub timestamp: u32,
#[prost(int32, tag = "3")]
pub timezone_offset: i32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckSdCardRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckSdCardResponse {
#[prost(bool, tag = "1")]
pub inserted: bool,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceInfoRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceInfoResponse {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub initialized: bool,
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub mnemonic_passphrase_enabled: bool,
#[prost(uint32, tag = "5")]
pub monotonic_increments_remaining: u32,
#[prost(string, tag = "6")]
pub securechip_model: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertRemoveSdCardRequest {
#[prost(enumeration = "insert_remove_sd_card_request::SdCardAction", tag = "1")]
pub action: i32,
}
pub mod insert_remove_sd_card_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SdCardAction {
RemoveCard = 0,
InsertCard = 1,
}
impl SdCardAction {
pub fn as_str_name(&self) -> &'static str {
match self {
SdCardAction::RemoveCard => "REMOVE_CARD",
SdCardAction::InsertCard => "INSERT_CARD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REMOVE_CARD" => Some(Self::RemoveCard),
"INSERT_CARD" => Some(Self::InsertCard),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDeviceLanguageRequest {
#[prost(string, tag = "1")]
pub language: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetDeviceNameRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPasswordRequest {
#[prost(bytes = "vec", tag = "1")]
pub entropy: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AntiKleptoHostNonceCommitment {
#[prost(bytes = "vec", tag = "1")]
pub commitment: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AntiKleptoSignerCommitment {
#[prost(bytes = "vec", tag = "1")]
pub commitment: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AntiKleptoSignatureRequest {
#[prost(bytes = "vec", tag = "1")]
pub host_nonce: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[cfg_attr(feature = "wasm", serde(try_from = "crate::btc::SerdeScriptConfig"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcScriptConfig {
#[prost(oneof = "btc_script_config::Config", tags = "1, 2, 3")]
pub config: ::core::option::Option<btc_script_config::Config>,
}
pub mod btc_script_config {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Multisig {
#[prost(uint32, tag = "1")]
pub threshold: u32,
#[prost(message, repeated, tag = "2")]
pub xpubs: ::prost::alloc::vec::Vec<super::XPub>,
#[prost(uint32, tag = "3")]
pub our_xpub_index: u32,
#[prost(enumeration = "multisig::ScriptType", tag = "4")]
pub script_type: i32,
}
pub mod multisig {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ScriptType {
P2wsh = 0,
P2wshP2sh = 1,
}
impl ScriptType {
pub fn as_str_name(&self) -> &'static str {
match self {
ScriptType::P2wsh => "P2WSH",
ScriptType::P2wshP2sh => "P2WSH_P2SH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"P2WSH" => Some(Self::P2wsh),
"P2WSH_P2SH" => Some(Self::P2wshP2sh),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Policy {
#[prost(string, tag = "1")]
pub policy: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<super::KeyOriginInfo>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SimpleType {
P2wpkhP2sh = 0,
P2wpkh = 1,
P2tr = 2,
}
impl SimpleType {
pub fn as_str_name(&self) -> &'static str {
match self {
SimpleType::P2wpkhP2sh => "P2WPKH_P2SH",
SimpleType::P2wpkh => "P2WPKH",
SimpleType::P2tr => "P2TR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"P2WPKH_P2SH" => Some(Self::P2wpkhP2sh),
"P2WPKH" => Some(Self::P2wpkh),
"P2TR" => Some(Self::P2tr),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(enumeration = "SimpleType", tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::btc::serde_deserialize_simple_type")
)]
SimpleType(i32),
#[prost(message, tag = "2")]
Multisig(Multisig),
#[prost(message, tag = "3")]
Policy(Policy),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcPubRequest {
#[prost(enumeration = "BtcCoin", tag = "1")]
pub coin: i32,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(bool, tag = "5")]
pub display: bool,
#[prost(oneof = "btc_pub_request::Output", tags = "3, 4")]
pub output: ::core::option::Option<btc_pub_request::Output>,
}
pub mod btc_pub_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum XPubType {
Tpub = 0,
Xpub = 1,
Ypub = 2,
Zpub = 3,
Vpub = 4,
Upub = 5,
#[cfg_attr(feature = "wasm", serde(rename = "Vpub"))]
CapitalVpub = 6,
#[cfg_attr(feature = "wasm", serde(rename = "Zpub"))]
CapitalZpub = 7,
#[cfg_attr(feature = "wasm", serde(rename = "Upub"))]
CapitalUpub = 8,
#[cfg_attr(feature = "wasm", serde(rename = "Ypub"))]
CapitalYpub = 9,
}
impl XPubType {
pub fn as_str_name(&self) -> &'static str {
match self {
XPubType::Tpub => "TPUB",
XPubType::Xpub => "XPUB",
XPubType::Ypub => "YPUB",
XPubType::Zpub => "ZPUB",
XPubType::Vpub => "VPUB",
XPubType::Upub => "UPUB",
XPubType::CapitalVpub => "CAPITAL_VPUB",
XPubType::CapitalZpub => "CAPITAL_ZPUB",
XPubType::CapitalUpub => "CAPITAL_UPUB",
XPubType::CapitalYpub => "CAPITAL_YPUB",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TPUB" => Some(Self::Tpub),
"XPUB" => Some(Self::Xpub),
"YPUB" => Some(Self::Ypub),
"ZPUB" => Some(Self::Zpub),
"VPUB" => Some(Self::Vpub),
"UPUB" => Some(Self::Upub),
"CAPITAL_VPUB" => Some(Self::CapitalVpub),
"CAPITAL_ZPUB" => Some(Self::CapitalZpub),
"CAPITAL_UPUB" => Some(Self::CapitalUpub),
"CAPITAL_YPUB" => Some(Self::CapitalYpub),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Output {
#[prost(enumeration = "XPubType", tag = "3")]
XpubType(i32),
#[prost(message, tag = "4")]
ScriptConfig(super::BtcScriptConfig),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcScriptConfigWithKeypath {
#[prost(message, optional, tag = "2")]
pub script_config: ::core::option::Option<BtcScriptConfig>,
#[prost(uint32, repeated, tag = "3")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignInitRequest {
#[prost(enumeration = "BtcCoin", tag = "1")]
pub coin: i32,
#[prost(message, repeated, tag = "2")]
pub script_configs: ::prost::alloc::vec::Vec<BtcScriptConfigWithKeypath>,
#[prost(uint32, tag = "4")]
pub version: u32,
#[prost(uint32, tag = "5")]
pub num_inputs: u32,
#[prost(uint32, tag = "6")]
pub num_outputs: u32,
#[prost(uint32, tag = "7")]
pub locktime: u32,
#[prost(enumeration = "btc_sign_init_request::FormatUnit", tag = "8")]
pub format_unit: i32,
}
pub mod btc_sign_init_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FormatUnit {
Default = 0,
Sat = 1,
}
impl FormatUnit {
pub fn as_str_name(&self) -> &'static str {
match self {
FormatUnit::Default => "DEFAULT",
FormatUnit::Sat => "SAT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"SAT" => Some(Self::Sat),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignNextResponse {
#[prost(enumeration = "btc_sign_next_response::Type", tag = "1")]
pub r#type: i32,
#[prost(uint32, tag = "2")]
pub index: u32,
#[prost(bool, tag = "3")]
pub has_signature: bool,
#[prost(bytes = "vec", tag = "4")]
pub signature: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "5")]
pub prev_index: u32,
#[prost(message, optional, tag = "6")]
pub anti_klepto_signer_commitment: ::core::option::Option<
AntiKleptoSignerCommitment,
>,
}
pub mod btc_sign_next_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Input = 0,
Output = 1,
Done = 2,
PrevtxInit = 3,
PrevtxInput = 4,
PrevtxOutput = 5,
HostNonce = 6,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Input => "INPUT",
Type::Output => "OUTPUT",
Type::Done => "DONE",
Type::PrevtxInit => "PREVTX_INIT",
Type::PrevtxInput => "PREVTX_INPUT",
Type::PrevtxOutput => "PREVTX_OUTPUT",
Type::HostNonce => "HOST_NONCE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INPUT" => Some(Self::Input),
"OUTPUT" => Some(Self::Output),
"DONE" => Some(Self::Done),
"PREVTX_INIT" => Some(Self::PrevtxInit),
"PREVTX_INPUT" => Some(Self::PrevtxInput),
"PREVTX_OUTPUT" => Some(Self::PrevtxOutput),
"HOST_NONCE" => Some(Self::HostNonce),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignInputRequest {
#[prost(bytes = "vec", tag = "1")]
pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub prev_out_index: u32,
#[prost(uint64, tag = "3")]
pub prev_out_value: u64,
#[prost(uint32, tag = "4")]
pub sequence: u32,
#[prost(uint32, repeated, tag = "6")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "7")]
pub script_config_index: u32,
#[prost(message, optional, tag = "8")]
pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignOutputRequest {
#[prost(bool, tag = "1")]
pub ours: bool,
#[prost(enumeration = "BtcOutputType", tag = "2")]
pub r#type: i32,
#[prost(uint64, tag = "3")]
pub value: u64,
#[prost(bytes = "vec", tag = "4")]
pub payload: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, repeated, tag = "5")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "6")]
pub script_config_index: u32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcScriptConfigRegistration {
#[prost(enumeration = "BtcCoin", tag = "1")]
pub coin: i32,
#[prost(message, optional, tag = "2")]
pub script_config: ::core::option::Option<BtcScriptConfig>,
#[prost(uint32, repeated, tag = "3")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSuccess {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcIsScriptConfigRegisteredRequest {
#[prost(message, optional, tag = "1")]
pub registration: ::core::option::Option<BtcScriptConfigRegistration>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcIsScriptConfigRegisteredResponse {
#[prost(bool, tag = "1")]
pub is_registered: bool,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcRegisterScriptConfigRequest {
#[prost(message, optional, tag = "1")]
pub registration: ::core::option::Option<BtcScriptConfigRegistration>,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "btc_register_script_config_request::XPubType", tag = "3")]
pub xpub_type: i32,
}
pub mod btc_register_script_config_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum XPubType {
AutoElectrum = 0,
AutoXpubTpub = 1,
}
impl XPubType {
pub fn as_str_name(&self) -> &'static str {
match self {
XPubType::AutoElectrum => "AUTO_ELECTRUM",
XPubType::AutoXpubTpub => "AUTO_XPUB_TPUB",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTO_ELECTRUM" => Some(Self::AutoElectrum),
"AUTO_XPUB_TPUB" => Some(Self::AutoXpubTpub),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcPrevTxInitRequest {
#[prost(uint32, tag = "1")]
pub version: u32,
#[prost(uint32, tag = "2")]
pub num_inputs: u32,
#[prost(uint32, tag = "3")]
pub num_outputs: u32,
#[prost(uint32, tag = "4")]
pub locktime: u32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcPrevTxInputRequest {
#[prost(bytes = "vec", tag = "1")]
pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub prev_out_index: u32,
#[prost(bytes = "vec", tag = "3")]
pub signature_script: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "4")]
pub sequence: u32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcPrevTxOutputRequest {
#[prost(uint64, tag = "1")]
pub value: u64,
#[prost(bytes = "vec", tag = "2")]
pub pubkey_script: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignMessageRequest {
#[prost(enumeration = "BtcCoin", tag = "1")]
pub coin: i32,
#[prost(message, optional, tag = "2")]
pub script_config: ::core::option::Option<BtcScriptConfigWithKeypath>,
#[prost(bytes = "vec", tag = "3")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcSignMessageResponse {
#[prost(bytes = "vec", tag = "1")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcRequest {
#[prost(oneof = "btc_request::Request", tags = "1, 2, 3, 4, 5, 6, 7")]
pub request: ::core::option::Option<btc_request::Request>,
}
pub mod btc_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
IsScriptConfigRegistered(super::BtcIsScriptConfigRegisteredRequest),
#[prost(message, tag = "2")]
RegisterScriptConfig(super::BtcRegisterScriptConfigRequest),
#[prost(message, tag = "3")]
PrevtxInit(super::BtcPrevTxInitRequest),
#[prost(message, tag = "4")]
PrevtxInput(super::BtcPrevTxInputRequest),
#[prost(message, tag = "5")]
PrevtxOutput(super::BtcPrevTxOutputRequest),
#[prost(message, tag = "6")]
SignMessage(super::BtcSignMessageRequest),
#[prost(message, tag = "7")]
AntikleptoSignature(super::AntiKleptoSignatureRequest),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BtcResponse {
#[prost(oneof = "btc_response::Response", tags = "1, 2, 3, 4, 5")]
pub response: ::core::option::Option<btc_response::Response>,
}
pub mod btc_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Success(super::BtcSuccess),
#[prost(message, tag = "2")]
IsScriptConfigRegistered(super::BtcIsScriptConfigRegisteredResponse),
#[prost(message, tag = "3")]
SignNext(super::BtcSignNextResponse),
#[prost(message, tag = "4")]
SignMessage(super::BtcSignMessageResponse),
#[prost(message, tag = "5")]
AntikleptoSignerCommitment(super::AntiKleptoSignerCommitment),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BtcCoin {
Btc = 0,
Tbtc = 1,
Ltc = 2,
Tltc = 3,
}
impl BtcCoin {
pub fn as_str_name(&self) -> &'static str {
match self {
BtcCoin::Btc => "BTC",
BtcCoin::Tbtc => "TBTC",
BtcCoin::Ltc => "LTC",
BtcCoin::Tltc => "TLTC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BTC" => Some(Self::Btc),
"TBTC" => Some(Self::Tbtc),
"LTC" => Some(Self::Ltc),
"TLTC" => Some(Self::Tltc),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BtcOutputType {
Unknown = 0,
P2pkh = 1,
P2sh = 2,
P2wpkh = 3,
P2wsh = 4,
P2tr = 5,
}
impl BtcOutputType {
pub fn as_str_name(&self) -> &'static str {
match self {
BtcOutputType::Unknown => "UNKNOWN",
BtcOutputType::P2pkh => "P2PKH",
BtcOutputType::P2sh => "P2SH",
BtcOutputType::P2wpkh => "P2WPKH",
BtcOutputType::P2wsh => "P2WSH",
BtcOutputType::P2tr => "P2TR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"P2PKH" => Some(Self::P2pkh),
"P2SH" => Some(Self::P2sh),
"P2WPKH" => Some(Self::P2wpkh),
"P2WSH" => Some(Self::P2wsh),
"P2TR" => Some(Self::P2tr),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoXpubsRequest {
#[prost(message, repeated, tag = "1")]
pub keypaths: ::prost::alloc::vec::Vec<Keypath>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoXpubsResponse {
#[prost(bytes = "vec", repeated, tag = "1")]
pub xpubs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[cfg_attr(feature = "wasm", serde(try_from = "crate::cardano::SerdeScriptConfig"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoScriptConfig {
#[prost(oneof = "cardano_script_config::Config", tags = "1")]
pub config: ::core::option::Option<cardano_script_config::Config>,
}
pub mod cardano_script_config {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PkhSkh {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath_payment: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath_stake: ::prost::alloc::vec::Vec<u32>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
PkhSkh(PkhSkh),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoAddressRequest {
#[prost(enumeration = "CardanoNetwork", tag = "1")]
pub network: i32,
#[prost(bool, tag = "2")]
pub display: bool,
#[prost(message, optional, tag = "3")]
pub script_config: ::core::option::Option<CardanoScriptConfig>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoSignTransactionRequest {
#[prost(enumeration = "CardanoNetwork", tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::cardano::serde_deserialize_network")
)]
pub network: i32,
#[prost(message, repeated, tag = "2")]
pub inputs: ::prost::alloc::vec::Vec<cardano_sign_transaction_request::Input>,
#[prost(message, repeated, tag = "3")]
pub outputs: ::prost::alloc::vec::Vec<cardano_sign_transaction_request::Output>,
#[prost(uint64, tag = "4")]
pub fee: u64,
#[prost(uint64, tag = "5")]
pub ttl: u64,
#[prost(message, repeated, tag = "6")]
pub certificates: ::prost::alloc::vec::Vec<
cardano_sign_transaction_request::Certificate,
>,
#[prost(message, repeated, tag = "7")]
pub withdrawals: ::prost::alloc::vec::Vec<
cardano_sign_transaction_request::Withdrawal,
>,
#[prost(uint64, tag = "8")]
pub validity_interval_start: u64,
#[prost(bool, tag = "9")]
#[cfg_attr(feature = "wasm", serde(rename = "allowZeroTTL"))]
pub allow_zero_ttl: bool,
}
pub mod cardano_sign_transaction_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Input {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(bytes = "vec", tag = "2")]
pub prev_out_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub prev_out_index: u32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetGroup {
#[prost(bytes = "vec", tag = "1")]
pub policy_id: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "2")]
pub tokens: ::prost::alloc::vec::Vec<asset_group::Token>,
}
pub mod asset_group {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Token {
#[prost(bytes = "vec", tag = "1")]
pub asset_name: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub value: u64,
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[cfg_attr(feature = "wasm", serde(default))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Output {
#[prost(string, tag = "1")]
pub encoded_address: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub value: u64,
#[prost(message, optional, tag = "3")]
pub script_config: ::core::option::Option<super::CardanoScriptConfig>,
#[prost(message, repeated, tag = "4")]
pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[cfg_attr(feature = "wasm", serde(try_from = "crate::cardano::SerdeCert"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Certificate {
#[prost(oneof = "certificate::Cert", tags = "1, 2, 3")]
pub cert: ::core::option::Option<certificate::Cert>,
}
pub mod certificate {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StakeDelegation {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(bytes = "vec", tag = "2")]
pub pool_keyhash: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Cert {
#[prost(message, tag = "1")]
StakeRegistration(super::super::Keypath),
#[prost(message, tag = "2")]
StakeDeregistration(super::super::Keypath),
#[prost(message, tag = "3")]
StakeDelegation(StakeDelegation),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Withdrawal {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, tag = "2")]
pub value: u64,
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoSignTransactionResponse {
#[prost(message, repeated, tag = "1")]
pub shelley_witnesses: ::prost::alloc::vec::Vec<
cardano_sign_transaction_response::ShelleyWitness,
>,
}
pub mod cardano_sign_transaction_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShelleyWitness {
#[prost(bytes = "vec", tag = "1")]
pub public_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoRequest {
#[prost(oneof = "cardano_request::Request", tags = "1, 2, 3")]
pub request: ::core::option::Option<cardano_request::Request>,
}
pub mod cardano_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
Xpubs(super::CardanoXpubsRequest),
#[prost(message, tag = "2")]
Address(super::CardanoAddressRequest),
#[prost(message, tag = "3")]
SignTransaction(super::CardanoSignTransactionRequest),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardanoResponse {
#[prost(oneof = "cardano_response::Response", tags = "1, 2, 3")]
pub response: ::core::option::Option<cardano_response::Response>,
}
pub mod cardano_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Xpubs(super::CardanoXpubsResponse),
#[prost(message, tag = "2")]
Pub(super::PubResponse),
#[prost(message, tag = "3")]
SignTransaction(super::CardanoSignTransactionResponse),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CardanoNetwork {
#[cfg_attr(feature = "wasm", serde(rename = "mainnet"))]
CardanoMainnet = 0,
#[cfg_attr(feature = "wasm", serde(rename = "testnet"))]
CardanoTestnet = 1,
}
impl CardanoNetwork {
pub fn as_str_name(&self) -> &'static str {
match self {
CardanoNetwork::CardanoMainnet => "CardanoMainnet",
CardanoNetwork::CardanoTestnet => "CardanoTestnet",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CardanoMainnet" => Some(Self::CardanoMainnet),
"CardanoTestnet" => Some(Self::CardanoTestnet),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthPubRequest {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(enumeration = "EthCoin", tag = "2")]
pub coin: i32,
#[prost(enumeration = "eth_pub_request::OutputType", tag = "3")]
pub output_type: i32,
#[prost(bool, tag = "4")]
pub display: bool,
#[prost(bytes = "vec", tag = "5")]
pub contract_address: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "6")]
pub chain_id: u64,
}
pub mod eth_pub_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OutputType {
Address = 0,
Xpub = 1,
}
impl OutputType {
pub fn as_str_name(&self) -> &'static str {
match self {
OutputType::Address => "ADDRESS",
OutputType::Xpub => "XPUB",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ADDRESS" => Some(Self::Address),
"XPUB" => Some(Self::Xpub),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthSignRequest {
#[prost(enumeration = "EthCoin", tag = "1")]
pub coin: i32,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(bytes = "vec", tag = "3")]
pub nonce: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub gas_price: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub gas_limit: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
pub recipient: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "7")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "8")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "9")]
pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
#[prost(uint64, tag = "10")]
pub chain_id: u64,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthSignMessageRequest {
#[prost(enumeration = "EthCoin", tag = "1")]
pub coin: i32,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(bytes = "vec", tag = "3")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
#[prost(uint64, tag = "5")]
pub chain_id: u64,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthSignResponse {
#[prost(bytes = "vec", tag = "1")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthSignTypedMessageRequest {
#[prost(uint64, tag = "1")]
pub chain_id: u64,
#[prost(uint32, repeated, tag = "2")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
#[prost(message, repeated, tag = "3")]
pub types: ::prost::alloc::vec::Vec<eth_sign_typed_message_request::StructType>,
#[prost(string, tag = "4")]
pub primary_type: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub host_nonce_commitment: ::core::option::Option<AntiKleptoHostNonceCommitment>,
}
pub mod eth_sign_typed_message_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberType {
#[prost(enumeration = "DataType", tag = "1")]
pub r#type: i32,
#[prost(uint32, tag = "2")]
pub size: u32,
#[prost(string, tag = "3")]
pub struct_name: ::prost::alloc::string::String,
#[prost(message, optional, boxed, tag = "4")]
pub array_type: ::core::option::Option<::prost::alloc::boxed::Box<MemberType>>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Member {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<MemberType>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructType {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub members: ::prost::alloc::vec::Vec<Member>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DataType {
Unknown = 0,
Bytes = 1,
Uint = 2,
Int = 3,
Bool = 4,
Address = 5,
String = 6,
Array = 7,
Struct = 8,
}
impl DataType {
pub fn as_str_name(&self) -> &'static str {
match self {
DataType::Unknown => "UNKNOWN",
DataType::Bytes => "BYTES",
DataType::Uint => "UINT",
DataType::Int => "INT",
DataType::Bool => "BOOL",
DataType::Address => "ADDRESS",
DataType::String => "STRING",
DataType::Array => "ARRAY",
DataType::Struct => "STRUCT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"BYTES" => Some(Self::Bytes),
"UINT" => Some(Self::Uint),
"INT" => Some(Self::Int),
"BOOL" => Some(Self::Bool),
"ADDRESS" => Some(Self::Address),
"STRING" => Some(Self::String),
"ARRAY" => Some(Self::Array),
"STRUCT" => Some(Self::Struct),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthTypedMessageValueResponse {
#[prost(enumeration = "eth_typed_message_value_response::RootObject", tag = "1")]
pub root_object: i32,
#[prost(uint32, repeated, tag = "2")]
pub path: ::prost::alloc::vec::Vec<u32>,
}
pub mod eth_typed_message_value_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RootObject {
Unknown = 0,
Domain = 1,
Message = 2,
}
impl RootObject {
pub fn as_str_name(&self) -> &'static str {
match self {
RootObject::Unknown => "UNKNOWN",
RootObject::Domain => "DOMAIN",
RootObject::Message => "MESSAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"DOMAIN" => Some(Self::Domain),
"MESSAGE" => Some(Self::Message),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthTypedMessageValueRequest {
#[prost(bytes = "vec", tag = "1")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthRequest {
#[prost(oneof = "eth_request::Request", tags = "1, 2, 3, 4, 5, 6")]
pub request: ::core::option::Option<eth_request::Request>,
}
pub mod eth_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
Pub(super::EthPubRequest),
#[prost(message, tag = "2")]
Sign(super::EthSignRequest),
#[prost(message, tag = "3")]
SignMsg(super::EthSignMessageRequest),
#[prost(message, tag = "4")]
AntikleptoSignature(super::AntiKleptoSignatureRequest),
#[prost(message, tag = "5")]
SignTypedMsg(super::EthSignTypedMessageRequest),
#[prost(message, tag = "6")]
TypedMsgValue(super::EthTypedMessageValueRequest),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EthResponse {
#[prost(oneof = "eth_response::Response", tags = "1, 2, 3, 4")]
pub response: ::core::option::Option<eth_response::Response>,
}
pub mod eth_response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Pub(super::PubResponse),
#[prost(message, tag = "2")]
Sign(super::EthSignResponse),
#[prost(message, tag = "3")]
AntikleptoSignerCommitment(super::AntiKleptoSignerCommitment),
#[prost(message, tag = "4")]
TypedMsgValue(super::EthTypedMessageValueResponse),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EthCoin {
Eth = 0,
RopstenEth = 1,
RinkebyEth = 2,
}
impl EthCoin {
pub fn as_str_name(&self) -> &'static str {
match self {
EthCoin::Eth => "ETH",
EthCoin::RopstenEth => "RopstenETH",
EthCoin::RinkebyEth => "RinkebyETH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ETH" => Some(Self::Eth),
"RopstenETH" => Some(Self::RopstenEth),
"RinkebyETH" => Some(Self::RinkebyEth),
_ => None,
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ElectrumEncryptionKeyRequest {
#[prost(uint32, repeated, tag = "1")]
#[cfg_attr(
feature = "wasm",
serde(deserialize_with = "crate::keypath::serde_deserialize")
)]
pub keypath: ::prost::alloc::vec::Vec<u32>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ElectrumEncryptionKeyResponse {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowMnemonicRequest {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreFromMnemonicRequest {
#[prost(uint32, tag = "1")]
pub timestamp: u32,
#[prost(int32, tag = "2")]
pub timezone_offset: i32,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetMnemonicPassphraseEnabledRequest {
#[prost(bool, tag = "1")]
pub enabled: bool,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RebootRequest {
#[prost(enumeration = "reboot_request::Purpose", tag = "1")]
pub purpose: i32,
}
pub mod reboot_request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Purpose {
Upgrade = 0,
Settings = 1,
}
impl Purpose {
pub fn as_str_name(&self) -> &'static str {
match self {
Purpose::Upgrade => "UPGRADE",
Purpose::Settings => "SETTINGS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UPGRADE" => Some(Self::Upgrade),
"SETTINGS" => Some(Self::Settings),
_ => None,
}
}
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformAttestationRequest {
#[prost(bytes = "vec", tag = "1")]
pub challenge: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformAttestationResponse {
#[prost(bytes = "vec", tag = "1")]
pub bootloader_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub device_pubkey: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub certificate: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub root_pubkey_identifier: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub challenge_signature: ::prost::alloc::vec::Vec<u8>,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(int32, tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Success {}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Request {
#[prost(
oneof = "request::Request",
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"
)]
pub request: ::core::option::Option<request::Request>,
}
pub mod request {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "2")]
DeviceName(super::SetDeviceNameRequest),
#[prost(message, tag = "3")]
DeviceLanguage(super::SetDeviceLanguageRequest),
#[prost(message, tag = "4")]
DeviceInfo(super::DeviceInfoRequest),
#[prost(message, tag = "5")]
SetPassword(super::SetPasswordRequest),
#[prost(message, tag = "6")]
CreateBackup(super::CreateBackupRequest),
#[prost(message, tag = "7")]
ShowMnemonic(super::ShowMnemonicRequest),
#[prost(message, tag = "8")]
BtcPub(super::BtcPubRequest),
#[prost(message, tag = "9")]
BtcSignInit(super::BtcSignInitRequest),
#[prost(message, tag = "10")]
BtcSignInput(super::BtcSignInputRequest),
#[prost(message, tag = "11")]
BtcSignOutput(super::BtcSignOutputRequest),
#[prost(message, tag = "12")]
InsertRemoveSdcard(super::InsertRemoveSdCardRequest),
#[prost(message, tag = "13")]
CheckSdcard(super::CheckSdCardRequest),
#[prost(message, tag = "14")]
SetMnemonicPassphraseEnabled(super::SetMnemonicPassphraseEnabledRequest),
#[prost(message, tag = "15")]
ListBackups(super::ListBackupsRequest),
#[prost(message, tag = "16")]
RestoreBackup(super::RestoreBackupRequest),
#[prost(message, tag = "17")]
PerformAttestation(super::PerformAttestationRequest),
#[prost(message, tag = "18")]
Reboot(super::RebootRequest),
#[prost(message, tag = "19")]
CheckBackup(super::CheckBackupRequest),
#[prost(message, tag = "20")]
Eth(super::EthRequest),
#[prost(message, tag = "21")]
Reset(super::ResetRequest),
#[prost(message, tag = "22")]
RestoreFromMnemonic(super::RestoreFromMnemonicRequest),
#[prost(message, tag = "24")]
Fingerprint(super::RootFingerprintRequest),
#[prost(message, tag = "25")]
Btc(super::BtcRequest),
#[prost(message, tag = "26")]
ElectrumEncryptionKey(super::ElectrumEncryptionKeyRequest),
#[prost(message, tag = "27")]
Cardano(super::CardanoRequest),
}
}
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Response {
#[prost(
oneof = "response::Response",
tags = "1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
)]
pub response: ::core::option::Option<response::Response>,
}
pub mod response {
#[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Success(super::Success),
#[prost(message, tag = "2")]
Error(super::Error),
#[prost(message, tag = "4")]
DeviceInfo(super::DeviceInfoResponse),
#[prost(message, tag = "5")]
Pub(super::PubResponse),
#[prost(message, tag = "6")]
BtcSignNext(super::BtcSignNextResponse),
#[prost(message, tag = "7")]
ListBackups(super::ListBackupsResponse),
#[prost(message, tag = "8")]
CheckBackup(super::CheckBackupResponse),
#[prost(message, tag = "9")]
PerformAttestation(super::PerformAttestationResponse),
#[prost(message, tag = "10")]
CheckSdcard(super::CheckSdCardResponse),
#[prost(message, tag = "11")]
Eth(super::EthResponse),
#[prost(message, tag = "12")]
Fingerprint(super::RootFingerprintResponse),
#[prost(message, tag = "13")]
Btc(super::BtcResponse),
#[prost(message, tag = "14")]
ElectrumEncryptionKey(super::ElectrumEncryptionKeyResponse),
#[prost(message, tag = "15")]
Cardano(super::CardanoResponse),
}
}