Getting Started with UCAN

This guide will walk you through the basics of implementing UCAN (User Controlled Authorization Network) in your applications.

What is UCAN?

UCAN is a capability-based authorization system that enables users to delegate permissions without requiring a centralized authority. It's built on cryptographic tokens and allows for decentralized, secure, and fine-grained access control.

Core Concepts

Capabilities

UCANs represent capabilities - specific permissions that can be delegated to others. Each capability defines what actions can be performed on which resources.

Delegation

Users can delegate their capabilities to others, creating a chain of authorization. Delegations can include constraints like time limits and reduced scope.

Invocation

To use a capability, you create an invocation that references the UCAN token and specifies the exact action you want to perform.

Quick Start

1 Choose Your Library

Select a UCAN library for your programming language. We have official implementations for JavaScript, Rust, and Go.

Browse Libraries

2 Create Your First UCAN

Start by creating a root UCAN that grants yourself the capabilities you need for your application.

// Example in JavaScript
import { Capability } from "iso-ucan/capability"

const delegation = await MyCap.delegate({
  iss: myKeypair,
  aud: targetDID,
  sub: myKeypair,
  pol: [],
  exp: Math.floor(Date.now() / 1000) + 3600
})

3 Delegate and Invoke

Delegate capabilities to other users and create invocations to exercise those capabilities.

See Examples

Ready to Dive Deeper?

Explore the full specification to understand all of UCAN's capabilities and implementation details.