Repository navigation
Covenant Compute x402 Python v0.3.0
Version 0.3.0 of the Covenant Compute x402 Python SDK supports the shorter payment memo that the gateway now includes in its quotes. The shorter memo lets any standard x402 wallet pay for inference.
Each quote now carries a 32-character memo instead of a 118-character one. The memo is the first 16 bytes of a SHA-256 hash over the quote ID and the hash of the request, so each payment is still bound to one quote and one request. A payment with the short memo uses about 13,000 Solana compute units, which fits within the 20,000-compute-unit limit that the official x402 Solana client always sets, so any standard x402 wallet can pay a Covenant quote without changes. The SDK now builds and signs the same transaction that the official client builds. If a quote also offers payment on another network, the SDK pays the Solana offer and ignores the others.
Upgrade before your next purchase. Python SDK 0.2.0 and earlier can no longer buy from the gateway, because they reject quotes that carry the short memo. They reject them before signing anything, so no funds are spent.
curl -LO https://github.com/open-covenant/covenant/releases/download/compute-x402-python-v0.3.0/covenant_compute_x402-0.3.0-py3-none-any.whl
curl -LO https://github.com/open-covenant/covenant/releases/download/compute-x402-python-v0.3.0/SHA256SUMS
shasum -a 256 -c --ignore-missing SHA256SUMS
python -m pip install ./covenant_compute_x402-0.3.0-py3-none-any.whlThis release was built from commit 5fefb03, which contains both the SDK and the gateway. The production gateway reports that commit at https://compute-inference.opencovenant.org/health and runs container image sha256:46ca0855638eed85472dc2691d7e5aab3deb9c9087dadb1e061fe2eb04094460.
We checked the release on Solana mainnet against the production gateway with three purchases of 0.014304 USDC each, each for one inference request of up to 256 output tokens: one from the unmodified official x402 client, one from this SDK and one from the JavaScript SDK 0.4.0. Each payment used 13,180 Solana compute units, and the inference result came back in the response to the paid request, so the client did not need to poll. Each result came with a receipt signed by the compute operator that ran the job, and both SDKs verified that signature. The transaction signatures and job details are in covenant-x402-short-memo-mainnet-acceptance.json, attached to this release.