Skip to content

Commit

Permalink
feat: tighten visibility of inner fields not required by external users
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Jun 27, 2024
1 parent cddd5f2 commit 563af80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bdk-ffi/src/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl From<BdkScriptBuf> for Script {
}

#[derive(Debug, PartialEq, Eq)]
pub struct Address(BdkAddress<NetworkChecked>);
pub struct Address(pub(crate) BdkAddress<NetworkChecked>);

impl Address {
pub fn new(address: String, network: Network) -> Result<Self, AddressParseError> {
Expand Down Expand Up @@ -134,7 +134,7 @@ impl From<BdkAddress> for Address {
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Transaction(BdkTransaction);
pub struct Transaction(pub(crate) BdkTransaction);

impl Transaction {
pub fn new(transaction_bytes: Vec<u8>) -> Result<Self, TransactionError> {
Expand Down Expand Up @@ -319,7 +319,7 @@ impl From<&BdkTxOut> for TxOut {
}

#[derive(Clone, Debug)]
pub struct FeeRate(pub BdkFeeRate);
pub struct FeeRate(pub(crate) BdkFeeRate);

impl FeeRate {
pub fn from_sat_per_vb(sat_per_vb: u64) -> Result<Self, FeeRateError> {
Expand Down
2 changes: 1 addition & 1 deletion bdk-ffi/src/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::sync::Arc;
// NOTE: We are keeping our naming convention where the alias of the inner type is the Rust type
// prefixed with `Bdk`. In this case the inner type is `BdkElectrumClient`, so the alias is
// funnily enough named `BdkBdkElectrumClient`.
pub struct ElectrumClient(BdkBdkElectrumClient<bdk_electrum::electrum_client::Client>);
pub struct ElectrumClient(pub(crate) BdkBdkElectrumClient<bdk_electrum::electrum_client::Client>);

impl ElectrumClient {
pub fn new(url: String) -> Result<Self, ElectrumError> {
Expand Down
2 changes: 1 addition & 1 deletion bdk-ffi/src/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bdk_wallet::KeychainKind;
use std::collections::BTreeMap;
use std::sync::Arc;

pub struct EsploraClient(BlockingClient);
pub struct EsploraClient(pub(crate) BlockingClient);

impl EsploraClient {
pub fn new(url: String) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion bdk-ffi/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bdk_wallet::KeychainKind;

use std::sync::{Arc, Mutex, MutexGuard};

pub struct SqliteStore(Mutex<BdkSqliteStore<KeychainKind, ConfirmationTimeHeightAnchor>>);
pub struct SqliteStore(pub(crate) Mutex<BdkSqliteStore<KeychainKind, ConfirmationTimeHeightAnchor>>);

impl SqliteStore {
pub fn new(path: String) -> Result<Self, SqliteError> {
Expand Down

0 comments on commit 563af80

Please sign in to comment.