Metadata-Version: 2.4
Name: tac-sdk
Version: 0.1.1
Summary: Python TAC SDK
License: MIT
License-File: LICENSE
Keywords: tac,ton,evm,bridge,sdk
Requires-Python: >=3.11,<4
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Requires-Dist: eth-account (>=0.13,<0.14)
Requires-Dist: pycryptodomex (>=3.20,<4.0)
Requires-Dist: python-dotenv (>=1.0,<2.0)
Requires-Dist: pytoniq (>=0.1.39,<0.2.0)
Requires-Dist: pytoniq-core (>=0.1.39,<0.2.0)
Requires-Dist: requests (>=2.31,<3.0)
Requires-Dist: setuptools (>=68)
Requires-Dist: web3 (>=7.14,<8.0)
Project-URL: Homepage, https://github.com/TacBuild/python-tac-sdk
Project-URL: Issues, https://github.com/TacBuild/python-tac-sdk/issues
Project-URL: Repository, https://github.com/TacBuild/python-tac-sdk
Description-Content-Type: text/markdown

# TAC SDK (Python)

Python SDK for TON <-> TAC cross-chain operations.
Repository: https://github.com/TacBuild/python-tac-sdk

## ETH <-> TON Bridge Helpers

See the dedicated helper docs: [helpers/README.md](helpers/README.md)

## Installation

```bash
pip install tac-sdk
```

## Prerequisities

1) Create `.env` out of `.env.example` and populate it with necessary data;
2) Fund your TAC wallet (the one which corresponds to EVM_PRIVATE_KEY) on the TAC chain with WTAC to pay fees. 
You can use https://bridge.tac.build/;
Addresses on TAC and ETH chains are equal for the same EVM_PRIVATE_KEY.
3) Go to WTAC address `https://explorer.tac.build/token/0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9` and connect your wallet EVM_PRIVATE_KEY.
Navigate to Contract > Read/Write contract > Write > approve.
Set spender to be composer address (currently `0xC1313fD7ca98a85E8a0A3398739801f6653d456b`) and your value. 
As of Feb 2026 bridge tx on TAC chain costs ~120-150 WTAC.
If you happen to reach allowance limit, your bridge txs start to fail. You can increase allowance with higher value;
4) For cbBTC. Go to `https://etherscan.io/token/0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf` and connect your wallet EVM_PRIVATE_KEY.
Navigate to Contract > Write as Proxy.
Set spender to be cbBTC OFT adapter on ETH chain (`0x59Ea2825d8Ad7D60cC6Aa77FFbDD0E89c0fBF539`) and the value of cbBTC you expect to bridge in upcoming future;
5) For WETH. Go to `https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` and connect your wallet EVM_PRIVATE_KEY.
Navigate to Contract > Write as Proxy.
Set spender to be WETH OFT adapter on ETH chain (`0xf211D3B40A74632162F45F4d42A461b663694a9D`) and the value of WETH you expect to bridge in upcoming future. 


## Quick start

```python
import asyncio
from sdk.tac_sdk import TacSdk
from structs.struct import Network, SDKParams


async def main() -> None:
    sdk = await TacSdk.create(SDKParams(network=Network.TESTNET))
    token = await sdk.getFT("EQBLi0v_y-KiLlT1VzQJmmMbaoZnLcMAHrIEmzur13dwOmM1")
    print(token.address)


asyncio.run(main())
```

