View Source Xander.Config (Xander v0.2.0)
This module provides functions to configure the Xander client.
Examples
Connecting to a local Cardano node:
# Use default configuration
path = "/tmp/cardano-node.socket"
config = Xander.Config.default_config!(path)
{:ok, pid} = Xander.Query.start_link(config)
# Or customize the configuration
path = "/tmp/cardano-node.socket"
config = Xander.Config.default_config!(path, :preview)
{:ok, pid} = Xander.Query.start_link(config)
Connecting to a Demeter node:
# Configure for Demeter
url = "https://your-demeter-url.demeter.run"
config = Xander.Config.demeter_config!(url)
{:ok, pid} = Xander.Query.start_link(config)
# Query the current era
{:ok, current_era} = Xander.Query.query(pid, :get_current_era)
Summary
Functions
Returns the default configuration for connecting to a Cardano node.
Returns configuration for connecting to a Demeter node.