diff --git a/README.md b/README.md index 57c5998..515ccf5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The package is published in PyPI at the following link: The SingularityNET SDK allows you to make calls to SingularityNET services programmatically from your application. To communicate between clients and services, SingularityNET uses [gRPC](https://grpc.io/). To handle payment of services, SingularityNET uses -[Ethereum state channels](https://dev.singularitynet.io/docs/concepts/multi-party-escrow/). +[Ethereum state channels](https://dev.singularitynet.io/docs/ai-consumers/mpe/). The SingularityNET SDK abstracts and manages state channels with service providers on behalf of the user and handles authentication with the SingularityNET services. @@ -144,7 +144,8 @@ If you want to use the free calls you will need to pass these arguments to the ` ```python free_call_auth_token_bin = "f2548d27ffd319b9c05918eeac15ebab934e5cfcd68e1ec3db2b92765", -free_call_token_expiry_block = 172800 +free_call_token_expiry_block = 172800, +email = "test@test.com" # which using in AI marketplace account ``` You can receive these for a given service from the [Dapp](https://beta.singularitynet.io/) @@ -152,10 +153,10 @@ You can receive these for a given service from the [Dapp](https://beta.singulari Creating a service client with free calls included would look like this: ```python service_client = snet_sdk.create_service_client(org_id="26072b8b6a0e448180f8c0e702ab6d2f", - service_id="Exampleservice", - group_name="default_group", + service_id="Exampleservice" free_call_auth_token_bin="f2548d27ffd319b9c05918eeac15ebab934e5cfcd68e1ec3db2b92765", - free_call_token_expiry_block=172800) + free_call_token_expiry_block=172800, + email="test@mail.com") ``` ### Paid call diff --git a/docs/storage_provider/service_metadata.md b/docs/storage_provider/service_metadata.md index aa3597c..b14048e 100644 --- a/docs/storage_provider/service_metadata.md +++ b/docs/storage_provider/service_metadata.md @@ -1,6 +1,6 @@ ## module: sdk.storage_provider.service_metadata -[Link](https://github.com/singnet/snet-sdk-python/blob/master/snet/sdk/metadata_provider/service_metadata.py) to GitHub +[Link](https://github.com/singnet/snet-sdk-python/blob/master/snet/sdk/storage_provider/service_metadata.py) to GitHub Entities: 1. [AssetType](#class-assettype) diff --git a/snet/sdk/__init__.py b/snet/sdk/__init__.py index f6dbbc2..850e1bc 100644 --- a/snet/sdk/__init__.py +++ b/snet/sdk/__init__.py @@ -82,6 +82,7 @@ def create_service_client(self, org_id: str, service_id: str, group_name=None, payment_channel_management_strategy=None, free_call_auth_token_bin=None, free_call_token_expiry_block=None, + email=None, options=None, concurrent_calls=1): @@ -108,7 +109,7 @@ def create_service_client(self, org_id: str, service_id: str, group_name=None, free_call_token_expiry_block else "" options['free-call-token-expiry-block'] = free_call_token_expiry_block if\ free_call_token_expiry_block else 0 - options['email'] = self._sdk_config.get("email", "") + options['email'] = email if email else "" options['concurrency'] = self._sdk_config.get("concurrency", True) service_metadata = self._metadata_provider.enhance_service_metadata(org_id, service_id) diff --git a/snet/sdk/storage_provider/storage_provider.py b/snet/sdk/storage_provider/storage_provider.py index c576404..852fbc3 100644 --- a/snet/sdk/storage_provider/storage_provider.py +++ b/snet/sdk/storage_provider/storage_provider.py @@ -24,7 +24,7 @@ def fetch_org_metadata(self,org_id): if org_provider_type == "ipfs": org_metadata_json = get_from_ipfs_and_checkhash(self._ipfs_client, org_metadata_hash) else: - org_metadata_json, _ = self.lighthouse_client.download(org_metadata_uri) + org_metadata_json, _ = self.lighthouse_client.download(org_metadata_hash) org_metadata = json.loads(org_metadata_json) return org_metadata diff --git a/version.py b/version.py index 85197cb..b202327 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -__version__ = "3.6.0" +__version__ = "3.6.1"