Skip to content

Commit

Permalink
Make UtxoInfo deserializable
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplOfAnImpl committed Oct 3, 2024
1 parent bf28aea commit c79faf6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions chainstate/src/rpc/types/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use rpc::types::RpcHexString;

use super::token::{RpcNftIssuance, RpcTokenIssuance};

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
#[serde(tag = "type", content = "content")]
pub enum RpcOutputValue {
Coin {
Expand Down Expand Up @@ -55,7 +55,7 @@ impl RpcOutputValue {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
pub struct RpcStakePoolData {
pledge: RpcAmountOut,
staker: RpcAddress<Destination>,
Expand All @@ -82,7 +82,7 @@ impl RpcStakePoolData {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
pub struct RpcHashedTimelockContract {
secret_hash: RpcHexString,
spend_key: RpcAddress<Destination>,
Expand All @@ -105,7 +105,7 @@ impl RpcHashedTimelockContract {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
#[serde(tag = "type", content = "content")]
pub enum RpcTxOutput {
Transfer {
Expand Down
8 changes: 4 additions & 4 deletions chainstate/src/rpc/types/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use common::{
};
use rpc::types::{RpcHexString, RpcString};

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
#[serde(tag = "type", content = "content")]
pub enum RpcTokenTotalSupply {
Fixed { amount: RpcAmountOut },
Expand All @@ -44,7 +44,7 @@ impl RpcTokenTotalSupply {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
pub struct RpcTokenIssuance {
pub token_ticker: RpcString,
pub number_of_decimals: u8,
Expand Down Expand Up @@ -74,7 +74,7 @@ impl RpcTokenIssuance {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
pub struct RpcNftIssuance {
pub metadata: RpcNftMetadata,
}
Expand All @@ -90,7 +90,7 @@ impl RpcNftIssuance {
}
}

#[derive(Debug, Clone, serde::Serialize, rpc_description::HasValueHint)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, rpc_description::HasValueHint)]
pub struct RpcNftMetadata {
pub creator: Option<RpcAddress<Destination>>,
pub name: RpcString,
Expand Down
2 changes: 1 addition & 1 deletion wallet/wallet-rpc-lib/src/rpc/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl VrfPublicKeyInfo {
}
}

#[derive(Debug, Clone, serde::Serialize)]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct UtxoInfo {
pub outpoint: RpcUtxoOutpoint,
pub output: RpcTxOutput,
Expand Down

0 comments on commit c79faf6

Please sign in to comment.