<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Bitcoin",
  "identifier" : "/documentation/Bitcoin/Daemon/bootstrap(url:username:password:timeout:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Bitcoin"
    ],
    "preciseIdentifier" : "s:7Bitcoin6DaemonO9bootstrap3url8username8password7timeouty10Foundation3URLV_S2Ss8DurationVtYaKFZ"
  },
  "title" : "bootstrap(url:username:password:timeout:)"
}
-->

# bootstrap(url:username:password:timeout:)

Bootstrap the direct RPC bridge using explicit credentials.

```
static func bootstrap(url: URL, username: String, password: String, timeout: Duration = .seconds(30)) async throws
```

## Parameters

`url`

The RPC endpoint URL (e.g., `http://127.0.0.1:8332`).

`username`

RPC username.

`password`

RPC password.

`timeout`

Maximum time to wait for the RPC server (default 30s).

## Discussion

Polls until the RPC server is ready, then calls the hidden
`_bridge_init` RPC via HTTP to capture the `NodeContext` for direct
dispatch. After this method returns, the auto-detecting transport
inside `RPCClient(url:username:password:)` routes non-wallet RPCs
through [`DirectTransport`](/documentation/Bitcoin/DirectTransport) automatically.

> Throws: The last transport error if the timeout expires, or
> `CancellationError` if the task is cancelled.