Skip to content

Commit

Permalink
Merge pull request #77 from singnet/development
Browse files Browse the repository at this point in the history
Release version 3.6.1
  • Loading branch information
kiruxaspb authored Oct 23, 2024
2 parents 9507541 + 63644c4 commit ed13dab
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -144,18 +144,19 @@ 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 = "[email protected]" # which using in AI marketplace account
```

You can receive these for a given service from the [Dapp](https://beta.singularitynet.io/)

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="[email protected]")
```

### Paid call
Expand Down
2 changes: 1 addition & 1 deletion docs/storage_provider/service_metadata.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 2 additions & 1 deletion snet/sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion snet/sdk/storage_provider/storage_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.6.0"
__version__ = "3.6.1"

0 comments on commit ed13dab

Please sign in to comment.