# is_public

> Check whether a network identifier represents public MainNet or TestNet.

```python
from ai_economy_sdk import is_public
```

```python
def is_public(network: str) -> bool
```

Check whether a network identifier represents public MainNet or TestNet.

## Parameters

- `network` (`str`, required):
Network name, canonical short CAIP-2 identifier, or legacy long ID.

## Returns

- `returns` (`bool`):
True if the network is Algorand MainNet or TestNet, False otherwise.

## Examples

```python
>>> from ai_economy_sdk.network import is_public, MAINNET, TESTNET
>>> is_public(MAINNET)
True
>>> is_public(TESTNET)
True
>>> is_public("localnet")
False
```

## See also

- `resolve_network`: Resolve any alias to a canonical CAIP-2 identifier.

Source: [ai_economy_sdk/network.py](https://github.com/x402-avm/ai-economy-sdk/blob/main/ai_economy_sdk/network.py#L88)

Source: https://x402-avm.github.io/reference/python/ai-economy-sdk/is-public
