ethernity-cloud-sdk-py 0.2.1__tar.gz → 0.2.3__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.
- {ethernity_cloud_sdk_py-0.2.1/ethernity_cloud_sdk_py.egg-info → ethernity_cloud_sdk_py-0.2.3}/PKG-INFO +18 -8
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/README.md +17 -7
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/build.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/config.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/private_key.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/publish.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/spinner.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/init.py +12 -2
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/build.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/ipfs_client.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/publish.cpython-311.pyc +0 -0
- ethernity_cloud_sdk_py-0.2.3/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile +51 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/etny_exec.py +1 -1
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/image_registry.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/public_key_service.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-final.yml +1 -1
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose.yml +1 -1
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-securelock-test.yaml +5 -5
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry.py +7 -5
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/predecessor.json +1 -1
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/templates/src/ethernity_task.py +43 -34
- ethernity_cloud_sdk_py-0.2.3/ethernity_cloud_sdk_py/templates/src/serverless/Dockerfile.serverless +7 -0
- ethernity_cloud_sdk_py-0.2.3/ethernity_cloud_sdk_py/templates/src/serverless/requirements.txt +5 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3/ethernity_cloud_sdk_py.egg-info}/PKG-INFO +18 -8
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py.egg-info/SOURCES.txt +3 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/setup.py +1 -1
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/LICENSE +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/MANIFEST.in +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/cli.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/__init__.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/__pycache__/init.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/build.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/config.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/private_key.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/publish.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/__init__.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/runner.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base.tpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.tpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/scripts/binary-fs-build.sh +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/cert1-ca1-clean.crt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/cert1-ca1-clean.key +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/enclave_pub_cert.pem +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/input.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/payload.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/public-cert-clean.pem +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/result.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/transaction.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/etny_crypto.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/image_registry.abi +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/key_generation.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/models.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/pox.abi +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/securelock.py.tmpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/swift_stream_service.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/build.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/ipfs_client.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/publish.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/IPFS_DOCKER_COMPOSE_HASH.ipfs +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/IPFS_HASH.ipfs +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/PUBLIC_KEY.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/__init__.cpython-311.pyc +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/cert.pem +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/certificate.trustedzone.crt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-final.yml.tmpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-swift-stream.yml.tmpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose.yml.tmpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-pynity-test.yaml.tpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-securelock-test.yaml.tpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-trustedzone-test.yaml.tpl +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry.abi +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry_runner.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/key.pem +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/pynithy/run/public_key_service.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/commands/spinner.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/templates/src/serverless/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/templates/src/serverless/backend.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py.egg-info/dependency_links.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py.egg-info/entry_points.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py.egg-info/requires.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py.egg-info/top_level.txt +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/setup.cfg +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/tests/__init__.py +0 -0
- {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/tests/test_example.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ethernity-cloud-sdk-py
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Ethernity Cloud SDK Python
|
|
5
5
|
Home-page: https://github.com/ethernity-cloud/ethernity-cloud-sdk-py
|
|
6
6
|
Author: Ethernity Cloud Team
|
|
@@ -31,6 +31,7 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
31
31
|
|
|
32
32
|
## Table of Contents
|
|
33
33
|
|
|
34
|
+
- [Pre-requisites](#pre-requisites)
|
|
34
35
|
- [Installation](#installation)
|
|
35
36
|
- [Usage](#usage)
|
|
36
37
|
- [Scripts](#scripts)
|
|
@@ -38,6 +39,22 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
38
39
|
- [Contributing](#contributing)
|
|
39
40
|
- [License](#license)
|
|
40
41
|
|
|
42
|
+
## Pre-requisites
|
|
43
|
+
Linux:
|
|
44
|
+
- build-essentials
|
|
45
|
+
- Python 3.10+
|
|
46
|
+
- docker
|
|
47
|
+
- docker-compose
|
|
48
|
+
|
|
49
|
+
Windows:
|
|
50
|
+
- Microsoft Visual Studio Community 2022+ (https://visualstudio.microsoft.com/)
|
|
51
|
+
- MSVC++ 14.3+ build tools
|
|
52
|
+
- C++ CMake tools for Windows
|
|
53
|
+
- Windows SDK (for current running version)
|
|
54
|
+
- Reboot required
|
|
55
|
+
- Python 3.13
|
|
56
|
+
- Docker Desktop
|
|
57
|
+
|
|
41
58
|
## Installation
|
|
42
59
|
|
|
43
60
|
To install the package and its dependencies, run:
|
|
@@ -55,13 +72,6 @@ pip install ethernity-cloud-sdk-py
|
|
|
55
72
|
|
|
56
73
|
After installation, you can use the provided scripts to build, publish, and initialize your project.
|
|
57
74
|
|
|
58
|
-
## Pre-requisites
|
|
59
|
-
The sdk requires the following to be installed on your system:
|
|
60
|
-
- python 3.10+
|
|
61
|
-
- docker (daemon running in the background for build and publish scripts)
|
|
62
|
-
- docker-compose (for the build and publish scripts)
|
|
63
|
-
|
|
64
|
-
|
|
65
75
|
## Operating System compatibility
|
|
66
76
|
The sdk has been tested on the following operating systems:
|
|
67
77
|
- Windows 10
|
|
@@ -13,6 +13,7 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
16
|
+
- [Pre-requisites](#pre-requisites)
|
|
16
17
|
- [Installation](#installation)
|
|
17
18
|
- [Usage](#usage)
|
|
18
19
|
- [Scripts](#scripts)
|
|
@@ -20,6 +21,22 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
20
21
|
- [Contributing](#contributing)
|
|
21
22
|
- [License](#license)
|
|
22
23
|
|
|
24
|
+
## Pre-requisites
|
|
25
|
+
Linux:
|
|
26
|
+
- build-essentials
|
|
27
|
+
- Python 3.10+
|
|
28
|
+
- docker
|
|
29
|
+
- docker-compose
|
|
30
|
+
|
|
31
|
+
Windows:
|
|
32
|
+
- Microsoft Visual Studio Community 2022+ (https://visualstudio.microsoft.com/)
|
|
33
|
+
- MSVC++ 14.3+ build tools
|
|
34
|
+
- C++ CMake tools for Windows
|
|
35
|
+
- Windows SDK (for current running version)
|
|
36
|
+
- Reboot required
|
|
37
|
+
- Python 3.13
|
|
38
|
+
- Docker Desktop
|
|
39
|
+
|
|
23
40
|
## Installation
|
|
24
41
|
|
|
25
42
|
To install the package and its dependencies, run:
|
|
@@ -37,13 +54,6 @@ pip install ethernity-cloud-sdk-py
|
|
|
37
54
|
|
|
38
55
|
After installation, you can use the provided scripts to build, publish, and initialize your project.
|
|
39
56
|
|
|
40
|
-
## Pre-requisites
|
|
41
|
-
The sdk requires the following to be installed on your system:
|
|
42
|
-
- python 3.10+
|
|
43
|
-
- docker (daemon running in the background for build and publish scripts)
|
|
44
|
-
- docker-compose (for the build and publish scripts)
|
|
45
|
-
|
|
46
|
-
|
|
47
57
|
## Operating System compatibility
|
|
48
58
|
The sdk has been tested on the following operating systems:
|
|
49
59
|
- Windows 10
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,6 +5,7 @@ import subprocess
|
|
|
5
5
|
import re
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from ethernity_cloud_sdk_py.commands.config import Config, config
|
|
8
|
+
from ethernity_cloud_sdk_py.commands.pynithy.run.image_registry import ImageRegistry
|
|
8
9
|
|
|
9
10
|
config = Config(Path(".config.json").resolve())
|
|
10
11
|
config.load()
|
|
@@ -107,6 +108,10 @@ def main():
|
|
|
107
108
|
docker_login = input("Enter Docker Login (username): ").strip()
|
|
108
109
|
docker_password = input("Enter Password: ").strip()
|
|
109
110
|
base_image_tag = input("Enter the image tag: ").strip()
|
|
111
|
+
config.write("BASE_IMAGE_TAG": dbase_image_tag)
|
|
112
|
+
config.write("DOCKER_REPO_URL": docker_repo_url)
|
|
113
|
+
config.write("DOCKER_LOGIN": docker_login)
|
|
114
|
+
config.write("DOCKER_PASSWORD": docker_password)
|
|
110
115
|
print()
|
|
111
116
|
blockchain_network_options = [
|
|
112
117
|
"Bloxberg Mainnet",
|
|
@@ -124,10 +129,15 @@ def main():
|
|
|
124
129
|
print(
|
|
125
130
|
f"Checking if the project name (image name) is available on the {blockchain_network.replace(' ', '_')} network and ownership..."
|
|
126
131
|
)
|
|
127
|
-
|
|
132
|
+
|
|
133
|
+
config.write("PROJECT_NAME", project_name)
|
|
134
|
+
config.write("SERVICE_TYPE", service_type)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
image_registry = ImageRegistry()
|
|
128
138
|
|
|
129
139
|
print(f"Running script image_registry...")
|
|
130
|
-
print(os.getcwd())
|
|
140
|
+
#print(os.getcwd())
|
|
131
141
|
|
|
132
142
|
image_registry.main(
|
|
133
143
|
blockchain_network.replace(" ", "_"),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
ethernity_cloud_sdk_py-0.2.3/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
FROM etny-securelock-serverless AS release
|
|
2
|
+
|
|
3
|
+
COPY ./src/serverless/requirements.txt /requirements.txt
|
|
4
|
+
RUN pip3 install -r /requirements.txt
|
|
5
|
+
RUN rm -rf /requirements.txt
|
|
6
|
+
|
|
7
|
+
ENV SECURELOCK_SESSION=ec_sdk_py_win_06_SECURELOCK_V3_testnet_96
|
|
8
|
+
ENV BUCKET_NAME=etny-pynithy-testnet-v3
|
|
9
|
+
ENV SMART_CONTRACT_ADDRESS=0x02882F03097fE8cD31afbdFbB5D72a498B41112c
|
|
10
|
+
ENV IMAGE_REGISTRY_ADDRESS=0x15D73a742529C3fb11f3FA32EF7f0CC3870ACA31
|
|
11
|
+
ENV RPC_URL=https://core.bloxberg.org
|
|
12
|
+
ENV CHAIN_ID=8995
|
|
13
|
+
ENV TRUSTED_ZONE_IMAGE=etny-pynithy-testnet
|
|
14
|
+
|
|
15
|
+
RUN mkdir binary-fs-dir
|
|
16
|
+
|
|
17
|
+
COPY ./src /etny-securelock/
|
|
18
|
+
COPY ./scripts/* /etny-securelock/
|
|
19
|
+
|
|
20
|
+
RUN /etny-securelock/binary-fs-build.sh
|
|
21
|
+
|
|
22
|
+
FROM registry.ethernity.cloud:443/debuggingdelight/ethernity-cloud-sdk-registry/sconecuratedimages/crosscompilers AS build
|
|
23
|
+
|
|
24
|
+
COPY --from=release /binary-fs-dir /.
|
|
25
|
+
|
|
26
|
+
RUN scone gcc ./binary_fs_blob.s ./libbinary_fs_template.a -shared -o /libbinary-fs.so
|
|
27
|
+
|
|
28
|
+
FROM etny-securelock-serverless
|
|
29
|
+
|
|
30
|
+
COPY --from=build /usr/local/bin/scone /usr/local/bin/scone
|
|
31
|
+
|
|
32
|
+
#RUN scone cas attest scone-cas.cf 3061b9feb7fa67f3815336a085f629a13f04b0a1667c93b14ff35581dc8271e4 -GCS --only_for_testing-debug --only_for_testing-ignore-signer
|
|
33
|
+
|
|
34
|
+
COPY --from=build /libbinary-fs.so /lib/libbinary-fs.so
|
|
35
|
+
|
|
36
|
+
RUN openssl genrsa -3 -out /enclave-key.pem 3072
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
ENV SCONE_HEAP=3072M
|
|
40
|
+
ENV SCONE_LOG=FATAL
|
|
41
|
+
ENV SCONE_STACK=4M
|
|
42
|
+
ENV SCONE_ALLOW_DLOPEN=1
|
|
43
|
+
ENV SCONE_EXTENSIONS_PATH=/lib/libbinary-fs.so
|
|
44
|
+
|
|
45
|
+
# Disabled production mode for testnet
|
|
46
|
+
# RUN scone-signer sign --key=/enclave-key.pem --env --production /usr/local/bin/python3
|
|
47
|
+
|
|
48
|
+
RUN rm -rf /enclave-key.pem
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
ENTRYPOINT ["/usr/local/bin/python", "/etny-securelock/securelock.py"]
|
|
@@ -58,7 +58,7 @@ def Exec(payload_data, input_data, globals=None, locals=None):
|
|
|
58
58
|
else:
|
|
59
59
|
# Handle statements if needed
|
|
60
60
|
exec(
|
|
61
|
-
compile(ast.Module([node]), filename="<ast>", mode="exec"),
|
|
61
|
+
compile(ast.Module([node], type_ignores=[]), filename="<ast>", mode="exec"),
|
|
62
62
|
globals,
|
|
63
63
|
locals,
|
|
64
64
|
)
|
|
Binary file
|
|
Binary file
|
|
@@ -24,7 +24,7 @@ services:
|
|
|
24
24
|
environment:
|
|
25
25
|
- SCONE_CAS_ADDR=scone-cas.cf
|
|
26
26
|
- SCONE_LAS_ADDR=las
|
|
27
|
-
- SCONE_CONFIG_ID=
|
|
27
|
+
- SCONE_CONFIG_ID=ec_sdk_py_win_06_SECURELOCK_V3_testnet_96/application
|
|
28
28
|
- SCONE_HEAP=3072M
|
|
29
29
|
- SCONE_LOG=FATAL
|
|
30
30
|
- SCONE_STACK=4M
|
|
@@ -23,7 +23,7 @@ services:
|
|
|
23
23
|
environment:
|
|
24
24
|
- SCONE_CAS_ADDR=scone-cas.cf
|
|
25
25
|
- SCONE_LAS_ADDR=las
|
|
26
|
-
- SCONE_CONFIG_ID=
|
|
26
|
+
- SCONE_CONFIG_ID=ec_sdk_py_win_06_SECURELOCK_V3_testnet_96/application
|
|
27
27
|
- SCONE_HEAP=3072M
|
|
28
28
|
- SCONE_LOG=FATAL
|
|
29
29
|
- SCONE_STACK=4M
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: ec_sdk_py_win_06_SECURELOCK_V3_testnet_96
|
|
2
2
|
version: "0.3"
|
|
3
3
|
|
|
4
4
|
|
|
@@ -10,18 +10,18 @@ security:
|
|
|
10
10
|
services:
|
|
11
11
|
- name: application
|
|
12
12
|
image_name: application_image
|
|
13
|
-
mrenclaves: [ "
|
|
13
|
+
mrenclaves: [ "1692a58a38b80e3f94f0ab7f95d7129fd616546a7c039a3a89568fae3db52612" ]
|
|
14
14
|
command: /usr/local/bin/python /etny-securelock/securelock.py
|
|
15
15
|
pwd: /
|
|
16
16
|
|
|
17
17
|
images:
|
|
18
18
|
- name: application_image
|
|
19
19
|
injection_files:
|
|
20
|
-
- path: /app/
|
|
20
|
+
- path: /app/ec_sdk_py_win_06_SECURELOCK_V3_testnet_96/ca.pem
|
|
21
21
|
content: $$SCONE::CA_CERT:crt$$
|
|
22
|
-
- path: /app/
|
|
22
|
+
- path: /app/ec_sdk_py_win_06_SECURELOCK_V3_testnet_96/cert.pem
|
|
23
23
|
content: $$SCONE::SERVER_CERT:crt$$
|
|
24
|
-
- path: /private/
|
|
24
|
+
- path: /private/ec_sdk_py_win_06_SECURELOCK_V3_testnet_96/key.pem
|
|
25
25
|
content: $$SCONE::SERVER_CERT:privatekey$$
|
|
26
26
|
|
|
27
27
|
secrets:
|
|
@@ -18,9 +18,10 @@ config = Config(Path(".config.json").resolve())
|
|
|
18
18
|
config.load()
|
|
19
19
|
|
|
20
20
|
class ImageRegistry:
|
|
21
|
-
def __init__(self, private_key):
|
|
21
|
+
def __init__(self, private_key=None):
|
|
22
22
|
try:
|
|
23
|
-
|
|
23
|
+
if private_key:
|
|
24
|
+
self.private_key = private_key
|
|
24
25
|
self.blockchain_network = config.read("BLOCKCHAIN_NETWORK")
|
|
25
26
|
self.project_name = config.read("PROJECT_NAME")
|
|
26
27
|
self.enclave_name_securelock = self.project_name
|
|
@@ -64,14 +65,15 @@ class ImageRegistry:
|
|
|
64
65
|
# if "Bloxberg" in BLOCKCHAIN_NETWORK or "Polygon" in BLOCKCHAIN_NETWORK:
|
|
65
66
|
# self.provider.middleware_onion.inject(geth_poa_middleware, layer=0)
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
if private_key:
|
|
69
|
+
self.acct = Account().from_key(self.private_key)
|
|
70
|
+
self.provider.eth.default_account = self.acct.address
|
|
70
71
|
|
|
71
72
|
self.image_registry_contract = self.provider.eth.contract(
|
|
72
73
|
address=to_checksum_address(self.image_registry_address),
|
|
73
74
|
abi=self.image_registry_abi,
|
|
74
75
|
)
|
|
76
|
+
|
|
75
77
|
except Exception as e:
|
|
76
78
|
raise Exception("Error initializing image registry: " + str(e))
|
|
77
79
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "687d26329c2869251d666f13f35b2240c246736fc05a39f3c7df5faf08836e11",
|
|
3
3
|
"warnings": [
|
|
4
4
|
[
|
|
5
5
|
"0.3 is a legacy version. Please consider using 0.3.7 instead, unless you are targeting SCONE 5.7.0 or older"
|
|
@@ -1,32 +1,58 @@
|
|
|
1
1
|
import os
|
|
2
|
-
import sys
|
|
3
2
|
import warnings
|
|
4
3
|
import time
|
|
5
|
-
from datetime import datetime
|
|
6
4
|
from dotenv import load_dotenv
|
|
7
|
-
|
|
5
|
+
import getpass
|
|
8
6
|
warnings.filterwarnings("ignore")
|
|
9
7
|
|
|
10
|
-
try:
|
|
11
|
-
load_dotenv(".env" if os.path.exists(".env") else ".env.config")
|
|
12
|
-
except ImportError as e:
|
|
13
|
-
pass
|
|
14
8
|
|
|
15
9
|
from ethernity_cloud_runner_py.runner import EthernityCloudRunner
|
|
10
|
+
from ethernity_cloud_sdk_py.commands.private_key import PrivateKeyManager
|
|
16
11
|
|
|
17
12
|
code = "hello('World!')"
|
|
18
13
|
|
|
14
|
+
def print_logs(runner):
|
|
15
|
+
previous_logs_count = 0
|
|
16
|
+
while runner.is_running():
|
|
17
|
+
state = runner.get_state()
|
|
18
|
+
current_logs = state['log'] # Assuming this is a list of logs in chronological order
|
|
19
|
+
|
|
20
|
+
# Determine which logs are new based on how many logs we've seen before
|
|
21
|
+
new_logs = current_logs[previous_logs_count:]
|
|
22
|
+
|
|
23
|
+
# Print the new logs in the order they appear
|
|
24
|
+
for log in new_logs:
|
|
25
|
+
print(log)
|
|
26
|
+
|
|
27
|
+
# Update the count of previously seen logs
|
|
28
|
+
previous_logs_count = len(current_logs)
|
|
29
|
+
|
|
30
|
+
# Optional status prints
|
|
31
|
+
# print(f"{datetime.now()} Task status: {state['progress']}")
|
|
32
|
+
# print(f"Processed Events: {state['processed_events']}, Remaining Events: {state['remaining_events']}")
|
|
33
|
+
|
|
19
34
|
def execute_task(code) -> None:
|
|
20
|
-
runner = EthernityCloudRunner()
|
|
21
|
-
runner.set_log_level("DEBUG")
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
load_dotenv(override=True)
|
|
37
|
+
|
|
38
|
+
while True:
|
|
39
|
+
try:
|
|
40
|
+
PASSWORD = getpass.getpass("Enter your private key password:")
|
|
41
|
+
ENC_PRIVATE_KEY = os.getenv("ENC_PRIVATE_KEY")
|
|
42
|
+
pkm = PrivateKeyManager(PASSWORD)
|
|
43
|
+
PRIVATE_KEY = pkm.decrypt_private_key(ENC_PRIVATE_KEY)
|
|
44
|
+
break
|
|
45
|
+
except Exception as e:
|
|
46
|
+
print("Incorrect password. Please try again.")
|
|
47
|
+
continue
|
|
48
|
+
|
|
49
|
+
runner = EthernityCloudRunner()
|
|
50
|
+
runner.set_log_level("INFO")
|
|
51
|
+
runner.set_private_key(PRIVATE_KEY)
|
|
24
52
|
runner.set_network("Bloxberg", "Testnet")
|
|
25
53
|
runner.set_storage_ipfs("https://ipfs.ethernity.cloud/api/v0")
|
|
26
|
-
|
|
27
54
|
runner.connect()
|
|
28
55
|
|
|
29
|
-
|
|
30
56
|
resources = {
|
|
31
57
|
"taskPrice": 3,
|
|
32
58
|
"cpu": 4,
|
|
@@ -39,38 +65,21 @@ def execute_task(code) -> None:
|
|
|
39
65
|
|
|
40
66
|
trustedzone_enclave = os.getenv("TRUSTED_ZONE_IMAGE")
|
|
41
67
|
securelock_enclave = os.getenv("PROJECT_NAME")
|
|
68
|
+
securelock_version = os.getenv("VERSION")
|
|
42
69
|
|
|
43
70
|
runner.run(
|
|
44
71
|
resources,
|
|
45
72
|
securelock_enclave,
|
|
73
|
+
securelock_version,
|
|
46
74
|
code,
|
|
47
75
|
"",
|
|
48
76
|
trustedzone_enclave
|
|
49
77
|
)
|
|
50
78
|
|
|
51
|
-
# Store previously printed logs
|
|
52
|
-
previous_logs = set()
|
|
53
|
-
|
|
54
79
|
while runner.is_running():
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
# Find new logs by subtracting previous_logs from current_logs
|
|
59
|
-
new_logs = current_logs - previous_logs
|
|
60
|
-
|
|
61
|
-
# If there are new logs, print them
|
|
62
|
-
if new_logs:
|
|
63
|
-
for log in new_logs:
|
|
64
|
-
print(log)
|
|
65
|
-
|
|
66
|
-
# Update previous_logs to include the current logs
|
|
67
|
-
previous_logs = current_logs
|
|
68
|
-
|
|
69
|
-
# Optional status prints
|
|
70
|
-
# print(f"{datetime.now()} Task status: {state['progress']}")
|
|
71
|
-
# print(f"Processed Events: {state['processed_events']}, Remaining Events: {state['remaining_events']}")
|
|
80
|
+
print_logs(runner)
|
|
81
|
+
time.sleep(0.1)
|
|
72
82
|
|
|
73
|
-
time.sleep(0.5)
|
|
74
83
|
state = runner.get_state()
|
|
75
84
|
|
|
76
85
|
if state['status'] == "ERROR":
|
|
@@ -83,4 +92,4 @@ def execute_task(code) -> None:
|
|
|
83
92
|
print(result['value'])
|
|
84
93
|
|
|
85
94
|
if __name__ == "__main__":
|
|
86
|
-
execute_task(code)
|
|
95
|
+
execute_task(code)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ethernity-cloud-sdk-py
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Ethernity Cloud SDK Python
|
|
5
5
|
Home-page: https://github.com/ethernity-cloud/ethernity-cloud-sdk-py
|
|
6
6
|
Author: Ethernity Cloud Team
|
|
@@ -31,6 +31,7 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
31
31
|
|
|
32
32
|
## Table of Contents
|
|
33
33
|
|
|
34
|
+
- [Pre-requisites](#pre-requisites)
|
|
34
35
|
- [Installation](#installation)
|
|
35
36
|
- [Usage](#usage)
|
|
36
37
|
- [Scripts](#scripts)
|
|
@@ -38,6 +39,22 @@ This project provides a set of tools and scripts to work with the Ethernity Clou
|
|
|
38
39
|
- [Contributing](#contributing)
|
|
39
40
|
- [License](#license)
|
|
40
41
|
|
|
42
|
+
## Pre-requisites
|
|
43
|
+
Linux:
|
|
44
|
+
- build-essentials
|
|
45
|
+
- Python 3.10+
|
|
46
|
+
- docker
|
|
47
|
+
- docker-compose
|
|
48
|
+
|
|
49
|
+
Windows:
|
|
50
|
+
- Microsoft Visual Studio Community 2022+ (https://visualstudio.microsoft.com/)
|
|
51
|
+
- MSVC++ 14.3+ build tools
|
|
52
|
+
- C++ CMake tools for Windows
|
|
53
|
+
- Windows SDK (for current running version)
|
|
54
|
+
- Reboot required
|
|
55
|
+
- Python 3.13
|
|
56
|
+
- Docker Desktop
|
|
57
|
+
|
|
41
58
|
## Installation
|
|
42
59
|
|
|
43
60
|
To install the package and its dependencies, run:
|
|
@@ -55,13 +72,6 @@ pip install ethernity-cloud-sdk-py
|
|
|
55
72
|
|
|
56
73
|
After installation, you can use the provided scripts to build, publish, and initialize your project.
|
|
57
74
|
|
|
58
|
-
## Pre-requisites
|
|
59
|
-
The sdk requires the following to be installed on your system:
|
|
60
|
-
- python 3.10+
|
|
61
|
-
- docker (daemon running in the background for build and publish scripts)
|
|
62
|
-
- docker-compose (for the build and publish scripts)
|
|
63
|
-
|
|
64
|
-
|
|
65
75
|
## Operating System compatibility
|
|
66
76
|
The sdk has been tested on the following operating systems:
|
|
67
77
|
- Windows 10
|
|
@@ -33,6 +33,7 @@ ethernity_cloud_sdk_py/commands/pynithy/__pycache__/build.cpython-311.pyc
|
|
|
33
33
|
ethernity_cloud_sdk_py/commands/pynithy/__pycache__/ipfs_client.cpython-311.pyc
|
|
34
34
|
ethernity_cloud_sdk_py/commands/pynithy/__pycache__/publish.cpython-311.pyc
|
|
35
35
|
ethernity_cloud_sdk_py/commands/pynithy/__pycache__/runner.cpython-311.pyc
|
|
36
|
+
ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile
|
|
36
37
|
ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base
|
|
37
38
|
ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base.tpl
|
|
38
39
|
ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.tpl
|
|
@@ -78,7 +79,9 @@ ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/__init__.cpython-311.pyc
|
|
|
78
79
|
ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/image_registry.cpython-311.pyc
|
|
79
80
|
ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/public_key_service.cpython-311.pyc
|
|
80
81
|
ethernity_cloud_sdk_py/templates/src/ethernity_task.py
|
|
82
|
+
ethernity_cloud_sdk_py/templates/src/serverless/Dockerfile.serverless
|
|
81
83
|
ethernity_cloud_sdk_py/templates/src/serverless/__init__.py
|
|
82
84
|
ethernity_cloud_sdk_py/templates/src/serverless/backend.py
|
|
85
|
+
ethernity_cloud_sdk_py/templates/src/serverless/requirements.txt
|
|
83
86
|
tests/__init__.py
|
|
84
87
|
tests/test_example.py
|
|
@@ -5,7 +5,7 @@ this_directory = Path(__file__).parent
|
|
|
5
5
|
long_description = (this_directory / "README.md").read_text()
|
|
6
6
|
setup(
|
|
7
7
|
name="ethernity-cloud-sdk-py",
|
|
8
|
-
version="0.2.
|
|
8
|
+
version="0.2.3",
|
|
9
9
|
url="https://github.com/ethernity-cloud/ethernity-cloud-sdk-py",
|
|
10
10
|
author="Ethernity Cloud Team",
|
|
11
11
|
author_email="contact@ethernity.cloud",
|
|
File without changes
|
|
File without changes
|
{ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.3}/ethernity_cloud_sdk_py/__init__.py
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
|
|
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
|