diff --git a/CHANGELOG-rust.md b/CHANGELOG-rust.md index eb53a93..0a796a7 100644 --- a/CHANGELOG-rust.md +++ b/CHANGELOG-rust.md @@ -1,6 +1,7 @@ # Changelog ## Unreleased +- cardano: added support for vote delegation ## 0.6.0 - btc: handle error when an input's previous transaction is required but missing diff --git a/messages/cardano.proto b/messages/cardano.proto index ba4bca5..ead7ecb 100644 --- a/messages/cardano.proto +++ b/messages/cardano.proto @@ -85,16 +85,30 @@ message CardanoSignTransactionRequest { repeated AssetGroup asset_groups = 4; } - // See https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L150 + // See https://github.com/IntersectMBO/cardano-ledger/blob/cardano-ledger-conway-1.12.0.0/eras/conway/impl/cddl-files/conway.cddl#L273 message Certificate { message StakeDelegation { repeated uint32 keypath = 1; bytes pool_keyhash = 2; } + message VoteDelegation { + enum CardanoDRepType { + KEY_HASH = 0; + SCRIPT_HASH = 1; + ALWAYS_ABSTAIN = 2; + ALWAYS_NO_CONFIDENCE = 3; + } + + // keypath in this instance refers to stake credential + repeated uint32 keypath = 1; + CardanoDRepType type = 2; + optional bytes drep_credhash = 3; + } oneof cert { Keypath stake_registration = 1; Keypath stake_deregistration = 2; StakeDelegation stake_delegation = 3; + VoteDelegation vote_delegation = 10; } } diff --git a/src/shiftcrypto.bitbox02.rs b/src/shiftcrypto.bitbox02.rs index 8fd73aa..0e6de11 100644 --- a/src/shiftcrypto.bitbox02.rs +++ b/src/shiftcrypto.bitbox02.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. #[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")] @@ -9,12 +8,10 @@ pub struct PubResponse { } #[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, Copy, 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")] @@ -25,7 +22,6 @@ pub struct RootFingerprintResponse { /// version field dropped as it will set dynamically based on the context (xpub, ypub, etc.). #[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")] @@ -42,7 +38,6 @@ pub struct XPub { /// This message exists for use in oneof or repeated fields, where one can't inline `repeated uint32` due to protobuf rules. #[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")] @@ -55,7 +50,6 @@ pub struct Keypath { #[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")] @@ -71,7 +65,6 @@ pub struct KeyOriginInfo { } #[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, Copy, PartialEq, ::prost::Message)] pub struct CheckBackupRequest { #[prost(bool, tag = "1")] @@ -79,7 +72,6 @@ pub struct CheckBackupRequest { } #[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")] @@ -88,7 +80,6 @@ pub struct CheckBackupResponse { /// Timestamp must be in UTC #[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, Copy, PartialEq, ::prost::Message)] pub struct CreateBackupRequest { #[prost(uint32, tag = "1")] @@ -98,12 +89,10 @@ pub struct CreateBackupRequest { } #[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, Copy, 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")] @@ -116,7 +105,6 @@ pub struct 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 ListBackupsResponse { #[prost(message, repeated, tag = "1")] @@ -124,7 +112,6 @@ pub struct ListBackupsResponse { } #[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")] @@ -136,12 +123,10 @@ pub struct RestoreBackupRequest { } #[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, Copy, 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, Copy, PartialEq, ::prost::Message)] pub struct CheckSdCardResponse { #[prost(bool, tag = "1")] @@ -149,12 +134,10 @@ pub struct CheckSdCardResponse { } #[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, Copy, 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")] @@ -173,7 +156,6 @@ pub struct DeviceInfoResponse { } #[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, Copy, PartialEq, ::prost::Message)] pub struct InsertRemoveSdCardRequest { #[prost(enumeration = "insert_remove_sd_card_request::SdCardAction", tag = "1")] @@ -222,12 +204,10 @@ pub mod insert_remove_sd_card_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, Copy, 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")] @@ -235,7 +215,6 @@ pub struct SetDeviceLanguageRequest { } #[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")] @@ -243,7 +222,6 @@ pub struct SetDeviceNameRequest { } #[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")] @@ -251,7 +229,6 @@ pub struct SetPasswordRequest { } #[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")] @@ -259,7 +236,6 @@ pub struct 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 AntiKleptoSignerCommitment { #[prost(bytes = "vec", tag = "1")] @@ -267,7 +243,6 @@ pub struct AntiKleptoSignerCommitment { } #[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")] @@ -276,7 +251,6 @@ pub struct AntiKleptoSignatureRequest { #[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")] @@ -286,7 +260,6 @@ pub struct BtcScriptConfig { 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")] @@ -349,7 +322,6 @@ 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 Policy { #[prost(string, tag = "1")] @@ -401,7 +373,6 @@ 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::Oneof)] pub enum Config { #[prost(enumeration = "SimpleType", tag = "1")] @@ -422,7 +393,6 @@ 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 BtcPubRequest { #[prost(enumeration = "BtcCoin", tag = "1")] @@ -514,7 +484,6 @@ pub mod btc_pub_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 Output { #[prost(enumeration = "XPubType", tag = "3")] @@ -525,7 +494,6 @@ pub mod btc_pub_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 BtcScriptConfigWithKeypath { #[prost(message, optional, tag = "2")] @@ -539,7 +507,6 @@ pub struct BtcScriptConfigWithKeypath { } #[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")] @@ -607,7 +574,6 @@ pub mod btc_sign_init_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 BtcSignNextResponse { #[prost(enumeration = "btc_sign_next_response::Type", tag = "1")] @@ -696,7 +662,6 @@ pub mod btc_sign_next_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 BtcSignInputRequest { #[prost(bytes = "vec", tag = "1")] @@ -723,7 +688,6 @@ pub struct BtcSignInputRequest { } #[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")] @@ -759,7 +723,6 @@ pub mod btc_sign_output_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 SilentPayment { #[prost(string, tag = "1")] @@ -768,7 +731,6 @@ pub mod btc_sign_output_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 BtcScriptConfigRegistration { #[prost(enumeration = "BtcCoin", tag = "1")] @@ -785,12 +747,10 @@ pub struct 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, Copy, 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")] @@ -798,7 +758,6 @@ pub struct BtcIsScriptConfigRegisteredRequest { } #[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, Copy, PartialEq, ::prost::Message)] pub struct BtcIsScriptConfigRegisteredResponse { #[prost(bool, tag = "1")] @@ -806,7 +765,6 @@ pub struct BtcIsScriptConfigRegisteredResponse { } #[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")] @@ -862,7 +820,6 @@ pub mod btc_register_script_config_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, Copy, PartialEq, ::prost::Message)] pub struct BtcPrevTxInitRequest { #[prost(uint32, tag = "1")] @@ -876,7 +833,6 @@ pub struct BtcPrevTxInitRequest { } #[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")] @@ -890,7 +846,6 @@ pub struct BtcPrevTxInputRequest { } #[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")] @@ -900,7 +855,6 @@ pub struct BtcPrevTxOutputRequest { } #[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 BtcPaymentRequestRequest { #[prost(string, tag = "1")] @@ -918,7 +872,6 @@ pub struct BtcPaymentRequestRequest { pub mod btc_payment_request_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 Memo { #[prost(oneof = "memo::Memo", tags = "1")] @@ -928,7 +881,6 @@ pub mod btc_payment_request_request { pub mod memo { #[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 TextMemo { #[prost(string, tag = "1")] @@ -936,7 +888,6 @@ pub mod btc_payment_request_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 Memo { #[prost(message, tag = "1")] @@ -946,7 +897,6 @@ pub mod btc_payment_request_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 BtcSignMessageRequest { #[prost(enumeration = "BtcCoin", tag = "1")] @@ -960,7 +910,6 @@ pub struct BtcSignMessageRequest { } #[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 { /// 65 bytes (32 bytes big endian R, 32 bytes big endian S, 1 recid). @@ -969,7 +918,6 @@ pub struct BtcSignMessageResponse { } #[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, 8")] @@ -979,7 +927,6 @@ pub struct BtcRequest { 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")] @@ -1002,7 +949,6 @@ 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::Message)] pub struct BtcResponse { #[prost(oneof = "btc_response::Response", tags = "1, 2, 3, 4, 5")] @@ -1012,7 +958,6 @@ pub struct BtcResponse { 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")] @@ -1107,7 +1052,6 @@ impl BtcOutputType { } #[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")] @@ -1115,7 +1059,6 @@ pub struct CardanoXpubsRequest { } #[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")] @@ -1124,7 +1067,6 @@ pub struct CardanoXpubsResponse { #[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 { /// Entries correspond to address types as described in: @@ -1138,7 +1080,6 @@ pub struct CardanoScriptConfig { 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")] @@ -1160,7 +1101,6 @@ 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::Oneof)] pub enum Config { /// Shelley PaymentKeyHash & StakeKeyHash @@ -1170,7 +1110,6 @@ 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 CardanoAddressRequest { #[prost(enumeration = "CardanoNetwork", tag = "1")] @@ -1187,7 +1126,6 @@ pub struct CardanoAddressRequest { /// See also: #[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")] @@ -1223,7 +1161,6 @@ pub struct CardanoSignTransactionRequest { 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")] @@ -1240,7 +1177,6 @@ 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 AssetGroup { #[prost(bytes = "vec", tag = "1")] @@ -1252,7 +1188,6 @@ pub mod cardano_sign_transaction_request { 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")] @@ -1265,7 +1200,6 @@ pub mod cardano_sign_transaction_request { #[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")] @@ -1278,21 +1212,19 @@ pub mod cardano_sign_transaction_request { #[prost(message, repeated, tag = "4")] pub asset_groups: ::prost::alloc::vec::Vec, } - /// See + /// See #[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")] + #[prost(oneof = "certificate::Cert", tags = "1, 2, 3, 10")] pub cert: ::core::option::Option, } /// Nested message and enum types in `Certificate`. 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")] @@ -1306,7 +1238,69 @@ 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 VoteDelegation { + /// keypath in this instance refers to stake credential + #[prost(uint32, repeated, tag = "1")] + #[cfg_attr( + feature = "wasm", + serde(deserialize_with = "crate::keypath::serde_deserialize") + )] + pub keypath: ::prost::alloc::vec::Vec, + #[prost(enumeration = "vote_delegation::CardanoDRepType", tag = "2")] + pub r#type: i32, + #[prost(bytes = "vec", optional, tag = "3")] + pub drep_credhash: ::core::option::Option<::prost::alloc::vec::Vec>, + } + /// Nested message and enum types in `VoteDelegation`. + pub mod vote_delegation { + #[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 CardanoDRepType { + KeyHash = 0, + ScriptHash = 1, + AlwaysAbstain = 2, + AlwaysNoConfidence = 3, + } + impl CardanoDRepType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + CardanoDRepType::KeyHash => "KEY_HASH", + CardanoDRepType::ScriptHash => "SCRIPT_HASH", + CardanoDRepType::AlwaysAbstain => "ALWAYS_ABSTAIN", + CardanoDRepType::AlwaysNoConfidence => "ALWAYS_NO_CONFIDENCE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "KEY_HASH" => Some(Self::KeyHash), + "SCRIPT_HASH" => Some(Self::ScriptHash), + "ALWAYS_ABSTAIN" => Some(Self::AlwaysAbstain), + "ALWAYS_NO_CONFIDENCE" => Some(Self::AlwaysNoConfidence), + _ => None, + } + } + } + } + #[cfg_attr(feature = "wasm", derive(serde::Serialize, serde::Deserialize))] + #[cfg_attr(feature = "wasm", serde(rename_all = "camelCase"))] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Cert { #[prost(message, tag = "1")] @@ -1315,11 +1309,12 @@ pub mod cardano_sign_transaction_request { StakeDeregistration(super::super::Keypath), #[prost(message, tag = "3")] StakeDelegation(StakeDelegation), + #[prost(message, tag = "10")] + VoteDelegation(VoteDelegation), } } #[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")] @@ -1334,7 +1329,6 @@ 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 CardanoSignTransactionResponse { #[prost(message, repeated, tag = "1")] @@ -1346,7 +1340,6 @@ pub struct CardanoSignTransactionResponse { 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")] @@ -1357,7 +1350,6 @@ 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 CardanoRequest { #[prost(oneof = "cardano_request::Request", tags = "1, 2, 3")] @@ -1367,7 +1359,6 @@ pub struct CardanoRequest { 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")] @@ -1380,7 +1371,6 @@ 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::Message)] pub struct CardanoResponse { #[prost(oneof = "cardano_response::Response", tags = "1, 2, 3")] @@ -1390,7 +1380,6 @@ pub struct CardanoResponse { 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")] @@ -1433,7 +1422,6 @@ impl CardanoNetwork { } #[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")] @@ -1499,7 +1487,6 @@ pub mod eth_pub_request { /// TX payload for "legacy" (EIP-155) transactions: #[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 { /// Deprecated: use chain_id instead. @@ -1539,7 +1526,6 @@ pub struct EthSignRequest { /// TX payload for an EIP-1559 (type 2) transaction: #[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 EthSignEip1559Request { #[prost(uint64, tag = "1")] @@ -1577,7 +1563,6 @@ pub struct EthSignEip1559Request { } #[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 { /// Deprecated: use chain_id instead. @@ -1599,7 +1584,6 @@ pub struct EthSignMessageRequest { } #[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 { /// 65 bytes, last byte is the recid @@ -1608,7 +1592,6 @@ pub struct EthSignResponse { } #[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")] @@ -1630,7 +1613,6 @@ pub struct EthSignTypedMessageRequest { 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")] @@ -1646,7 +1628,6 @@ 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 Member { #[prost(string, tag = "1")] @@ -1656,7 +1637,6 @@ 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 StructType { #[prost(string, tag = "1")] @@ -1726,7 +1706,6 @@ 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 EthTypedMessageValueResponse { #[prost(enumeration = "eth_typed_message_value_response::RootObject", tag = "1")] @@ -1780,7 +1759,6 @@ pub mod eth_typed_message_value_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 EthTypedMessageValueRequest { #[prost(bytes = "vec", tag = "1")] @@ -1788,7 +1766,6 @@ pub struct 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 EthRequest { #[prost(oneof = "eth_request::Request", tags = "1, 2, 3, 4, 5, 6, 7")] @@ -1798,7 +1775,6 @@ pub struct EthRequest { 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")] @@ -1819,7 +1795,6 @@ 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::Message)] pub struct EthResponse { #[prost(oneof = "eth_response::Response", tags = "1, 2, 3, 4")] @@ -1829,7 +1804,6 @@ pub struct EthResponse { 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")] @@ -1909,7 +1883,6 @@ impl EthAddressCase { } #[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")] @@ -1921,7 +1894,6 @@ pub struct ElectrumEncryptionKeyRequest { } #[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")] @@ -1929,7 +1901,6 @@ pub struct ElectrumEncryptionKeyResponse { } #[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, Copy, PartialEq, ::prost::Message)] pub struct Bip85Request { #[prost(oneof = "bip85_request::App", tags = "1, 2")] @@ -1939,7 +1910,6 @@ pub struct Bip85Request { pub mod bip85_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, Copy, PartialEq, ::prost::Message)] pub struct AppLn { #[prost(uint32, tag = "1")] @@ -1947,7 +1917,6 @@ pub mod bip85_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, Copy, PartialEq, ::prost::Oneof)] pub enum App { #[prost(message, tag = "1")] @@ -1958,7 +1927,6 @@ pub mod bip85_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 Bip85Response { #[prost(oneof = "bip85_response::App", tags = "1, 2")] @@ -1968,7 +1936,6 @@ pub struct Bip85Response { pub mod bip85_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 App { #[prost(message, tag = "1")] @@ -1979,12 +1946,10 @@ pub mod bip85_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, Copy, 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, Copy, PartialEq, ::prost::Message)] pub struct RestoreFromMnemonicRequest { #[prost(uint32, tag = "1")] @@ -1994,7 +1959,6 @@ pub struct RestoreFromMnemonicRequest { } #[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, Copy, PartialEq, ::prost::Message)] pub struct SetMnemonicPassphraseEnabledRequest { #[prost(bool, tag = "1")] @@ -2002,7 +1966,6 @@ pub struct SetMnemonicPassphraseEnabledRequest { } #[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, Copy, PartialEq, ::prost::Message)] pub struct RebootRequest { #[prost(enumeration = "reboot_request::Purpose", tag = "1")] @@ -2052,7 +2015,6 @@ pub mod reboot_request { /// Deprecated, last used in v1.0.0 #[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 { /// 32 bytes challenge. @@ -2062,7 +2024,6 @@ pub struct PerformAttestationRequest { /// Deprecated, last used in v1.0.0 #[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")] @@ -2078,7 +2039,6 @@ pub struct PerformAttestationResponse { } #[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")] @@ -2088,12 +2048,10 @@ pub struct Error { } #[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, Copy, 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( @@ -2106,7 +2064,6 @@ pub struct 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 { /// removed: RandomNumberRequest random_number = 1; @@ -2167,7 +2124,6 @@ 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::Message)] pub struct Response { #[prost( @@ -2180,7 +2136,6 @@ pub struct 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")] diff --git a/tests/subtests/test_cardano.rs b/tests/subtests/test_cardano.rs index 1ccd3bb..b973746 100644 --- a/tests/subtests/test_cardano.rs +++ b/tests/subtests/test_cardano.rs @@ -169,6 +169,57 @@ pub async fn test(bitbox: &PairedBitBox) { "ed0d6426efcae3b02b963db0997845ba43ed53c131aa2f0faa01976ddcdb3751", ); } + // Delegating vote to a drep + { + let transaction = pb::CardanoSignTransactionRequest { + network: pb::CardanoNetwork::CardanoMainnet as i32, + inputs: vec![pb::cardano_sign_transaction_request::Input { + keypath: keypath_input.to_vec(), + prev_out_hash: hex::decode( + "59864ee73ca5d91098a32b3ce9811bac1996dcbaefa6b6247dcaafb5779c2538", + ) + .unwrap(), + prev_out_index: 0, + }], + outputs: vec![pb::cardano_sign_transaction_request::Output { + encoded_address: change_address.clone(), + value: 2741512, + script_config: Some(change_config.clone()), + ..Default::default() + }], + fee: 191681, + ttl: 41539125, + certificates: vec![ + pb::cardano_sign_transaction_request::Certificate { + cert: Some( + pb::cardano_sign_transaction_request::certificate::Cert::VoteDelegation( + pb::cardano_sign_transaction_request::certificate::VoteDelegation { + keypath: vec![2147485500, 2147485463, 2147483648, 2, 0], + r#type: pb::cardano_sign_transaction_request::certificate::vote_delegation::CardanoDRepType::AlwaysAbstain.into(), + drep_credhash: None, + }, + ), + ), + }, + ], + withdrawals: vec![], + validity_interval_start: 41110811, + allow_zero_ttl: false, + }; + + if semver::VersionReq::parse(">=9.21.0").unwrap().matches(bitbox.version()) { + let witness = bitbox.cardano_sign_transaction(transaction).await.unwrap(); + assert_eq!(witness.shelley_witnesses.len(), 2); + assert_eq!( + hex::encode(&witness.shelley_witnesses[0].public_key), + "6b5d4134cfc66281827d51cb0196f1a951ce168c19ba1314233f43d39d91e2bc", + ); + assert_eq!( + hex::encode(&witness.shelley_witnesses[1].public_key), + "ed0d6426efcae3b02b963db0997845ba43ed53c131aa2f0faa01976ddcdb3751", + ); + } + } // Withdrawing staking rewards... { let transaction = pb::CardanoSignTransactionRequest {