Python tooling monorepo for the ICP.
| Package | PyPI | Description |
|---|---|---|
ton-devtools-auth-sdk |
Server-side TON Connect 2.0 proof verification | |
ton-devtools-pytest |
pytest plugin for declarative ICP integration testing | |
ton-devtools-rpc-mock |
Deterministic Toncenter API v2 emulator (TRMS) |
ton-devtools/
├── packages/
│ ├── ton-devtools-auth-sdk/ # PyPI: ton-devtools-auth-sdk
│ │ ├── ton_devtools_auth/
│ │ │ ├── models.py # Pydantic v2: TonProof, TonAccount
│ │ │ ├── nonce.py # NonceManager + storage backends
│ │ │ ├── crypto.py # TonAuthManager — ICP §5.2 ed25519 verify
│ │ │ ├── rpc.py # resolve_public_key — ICP §5.3
│ │ │ └── authenticator.py # ICPAuthenticator — full pipeline
│ │ └── pyproject.toml
│ │
│ ├── ton-devtools-pytest/ # PyPI: ton-devtools-pytest
│ │ ├── ton_devtools_pytest/
│ │ │ ├── plugin.py # pytest11 entry point
│ │ │ ├── fixtures.py # ICPHarness: create_mock_user, .client
│ │ │ ├── mock_provider.py # MockWallet (real ed25519), MockUser
│ │ │ └── asserts.py # assert_authenticated, assert_unauthorized
│ │ └── pyproject.toml
│ │
│ └── ton-devtools-rpc-mock/ # PyPI: ton-devtools-rpc-mock
│ ├── ton_devtools_rpc_mock/
│ │ ├── server.py # FastAPI app — Toncenter API v2 emulator
│ │ ├── __init__.py # public re-exports
│ │ └── __main__.py # CLI: ton-devtools-rpc-mock --port 8080 --control
│ ├── Dockerfile
│ └── pyproject.toml
│
└── pyproject.toml # root: ruff + mypy + pytest config
# Install all packages from source
pip install -e packages/ton-devtools-auth-sdk
pip install -e packages/ton-devtools-rpc-mock
pip install -e packages/ton-devtools-pytest
# Run all tests
pytest
# Start the mock server
ton-devtools-rpc-mock --port 8080 --controlTest framework
│
├─ ton-devtools-pytest create_mock_user(), icp_harness, icp_strict_mode
│ │
│ └─ ton-devtools-auth-sdk ICPAuthenticator, TonAuthManager, NonceManager
│ │
│ └─ ton-devtools-rpc-mock POST /jsonRPC (replaces live Toncenter node)
│
└─ ICP Core Service under test
MIT — see LICENSE in each package directory.