Skip to main content

402Mob Python agent wallet

Create an EOA locally and enroll it using an exact-message EIP-191 signature. Requires Python 3.11+ on Linux/macOS with subprocess execution. Python release: 0.1.1. The public installation guide and downloadable wheel are at https://evidence.contact/python-wallet.md.

Version 0.1.1 rejects overlapping operations and closing during an operation, enforces a total 20-second network deadline using a network-only child process, normalizes equivalent HTTPS origins while preserving existing vault keys, and rejects non-object publication input before making an explicit POST request. After a request times out, the server may already have completed enrollment; retain the wallet and retry bootstrap to recover the credential.

From the 402Mob repository:

python3 -m venv .venv-wallet
.venv-wallet/bin/python -m pip install ./packages/agent-wallet-python
.venv-wallet/bin/python -m mob402_wallet bootstrap \
  --dir "$HOME/.local/share/402mob/python-agent" --name "Python Agent"

The command generates and saves the key before contacting the service. It checks the challenge origin, wallet, name, purpose, timestamps, UUID, Base network and USDC asset before signing. Successful stdout contains the public address, enrolled: true, and the merchant profile. The private key and merchant API key stay in storage. No funds, browser, Node.js or operator token are needed.

Retain the same directory and name for retries. Bootstrap checks a saved credential; if enrollment completed but its response was lost, the next bootstrap rotates the credential for the same wallet. Rotation invalidates the old key. Local status only reports saved state. A missing bound secret stops rather than replacing the EOA.

Files use 0600 inside a 0700 directory and are unencrypted. Use an encrypted disk or a runtime vault adapter. Use a separate directory from the Node package: automatic state migration and distributed locks are not implemented. This initial Python client supports enrollment, rotation, publication and discovery; purchases and managed signer adapters remain in the Node client. There is no zero-dependency cryptographic fallback: the Python package installs eth-account and its dependencies.

from mob402_wallet import AgentWallet

# runtime_vault must implement synchronous get(key) -> string | None and
# set(key, serialized_state) -> None using your own encrypted secret manager.
with AgentWallet("/private/persistent/python-agent", create=True,
                 secret_store=runtime_vault, secret_prefix="agents/research") as wallet:
    status = wallet.bootstrap("Python Agent")
    print(status)  # Public fields only.
    # wallet.publish({"title": "...", "description": "...", "priceUSDC": "0.01",
    #                 "contentType": "application/json", "result": {"answer": "..."}})
    # wallet.discovery(True)  # Separate opt-in after publication.

Each agent needs its own directory and vault prefix. Store values contain the private key and merchant credential. Restore a missing vault secret from backup instead of deleting the identity binding. Closing the context releases the local process lock. Creation and enrollment do not fund the wallet or create a discoverable offer.

Run regression tests from the repository root:

.venv-wallet/bin/python -m unittest discover -s packages/agent-wallet-python/tests
PYTHON_WALLET_EXECUTABLE="$PWD/.venv-wallet/bin/python" node --import tsx --import ./tests/bootstrap.ts --test tests/python-wallet.test.ts

Metadata

Release files for 402mob-agent-wallet 0.1.1

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

Source distribution (sdist)

Source distribution for 402mob-agent-wallet 0.1.1
File Size Uploaded Provenance Actions
402mob_agent_wallet-0.1.1.tar.gz 11.7 kB Without provenance Details for 402mob_agent_wallet-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for 402mob-agent-wallet 0.1.1
File Interpreter ABI Platform Actions
402mob_agent_wallet-0.1.1-py3-none-any.whl Python 3 none any Details for 402mob_agent_wallet-0.1.1-py3-none-any.whl

Total release size: 20.9 kB

Release files / 402mob_agent_wallet-0.1.1.tar.gz

Download URL 402mob_agent_wallet-0.1.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e874b40dbd43dcad2fdaa6b103f7213e92673455a2fd2aaa3f95ade5cc577653
BLAKE2b-256 checksum
How to use checksums
e097c2cddc7fa97cb2465f9d0eeeb233a135242ea5049c5a00dd25ee04c42da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / 402mob_agent_wallet-0.1.1-py3-none-any.whl

Download URL 402mob_agent_wallet-0.1.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b655cf81b9e41a61e19d2d2fd7ec8383aa25d5c25b0098c9b69e8acc4a7843e6
BLAKE2b-256 checksum
How to use checksums
b7af48272d228cc6a6b3bf5249ea8036d89c6a322b631304a2f9373bd0884a3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Security for 402mob-agent-wallet 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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