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. Python release: 0.1.0. The public installation guide and downloadable wheel are at https://evidence.contact/python-wallet.md.

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.0

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.0
File Size Uploaded Provenance Actions
402mob_agent_wallet-0.1.0.tar.gz 9.1 kB Without provenance Details for 402mob_agent_wallet-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 17.0 kB

Release files / 402mob_agent_wallet-0.1.0.tar.gz

Download URL 402mob_agent_wallet-0.1.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c5f1c6d1b33099b3bd059ecac6171306fd5b8678a9a77a66242b94e7a336bbbb
BLAKE2b-256 checksum
How to use checksums
81120eca739bbde86228d4032c8764218234adc4dcf81b12472cb299806ffcb2
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.0-py3-none-any.whl

Download URL 402mob_agent_wallet-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed2440b0e6d8e8dde56dc9b9814152c8774b7d9854ef9b23822f606bed25f5a8
BLAKE2b-256 checksum
How to use checksums
8f5ed540e87e74c343eeda1718c7af3861082a2b61148dd8097a4fbaba2004e4
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.0

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