refactor: split into typescript/ + python/ monorepo, add Python sibling package#12
Merged
acedatacloud-dev merged 1 commit intomainfrom Apr 19, 2026
Merged
Conversation
…ibling
Mirrors the AceDataCloud/SDK layout so the x402 plugin has feature
parity across TS and Python.
Structure:
typescript/ @acedatacloud/x402-client (moved, build and scripts intact)
python/ acedatacloud-x402 (new, PyPI-ready)
Python package:
- src/acedatacloud_x402/{handler.py, types.py, signing/{evm.py,solana.py}}
- create_x402_payment_handler() returns a callable compatible with
acedatacloud.AceDataCloud(payment_handler=...) (sync and async)
- EVMAccountSigner wraps eth_account.Account (no web3.py dep)
- SolanaKeypairSigner wraps solders.Keypair (no solana-py dep)
- ships its own SPL TransferChecked builder + httpx JSON-RPC client,
mirroring the TS reference implementation
- hatchling build, pytest-asyncio, ruff (check + format) — all green
CI:
- .github/workflows/ci.yml: two jobs (typescript build, python 3.10/3.11/3.12
lint + test) with working-directory set per-job
- .github/workflows/publish.yml: scoped to typescript/, unchanged CalVer logic
- .github/workflows/publish-pypi.yml (new): CalVer-versioned PyPI publish
mirroring publish.yml; uses Trusted Publishing via pypa/gh-action-pypi-publish
Docs: root README is a monorepo landing page linking to typescript/ and
python/; language-specific READMEs live in the subfolders.
Verified locally:
cd typescript && npm run build → OK
cd python && ruff check . && ruff format --check . && pytest -q → 7 passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Feature parity with @acedatacloud/sdk, which ships both a TypeScript and
a Python package. The x402 plugin should have the same coverage.
What
Split this repo into a monorepo:
Python package
src/acedatacloud_x402/handler.py—create_x402_payment_handler(network=..., evm_signer=..., solana_signer=...)returns a callable the SDK invokes on 402.types.py— TypedDicts mirroringtypescript/src/types.ts.signing/evm.py— EIP-3009TransferWithAuthorizationviaeth_account(no web3.py dep).signing/solana.py— SPLTransferCheckedbuilder +httpxJSON-RPC client (no solana-py dep, justsolders).acedatacloud.AceDataCloud(payment_handler=...)andAsyncAceDataCloud.hatchlingbuild,pytest-asyncio,ruff(check + format).CI
ci.yml: two jobs — TypeScript build, Python 3.10/3.11/3.12 lint+test — each with its ownworking-directory.publish.yml: scoped totypescript/(CalVerYYYY.M.D[.N]→ npm), unchanged logic.publish-pypi.yml(new): CalVerYYYY.M.D[.N]→ PyPI via pypa trusted publishing.Verified locally
cd typescript && npm run buildcd python && ruff check .cd python && ruff format --check .cd python && pytest -qFollow-ups (not in this PR)