View Source BitcoinCoreClient.Rpc.Settings (BitcoinCoreClient v0.1.0)
A simple struct containing ip, port, credentials and a reference to the module to use for HTTP calls
Link to this section Summary
Functions
Converts the struct into an URL that can be used to get information over a Bitcoin Core RPC endpoint
Link to this section Functions
@spec to_url(%BitcoinCoreClient.Rpc.Settings{ http_module: term(), ip: term(), password: term(), port: term(), username: term() }) :: binary()
Converts the struct into an URL that can be used to get information over a Bitcoin Core RPC endpoint
examples
Examples
iex> %BitcoinCoreClient.Rpc.Settings{ip: "192.168.1.1", port: 8332, username: "me", password: "pwd"}
...> |> BitcoinCoreClient.Rpc.Settings.to_url()
"http://me:pwd@192.168.1.1:8332"