# tangled-api
`tangled-api` is the low-level, lexicon-generated Rust XRPC client used by the
[Tangled CLI](https://tangled.org/dzejkop.space/tangled-cli).
It provides:
- Generated request builders and data types for Tangled and AT Protocol
lexicons
- Transport helpers for JSON, unit, and byte responses
- Structured XRPC errors
- Preservation of unknown record fields during serialization round trips
The crate intentionally contains no authentication policy or multi-step
orchestration. Consumers attach the required authorization headers and compose
individual requests into higher-level operations.
```rust,no_run
use tangled_api::lexicon::sh::tangled::repo;
# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let http = reqwest::Client::new();
let params = repo::describe_repo::Params {
repo_did: "did:plc:example".to_string(),
};
let request = repo::describe_repo(&http, "https://knot1.tangled.sh", ¶ms);
let output: repo::describe_repo::Output = tangled_api::xrpc::send(request).await?;
# Ok(())
# }
```
## License
Licensed under either of Apache License, Version 2.0 or MIT license at your
option.