SmartWallet class

Implemented types

Constructors

SmartWallet({required Chain chain, required MultiSignerInterface signer, required BundlerProviderBase bundler, RPCProviderBase? jsonRpcProvider, EthereumAddress? address})
Entrypoint is not initialized to initialize with entrypoint, you have to call SmartWallet.init instead
SmartWallet.init({required Chain chain, required MultiSignerInterface signer, required BundlerProviderBase bundler, RPCProviderBase? jsonRpcProvider, EthereumAddress? address, String? initCode})
Initializes the SmartWallet instance and the associated Entrypoint contract.
factory

Properties

address EthereumAddress?
The Ethereum address associated with the Smart Wallet.
read-onlyoverride
balance Future<EtherAmount>
Retrieves the balance of the Smart Wallet.
read-onlyoverride
deployed Future<bool>
Checks if the Smart Wallet has been deployed on the blockchain.
read-onlyoverride
hashCode int
The hash code for this object.
read-onlyinherited
initCode String?
Retrieves the init code of the Smart Wallet.
read-onlyoverride
initCodeGas Future<BigInt>
Retrieves the gas required to deploy the Smart Wallet.
read-onlyoverride
nonce Future<Uint256>
Retrieves the nonce of the Smart Wallet.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
toHex String?
Converts the Smart Wallet address to its hexadecimal representation.
read-onlyoverride

Methods

activePlugins() List<String>
returns a list of all active plugins
inherited
addPlugin<T>(String name, T module) → void
adds a plugin by name
inherited
buildUserOperation({required Uint8List callData, BigInt? customNonce, BigInt? callGasLimit, BigInt? verificationGasLimit, BigInt? preVerificationGas, BigInt? maxFeePerGas, BigInt? maxPriorityFeePerGas}) UserOperation
Builds a UserOperation based on provided parameters.
override
createSimpleAccount(Uint256 salt, {int? index}) Future
Creates a new wallet address using counterfactual deployment.
override
createSimplePasskeyAccount(PassKeyPair pkp, Uint256 salt) Future
Creates a new Passkey wallet address using counterfactual deployment.
override
dangerouslySetInitCode(String? code) → void
manually Sets the init code of the Smart Wallet and overrides the default.
override
getSimpleAccountAddress(EthereumAddress signer, Uint256 salt) Future<EthereumAddress>
Retrieves the counterfactual address of a wallet created with createAccount.
override
getSimplePassKeyAccountAddress(PassKeyPair pkp, Uint256 salt) Future<EthereumAddress>
Retrieves the counterfactual address of a Passkey wallet created with createSimplePasskeyAccount.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
plugin<T>(String name) → T
gets a plugin by name
inherited
removePlugin(String name) → void
removes an unwanted plugin by name
inherited
send(EthereumAddress recipient, EtherAmount amount) Future<UserOperationResponse>
Transfers native tokens to another recipient.
override
sendBatchedTransaction(List<EthereumAddress> recipients, List<Uint8List> calls, {List<EtherAmount>? amounts}) Future<UserOperationResponse>
Sends a batched transaction to the wallet.
override
sendSignedUserOperation(UserOperation op) Future<UserOperationResponse>
Sends a signed user operation to the bundler.
override
sendTransaction(EthereumAddress to, Uint8List encodedFunctionData, {EtherAmount? amount}) Future<UserOperationResponse>
Sends a transaction to the wallet contract.
override
sendUserOperation(UserOperation op, {String? id}) Future<UserOperationResponse>
Signs and sends a user operation to the bundler.
override
signUserOperation(UserOperation userOp, {bool update = true, String? id, int? index}) Future<UserOperation>
Signs a user operation using the provided key.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited