---
title: "Create P2SAddress from Sigma source"
method: POST
path: "/script/p2sAddress"
tags: ["script"]
---

# Create P2SAddress from Sigma source

`POST /script/p2sAddress`

## Request body

- CompileRequest
  - `source` string, required — Source code of the ErgoScript to be compiled
  - `treeVersion` integer, required — Version of ErgoTree to compile to

## Response `200`

Ergo address derived from source

- AddressHolder — Holds encoded ErgoAddress
  - `address` string, required — Encoded Ergo Address

## Other responses

- `400` — Bad source
- `default` — Error

## Changes

- **2026-08-11** `a731602272c6` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API
- **2026-08-02** `dc0b9844c2d1` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
- **2026-07-22** `2788fc3df4e4` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API
- **2026-07-17** `ef97e678f020` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
- **2026-07-08** `ac1f674d89f0` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API

[Full history](https://skmtc.dev/ergoplatform/apis/ergo-node-api/changes/script/p2sAddress/post.md)

---

[API](https://skmtc.dev/ergoplatform/apis/ergo-node-api.md) · [All operations](https://skmtc.dev/ergoplatform/apis/ergo-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ergoplatform/ergo-node-api/revisions/a731602272c6/schema)
