# ExactAvmServerScheme

> AVM server implementation for the Exact payment scheme (V2).

```python
from x402_algorand.exact import ExactAvmServerScheme  # defined as x402_algorand.exact.server.ExactAvmScheme
```

```python
class ExactAvmServerScheme()
```

AVM server implementation for the Exact payment scheme (V2).

Parses prices and enhances payment requirements with AVM-specific data.

Note: feePayer is OPTIONAL for AVM (unlike SVM which requires it).
If not provided, the client pays their own fees.

## Attributes

- `scheme` (`Any`):
The scheme identifier ("exact").

## Examples

```python
from x402_algorand.exact import ExactAvmServerScheme

scheme = ExactAvmServerScheme()
price = scheme.parse_price({"amount": "10000", "asset": "0"}, "algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k")
print(price.amount, price.asset)  # 10000 0
```

## Methods

### `register_money_parser`

```python
def register_money_parser(parser: MoneyParser) -> ExactAvmScheme
```

Register custom money parser in the parser chain.

Multiple parsers can be registered - tried in registration order.
If parser returns None, next parser is tried.

**Parameters**

- `parser` (`MoneyParser`, required):
Custom function to convert amount to AssetAmount.

**Returns**

- `returns` (`ExactAvmScheme`):
Self for chaining.

### `parse_price`

```python
def parse_price(price: Price, network: Network) -> AssetAmount
```

Parse price into asset amount.

If price is already AssetAmount, returns it directly.
If price is Money (str|float), parses and tries custom parsers.
Falls back to default USDC conversion.

**Parameters**

- `price` (`Price`, required):
Price to parse (string, number, or AssetAmount dict).

- `network` (`Network`, required):
Network identifier.

**Returns**

- `returns` (`AssetAmount`):
AssetAmount with amount, asset, and extra fields.

### `enhance_payment_requirements`

```python
def enhance_payment_requirements(
    requirements: PaymentRequirements,
    supported_kind: SupportedKind,
    extension_keys: list[str],
) -> PaymentRequirements
```

Add scheme-specific enhancements to payment requirements.

For AVM:
- Adds decimals to extra (required for display)
- Adds feePayer from facilitator if provided (OPTIONAL)
- Adds genesis info if available

**Parameters**

- `requirements` (`PaymentRequirements`, required):
Base payment requirements.

- `supported_kind` (`SupportedKind`, required):
Supported kind from facilitator.

- `extension_keys` (`list[str]`, required):
Extension keys being used.

**Returns**

- `returns` (`PaymentRequirements`):
Enhanced payment requirements.

### `get_asset_info`

```python
def get_asset_info(network: str, asset: str) -> dict[str, Any]
```

Get information about an asset.

**Parameters**

- `network` (`str`, required):
Network identifier.

- `asset` (`str`, required):
ASA ID as string.

**Returns**

- `returns` (`dict[str, Any]`):
Asset info with name, decimals, asa_id.

Source: [x402_algorand/exact/server.py](https://github.com/x402-avm/x402-algorand/blob/main/x402_algorand/exact/server.py#L33)

Source: https://x402-avm.github.io/reference/python/x402-algorand/exact-avm-server-scheme
