summaryrefslogtreecommitdiff
path: root/impls/monero.rs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'impls/monero.rs/src/lib.rs')
-rw-r--r--impls/monero.rs/src/lib.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/impls/monero.rs/src/lib.rs b/impls/monero.rs/src/lib.rs
index b40cb94..1334b7a 100644
--- a/impls/monero.rs/src/lib.rs
+++ b/impls/monero.rs/src/lib.rs
@@ -628,6 +628,20 @@ impl WalletManager {
Ok(height)
}
}
+
+ /// Sets the daemon address of WalletManager
+ pub fn set_daemon_address(&self, daemon_address: &str) -> WalletResult<()> {
+ let c_daemon_address = CString::new(daemon_address)
+ .map_err(|_| WalletError::FfiError("Invalid daemon address".to_string()))?;
+
+ unsafe {
+ bindings::MONERO_WalletManager_setDaemonAddress(
+ self.ptr.as_ptr(),
+ c_daemon_address.as_ptr(),
+ );
+ Ok(())
+ }
+ }
}
impl Wallet {