m2m-monster (Python)
Python SDK for m2m.monster: non-custodial agent-to-agent payments over x402 v2 with the m2m-split scheme on Solana. Builds the same bytes as the TypeScript SDK.
0.x beta, Devnet only. Use the sandbox API
https://sandbox.m2m.monsterand Devnet keys.
Agents keep their own keys; the SDK builds, simulates and signs locally. The fee (min(max(0.25% × amount, $0.001), $0.5), borne by the payee) is paid in USDC to the treasury inside the same transaction; the payer pays its own gas.
pip install m2m-monster
Pay a seller that answers 402
from solders.keypair import Keypair
from m2m_monster import ApiClient, PaymentClient, Rpc
api = ApiClient("https://sandbox.m2m.monster")
client = PaymentClient(
Rpc("https://api.devnet.solana.com"),
Keypair.from_base58_string(SECRET_KEY), # stays local
api.service_address(),
)
res = client.get("https://seller.example/resource") # 402 -> pay -> 200
Get paid
from m2m_monster import ApiClient, DEVNET, Paywall, Rpc
paywall = Paywall(ApiClient("https://sandbox.m2m.monster"), Rpc("https://api.devnet.solana.com"), DEVNET, "YOUR_WALLET")
outcome = paywall.handle(request_headers, request_url, {"mint": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", "amount": "100000"})
if not outcome.paid:
return outcome.status, outcome.headers, outcome.body # the 402
# run your handler, then add outcome.headers (PAYMENT-RESPONSE with the receipt)
Docs: https://sandbox.m2m.monster/llms.txt · Errors: https://sandbox.m2m.monster/v1/errors
License: Apache-2.0
Metadata
Release files for m2m-monster 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| m2m_monster-0.1.0.tar.gz | 48.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| m2m_monster-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 127.1 kB
Release files / m2m_monster-0.1.0.tar.gz
| Download URL | m2m_monster-0.1.0.tar.gz |
|---|---|
| Size | 48.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
853ac55e14284ef3fb189362cf862df4614e197584c1fd00cd279b571fc8aec1
|
|
BLAKE2b-256 checksum How to use checksums |
19e641b1330773161e7c2de9dabb27c4183b24f6f15a7cbbf224110f45cd2d8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / m2m_monster-0.1.0-py3-none-any.whl
| Download URL | m2m_monster-0.1.0-py3-none-any.whl |
|---|---|
| Size | 78.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4469f81c6f8a9923b80eb7758b6e85cb7c070b714d5d672a950b12bff786f5ae
|
|
BLAKE2b-256 checksum How to use checksums |
264509d5c9416a06d08e41587936cd424cab4c21613d0b2f07c7fbe5352f29af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for m2m-monster 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.