JSPM

  • Created
  • Published
  • Downloads 4380
  • Score
    100M100P100Q125559F
  • License (Apache-2.0 AND MIT)

interface definitions for ucanto

Package Exports

  • @ucanto/interface

Readme

@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

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🔑xyz',
  audience: 'did🔑abc'
};

For more details, see the ucanto documentation.