atproto-record
Cryptographic signature operations for AT Protocol records with IPLD DAG-CBOR serialization and AT-URI parsing.
Overview
atproto-record provides comprehensive signature operations for AT Protocol records, including cryptographic signing, verification, AT-URI parsing, and proper IPLD DAG-CBOR serialization. This library implements the AT Protocol signature format with proper $sig object handling for secure record attestation.
Features
- Record signing: Create cryptographic signatures on AT Protocol records
- Signature verification: Verify signatures against public keys and issuers
- AT-URI parsing: Parse and validate AT Protocol URIs into component parts
- IPLD serialization: Proper DAG-CBOR serialization for signature consistency
- Multi-curve support: Support for P-256, P-384, and K-256 elliptic curves
- Structured errors: Comprehensive error handling with detailed error types
- CLI tools: Command-line utilities for record operations (requires
clapfeature)
Binaries
All CLI tools require the clap feature and use consistent command-line argument processing:
- atproto-record-sign: Sign AT Protocol records with cryptographic signatures
- atproto-record-verify: Verify AT Protocol record signatures
Library Usage
Creating Signatures
use signature;
use identify_key;
use json;
let key_data = identify_key?;
let record = json!;
let signature_object = json!;
let signed_record = create.await?;
Verifying Signatures
let issuer_key = identify_key?;
verify.await?;
AT-URI Parsing
use ATURI;
use FromStr;
let aturi = ATURIfrom_str?;
println!;
println!;
println!;
Command Line Usage
All CLI tools require the clap feature:
# Build with CLI support
# Sign a record
# Verify a signature
License
MIT License