chore: update file permissions to executable across repository

- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
This commit is contained in:
oib
2026-03-06 22:17:54 +01:00
parent bb5363bebc
commit 15427c96c0
1794 changed files with 43849 additions and 530 deletions

30
cli/aitbc_cli/commands/marketplace.py Normal file → Executable file
View File

@@ -51,7 +51,7 @@ def register(ctx, name: str, memory: Optional[int], cuda_cores: Optional[int],
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/gpu/register",
f"{config.coordinator_url}/v1/marketplace/gpu/register",
headers={
"Content-Type": "application/json",
"X-Api-Key": config.api_key or "",
@@ -96,7 +96,7 @@ def list(ctx, available: bool, model: Optional[str], memory_min: Optional[int],
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/gpu/list",
f"{config.coordinator_url}/v1/marketplace/gpu/list",
params=params,
headers={"X-Api-Key": config.api_key or ""}
)
@@ -120,7 +120,7 @@ def details(ctx, gpu_id: str):
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/gpu/{gpu_id}",
f"{config.coordinator_url}/v1/marketplace/gpu/{gpu_id}",
headers={"X-Api-Key": config.api_key or ""}
)
@@ -152,7 +152,7 @@ def book(ctx, gpu_id: str, hours: float, job_id: Optional[str]):
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/gpu/{gpu_id}/book",
f"{config.coordinator_url}/v1/marketplace/gpu/{gpu_id}/book",
headers={
"Content-Type": "application/json",
"X-Api-Key": config.api_key or ""
@@ -180,7 +180,7 @@ def release(ctx, gpu_id: str):
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/gpu/{gpu_id}/release",
f"{config.coordinator_url}/v1/marketplace/gpu/{gpu_id}/release",
headers={"X-Api-Key": config.api_key or ""}
)
@@ -208,7 +208,7 @@ def orders(ctx, status: Optional[str], limit: int):
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/orders",
f"{config.coordinator_url}/v1/marketplace/orders",
params=params,
headers={"X-Api-Key": config.api_key or ""}
)
@@ -232,7 +232,7 @@ def pricing(ctx, model: str):
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/pricing/{model}",
f"{config.coordinator_url}/v1/marketplace/pricing/{model}",
headers={"X-Api-Key": config.api_key or ""}
)
@@ -256,7 +256,7 @@ def reviews(ctx, gpu_id: str, limit: int):
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/gpu/{gpu_id}/reviews",
f"{config.coordinator_url}/v1/marketplace/gpu/{gpu_id}/reviews",
params={"limit": limit},
headers={"X-Api-Key": config.api_key or ""}
)
@@ -291,7 +291,7 @@ def review(ctx, gpu_id: str, rating: int, comment: Optional[str]):
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/gpu/{gpu_id}/reviews",
f"{config.coordinator_url}/v1/marketplace/gpu/{gpu_id}/reviews",
headers={
"Content-Type": "application/json",
"X-Api-Key": config.api_key or ""
@@ -344,7 +344,7 @@ def submit(ctx, provider: str, capacity: int, price: float, notes: Optional[str]
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/bids",
f"{config.coordinator_url}/v1/marketplace/bids",
headers={
"Content-Type": "application/json",
"X-Api-Key": config.api_key or ""
@@ -383,7 +383,7 @@ def list(ctx, status: Optional[str], provider: Optional[str], limit: int):
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/bids",
f"{config.coordinator_url}/v1/marketplace/bids",
params=params,
headers={"X-Api-Key": config.api_key or ""}
)
@@ -450,7 +450,7 @@ def create(ctx, gpu_id: str, price_per_hour: float, min_hours: float,
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/offers",
f"{config.coordinator_url}/v1/marketplace/offers",
headers={
"Content-Type": "application/json",
"X-Api-Key": config.api_key or ""
@@ -499,7 +499,7 @@ def list(ctx, status: Optional[str], gpu_model: Optional[str], price_max: Option
try:
with httpx.Client() as client:
response = client.get(
f"{config.coordinator_url}/api/v1/marketplace/offers",
f"{config.coordinator_url}/v1/marketplace/offers",
params=params,
headers={"X-Api-Key": config.api_key or ""}
)
@@ -622,7 +622,7 @@ def list_resource(ctx, resource_id: str, resource_type: str, compute_power: floa
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/list",
f"{config.coordinator_url}/v1/marketplace/list",
json=resource_data,
headers={"X-Api-Key": config.api_key or ""}
)
@@ -661,7 +661,7 @@ def rent(ctx, resource_id: str, consumer_id: str, duration: int, max_price: Opti
try:
with httpx.Client() as client:
response = client.post(
f"{config.coordinator_url}/api/v1/marketplace/rent",
f"{config.coordinator_url}/v1/marketplace/rent",
json=rental_data,
headers={"X-Api-Key": config.api_key or ""}
)