docs.rs failed to build ethexe-sdk-2.0.0-pre.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ethexe-sdk
Rust client SDK for the Vara.ETH execution layer — Gear programs running on Ethereum via
ethexe. It bundles an ethexe JSON-RPC WebSocket client with an Ethereum contract client
behind a single [VaraEthApi] handle.
This is a thin, std-only convenience layer for external consumers: it holds no execution,
consensus, or storage logic and delegates to ethexe-ethereum, ethexe-rpc-client, and
ethexe-node-wrapper. The primary in-workspace consumer is ethexe-node-loader, which
builds [VaraEthApi] clients for integration and fuzz testing.
Public API
- [
VaraEthApi] — SDK root; built withVaraEthApi::newor [VaraEthApi::builder]. Factory methodsmirror,router,wrapped_varareturn scoped wrappers. - [
Mirror] — Per-program operations:send_message,send_reply,send_message_injected,wait_for_reply,claim_value,state,calculate_reply_for_handle,calculate_reply_for_handle_with_top_up, plus*_with_receiptvariants. - [
Router] — Router-contract and global queries:request_code_validation,create_program, validator queries,code_state,program_ids,storage_view. - [
WVara] — WrappedVara ERC20 queries and transfers, plusmintandevents. - [
types] — SDK-visible result and value types. - [
node_bindings] — Bindings for spawning and managing a local ethexe node process.
Usage example
use VaraEthApi;
// `eth_client` is an `ethexe_ethereum::Ethereum`; `rpc_url` is the node's WS endpoint.
let api = new.await?;
let = api.router.request_code_validation.await?;
api.router.wait_for_code_validation.await?;
let = api
.router
.create_program_with_executable_balance
.await?;
let mirror = api.mirror;
let = mirror.send_message.await?;
let reply = mirror.wait_for_reply.await?;
# Ok
Invariants
- [
Mirror] and [Router] borrow&VaraEthApiand cannot outlive the handle they were created from. - Injected transactions must carry zero value; a non-zero value is a hard error at call time.
- Most methods are
asyncand returnanyhow::Result, assuming a live RPC WebSocket and a reachable Ethereum endpoint.