> For the complete documentation index, see [llms.txt](https://noiho.gitbook.io/noiho/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noiho.gitbook.io/noiho/developers/api-consumers/wrap-and-unwrap.md).

# Execute wrap and unwrap orders

Send wrap deposits once, or broadcast the returned unwrap transactions from the authorized wallet.

| Direction          | User action                                                                      | Service action                                                                  |
| ------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Wrap: XMR → XMRn   | Send XMR to the returned unique depositAddress on the advertised Monero network. | Observe deposits, create the wrap, record payment proof and monitor settlement. |
| Unwrap: XMRn → XMR | Sign and broadcast approve, then requestUnwrap, on the returned EVM chain.       | Bind the request hash. LP and witness services handle payment and settlement.   |

For wrap, display depositAddress and expiresAt. New API orders aggregate deposits to that subaddress. Pool and mined copies count once. Existing funded orders retain their earlier deposit policy.

For unwrap, use the two returned unsigned transaction requests without changing their economic terms. Approve the exact token amount. Wait for approval to mine successfully before broadcasting requestUnwrap. The user pays EVM gas. The server never receives private keys or raw signed transactions.

Persist transaction hashes. Reconcile an uncertain broadcast response before trying again. POST /v1/orders/{id}/transactions registers the requestUnwrap hash, not the approval hash.

```json
{"txHash":"0xREQUEST_UNWRAP_TRANSACTION_HASH"}
```

Binding requires a successful receipt with two confirmations. The server checks the configured bridge contract, authorized sender, contract-origin orderPlaced event, direction, owner, amounts and destination. Unconfirmed receipts return 202: retry the same hash. Conflicting bindings return 409.

HTTP success is not settlement. Read the current order state. See [Order lifecycle](/noiho/architecture/order-lifecycle.md) for LP and witness responsibilities.

> **Note: Submission, delivery and finalization are different**
>
> Only COMPLETED reports final settlement. XMRn delivery and witness-bond finalization are separate events. Unwrap actual output appears after successful witnessing/finalization. Do not infer payment success from an accepted API request.
