Socket
Book a DemoInstallSign in
Socket

@ucanto/interface

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ucanto/interface

interface definitions for ucanto

latest
Source
npmnpm
Version
11.0.1
Version published
Maintainers
3
Created
Source

@ucanto/interface

@ucanto/interface provides shared type definitions and contracts used across the ucanto ecosystem. It ensures consistent and type-safe interactions between different modules, facilitating seamless integration.

What It Provides

  • Shared Type Definitions: Standardized types for capabilities, invocations, and responses.
  • Interface Contracts: Defines clear API contracts for ucanto modules.
  • Type Safety: Enhances reliability through TypeScript-based type checking.

How It Fits with Other Modules

  • @ucanto/core: Uses the interfaces to define and execute capabilities.
  • @ucanto/server: Implements service logic based on interface definitions.
  • @ucanto/transport: Adopts standardized encoding and transport interfaces.
  • @ucanto/principal: Uses identity-related interfaces for cryptographic operations.
  • @ucanto/client: Ensures consistent request and response structures.

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

Installation

npm install @ucanto/interface

Example Usage

import { Capability, Invocation } from '@ucanto/interface';

const exampleCapability: Capability = {
  can: 'file/read',
  with: 'file://example.txt'
};

const exampleInvocation: Invocation = {
  capability: exampleCapability,
  issuer: 'did:key:xyz',
  audience: 'did:key:abc'
};

For more details, see the ucanto documentation.

Keywords

UCAN

FAQs

Package last updated on 24 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts