Skip to main content
Cardano DevKit Logo

Cardano DevKit

All-in-one development toolkit for Cardano blockchain

1,369+Tests
100%TypeScript
MITLicense

Quick Install

Get started in seconds with your preferred package manager

npm install cardano-devkit

Why Cardano DevKit?

Everything you need to build production-ready Cardano applications

Local Devnet

Spin up a full Cardano devnet locally with configurable block times (100ms-1000ms). Perfect for rapid development and testing.

Multi-Network Support

Seamlessly switch between Mainnet, Preprod, Preview, and local devnet. One API, all networks.

React Hooks

First-class React support with hooks for wallet connection, transactions, and network state.

TypeScript First

Full TypeScript support with comprehensive types for a great developer experience.

Built on Lucid Evolution

Powered by Lucid Evolution for reliable transaction building and smart contract interaction.

CLI Tools

Powerful command-line tools for devnet management, wallet operations, and debugging.

Smart Contract Templates

Pre-built templates for escrow, vesting, timelocks, auctions, and more.

Conway Era Ready

Full governance support including DRep registration, voting, and delegation.

Batch Transactions

Build complex multi-action transactions with the fluent BatchBuilder API.

Quick Start Examples

Get up and running with just a few lines of code

Basic Setup

import { createDevKit } from 'cardano-devkit';

// Initialize for any network
const devKit = createDevKit({ network: 'Preprod' });
await devKit.init();

// Get Lucid instance for transactions
const lucid = devKit.getLucid();

Local Devnet

import { createDevnetManager } from 'cardano-devkit';

// Start a local devnet with fast blocks
const devnet = createDevnetManager({
blockTimeMs: 500, // 500ms blocks for rapid testing
enableOgmios: true,
enableKupo: true
});

await devnet.start();
console.log('Devnet running at:', devnet.getApiUrl());

React Integration

import { CardanoProvider, useCardano } from 'cardano-devkit';

// Wrap your app
<CardanoProvider network="Preprod" autoConnect>
<App />
</CardanoProvider>

// Use hooks anywhere
function WalletButton() {
const { isConnected, connect, address } = useCardano();
return isConnected
? <span>{address.slice(0, 20)}...</span>
: <button onClick={connect}>Connect Wallet</button>;
}

Powerful CLI

Manage your local devnet and more from the command line

# Start local devnet with fast blocks
npx cardano-devkit start --block-time 500

# Check devnet status
npx cardano-devkit status

# Fund a test address
npx cardano-devkit faucet addr_test1qz... --amount 1000

# View transaction history
npx cardano-devkit history addr_test1qz...

# Health check all services
npx cardano-devkit doctor

Ready to Build on Cardano?

Join developers building the future of decentralized finance.