-
-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Summary
We're integrating TACo (Threshold Access Control) network's distributed signing with MetaMask Smart Accounts. Currently, toMetaMaskSmartAccount requires a local wallet as a signatory even when using external multisig signers. This creates an unnecessary dependency for applications using distributed signing networks.
Current Implementation
// Current setup requires a local wallet even though signing happens via TACo network
const smartAccount = await toMetaMaskSmartAccount({
client: publicClient,
implementation: Implementation.MultiSig,
deployParams: [signers, BigInt(threshold)], // TACo network signers
deploySalt: '0x' as `0x${string}`,
signatory: [{ account: localAccount }], // ← Still requires local wallet
});Problem
When using distributed signing networks like TACo:
- The actual signing is performed by the network (2-of-3 threshold signatures from Ursula nodes)
- The local wallet in
signatoryis just a placeholder and doesn't perform the actual signing - This creates confusion and unnecessary key management requirements
- AI agents and autonomous systems must manage private keys they don't actually use for signing
Use Case
TACo provides distributed threshold signatures where:
- Multiple Ursula nodes collectively sign transactions
- No single entity holds the complete signing capability
- The signing happens through the TACo SDK's
signUserOp()function - We retrieve signatures via the network, not from a local key
Example of how we currently sign:
const signature = await signUserOp(
provider,
TACO_DOMAIN,
COHORT_ID,
SEPOLIA_CHAIN_ID,
tacoUserOp,
AA_VERSION,
signingContext
);Desired Behavior
We'd like to wrap or integrate external signing networks (like TACo) with toMetaMaskSmartAccount without requiring a dummy local wallet. We understand Viem has capabilities for custom account implementations and wrapping external signers, but we're unsure of the best pattern to apply here.
Questions
- Is there an existing pattern in Viem/Delegation Toolkit for wrapping external signing networks?
- Can the
signatoryfield support custom implementations that delegate to external networks? - What's the recommended approach for integrating distributed signing systems?
Benefits of Supporting This
- Enhanced Security: No unnecessary local key management
- AI Agent Compatibility: Enables autonomous agents without key custody
- Cleaner Integration: Direct integration with distributed signing networks
- Broader Adoption: Opens up new use cases for decentralized applications
Additional Context
- We're building demos for TACo adopters showing Account Abstraction integration
- The current workaround uses a dummy local wallet which is confusing in examples
- This pattern would benefit any application using external signing infrastructure (MPC, threshold signatures, HSMs, etc.)
Would love guidance on the best way to achieve this with the current toolkit or if this requires an enhancement.