Sigil documentation
ReferenceRust referencesigil-sdk

sigil-sdk · gal_http

Source declarations, signatures and documentation for gal_http.

Source: sigil/node/sigil-sdk/src/gal_http.rs. SHA-256: 53980e7e43e59a9fb8df324a56cf4920e0a42aab587982249155e094c9463a25.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

Module condition:

#[cfg(feature = "gal-http")]

gal_http::HttpSigilAnchorClientConfig

Configuration for the HTTP anchor client.

#[cfg(feature = "gal-http")]
#[derive(Debug, Clone)]
pub struct HttpSigilAnchorClientConfig {
/// JSON-RPC endpoint (e.g. `"http://localhost:12618"`).

pub rpc_url: String,
/// Request timeout. Defaults to 10 seconds.

pub timeout: Duration,
/// Optional bearer token for authenticated endpoints.

pub auth_token: Option<String>
}

Source line: 22.

gal_http::HttpSigilAnchorClientConfig::new

Build a config targeting a JSON-RPC URL with the default 10-second timeout and no auth token.

#[cfg(feature = "gal-http")]
pub fn new(rpc_url: impl Into<String>) -> Self;

Source line: 34.

gal_http::HttpSigilAnchorClientConfig::with_timeout

Override the request timeout.

#[cfg(feature = "gal-http")]
pub fn with_timeout(mut self, timeout: Duration) -> Self;

Source line: 44.

gal_http::HttpSigilAnchorClientConfig::with_auth_token

Set a bearer token for authenticated endpoints.

#[cfg(feature = "gal-http")]
pub fn with_auth_token(mut self, token: impl Into<String>) -> Self;

Source line: 50.

gal_http::HttpSigilAnchorClient

Reqwest-backed SigilAnchorClient impl.

#[cfg(feature = "gal-http")]
pub struct HttpSigilAnchorClient {

}

Source line: 65.

gal_http::HttpSigilAnchorClient::new

Construct a new client. Returns an error if the underlying HTTP client cannot be initialized (e.g., TLS configuration failure).

#[cfg(feature = "gal-http")]
pub fn new(config: HttpSigilAnchorClientConfig) -> Result<Self, AnchorError>;

Source line: 74.

On this page