# make_identity_txn

> Create an unsigned identity proof payment transaction.

```python
from ai_economy_sdk import make_identity_txn
```

```python
def make_identity_txn(
    address: str,
    genesis_hash_b64: str,
    sp: algosdk.transaction.SuggestedParams | None = None,
    ts: int | None = None,
) -> algosdk.transaction.PaymentTxn
```

Create an unsigned identity proof payment transaction.

This transaction is never submitted to the network. It proves account ownership
by signing a zero-amount, zero-fee self-payment containing a timestamped identity note.

## Parameters

- `address` (`str`, required):
Algorand public address of the sender/prover.

- `genesis_hash_b64` (`str`, required):
Base64-encoded genesis hash of the target network.

- `sp` (`algosdk.transaction.SuggestedParams | None`, default `None`):
Base suggested transaction parameters. If omitted, default parameters
with fee=0, first=1, last=1000, and flat_fee=True are generated.

- `ts` (`int | None`, default `None`):
Unix timestamp (seconds) embedded in the transaction note. Defaults
to current system time (`int(time.time())`).

## Returns

- `returns` (`algosdk.transaction.PaymentTxn`):
Unsigned PaymentTxn with sender=address, receiver=address, amount=0, fee=0,
and note `x402-identity:<address>:<ts>`.

## Examples

```python
>>> from algosdk import account
>>> from ai_economy_sdk.identity import make_identity_txn
>>> _, addr = account.generate_account()
>>> txn = make_identity_txn(addr, "wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=", ts=1700000000)
>>> txn.amt
0
>>> txn.fee
0
>>> txn.sender == txn.receiver == addr
True
```

## See also

- `sign_identity_txn`: Create and sign this transaction into an X-Identity-Txn header.
- `verify_identity_txn`: Validate and decode the signed transaction.

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

Source: https://x402-avm.github.io/reference/python/ai-economy-sdk/make-identity-txn
