Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Overview

Purse: Personalize your Wallet

Design

Purse is a (very) simple smart wallet for EOAs, using EIP-7702 for core functionality. Purse only works for EOAs since it uses the SetCode transactions on supported neworks to install and uninstall it.

Out of the box, Purse has no features other than controlling a set of "accessories" that it can install (and uninstall) at will. Through the accessories, Purse can expand it's capabilities, such as adding multicall support and enabling automation through 3rd party delegation services. The only invariant in Purse is that only the EOA can add or remove accessories by directly calling these methods to itself, which means it only works in a EIP-7702 context via EOA delegatecall.

Purse calls its accessories through the fallback method (__default__ method in Vyper), where the method ID of the calldata is used to load the target address. It will then forward the entire calldata to that previously-approved target as it gets called via DELEGATECALL. How the accessory chooses to handle the calldata is up to them, the rest of the calldata is simply passed through to it. Also note that beyond restrictions of how accessories can be added or removed, there are no invariants maintained through 3rd party accessories unless they implement those measures themsleves.

If any accessory call has a failure, Purse's call handling will raise it and not continue processing the transaction. This presents a nicer interface when debugging call failures without dealing with nonce management features. Therefore, if you need replay protection, your accessory should implement it for itself.

Additionally, since all accessory calls are executed using DELEGATECALL, technically all accessories use the shared storage space: your EOA account. It is highly recommended not to use stateful accessories without further security analysis of their interactions with other accessories, but stateful accessories are possible. If designing a stateful accessory, it is highly recommended to manage the entire storage lifecycle, as well to make use of storage namespacing to ensure that no conflicts will exist between accessories (unless desired). Purse makes no guarantees about storage namespacing, and it is potentially highly dangerous and could lead to total account compromise if implemented poorly, since this also potentially allows eliding Purse's own security invariants for accessory management.

Technically, Purse can probably work with Threshold Signature or MPC technology, but it is not advised at this time without a security review. In fact, using Purse at all is probably not advised as it is an un-audited experiment based on a half-baked idea I had from seeing 7702 in the wild.


Purse is inspired by The Diamond Standard and ds-proxy.

Contributing

This project is written in Vyper.

This project uses ape to compile, test and script it. See Installation Guide for help installing it.

Metadata

Release files for purse-py 0.0.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for purse-py 0.0.1a0
File Size Uploaded
purse_py-0.0.1a0.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for purse-py 0.0.1a0
File Interpreter ABI Platform
purse_py-0.0.1a0-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / purse_py-0.0.1a0.tar.gz

Download URL purse_py-0.0.1a0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8dadb387635aaade21637db6059a872aa0f9e0a0fc89b99ac0b6de89f82bbaf8
BLAKE2b-256 checksum
How to use checksums
98a22d985461b0cc21ca15607ebc8b85fd9627c24137e3a8f725580c4c2a311a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / purse_py-0.0.1a0-py3-none-any.whl

Download URL purse_py-0.0.1a0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
484436e186853a853d91cc0fa00f058d45c7cb0ed48f429363cbf15970d5b6e0
BLAKE2b-256 checksum
How to use checksums
832858d35829916b956307b155d82609dd38005d88234c9ae379414ec32c6494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.1a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page