> ## Documentation Index
> Fetch the complete documentation index at: https://pdsx.zzstoatzz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# identity

# `pdsx._internal.identity`

identity checks: bidirectional handles, record proofs, PLC history.

## Functions

### `verify_identity` <sup>[https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/\_internal/identity.py#L35](https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/identity.py#L35)</sup>

```python theme={null}
verify_identity(repo: str, resolver: AsyncIdResolver | None = None) -> Identity
```

resolve a handle or DID and check the handle in both directions.

a handle only counts as verified when it resolves to the DID *and* the
DID document lists it in alsoKnownAs. either half alone can be forged:
anyone can put any handle in their own DID document, and a DNS record
can point at any DID.

### `fetch_record_proof` <sup>[https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/\_internal/identity.py#L83](https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/identity.py#L83)</sup>

```python theme={null}
fetch_record_proof(did: str, collection: str, rkey: str, resolver: AsyncIdResolver | None = None, timeout: float = 10.0) -> RecordProof
```

fetch sync.getRecord from the repo's own PDS and verify it.

the signing key and PDS come from the DID document, never from the PDS.

### `plc_history` <sup>[https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/\_internal/identity.py#L121](https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/identity.py#L121)</sup>

```python theme={null}
plc_history(did: str, timeout: float = 10.0) -> dict[str, Any]
```

the did:plc audit log, each op checked and summarized.

## Classes

### `Identity` <sup>[https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/\_internal/identity.py#L23](https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/identity.py#L23)</sup>

**Methods:**

#### `to_dict` <sup>[https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/\_internal/identity.py#L31](https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/identity.py#L31)</sup>

```python theme={null}
to_dict(self) -> dict[str, Any]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.