mech-client 0.15.3__tar.gz → 0.15.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mech_client-0.15.3 → mech_client-0.15.4}/PKG-INFO +1 -2
- {mech_client-0.15.3 → mech_client-0.15.4}/README.md +0 -1
- mech_client-0.15.4/mech_client/__init__.py +3 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/cli.py +301 -53
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/interact.py +1 -1
- {mech_client-0.15.3 → mech_client-0.15.4}/pyproject.toml +1 -1
- mech_client-0.15.3/mech_client/__init__.py +0 -3
- {mech_client-0.15.3 → mech_client-0.15.4}/LICENSE +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/AgentMech.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/AgentRegistry.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/AgreementStoreManager.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/AgreementStoreManager.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerFixedPriceNative.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerFixedPriceToken.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerNvmSubscriptionToken.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/ComplementaryServiceMetadata.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/DIDRegistry.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/DIDRegistry.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/EscrowPaymentCondition.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/EscrowPaymentCondition.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/IERC1155.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/IMech.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/IToken.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/LockPaymentCondition.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/LockPaymentCondition.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/MechMarketplace.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/NFTSalesTemplate.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/NFTSalesTemplate.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/NeverminedConfig.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/NeverminedConfig.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/SubscriptionNFT.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/SubscriptionNFT.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/SubscriptionProvider.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/SubscriptionProvider.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/SubscriptionToken.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/TransferNFTCondition.base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/TransferNFTCondition.gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/acn.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/config/mech_client_base.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/config/mech_client_gnosis.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/config/mech_client_polygon.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/configs/mechs.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/delivery.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/fetch_ipfs_hash.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/helpers/__init__.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/marketplace_interact.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/mech_marketplace_subgraph.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/mech_marketplace_tool_management.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/mech_tool_management.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/prompt_to_ipfs.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/push_to_ipfs.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/safe.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/subgraph.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/to_png.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/mech_client/wss.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/__init__.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/benchmark.sh +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/bump.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/deposit_native.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/deposit_token.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscribe.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/agreement_manager.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/base_contract.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/did_registry.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/escrow_payment.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/lock_payment.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/nft.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/nft_sales.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/subscription_provider.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/token.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/transfer_nft.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/envs/base.env +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/envs/gnosis.env +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/manager.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/resources/networks.json +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/utils.py +0 -0
- {mech_client-0.15.3 → mech_client-0.15.4}/scripts/whitelist.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mech-client
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.4
|
|
4
4
|
Summary: Basic client to interact with a mech
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: David Minarsch
|
|
@@ -544,7 +544,6 @@ MECHX_GAS_LIMIT
|
|
|
544
544
|
MECHX_TRANSACTION_URL
|
|
545
545
|
MECHX_SUBGRAPH_URL
|
|
546
546
|
|
|
547
|
-
MECHX_LEDGER_ADDRESS
|
|
548
547
|
MECHX_LEDGER_CHAIN_ID
|
|
549
548
|
MECHX_LEDGER_POA_CHAIN
|
|
550
549
|
MECHX_LEDGER_DEFAULT_GAS_PRICE_STRATEGY
|
|
@@ -25,6 +25,7 @@ from pathlib import Path
|
|
|
25
25
|
from typing import Any, Dict, List, Optional, Tuple
|
|
26
26
|
|
|
27
27
|
import click
|
|
28
|
+
import requests
|
|
28
29
|
from click import ClickException
|
|
29
30
|
from dotenv import load_dotenv, set_key
|
|
30
31
|
from operate.cli import OperateApp
|
|
@@ -243,12 +244,33 @@ def setup_agent_mode(
|
|
|
243
244
|
].configure_local_config = mech_client_configure_local_config # type: ignore
|
|
244
245
|
|
|
245
246
|
print(f"Setting up agent mode using config at {template}...")
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
try:
|
|
248
|
+
run_service(
|
|
249
|
+
operate=operate,
|
|
250
|
+
config_path=template,
|
|
251
|
+
build_only=True,
|
|
252
|
+
skip_dependency_check=False,
|
|
253
|
+
)
|
|
254
|
+
except requests.exceptions.HTTPError as e:
|
|
255
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
256
|
+
raise ClickException(
|
|
257
|
+
f"RPC endpoint error: {e}\n\n"
|
|
258
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
259
|
+
f"Possible solutions:\n"
|
|
260
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
261
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
262
|
+
f" 3. Check your network connection"
|
|
263
|
+
) from e
|
|
264
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
265
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
266
|
+
raise ClickException(
|
|
267
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
268
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
269
|
+
f"Possible solutions:\n"
|
|
270
|
+
f" 1. Check your internet connection\n"
|
|
271
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
272
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
273
|
+
) from e
|
|
252
274
|
|
|
253
275
|
|
|
254
276
|
@click.command()
|
|
@@ -423,6 +445,26 @@ def interact( # pylint: disable=too-many-arguments,too-many-locals
|
|
|
423
445
|
sleep=sleep,
|
|
424
446
|
chain_config=chain_config,
|
|
425
447
|
)
|
|
448
|
+
except requests.exceptions.HTTPError as e:
|
|
449
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
450
|
+
raise ClickException(
|
|
451
|
+
f"RPC endpoint error: {e}\n\n"
|
|
452
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
453
|
+
f"Possible solutions:\n"
|
|
454
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
455
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
456
|
+
f" 3. Check your network connection"
|
|
457
|
+
) from e
|
|
458
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
459
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
460
|
+
raise ClickException(
|
|
461
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
462
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
463
|
+
f"Possible solutions:\n"
|
|
464
|
+
f" 1. Check your internet connection\n"
|
|
465
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
466
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
467
|
+
) from e
|
|
426
468
|
except (ValueError, FileNotFoundError, Exception) as e:
|
|
427
469
|
raise ClickException(str(e)) from e
|
|
428
470
|
|
|
@@ -500,6 +542,26 @@ def tools_for_agents(agent_id: Optional[int], chain_config: str) -> None:
|
|
|
500
542
|
]
|
|
501
543
|
|
|
502
544
|
click.echo(tabulate(data, headers=headers, tablefmt="grid"))
|
|
545
|
+
except requests.exceptions.HTTPError as e:
|
|
546
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
547
|
+
raise ClickException(
|
|
548
|
+
f"RPC endpoint error: {e}\n\n"
|
|
549
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
550
|
+
f"Possible solutions:\n"
|
|
551
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
552
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
553
|
+
f" 3. Check your network connection"
|
|
554
|
+
) from e
|
|
555
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
556
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
557
|
+
raise ClickException(
|
|
558
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
559
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
560
|
+
f"Possible solutions:\n"
|
|
561
|
+
f" 1. Check your internet connection\n"
|
|
562
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
563
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
564
|
+
) from e
|
|
503
565
|
except (KeyError, TypeError) as e:
|
|
504
566
|
click.echo(f"Error processing tool data: {str(e)}")
|
|
505
567
|
except json.JSONDecodeError as e:
|
|
@@ -516,6 +578,26 @@ def tool_description(tool_id: str, chain_config: str) -> None:
|
|
|
516
578
|
try:
|
|
517
579
|
description = get_tool_description(tool_id, chain_config)
|
|
518
580
|
click.echo(f"Description for tool {tool_id}: {description}")
|
|
581
|
+
except requests.exceptions.HTTPError as e:
|
|
582
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
583
|
+
raise ClickException(
|
|
584
|
+
f"RPC endpoint error: {e}\n\n"
|
|
585
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
586
|
+
f"Possible solutions:\n"
|
|
587
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
588
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
589
|
+
f" 3. Check your network connection"
|
|
590
|
+
) from e
|
|
591
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
592
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
593
|
+
raise ClickException(
|
|
594
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
595
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
596
|
+
f"Possible solutions:\n"
|
|
597
|
+
f" 1. Check your internet connection\n"
|
|
598
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
599
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
600
|
+
) from e
|
|
519
601
|
except KeyError as e:
|
|
520
602
|
click.echo(f"Tool not found or missing description: {str(e)}")
|
|
521
603
|
except json.JSONDecodeError as e:
|
|
@@ -566,6 +648,26 @@ def tool_io_schema(tool_id: str, chain_config: str) -> None:
|
|
|
566
648
|
output_schema, headers=["Field", "Type", "Description"], tablefmt="grid"
|
|
567
649
|
)
|
|
568
650
|
)
|
|
651
|
+
except requests.exceptions.HTTPError as e:
|
|
652
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
653
|
+
raise ClickException(
|
|
654
|
+
f"RPC endpoint error: {e}\n\n"
|
|
655
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
656
|
+
f"Possible solutions:\n"
|
|
657
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
658
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
659
|
+
f" 3. Check your network connection"
|
|
660
|
+
) from e
|
|
661
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
662
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
663
|
+
raise ClickException(
|
|
664
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
665
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
666
|
+
f"Possible solutions:\n"
|
|
667
|
+
f" 1. Check your internet connection\n"
|
|
668
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
669
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
670
|
+
) from e
|
|
569
671
|
except KeyError as e:
|
|
570
672
|
click.echo(f"Error accessing schema data: {str(e)}")
|
|
571
673
|
except json.JSONDecodeError as e:
|
|
@@ -596,6 +698,26 @@ def tools_for_marketplace_mech(service_id: int, chain_config: str) -> None:
|
|
|
596
698
|
|
|
597
699
|
click.echo(tabulate(data, headers=headers, tablefmt="grid"))
|
|
598
700
|
|
|
701
|
+
except requests.exceptions.HTTPError as e:
|
|
702
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
703
|
+
raise ClickException(
|
|
704
|
+
f"RPC endpoint error: {e}\n\n"
|
|
705
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
706
|
+
f"Possible solutions:\n"
|
|
707
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
708
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
709
|
+
f" 3. Check your network connection"
|
|
710
|
+
) from e
|
|
711
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
712
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
713
|
+
raise ClickException(
|
|
714
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
715
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
716
|
+
f"Possible solutions:\n"
|
|
717
|
+
f" 1. Check your internet connection\n"
|
|
718
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
719
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
720
|
+
) from e
|
|
599
721
|
except (KeyError, TypeError) as e:
|
|
600
722
|
click.echo(f"Error processing tool data: {str(e)}")
|
|
601
723
|
except IOError as e:
|
|
@@ -610,6 +732,26 @@ def tool_description_for_marketplace_mech(tool_id: str, chain_config: str) -> No
|
|
|
610
732
|
try:
|
|
611
733
|
description = get_tool_description_for_marketplace_mech(tool_id, chain_config)
|
|
612
734
|
click.echo(f"Description for tool {tool_id}: {description}")
|
|
735
|
+
except requests.exceptions.HTTPError as e:
|
|
736
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
737
|
+
raise ClickException(
|
|
738
|
+
f"RPC endpoint error: {e}\n\n"
|
|
739
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
740
|
+
f"Possible solutions:\n"
|
|
741
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
742
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
743
|
+
f" 3. Check your network connection"
|
|
744
|
+
) from e
|
|
745
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
746
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
747
|
+
raise ClickException(
|
|
748
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
749
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
750
|
+
f"Possible solutions:\n"
|
|
751
|
+
f" 1. Check your internet connection\n"
|
|
752
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
753
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
754
|
+
) from e
|
|
613
755
|
except KeyError as e:
|
|
614
756
|
click.echo(f"Tool not found or missing description: {str(e)}")
|
|
615
757
|
except IOError as e:
|
|
@@ -646,6 +788,26 @@ def tool_io_schema_for_marketplace_mech(tool_id: str, chain_config: str) -> None
|
|
|
646
788
|
output_schema, headers=["Field", "Type", "Description"], tablefmt="grid"
|
|
647
789
|
)
|
|
648
790
|
)
|
|
791
|
+
except requests.exceptions.HTTPError as e:
|
|
792
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
793
|
+
raise ClickException(
|
|
794
|
+
f"RPC endpoint error: {e}\n\n"
|
|
795
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
796
|
+
f"Possible solutions:\n"
|
|
797
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
798
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'\n"
|
|
799
|
+
f" 3. Check your network connection"
|
|
800
|
+
) from e
|
|
801
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
802
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
803
|
+
raise ClickException(
|
|
804
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
805
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
806
|
+
f"Possible solutions:\n"
|
|
807
|
+
f" 1. Check your internet connection\n"
|
|
808
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
809
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
810
|
+
) from e
|
|
649
811
|
except KeyError as e:
|
|
650
812
|
click.echo(f"Error accessing schema data: {str(e)}")
|
|
651
813
|
except IOError as e:
|
|
@@ -672,22 +834,44 @@ def deposit_native(
|
|
|
672
834
|
chain_config: Optional[str] = None,
|
|
673
835
|
) -> None:
|
|
674
836
|
"""Deposits Native balance for prepaid requests."""
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
837
|
+
try:
|
|
838
|
+
agent_mode = is_agent_mode(ctx)
|
|
839
|
+
click.echo(f"Running deposit native with agent_mode={agent_mode}")
|
|
840
|
+
|
|
841
|
+
if agent_mode:
|
|
842
|
+
safe, key_path, key_password = fetch_agent_mode_data(chain_config)
|
|
843
|
+
if not safe or not key_path:
|
|
844
|
+
raise ClickException(
|
|
845
|
+
"Cannot fetch safe or key data for the agent mode."
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
deposit_native_main(
|
|
849
|
+
agent_mode=agent_mode,
|
|
850
|
+
safe_address=safe,
|
|
851
|
+
amount=amount_to_deposit,
|
|
852
|
+
private_key_path=key_path,
|
|
853
|
+
private_key_password=key_password,
|
|
854
|
+
chain_config=chain_config,
|
|
855
|
+
)
|
|
856
|
+
except requests.exceptions.HTTPError as e:
|
|
857
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
858
|
+
raise ClickException(
|
|
859
|
+
f"RPC endpoint error: {e}\n\n"
|
|
860
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
861
|
+
f"Possible solutions:\n"
|
|
862
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
863
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
864
|
+
) from e
|
|
865
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
866
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
867
|
+
raise ClickException(
|
|
868
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
869
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
870
|
+
f"Possible solutions:\n"
|
|
871
|
+
f" 1. Check your internet connection\n"
|
|
872
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
873
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
874
|
+
) from e
|
|
691
875
|
|
|
692
876
|
|
|
693
877
|
@click.command(name="deposit-token")
|
|
@@ -710,22 +894,44 @@ def deposit_token(
|
|
|
710
894
|
chain_config: Optional[str] = None,
|
|
711
895
|
) -> None:
|
|
712
896
|
"""Deposits Token balance for prepaid requests."""
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
897
|
+
try:
|
|
898
|
+
agent_mode = is_agent_mode(ctx)
|
|
899
|
+
click.echo(f"Running deposit token with agent_mode={agent_mode}")
|
|
900
|
+
|
|
901
|
+
if agent_mode:
|
|
902
|
+
safe, key_path, key_password = fetch_agent_mode_data(chain_config)
|
|
903
|
+
if not safe or not key_path:
|
|
904
|
+
raise ClickException(
|
|
905
|
+
"Cannot fetch safe or key data for the agent mode."
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
deposit_token_main(
|
|
909
|
+
agent_mode=agent_mode,
|
|
910
|
+
safe_address=safe,
|
|
911
|
+
amount=amount_to_deposit,
|
|
912
|
+
private_key_path=key_path,
|
|
913
|
+
private_key_password=key_password,
|
|
914
|
+
chain_config=chain_config,
|
|
915
|
+
)
|
|
916
|
+
except requests.exceptions.HTTPError as e:
|
|
917
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
918
|
+
raise ClickException(
|
|
919
|
+
f"RPC endpoint error: {e}\n\n"
|
|
920
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
921
|
+
f"Possible solutions:\n"
|
|
922
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
923
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
924
|
+
) from e
|
|
925
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
926
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
927
|
+
raise ClickException(
|
|
928
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
929
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
930
|
+
f"Possible solutions:\n"
|
|
931
|
+
f" 1. Check your internet connection\n"
|
|
932
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
933
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
934
|
+
) from e
|
|
729
935
|
|
|
730
936
|
|
|
731
937
|
@click.command(name="purchase-nvm-subscription")
|
|
@@ -746,21 +952,43 @@ def nvm_subscribe(
|
|
|
746
952
|
safe: Optional[str] = None,
|
|
747
953
|
) -> None:
|
|
748
954
|
"""Allows to purchase nvm subscription for nvm mech requests."""
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
955
|
+
try:
|
|
956
|
+
agent_mode = is_agent_mode(ctx)
|
|
957
|
+
click.echo(f"Running purchase nvm subscription with agent_mode={agent_mode}")
|
|
958
|
+
|
|
959
|
+
if agent_mode:
|
|
960
|
+
safe, key_path, key_password = fetch_agent_mode_data(chain_config)
|
|
961
|
+
if not safe or not key_path:
|
|
962
|
+
raise ClickException(
|
|
963
|
+
"Cannot fetch safe or key data for the agent mode."
|
|
964
|
+
)
|
|
965
|
+
|
|
966
|
+
nvm_subscribe_main(
|
|
967
|
+
agent_mode=agent_mode,
|
|
968
|
+
safe_address=safe,
|
|
969
|
+
private_key_path=key_path,
|
|
970
|
+
private_key_password=key_password,
|
|
971
|
+
chain_config=chain_config,
|
|
972
|
+
)
|
|
973
|
+
except requests.exceptions.HTTPError as e:
|
|
974
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
975
|
+
raise ClickException(
|
|
976
|
+
f"RPC endpoint error: {e}\n\n"
|
|
977
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
978
|
+
f"Possible solutions:\n"
|
|
979
|
+
f" 1. Check if the RPC endpoint is available and accessible\n"
|
|
980
|
+
f" 2. Set a different RPC endpoint: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
981
|
+
) from e
|
|
982
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
983
|
+
rpc_url = os.getenv("MECHX_CHAIN_RPC", "default")
|
|
984
|
+
raise ClickException(
|
|
985
|
+
f"Network error connecting to RPC endpoint: {e}\n\n"
|
|
986
|
+
f"Current RPC: {rpc_url}\n\n"
|
|
987
|
+
f"Possible solutions:\n"
|
|
988
|
+
f" 1. Check your internet connection\n"
|
|
989
|
+
f" 2. Verify the RPC URL is correct\n"
|
|
990
|
+
f" 3. Try a different RPC provider: export MECHX_CHAIN_RPC='https://your-rpc-url'"
|
|
991
|
+
) from e
|
|
764
992
|
|
|
765
993
|
|
|
766
994
|
@click.command(name="fetch-mm-mechs-info")
|
|
@@ -806,6 +1034,26 @@ def query_mm_mechs_info_cli(
|
|
|
806
1034
|
|
|
807
1035
|
click.echo(tabulate(data, headers=headers, tablefmt="grid"))
|
|
808
1036
|
return None
|
|
1037
|
+
except requests.exceptions.HTTPError as e:
|
|
1038
|
+
subgraph_url = os.getenv("MECHX_SUBGRAPH_URL", "default")
|
|
1039
|
+
raise ClickException(
|
|
1040
|
+
f"Subgraph endpoint error: {e}\n\n"
|
|
1041
|
+
f"Current subgraph URL: {subgraph_url}\n\n"
|
|
1042
|
+
f"Possible solutions:\n"
|
|
1043
|
+
f" 1. Check if the subgraph endpoint is available and accessible\n"
|
|
1044
|
+
f" 2. Set a different subgraph URL: export MECHX_SUBGRAPH_URL='https://your-subgraph-url'\n"
|
|
1045
|
+
f" 3. Check your network connection"
|
|
1046
|
+
) from e
|
|
1047
|
+
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
|
|
1048
|
+
subgraph_url = os.getenv("MECHX_SUBGRAPH_URL", "default")
|
|
1049
|
+
raise ClickException(
|
|
1050
|
+
f"Network error connecting to subgraph endpoint: {e}\n\n"
|
|
1051
|
+
f"Current subgraph URL: {subgraph_url}\n\n"
|
|
1052
|
+
f"Possible solutions:\n"
|
|
1053
|
+
f" 1. Check your internet connection\n"
|
|
1054
|
+
f" 2. Verify the subgraph URL is correct\n"
|
|
1055
|
+
f" 3. Try a different subgraph provider: export MECHX_SUBGRAPH_URL='https://your-subgraph-url'"
|
|
1056
|
+
) from e
|
|
809
1057
|
except Exception as e: # pylint: disable=broad-except
|
|
810
1058
|
click.echo(f"Error: {str(e)}")
|
|
811
1059
|
return None
|
|
@@ -79,7 +79,7 @@ class LedgerConfig:
|
|
|
79
79
|
|
|
80
80
|
def __post_init__(self) -> None:
|
|
81
81
|
"""Post initialization to override with environment variables."""
|
|
82
|
-
address = os.getenv("
|
|
82
|
+
address = os.getenv("MECHX_CHAIN_RPC")
|
|
83
83
|
if address:
|
|
84
84
|
self.address = address
|
|
85
85
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/AgreementStoreManager.gnosis.json
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerFixedPriceNative.json
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerFixedPriceToken.json
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/BalanceTrackerNvmSubscriptionToken.json
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/ComplementaryServiceMetadata.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/mech_client/abis/EscrowPaymentCondition.gnosis.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/agreement_manager.py
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/base_contract.py
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/did_registry.py
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/escrow_payment.py
RENAMED
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/lock_payment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mech_client-0.15.3 → mech_client-0.15.4}/scripts/nvm_subscription/contracts/transfer_nft.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|