Skip to main content
The official Rust SDK provides an async, strongly-typed client for the Hypermid API. Built on reqwest and tokio, with serde for serialization. Compatible with stable Rust (2021 edition).

Installation

Configuration

Configuration fields

Hypermid::anonymous() is shorthand for Hypermid::new(HypermidConfig::default()) — the recommended starting point.

Methods

All methods are async and return Result<T, HypermidError>.

Chains & tokens

Quote / Execute / Status

Balances

get_balances auto-detects the address ecosystem (EVM, Solana, Bitcoin, NEAR, Sui, Tron) and returns priced holdings plus dust classification.

NEAR Intents deposits

For non-EVM destinations, execute returns a deposit address. After the user sends funds:

Webhooks

Verify incoming webhook deliveries:

Fiat on-ramp (RampNow)

Partner endpoints (require API key)

SuperSwap inbound receiver

For SuperSwap V2 inbound deposits (PulseChain-side outputs):

Health check

Polling helpers

For long-running flows, the SDK provides wait_for_* helpers that poll until a terminal state or timeout:
Both return either the final status response or HypermidError::PollTimeout if the wait window expires.

Type guards

Use these to branch on provider/mode without matching the full response struct:
And on statuses:

Error handling

All methods return Result<T, HypermidError>. The error type is a single enum with variants for each failure mode:
HypermidError implements std::error::Error via thiserror, so it composes cleanly with ? and the anyhow / eyre ecosystems.

End-to-end example

A complete EVM swap from Ethereum to Arbitrum, anonymous tier: