Metadata-Version: 2.4
Name: foundry-client
Version: 3.0.0
Summary: Python client for FoundryNet — MINT Protocol work settlement on Solana
Home-page: https://github.com/FoundryNet/foundry_net_MINT
Author: FoundryNet
Author-email: foundrynet@proton.me
Project-URL: Homepage, https://foundrynet.io
Project-URL: API Docs, https://mint-relay-production.up.railway.app/docs
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Provides-Extra: solana
Requires-Dist: solders>=0.21.0; extra == "solana"
Requires-Dist: solana>=0.34.0; extra == "solana"
Requires-Dist: base58>=2.1.1; extra == "solana"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# foundry-client

Python client for [FoundryNet](https://foundrynet.io) — MINT Protocol work settlement on Solana.

## Installation
```bash
pip install foundry-client
```

## Relay API — recommended

No blockchain knowledge required.
```python
from foundry_client import RelayClient, create_account

# One-time: create account
account = create_account("Acme Robotics", "ops@acme.com")
# Save api_key — shown once only

client = RelayClient(api_key="mint_xxxxx")

# Register machines
machines = client.register(["ROBOT-001", "ROBOT-002"])

# Settle when job completes — add this to your existing job completion callback
receipt = client.settle("MINT-7f3a9b", duration_seconds=3600)
print(receipt["verify_url"])  # https://solscan.io/tx/...

# History and fleet
history = client.history("MINT-7f3a9b")
fleet = client.fleet()
```

## Direct Solana client
```bash
pip install foundry-client[solana]
```
```python
from foundry_client import FoundryClient

client = FoundryClient()
client.init()
client.register_machine()
job_hash = client.generate_job_hash("work-content")
client.record_job(job_hash, duration_seconds=3600)
```

## Links

- [Homepage](https://foundrynet.io)
- [API Docs](https://mint-relay-production.up.railway.app/docs)
- [GitHub](https://github.com/FoundryNet/foundry_net_MINT)
- [MINT Token](https://solscan.io/token/5Pd4YBgFdih88vAFGAEEsk2JpixrZDJpRynTWvqPy5da)
