@le-space/ucanto-principal
v9.1.1
Published
ucanto principal
Maintainers
Readme
@le-space/ucanto-principal
@le-space/ucanto-principal provides identity management and cryptographic utilities for UCAN-based authentication and authorization. It enables secure key generation, signing, and verification of UCANs.
What It Provides
- Key Management: Supports cryptographic key generation and handling.
- UCAN Signing & Verification: Ensures authenticity and integrity of UCAN tokens.
- Identity Handling: Manages decentralized identifiers (DIDs) for secure communication.
How It Fits with Other Modules
@le-space/ucanto-core: Uses principal identities for capability execution.@le-space/ucanto-server: Relies on identity verification for secure RPC handling.@le-space/ucanto-interface: Defines standard identity-related types.@le-space/ucanto-transport: Ensures encrypted and authenticated communication.
For an overview and detailed usage information, refer to the main ucanto README.
Installation
npm install @le-space/ucanto-principalExample Usage
import { ed25519 } from '@le-space/ucanto-principal';
const keypair = ed25519.generate();
const signature = keypair.sign(new Uint8Array([1, 2, 3]));
const isValid = keypair.verify(new Uint8Array([1, 2, 3]), signature);For more details, see the ucanto documentation.
