Enumeration
Daemon
Controls the lifecycle of an embedded Bitcoin Core daemon process.
enum Daemon
Overview
Provides static methods to start, bootstrap, and wait for the bitcoind process. The daemon runs on a dedicated thread and communicates via JSON-RPC.
Typical Usage
// Start the daemon
Daemon.start(["-regtest", "-server"])
// Bootstrap the direct RPC bridge (cookie auth — credential-free)
let cookieFile = dataDir.appending(path: ".cookie")
try await Daemon.bootstrap(cookieFile: cookieFile, port: 18443)
// Or bootstrap with explicit credentials
try await Daemon.bootstrap(
url: URL(string: "http://127.0.0.1:8332")!,
username: "user",
password: "pass"
)
// Now AutoTransport routes non-wallet RPCs through the direct bridge.
Topics
Type Methods