Skip to main content

Python client for FoundryNet — MINT Protocol work settlement on Solana

Project description

foundry-client

Python client for FoundryNet — MINT Protocol work settlement on Solana.

Installation

pip install foundry-client

Relay API — recommended

No blockchain knowledge required.

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

pip install foundry-client[solana]
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foundry_client-3.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foundry_client-3.0.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file foundry_client-3.0.0.tar.gz.

File metadata

  • Download URL: foundry_client-3.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for foundry_client-3.0.0.tar.gz
Algorithm Hash digest
SHA256 9c29fa081d9b884082c99187748ddfb3ff0dac984002612aba0e178008427c45
MD5 a5d7ec254b910b63a2a9ec586f89aa64
BLAKE2b-256 3a9688fd53f76dd971756c87348ab3c69c6cefeedaa8b39b7ebf1e0700737b5c

See more details on using hashes here.

File details

Details for the file foundry_client-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: foundry_client-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for foundry_client-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de065dd56434a0988e72faf612918c2b9d378bafd34c47b15eb1833dd1c88880
MD5 4ea9b63f9e7209ff28f98216fe17a731
BLAKE2b-256 1b1990b977ceecd87423606abbd3a0bc7d13f74133264a1477e2467cefa82d26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page