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

# Create P2SHAddress from Sigma source

`POST /script/p2shAddress`

## 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`

P2SH address derived from source

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

## Other responses

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

## Changes

- **2025-06-17** `a0078a982142` — 1 breaking
  - added the new required request property `treeVersion`
- **2025-05-23** `5e1f436c0a2f` — 1 warning
  - removed the request property `treeVersion`
- **2025-04-16** `7ded45111715` — 1 breaking
  - added the new required request property `treeVersion`

[Change history](https://skmtc.dev/ergoplatform/apis/ergo-node-api/changes/script/p2shAddress/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/ce177636b3e4/schema)
