Skip to content

Commit

Permalink
Merge branch 'ord' into ord2
Browse files Browse the repository at this point in the history
  • Loading branch information
gruve-p authored Sep 2, 2023
2 parents 45c9ea6 + 84bdb1b commit 6feea7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jsonrpc = "0.14.0"
# Used for deserialization of JSON.
serde = "1"
serde_json = "1"
groestlcoin-private = "0.1.0"
groestlcoin-private = "0.1.0"
5 changes: 5 additions & 0 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ pub trait RpcApi: Sized {
self.call("importdescriptors", handle_defaults(&mut [json_request.into()], &[null()]))
}

fn list_descriptors(&self, private: Option<bool>) -> Result<json::ListDescriptorsResult> {
let mut args = [opt_into_json(private)?];
self.call("listdescriptors", handle_defaults(&mut args, &[null()]))
}

fn set_label(&self, address: &Address, label: &str) -> Result<()> {
self.call("setlabel", &[address.to_string().into(), label.into()])
}
Expand Down
14 changes: 7 additions & 7 deletions json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ pub enum GetTransactionResultDetailCategory {
Orphan,
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize)]
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
pub struct GetTransactionResultDetail {
pub address: Option<Address<NetworkUnchecked>>,
pub category: GetTransactionResultDetailCategory,
Expand All @@ -680,7 +680,7 @@ pub struct GetTransactionResultDetail {
pub abandoned: Option<bool>,
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize)]
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
pub struct WalletTxInfo {
pub confirmations: i32,
pub blockhash: Option<groestlcoin::BlockHash>,
Expand All @@ -697,7 +697,7 @@ pub struct WalletTxInfo {
pub wallet_conflicts: Vec<groestlcoin::Txid>,
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize)]
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
pub struct GetTransactionResult {
#[serde(flatten)]
pub info: WalletTxInfo,
Expand All @@ -716,7 +716,7 @@ impl GetTransactionResult {
}
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize)]
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
pub struct ListTransactionResult {
#[serde(flatten)]
pub info: WalletTxInfo,
Expand Down Expand Up @@ -1850,7 +1850,7 @@ impl serde::Serialize for SigHashType {
}

// Used for createrawtransaction argument.
#[derive(Serialize, Clone, PartialEq, Eq, Debug)]
#[derive(Serialize, Clone, PartialEq, Eq, Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateRawTransactionInput {
pub txid: groestlcoin::Txid,
Expand Down Expand Up @@ -1902,7 +1902,7 @@ pub struct FundRawTransactionResult {
pub change_position: i32,
}

#[derive(Deserialize, Clone, PartialEq, Eq, Debug)]
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, Debug)]
pub struct GetBalancesResultEntry {
#[serde(with = "groestlcoin::amount::serde::as_btc")]
pub trusted: Amount,
Expand All @@ -1912,7 +1912,7 @@ pub struct GetBalancesResultEntry {
pub immature: Amount,
}

#[derive(Deserialize, Clone, PartialEq, Eq, Debug)]
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GetBalancesResult {
pub mine: GetBalancesResultEntry,
Expand Down

0 comments on commit 6feea7a

Please sign in to comment.