ethernity-cloud-sdk-py 0.2.1__tar.gz → 0.2.2__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.
Files changed (89) hide show
  1. {ethernity_cloud_sdk_py-0.2.1/ethernity_cloud_sdk_py.egg-info → ethernity_cloud_sdk_py-0.2.2}/PKG-INFO +18 -8
  2. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/README.md +17 -7
  3. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/build.cpython-311.pyc +0 -0
  4. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/config.cpython-311.pyc +0 -0
  5. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/spinner.cpython-311.pyc +0 -0
  6. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/build.cpython-311.pyc +0 -0
  7. ethernity_cloud_sdk_py-0.2.2/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile +51 -0
  8. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/templates/src/ethernity_task.py +43 -34
  9. ethernity_cloud_sdk_py-0.2.2/ethernity_cloud_sdk_py/templates/src/serverless/Dockerfile.serverless +7 -0
  10. ethernity_cloud_sdk_py-0.2.2/ethernity_cloud_sdk_py/templates/src/serverless/requirements.txt +5 -0
  11. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2/ethernity_cloud_sdk_py.egg-info}/PKG-INFO +18 -8
  12. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py.egg-info/SOURCES.txt +3 -0
  13. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/setup.py +1 -1
  14. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/LICENSE +0 -0
  15. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/MANIFEST.in +0 -0
  16. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/__init__.py +0 -0
  17. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/cli.py +0 -0
  18. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__init__.py +0 -0
  19. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/__init__.cpython-311.pyc +0 -0
  20. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/init.cpython-311.pyc +0 -0
  21. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/private_key.cpython-311.pyc +0 -0
  22. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/__pycache__/publish.cpython-311.pyc +0 -0
  23. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/build.py +0 -0
  24. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/config.py +0 -0
  25. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/init.py +0 -0
  26. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/private_key.py +0 -0
  27. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/publish.py +0 -0
  28. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__init__.py +0 -0
  29. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/__init__.cpython-311.pyc +0 -0
  30. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/ipfs_client.cpython-311.pyc +0 -0
  31. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/publish.cpython-311.pyc +0 -0
  32. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/__pycache__/runner.cpython-311.pyc +0 -0
  33. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base +0 -0
  34. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.base.tpl +0 -0
  35. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/Dockerfile.tpl +0 -0
  36. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/scripts/binary-fs-build.sh +0 -0
  37. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/cert1-ca1-clean.crt +0 -0
  38. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/cert1-ca1-clean.key +0 -0
  39. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/enclave_pub_cert.pem +0 -0
  40. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/input.txt +0 -0
  41. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/payload.py +0 -0
  42. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/public-cert-clean.pem +0 -0
  43. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/result.txt +0 -0
  44. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/app/transaction.txt +0 -0
  45. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/etny_crypto.py +0 -0
  46. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/etny_exec.py +0 -0
  47. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/image_registry.abi +0 -0
  48. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/key_generation.py +0 -0
  49. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/models.py +0 -0
  50. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/pox.abi +0 -0
  51. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/securelock.py.tmpl +0 -0
  52. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build/securelock/src/swift_stream_service.py +0 -0
  53. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/build.py +0 -0
  54. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/ipfs_client.py +0 -0
  55. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/publish.py +0 -0
  56. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/IPFS_DOCKER_COMPOSE_HASH.ipfs +0 -0
  57. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/IPFS_HASH.ipfs +0 -0
  58. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/PUBLIC_KEY.txt +0 -0
  59. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/__init__.py +0 -0
  60. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/__init__.cpython-311.pyc +0 -0
  61. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/image_registry.cpython-311.pyc +0 -0
  62. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/__pycache__/public_key_service.cpython-311.pyc +0 -0
  63. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/cert.pem +0 -0
  64. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/certificate.trustedzone.crt +0 -0
  65. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-final.yml +0 -0
  66. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-final.yml.tmpl +0 -0
  67. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose-swift-stream.yml.tmpl +0 -0
  68. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose.yml +0 -0
  69. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/docker-compose.yml.tmpl +0 -0
  70. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-pynity-test.yaml.tpl +0 -0
  71. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-securelock-test.yaml +0 -0
  72. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-securelock-test.yaml.tpl +0 -0
  73. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/etny-trustedzone-test.yaml.tpl +0 -0
  74. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry.abi +0 -0
  75. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry.py +0 -0
  76. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/image_registry_runner.py +0 -0
  77. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/key.pem +0 -0
  78. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/predecessor.json +0 -0
  79. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/pynithy/run/public_key_service.py +0 -0
  80. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/commands/spinner.py +0 -0
  81. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/templates/src/serverless/__init__.py +0 -0
  82. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py/templates/src/serverless/backend.py +0 -0
  83. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py.egg-info/dependency_links.txt +0 -0
  84. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py.egg-info/entry_points.txt +0 -0
  85. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py.egg-info/requires.txt +0 -0
  86. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/ethernity_cloud_sdk_py.egg-info/top_level.txt +0 -0
  87. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/setup.cfg +0 -0
  88. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/tests/__init__.py +0 -0
  89. {ethernity_cloud_sdk_py-0.2.1 → ethernity_cloud_sdk_py-0.2.2}/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.1
3
+ Version: 0.2.2
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
@@ -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_92
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"]
@@ -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
- runner.set_private_key(os.getenv("PRIVATE_KEY"))
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
- state = runner.get_state()
56
- current_logs = set(state['log']) # Current set of logs
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)
@@ -0,0 +1,7 @@
1
+ FROM etny-securelock-base
2
+
3
+ # add any docker commands to be included in the build process
4
+ #
5
+ # Example:
6
+ # RUN apk update
7
+ # RUN apk add gcc g++ git openblas-dev
@@ -0,0 +1,5 @@
1
+ # Add requirements.txt file content to be included in the build process
2
+ # Example:
3
+ #
4
+ # scipy
5
+ # numpy
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ethernity-cloud-sdk-py
3
- Version: 0.2.1
3
+ Version: 0.2.2
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.1",
8
+ version="0.2.2",
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",