Observed since 20 Oct, 17:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
abstract-wallet
A software development kit for creating and managing ERC-4337 smart contract accounts on ethereum and ethereum layer-2 blockchains.
A software development kit for creating and managing ERC-4337 smart contract accounts on ethereum and ethereum layer-2 blockchains.
pip install abstract_wallet
from abstract_wallet import AbstractWallet
seed_phrase = AbstractWallet.get_random_seed_phrase()
wallet = AbstractWallet(seed_phrase, {
"provider": "https://eth-mainnet.g.alchemy.com/v2/<YOUR API-KEY>",
"url": "https://api.pimlico.io/v2/1/rpc?apikey=<YOUR API-KEY>",
"entry_point": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"factory": "0x9406Cc6185a346906296840746125a0E44976454"
})
account = wallet.get_account(0)
print(f"Address: {account.address}")
print(f"Balance: {account.get_balance()} wei")
The BundlerConfig dictionary accepts the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
provider | str | Yes | URL of a JSON-RPC provider (e.g. Alchemy, Infura). |
url | str | Yes | URL of the ERC-4337 bundler (e.g. Pimlico, Stackup). |
entry_point | str | Yes | Address of the EntryPoint contract. |
factory | str | Yes | Address of a SimpleAccountFactory contract. |
paymaster | str | No | Address of a paymaster contract to sponsor operations. |
paymaster_data | bytes | No | Data to pass to the paymaster. |
hash = account.send_user_operation({
"to": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"value": 0,
"data": b"..." # Encoded calldata
})
print(f"User operation hash: {hash}")
receipt = account.get_user_operation_receipt(hash)
The SDK implements the BIP-44 account discovery algorithm, scanning derivation paths until it finds a gap of 20 unused addresses:
accounts = wallet.get_accounts()
for path, account in accounts.items():
print(f"{path} -> {account.address}")
See the examples/ directory for complete, runnable scripts.
Full API documentation is available in the docs/ directory. Open docs/index.html in your browser to browse it.
MIT - see LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
ecdsaEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | ecdsa>=0.19.2 | runtime |
eth-utilsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | eth-utils>=6.0.0 | runtime |
eth_abiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | eth_abi>=5.2.0 | runtime |
eth-accountEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | eth-account>=0.13.7 | runtime |
pyhumpsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | pyhumps>=3.8.0 | runtime |
requestsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | requests>=2.33.1 | runtime |
safe-pysha3Environment{
"extras": "",
"marker": null,
"requires_python": ">=3.13",
"evaluation": "NOT_EVALUATED"
} | safe-pysha3>=1.0.5 | runtime |
bdist_wheel · 20.9 KB · Python py3
sdist · 19.5 KB · Python source
Observed since 20 Oct, 17:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:5bcda53723e006ce4ecfdabe51d00135750d650de982aebc4a80cd470463f7f2