> For the complete documentation index, see [llms.txt](https://docs.ethernity.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ethernity.cloud/ethernity-client-installation.md).

# Ethernity SDK Quick Start

The Ethernity Cloud SDK lets you package your own code (a "backend") into an attestable, confidential enclave image and run it as a **Proof of eXecution** task on the Ethernity Cloud network. Two SDKs are available — pick the one that matches your stack. Both expose the same workflow: initialize a project, build the secure image, publish it, then run.

### Which SDK?

|             | Package                                                                            | Install                               | Runtime                                    |
| ----------- | ---------------------------------------------------------------------------------- | ------------------------------------- | ------------------------------------------ |
| **Node.js** | [`@ethernity-cloud/sdk-js`](https://www.npmjs.com/package/@ethernity-cloud/sdk-js) | `npm install @ethernity-cloud/sdk-js` | Node.js 16+                                |
| **Python**  | [`ethernity-cloud-sdk-py`](https://pypi.org/project/ethernity-cloud-sdk-py/)       | `pip install ethernity-cloud-sdk-py`  | Python 3.10+ (Linux/macOS), 3.13 (Windows) |

Both SDKs can target either dApp template type:

* **Nodenithy** — your backend code is JavaScript / Node.js.
* **Pynithy** — your backend code is Python.

### Prerequisites

**Linux:**

* build-essential
* Docker + docker-compose
* Node.js 16+ (JS SDK) and/or Python 3.10+ (Python SDK)

**Windows:**

* Docker Desktop
* Node.js 16+ (JS SDK) and/or Python 3.13 (Python SDK)

### Installation

#### Node.js SDK

```bash
npm install @ethernity-cloud/sdk-js
```

Installing the package adds the `ecld-init`, `ecld-build`, and `ecld-publish` scripts to your project's `package.json` (via its postinstall step), so you can run them with `npm run`.

#### Python SDK

```bash
python -m venv venv
source venv/bin/activate        # macOS / Linux
venv\Scripts\activate           # Windows
pip install ethernity-cloud-sdk-py
```

The Python package exposes the `ecld-init`, `ecld-build`, and `ecld-publish` commands directly on your PATH.

### Workflow

The commands are identical for both SDKs.

* **Initialize** — `ecld-init` Sets up the project: choose the dApp type (Nodenithy / Pynithy) and the blockchain network, then the scaffold is generated. You will find a `src/serverless/` directory containing a `backend` file — this is where you add the functions your dApp calls, e.g.:

  ```python
  def hello(msg="World"):
      return "Hello " + msg
  ```
* **Build** — `ecld-build` Builds the project and stores the docker registry output under `registry/`. This is where your backend functions are baked into the secure enclave images.
* **Publish** — `ecld-publish` Required after build. Integrates the secure certificates used during executions and registers the image into the Ethernity Cloud Image Registry (on-chain), so nodes can attest and run the exact, untampered image.
* **Run** — start the demo/frontend to submit a task and test the integration end-to-end.

### Blockchain compatibility

The SDK can build and publish for the following networks:

| Network          | Type    | Chain ID |
| ---------------- | ------- | -------- |
| Bloxberg Mainnet | mainnet | 8995     |
| Bloxberg Testnet | testnet | 8995     |
| Polygon Mainnet  | mainnet | 137      |
| Polygon Amoy     | testnet | 80002    |
| IoTeX Testnet    | testnet | 4690     |
| Ethereum Sepolia | testnet | 11155111 |
| LitVM LiteForge  | testnet | 4441     |

> **Mainnet vs testnet attestation.** On **mainnet**, enclaves are signed `--production` and attested through CAS (real Intel SGX DCAP). On **testnet**, enclaves run in a non-CAS mode and self-sign their certificate from their own `MR_ENCLAVE` (`[TESTNET-INSECURE]`) — convenient for development, but not a production security guarantee.

### Tested platforms

* Windows 10 / 11
* Linux (Ubuntu 20.04+)
