npm.io
9.0.3 • Published 10 months ago

@ucanto/principal

Licence
(Apache-2.0 AND MIT)
Version
9.0.3
Deps
7
Size
96 kB
Vulns
0
Weekly
0
Stars
62

@ucanto/principal

@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

For an overview and detailed usage information, refer to the main ucanto README.

Installation

npm install @ucanto/principal

Example Usage

import { ed25519 } from '@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.

Keywords