#canister #icp #cbor #encryption #config

ic_auth_types

A Rust types library used for integrating with IC-Auth

11 releases

Uses new Rust 2024

new 0.3.1 May 5, 2025
0.3.0 May 4, 2025
0.2.6 Apr 29, 2025
0.2.2 Mar 24, 2025
0.1.1 Mar 11, 2025

#430 in Magic Beans

Download history 276/week @ 2025-03-10 162/week @ 2025-03-17 292/week @ 2025-03-24 274/week @ 2025-03-31 231/week @ 2025-04-07 46/week @ 2025-04-14 32/week @ 2025-04-21 137/week @ 2025-04-28

472 downloads per month
Used in 15 crates (8 directly)

MIT license

35KB
617 lines

ic_auth_types

License Crates.io Test Docs.rs Latest Version

IC-Auth is a web authentication system based on the Internet Computer.

ic_auth_types is a Rust types library used for integrating with IC-Auth. It provides essential data structures and utilities for working with Internet Computer authentication.

Features

  • Efficient Byte Handling: Includes ByteBufB64 and ByteArrayB64 types for efficient serialization and deserialization of binary data with automatic Base64URL encoding for human-readable formats.
  • Unique Identifiers: Provides Xid type, a compact and lexicographically sortable globally unique identifier (12 bytes vs UUID's 16 bytes).
  • Authentication Primitives: Includes types for delegations, signed delegations, and authentication responses.
  • Candid Compatibility: All types implement CandidType for seamless integration with the Internet Computer.
  • Serde Support: Full serialization/deserialization support for both human-readable (JSON) and binary formats (CBOR).

Usage

Add this to your Cargo.toml:

[dependencies]
ic_auth_types = "0.3"

Enables interoperability with the original xid crate:

[dependencies]
ic_auth_types = { version = "0.3", features = ["xid"] }

License

Copyright © 2024-2025 LDC Labs.

ldclabs/ic-auth is licensed under the MIT License. See LICENSE for the full license text.

Dependencies

~1.2–8.5MB
~74K SLoC