The TACo SDK allows you to implement conditional signing for ERC-4337 (a.k.a Account Abstraction) UserOperations. In just a few minutes, you'll be able to:
Define signing conditions – Specify rules that must be fulfilled before UserOperations can be signed
Request signatures – Get signatures from the decentralized network when conditions are met
Execute signed UserOperations – Use the aggregated signature to execute transactions via Account Abstraction
1. Installation
Install @nucypher/taco, @nucypher/taco-auth, and ethers with your favorite package manager:
To run the code examples below, you will need a cohortId signing parameter. For development and testing, we provide publicly available testnet cohorts:
Network
Domain
Cohort ID
Chain ID
Description
Sepolia
TESTNET
1
11155111
Public testnet cohort
Lynx
DEVNET
1
11155111
Development cohort
For production use, please contact us to have a dedicated cohort configured.
3. Define Signing Conditions (Admin Only)
Only the cohort admin can set conditions. The testnet cohort comes pre-configured with a time-based condition that allows signing after a certain timestamp.
Admins can set conditions on the contract easily:
4. Request Signatures
Once conditions are set, you can request signatures for UserOperations that meet those conditions:
5. Execute with Signature
The aggregated signature can now be used to execute the UserOperation through an ERC-4337 bundler:
The signature validation happens automatically when the bundler submits the UserOperation to the EntryPoint contract. The EntryPoint calls the account's validateUserOp function, which in turn verifies the signature using the multisig contract's isValidSig method.
// Add the signature to your UserOperation
userOp.signature = signResult.aggregatedSignature;
// Submit to your ERC-4337 bundler
// The bundler will validate the signature against the multisig contract
const bundlerResponse = await bundlerClient.sendUserOperation(userOp);
// The multisig contract's isValidSig method is called automatically
// by the EntryPoint contract during UserOperation validation