The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(web3): source wallet types from local ops module
Steven Enamakel9290905d38c2
diff --git a/crates/openhuman-core/src/tools/impl/network/mod.rs b/crates/openhuman-core/src/tools/impl/network/mod.rsindex 0dba61f0d5..37effcd22c 100644--- a/crates/openhuman-core/src/tools/impl/network/mod.rs+++ b/crates/openhuman-core/src/tools/impl/network/mod.rs@@ -26,7 +26,7 @@ pub use gmail_unsubscribe::GmailUnsubscribeTool;pub(crate) use host::x402_request_tool;pub use host::{http_request_tool, web_fetch_tool};#[cfg(feature = "mcp")]-pub use mcp::mcp_call_tool;+pub use mcp::{mcp_call_tool, McpListServersTool, McpListToolsTool};#[cfg(feature = "mcp")]pub use mcp_server_tools::{configured_server_tools, ConfiguredMcpServerTool};diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rsindex e2afd5b844..6f97a00c9a 100644--- a/crates/openhuman-core/src/tools/ops.rs+++ b/crates/openhuman-core/src/tools/ops.rs@@ -308,7 +308,7 @@ pub fn all_tools_with_runtime(// or SPL payment signing, and ledger recording. Gated with the `web3`// feature (the x402 domain is compiled out when web3 is disabled).#[cfg(feature = "web3")]- tools.push(Box::new(crate::web3::x402::request_tool(+ tools.push(Box::new(crate::tools::x402_request_tool(security.clone(),http_config.allowed_domains.clone(),)));diff --git a/crates/openhuman-core/src/web3/wallet/execution.rs b/crates/openhuman-core/src/web3/wallet/execution.rsindex 6a36553f19..517bf74272 100644--- a/crates/openhuman-core/src/web3/wallet/execution.rs+++ b/crates/openhuman-core/src/web3/wallet/execution.rs@@ -16,7 +16,7 @@ pub use tinywallet_bus::wire::{use tinywallet_bus::wire::{EvmNetwork, WalletNetworkDefaults};-use tinywallet_web3::crypto::wallet::WalletChain;+use super::ops::WalletChain;/// Default row for every supported network, with the host's endpoints.pub async fn network_defaults() -> Result<Outcome<Vec<WalletNetworkDefaults>>, String> {diff --git a/crates/openhuman-core/src/web3/wallet/ops/state.rs b/crates/openhuman-core/src/web3/wallet/ops/state.rsindex 0c17e472a4..aa402e7e20 100644--- a/crates/openhuman-core/src/web3/wallet/ops/state.rs+++ b/crates/openhuman-core/src/web3/wallet/ops/state.rs@@ -385,10 +385,7 @@ pub(super) fn current_time_ms() -> u64 {.unwrap_or(0)}-pub(super) fn to_status(- config: &Config,- state: Option<StoredWalletState>,-) -> tinywallet_web3::crypto::wallet::WalletStatus {+pub(super) fn to_status(config: &Config, state: Option<StoredWalletState>) -> super::WalletStatus {match state {Some(state) => {// A mnemonic is "stored" if it's either in the JSON field (headless path)@@ -399,7 +396,7 @@ pub(super) fn to_status(.map(|v| !v.trim().is_empty()).unwrap_or(false);let secret_stored = secret_in_json || keychain_has_mnemonic(config);- tinywallet_web3::crypto::wallet::WalletStatus {+ super::WalletStatus {configured: true,onboarding_completed: state.consent_granted && !state.accounts.is_empty(),consent_granted: state.consent_granted,@@ -410,7 +407,7 @@ pub(super) fn to_status(updated_at_ms: Some(state.updated_at_ms),}}- None => tinywallet_web3::crypto::wallet::WalletStatus {+ None => super::WalletStatus {configured: false,onboarding_completed: false,consent_granted: false,diff --git a/crates/openhuman-core/src/web3/wallet/ops_tests.rs b/crates/openhuman-core/src/web3/wallet/ops_tests.rsindex 4064931b3f..920c11bcf4 100644--- a/crates/openhuman-core/src/web3/wallet/ops_tests.rs+++ b/crates/openhuman-core/src/web3/wallet/ops_tests.rs@@ -1,6 +1,5 @@use super::*;use crate::config::Config;-use tinywallet_web3::crypto::wallet::WalletSetupSource;fn sample_account(chain: WalletChain) -> WalletAccount {WalletAccount {diff --git a/crates/openhuman-core/src/web3/wallet/registration.rs b/crates/openhuman-core/src/web3/wallet/registration.rsdeleted file mode 100644index 200e3cd0f7..0000000000--- a/crates/openhuman-core/src/web3/wallet/registration.rs+++ /dev/null@@ -1,19 +0,0 @@-//! Host registration of wallet tools over the configured wallet engine.--use tinytools::Tool;-use tinywallet_web3::tools::wallet::{- WalletChainStatusTool, WalletLookupTxTool, WalletPrepareTransferTool, WalletStatusTool,- WalletTxReceiptTool, WalletTxStatusTool,-};--/// Build the wallet tool family in its persisted catalogue order.-pub(crate) fn tools() -> Vec<Box<dyn Tool>> {- vec![- Box::new(WalletStatusTool::new(crate::web3::seams::engine())),- Box::new(WalletChainStatusTool::new(crate::web3::seams::engine())),- Box::new(WalletPrepareTransferTool::new(crate::web3::seams::engine())),- Box::new(WalletTxStatusTool::new(crate::web3::seams::engine())),- Box::new(WalletTxReceiptTool::new(crate::web3::seams::engine())),- Box::new(WalletLookupTxTool::new(crate::web3::seams::engine())),- ]-}diff --git a/crates/openhuman-core/src/web3/wallet/test_support.rs b/crates/openhuman-core/src/web3/wallet/test_support.rsindex 8c5ab9d5f7..e1411665a1 100644--- a/crates/openhuman-core/src/web3/wallet/test_support.rs+++ b/crates/openhuman-core/src/web3/wallet/test_support.rs@@ -11,13 +11,9 @@use tempfile::TempDir;+use super::ops::{setup, WalletAccount, WalletChain, WalletSetupParams, WalletSetupSource};use crate::config::rpc as config_rpc;use crate::config::test_env::EnvVarGuard;-use {- super::ops::setup, super::ops::WalletSetupParams,- tinywallet_web3::crypto::wallet::WalletAccount, tinywallet_web3::crypto::wallet::WalletChain,- tinywallet_web3::crypto::wallet::WalletSetupSource,-};pub(crate) static TEST_LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());