# emptyZswapLocalState

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight-ntwrk/compact-runtime v0.21.0**](https://docs.midnight.network/api-reference/compact-runtime.md)

***

[@midnight-ntwrk/compact-runtime](https://docs.midnight.network/api-reference/compact-runtime/globals.md) / emptyZswapLocalState

# Function: emptyZswapLocalState()

```
function emptyZswapLocalState(coinPublicKey): EncodedZswapLocalState;
```

Constructs a new [EncodedZswapLocalState](https://docs.midnight.network/api-reference/compact-runtime/interfaces/EncodedZswapLocalState.md) with the given coin public key. The result can be used to create a [ConstructorContext](https://docs.midnight.network/api-reference/compact-runtime/interfaces/ConstructorContext.md).

## Parameters[​](#parameters "Direct link to Parameters")

### coinPublicKey[​](#coinpublickey "Direct link to coinPublicKey")

The Zswap coin public key of the user executing the circuit.

`string` | [`EncodedCoinPublicKey`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/EncodedCoinPublicKey.md)

## Returns[​](#returns "Direct link to Returns")

[`EncodedZswapLocalState`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/EncodedZswapLocalState.md)
