パッケージの詳細

@ucanto/interface

web3-storage25.3k(Apache-2.0 AND MIT)11.0.0

interface definitions for ucanto

UCAN, RPC, types

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

For more details, see the ucanto documentation.

更新履歴

Changelog

0.1.0-beta (2022-05-03)

Features

  • improve http transport configuration (#10) (c99be08)

0.0.3-beta (2022-05-02)

Bug Fixes

0.0.2-beta (2022-04-24)

Bug Fixes

0.0.1-beta (2022-04-24)

Features

Bug Fixes

Miscellaneous Chores