permissionless 0.1.2
permissionless: ^0.1.2 copied to clipboard
A Dart implementation of permissionless.js for ERC-4337 smart accounts. Supports Safe, Simple, Kernel, and Etherspot accounts with bundler and paymaster clients.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.2 - 2025-12-18 #
Changed #
- Documentation: Achieved 100% dartdoc coverage (1192/1192 API elements)
- Added documentation to all
fromJsonfactory constructors - Documented all UserOperation fields for both v0.6 and v0.7
- Added dartdoc comments to Safe, Kernel, Pimlico, and Paymaster types
- Documented all public class constructors and their parameters
- Added field-level documentation for gas limits, fees, and paymaster data
- Added documentation to all
0.1.1 - 2025-12-18 #
Changed #
- BREAKING: Replaced custom
EthAddressclass withEthereumAddressfrom thewalletpackageEthAddress('0x...')→EthereumAddress.fromHex('0x...')EthAddress.zero→zeroAddress(top-level constant)- Added
EthereumAddressExtensionwith.hex,.checksummed,.bytes,.isZero,.toAbiEncoded()methods - Added
StringToAddressextension:'0x...'.toAddress()
- BREAKING: Removed
includeFactoryDataparameter fromSmartAccountClientmethodsprepareUserOperation,prepareUserOperationWithAuth,sendUserOperation,sendUserOperationAndWaitprepareUserOperationV06,sendUserOperationV06,sendUserOperationV06AndWait- The SDK now automatically detects deployment status via
publicClient.isDeployed()and includes factory data only when needed - Important:
publicClientparameter is now required inSmartAccountClientconstructor for auto-detection to work - This simplifies the API - users no longer need to track deployment status themselves
- Added
walletpackage as direct dependency forEthereumAddresstype
Fixed #
- Improved interoperability with web3dart ecosystem by using standard types
- Fixed inconsistency between v0.6 and v0.7 UserOperation preparation
- v0.6 now properly checks deployment status before including
initCode, matching v0.7 behavior
- v0.6 now properly checks deployment status before including
0.1.0 - 2025-12-15 #
Initial release of permissionless.dart - a Dart implementation of permissionless.js for ERC-4337 smart accounts.
Added #
Smart Accounts
- SafeSmartAccount - Gnosis Safe with 4337 module support
- Safe v1.4.1 (EntryPoint v0.6 and v0.7)
- Safe v1.5.0 (EntryPoint v0.7)
- Multi-signature support with threshold
- EIP-712 typed data signing
- SimpleSmartAccount - Minimal single-owner account
- EntryPoint v0.6 and v0.7 support
- Eip7702SimpleSmartAccount - EIP-7702 delegated Simple account
- EOA code delegation support
- EntryPoint v0.7
- KernelSmartAccount - ZeroDev's modular account
- Kernel v0.2.4 (EntryPoint v0.6)
- Kernel v0.3.1 (EntryPoint v0.7, ERC-7579 compliant)
- Eip7702KernelSmartAccount - EIP-7702 delegated Kernel account
- EOA code delegation with modular architecture
- EntryPoint v0.7
- EtherspotSmartAccount - ModularEtherspotWallet (EntryPoint v0.7)
- ERC-7579 modular architecture
- NexusSmartAccount - Biconomy's ERC-7579 modular account (EntryPoint v0.7)
- K1 validator for ECDSA signatures
- LightSmartAccount - Alchemy's gas-efficient account
- Version 1.1.0 (EntryPoint v0.6)
- Version 2.0.0 (EntryPoint v0.7, signature type prefix)
- ThirdwebSmartAccount - Thirdweb SDK smart account
- EntryPoint v0.6 and v0.7 support
- TrustSmartAccount - Trust Wallet's Barz account
- Diamond proxy pattern (EIP-2535)
- EntryPoint v0.6 only
- BiconomySmartAccount (deprecated) - Use NexusSmartAccount instead
Clients
- BundlerClient - ERC-4337 bundler RPC methods
eth_sendUserOperationeth_estimateUserOperationGaseth_getUserOperationReceipteth_getUserOperationByHasheth_supportedEntryPointswaitForUserOperationReceipt- Polling with configurable timeout
- PaymasterClient - Paymaster integration
pm_getPaymasterStubDatapm_getPaymasterDatapm_validateSponsorshipPolicies
- SmartAccountClient - High-level account operations
prepareUserOperationsignUserOperationsendUserOperationsendPreparedUserOperationwaitForReceipt
- PimlicoClient - Pimlico bundler extensions
pimlico_getUserOperationGasPricepimlico_getUserOperationStatuspimlico_sendCompressedUserOperationgetSupportedTokens- Get supported ERC-20 tokens for gas paymentgetTokenQuotes- Get exchange rates and paymaster info for tokens
- EtherspotClient - Etherspot (Skandha) bundler extensions
skandha_getGasPrice
- PublicClient - Standard Ethereum JSON-RPC
eth_chainIdeth_getCode/isDeployedeth_calleth_getTransactionReceiptgetSenderAddressgetAccountNonce
Smart Account Actions
signMessage- EIP-191 personal message signing for all accountssignTypedData- EIP-712 typed data signing for all accounts
ERC-7579 Actions
installModule- Install a single module on the smart accountinstallModules- Batch install multiple modules in one UserOperationuninstallModule- Remove a module from the smart accountisModuleInstalled- Check if a module is installed on an accountsupportsModule- Check if an account supports a module type
ERC-20 Paymaster Support (Experimental)
prepareUserOperationForErc20Paymaster- Prepare UserOperations for ERC-20 gas payment- Automatic token approval injection
- USDT special case handling (approval reset)
- Max cost calculation in tokens
estimateErc20PaymasterCost- Estimate gas cost in ERC-20 tokens
Constants
EntryPointAddresses- Canonical EntryPoint contract addresses- v0.6, v0.7, and v0.8 support
EntryPointVersion- Enum for version selection
Types
UserOperationV06- EntryPoint v0.6 UserOperationUserOperationV07- EntryPoint v0.7 UserOperationEthereumAddress- Ethereum address type (from wallet package) with extensionsCall- Transaction call representationTypedData/TypedDataDomain/TypedDataField- EIP-712 typed dataCallsStatus/CallReceipt- ERC-5792 response typesPackedUserOperation- Packed UserOperation format utilitiesEip7702Authorization- EIP-7702 EOA code delegation authorizationAccountOwner/PrivateKeyOwner- Unified owner interface for all signing modes
Utilities
- Gas Estimation
totalGasLimitcalculationgetRequiredPrefundfor account funding- Gas multipliers for estimation buffers
- ERC-7579 - Modular account call encoding
encode7579Executefor single callsencode7579ExecuteBatchfor batch callsencodeInstallModule/encodeUninstallModuledecode7579Calls
- ABI Encoding - Solidity ABI encoding utilities
AbiEncoder.encodeAddressAbiEncoder.encodeUint256AbiEncoder.encodeBytes
- MultiSend - Safe batch transaction encoding
encodeMultiSendencodeMultiSendCall
- Message Hashing
hashMessage- EIP-191 personal message hashhashTypedData- EIP-712 typed data hash
- PackedUserOperation Utilities
packUserOperation/unpackUserOperationtoPackedUserOperation/fromPackedUserOperation
- ERC-20 Utilities
encodeApprove/encodeTransfer- Token operation encodingErc20Selectors- Function selector constantserc20BalanceOverride- Simulate token balanceserc20AllowanceOverride- Simulate token allowancesmergeStateOverrides- Combine multiple state overrides
- Units - Wei/Gwei/Ether conversions
parseEther/formatEtherparseGwei/formatGweiparseUnits/formatUnits
- Hex Utilities
Hex.concat/Hex.sliceHex.fromBigInt/Hex.toBigIntHex.fromBytes/Hex.decode
- Nonce Utilities
encodeNonce/decodeNonce- 2D nonce encoding
Examples
simple_example.dart- Simple account usagesafe_example.dart- Safe account with multi-sigsafe_7579_example.dart- Safe with ERC-7579 moduleskernel_example.dart- Kernel v0.3.1 (ERC-7579)kernel_v024_example.dart- Kernel v0.2.4 (EntryPoint v0.6)etherspot_example.dart- Etherspot modular accountlight_example.dart- Light account with version comparisonnexus_example.dart- Nexus (Biconomy) accountbiconomy_example.dart- Legacy Biconomy accountthirdweb_example.dart- Thirdweb accounttrust_example.dart- Trust Wallet Barz accounteip7702_simple_example.dart- EIP-7702 Simple account delegationeip7702_kernel_example.dart- EIP-7702 Kernel account delegationerc20_paymaster_example.dart- ERC-20 gas paymenterc7579_modules_example.dart- Module installation and management