MCPcopy Create free account
hub / github.com/bwt-dev/bwt / bitcoind_auth

Method bitcoind_auth

src/config.rs:396–408  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

394 }
395
396 pub fn bitcoind_auth(&self) -> Result<RpcAuth> {
397 Ok(self.bitcoind_auth
398 .as_ref()
399 .and_then(|auth| {
400 let mut parts = auth.splitn(2, ':');
401 Some(RpcAuth::UserPass(parts.next()?.into(), parts.next()?.into()))
402 })
403 .or_else(|| {
404 let cookie = self.bitcoind_cookie.clone().or_else(|| get_cookie(self))?;
405 Some(RpcAuth::CookieFile(cookie))
406 })
407 .or_err("no valid authentication found for bitcoind rpc, specify user/pass or a cookie file")?)
408 }
409
410 pub fn addresses(&self) -> Result<Vec<Address>> {
411 let mut addresses = self.addresses.clone();

Callers 2

bootMethod · 0.80
test_rpcMethod · 0.80

Calls 4

get_cookieFunction · 0.85
or_errMethod · 0.80
and_thenMethod · 0.80
intoMethod · 0.80

Tested by 1

test_rpcMethod · 0.64