Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(web3): use tinywallet_web3 WalletChain directly

Steven Enamakel5b9c04d0d106
diff --git a/crates/openhuman-core/src/modules/wallet_host.rs b/crates/openhuman-core/src/modules/wallet_host.rs
index cf7d8958ef..b98bfe2cf1 100644
--- a/crates/openhuman-core/src/modules/wallet_host.rs
+++ b/crates/openhuman-core/src/modules/wallet_host.rs
@@ -67,13 +67,13 @@ pub(crate) fn bind_endpoint_references(
crate::web3::wallet::endpoints::rpc_url_for_evm_network(network)
}
RpcEndpointKey::Btc => crate::web3::wallet::endpoints::rpc_url_for_chain(
- crate::web3::wallet::WalletChain::Btc,
+ tinywallet_web3::crypto::wallet::WalletChain::Btc,
),
RpcEndpointKey::Solana => crate::web3::wallet::endpoints::rpc_url_for_chain(
- crate::web3::wallet::WalletChain::Solana,
+ tinywallet_web3::crypto::wallet::WalletChain::Solana,
),
RpcEndpointKey::Tron => crate::web3::wallet::endpoints::rpc_url_for_chain(
- crate::web3::wallet::WalletChain::Tron,
+ tinywallet_web3::crypto::wallet::WalletChain::Tron,
),
};
if endpoint.reference.trim().is_empty()
diff --git a/crates/openhuman-core/src/modules/wallet_service.rs b/crates/openhuman-core/src/modules/wallet_service.rs
index 8794ffbc82..0db893dafc 100644
--- a/crates/openhuman-core/src/modules/wallet_service.rs
+++ b/crates/openhuman-core/src/modules/wallet_service.rs
@@ -222,10 +222,10 @@ async fn signing_secret(
chain: tinywallet_bus::wire::WalletChain,
) -> Result<tinywallet_bus::wire::SecretMaterial, WalletCallError> {
let local_chain = match chain {
- tinywallet_bus::wire::WalletChain::Evm => crate::web3::wallet::WalletChain::Evm,
- tinywallet_bus::wire::WalletChain::Btc => crate::web3::wallet::WalletChain::Btc,
- tinywallet_bus::wire::WalletChain::Solana => crate::web3::wallet::WalletChain::Solana,
- tinywallet_bus::wire::WalletChain::Tron => crate::web3::wallet::WalletChain::Tron,
+ tinywallet_bus::wire::WalletChain::Evm => tinywallet_web3::crypto::wallet::WalletChain::Evm,
+ tinywallet_bus::wire::WalletChain::Btc => tinywallet_web3::crypto::wallet::WalletChain::Btc,
+ tinywallet_bus::wire::WalletChain::Solana => tinywallet_web3::crypto::wallet::WalletChain::Solana,
+ tinywallet_bus::wire::WalletChain::Tron => tinywallet_web3::crypto::wallet::WalletChain::Tron,
};
let stored = crate::web3::wallet::secret_material(local_chain)
.await
@@ -344,12 +344,12 @@ fn native_wallet_config_request() -> NativeWalletConfigRequest {
}
}
for (chain, key) in [
- (crate::web3::wallet::WalletChain::Btc, RpcEndpointKey::Btc),
+ (tinywallet_web3::crypto::wallet::WalletChain::Btc, RpcEndpointKey::Btc),
(
- crate::web3::wallet::WalletChain::Solana,
+ tinywallet_web3::crypto::wallet::WalletChain::Solana,
RpcEndpointKey::Solana,
),
- (crate::web3::wallet::WalletChain::Tron, RpcEndpointKey::Tron),
+ (tinywallet_web3::crypto::wallet::WalletChain::Tron, RpcEndpointKey::Tron),
] {
let name = crate::web3::wallet::endpoints::env_var_for_chain(chain);
if nonempty_env(name) {
diff --git a/crates/openhuman-core/src/web3/seams.rs b/crates/openhuman-core/src/web3/seams.rs
index 4067b438e6..89614bbf47 100644
--- a/crates/openhuman-core/src/web3/seams.rs
+++ b/crates/openhuman-core/src/web3/seams.rs
@@ -37,7 +37,7 @@ use crate::security::approval::APPROVAL_CHAT_CONTEXT;
use super::client::CryptoClient;
use super::wallet::endpoints::HostEndpoints;
use super::wallet::transport::OpenHumanTransport;
-use super::wallet::{self, WalletChain};
+use {super::wallet::self, tinywallet_web3::crypto::wallet::WalletChain};
const LOG_PREFIX: &str = "[web3:seams]";
diff --git a/crates/openhuman-core/src/web3/wallet/mod.rs b/crates/openhuman-core/src/web3/wallet/mod.rs
index 1dcdb26cea..c514c944c7 100644
--- a/crates/openhuman-core/src/web3/wallet/mod.rs
+++ b/crates/openhuman-core/src/web3/wallet/mod.rs
@@ -88,6 +88,12 @@ pub use {
};
+// Retained for the always-on RPC/observability boundary until #7406 exposes
+// this shared producer error through the released TinyWallet bus contract.
+// Embed must not acquire an implementation dependency for this sentinel.
+#[cfg(feature = "web3")]
+pub use tinywallet_web3::quote::WALLET_NOT_CONFIGURED_MESSAGE;
+
// ---------------------------------------------------------------------------
// Disabled facade — compiled only when the `web3` feature is OFF.
// ---------------------------------------------------------------------------
diff --git a/crates/openhuman-core/src/web3/wallet/schemas.rs b/crates/openhuman-core/src/web3/wallet/schemas.rs
index 8b87da257a..5ef0ba9155 100644
--- a/crates/openhuman-core/src/web3/wallet/schemas.rs
+++ b/crates/openhuman-core/src/web3/wallet/schemas.rs
@@ -8,7 +8,7 @@ use super::execution::{
balances, chain_status, execute_prepared, lookup_tx, network_defaults, prepare_transfer,
supported_assets, tx_receipt, tx_status, ExecutePreparedParams, PrepareTransferParams,
};
-use super::{encode_erc20_transfer, EvmNetwork, WalletChain};
+use {super::encode_erc20_transfer, super::EvmNetwork, tinywallet_web3::crypto::wallet::WalletChain};
use {
super::ops::WalletSetupParams, tinywallet_web3::crypto::wallet::WalletAccount,
tinywallet_web3::crypto::wallet::WalletSetupSource,
diff --git a/crates/openhuman-core/src/web3/x402/seams.rs b/crates/openhuman-core/src/web3/x402/seams.rs
index 0f57e0192e..0c4808a5b7 100644
--- a/crates/openhuman-core/src/web3/x402/seams.rs
+++ b/crates/openhuman-core/src/web3/x402/seams.rs
@@ -36,7 +36,7 @@ use tinywallet_x402::wire::PaymentChain;
use crate::security::approval::APPROVAL_CHAT_CONTEXT;
use crate::security::SecurityPolicy;
use crate::web3::wallet::transport::OpenHumanTransport;
-use crate::web3::wallet::WalletChain;
+use {tinywallet_web3::crypto::wallet::WalletChain};
const LOG_PREFIX: &str = "[x402::seams]";