@ethernity-cloud/sdk-js 1.6.2 → 1.7.0

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 (51) hide show
  1. package/README.md +41 -3
  2. package/cas/config.js +59 -1
  3. package/info.js +14 -5
  4. package/init.js +20 -4
  5. package/nodenithy/build/securelock/Dockerfile.tmpl +34 -32
  6. package/nodenithy/build/securelock/scripts/binary-fs-build.sh +7 -6
  7. package/nodenithy/build.mjs +80 -68
  8. package/nodenithy/run/docker-compose-final.yml.tmpl +36 -31
  9. package/nodenithy/run/docker-compose.yml.tmpl +34 -45
  10. package/nodenithy/run/image_registry.js +17 -4
  11. package/nodenithy/run.js +42 -28
  12. package/package.json +5 -3
  13. package/publish.js +4 -2
  14. package/pynithy/build/securelock/Dockerfile.base.tpl +13 -0
  15. package/pynithy/build/securelock/Dockerfile.tpl +131 -0
  16. package/pynithy/build/securelock/scripts/binary-fs-build.sh +25 -34
  17. package/pynithy/build/securelock/scripts/pyfreeze.sh +32 -0
  18. package/pynithy/build/securelock/src/{pox.abi → abi/etnyImplementationV2.abi} +1489 -1489
  19. package/pynithy/build/securelock/src/abi/image_registry.abi +1 -0
  20. package/pynithy/build/securelock/src/ecld_state.py +906 -0
  21. package/pynithy/build/securelock/src/esr.abi +1 -0
  22. package/pynithy/build/securelock/src/esr_local.py +267 -0
  23. package/pynithy/build/securelock/src/esr_wallet.py +150 -0
  24. package/pynithy/build/securelock/src/etny_crypto.py +208 -167
  25. package/pynithy/build/securelock/src/etny_exec.py +385 -79
  26. package/pynithy/build/securelock/src/etny_exec_flask.py +535 -0
  27. package/pynithy/build/securelock/src/etny_exec_serv.py +353 -0
  28. package/pynithy/build/securelock/src/etny_session_exec.py +245 -0
  29. package/pynithy/build/securelock/src/get_sgx_report.so +0 -0
  30. package/pynithy/build/securelock/src/image_registry.abi +1 -1
  31. package/pynithy/build/securelock/src/key_generation.py +17 -17
  32. package/pynithy/build/securelock/src/local_api.py +189 -0
  33. package/pynithy/build/securelock/src/models.py +200 -176
  34. package/pynithy/build/securelock/src/securelock.py.tmpl +1037 -731
  35. package/pynithy/build/securelock/src/swift_stream_service.py +206 -186
  36. package/pynithy/build.mjs +139 -89
  37. package/pynithy/run/docker-compose-final.yml.tmpl +58 -51
  38. package/pynithy/run/docker-compose.yml.tmpl +62 -48
  39. package/pynithy/run/etny-securelock-test.yaml.tpl +4 -1
  40. package/pynithy/run/image_registry.js +17 -4
  41. package/pynithy/run.js +44 -28
  42. package/pynithy/src/serverless/Dockerfile.serverless +8 -0
  43. package/pynithy/src/serverless/requirements.txt +6 -0
  44. package/run.js +69 -28
  45. package/nodenithy/build/las/Dockerfile +0 -5
  46. package/pynithy/build/docker-compose.yml +0 -70
  47. package/pynithy/build/las/Dockerfile +0 -11
  48. package/pynithy/build/las/src/etny_entrypoint.sh +0 -6
  49. package/pynithy/build/las/src/las_entrypoint.sh +0 -26
  50. package/pynithy/build/scripts/binary-fs-build.sh +0 -28
  51. package/pynithy/build/securelock/Dockerfile.tmpl +0 -95
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+ # Runs on a STOCK python:3.14-alpine (NO SCONE, NO SGX). Renders securelock.py
3
+ # from its template and runs PyInstaller purely as a dependency-analysis pass:
4
+ # PyInstaller resolves every module/shared-object securelock needs and records
5
+ # them in build/securelock/COLLECT-00.toc. The frozen executable itself is not
6
+ # used at runtime (the enclave runs the plain securelock.py with the SCONE
7
+ # python); we only need the collected .so list + the installed site-packages,
8
+ # which the later SCONE stage bakes into the measured binary-fs.
9
+ set -e
10
+ cd /etny-securelock
11
+
12
+ echo "SECURELOCK_SESSION = ${SECURELOCK_SESSION}"
13
+
14
+ # Use '|' as the sed delimiter so values containing '/' (e.g. the RPC URL
15
+ # https://...) don't break the substitution ("sed: bad option in substitution").
16
+ cp securelock.py.tmpl securelock.py.tmp
17
+ sed -i "s|__SECURELOCK_SESSION__|${SECURELOCK_SESSION}|g" securelock.py.tmp
18
+ sed -i "s|__BUCKET_NAME__|${BUCKET_NAME}|g" securelock.py.tmp
19
+ sed -i "s|__SMART_CONTRACT_ADDRESS__|${SMART_CONTRACT_ADDRESS}|g" securelock.py.tmp
20
+ sed -i "s|__IMAGE_REGISTRY_ADDRESS__|${IMAGE_REGISTRY_ADDRESS}|g" securelock.py.tmp
21
+ sed -i "s|__RPC_URL__|${RPC_URL}|g" securelock.py.tmp
22
+ sed -i "s|__CHAIN_ID__|${CHAIN_ID}|g" securelock.py.tmp
23
+ sed -i "s|__TRUSTED_ZONE_IMAGE__|${TRUSTED_ZONE_IMAGE}|g" securelock.py.tmp
24
+ sed -i "s|__NETWORK_TYPE__|${NETWORK_TYPE}|g" securelock.py.tmp
25
+ sed -i "s|__VALIDATOR_REGISTRY_ADDRESS__|${VALIDATOR_REGISTRY_ADDRESS}|g" securelock.py.tmp
26
+ mv securelock.py.tmp securelock.py
27
+
28
+ # Dependency-analysis freeze (off-SCONE). --collect-all pulls in data/binaries
29
+ # for the crypto/web3 stack so the COLLECT toc is complete.
30
+ pyinstaller --onedir --noconfirm securelock.py
31
+
32
+ echo "pyfreeze complete: COLLECT-00.toc + site-packages ready for binary-fs"