@minka/types
TypeScript type definitions for Minka Ledger - Enable full autocomplete and type safety for Minka Ledger development.

🚀 Quick Start
npm install @minka/types
import { LedgerLayout, LayoutRecord, LedgerSchema } from '@minka/types'
const layout: LedgerLayout = {
custom: {
title: 'Payment Processing Layout',
version: '1.0.0',
},
values: [
{
record: LayoutRecord.Schema,
values: [
{
data: {
handle: 'payment-schema',
},
},
],
},
],
}
✨ Features
- 🔍 Full IntelliSense - Complete autocomplete for all Minka Ledger entities
- 🛡️ Type Safety - Compile-time validation for layout definitions and API calls
- 📚 Comprehensive - 180+ type definitions covering the entire Minka ecosystem
- 🎯 Zero Runtime - Pure TypeScript definitions with no runtime overhead
- 🔗 Compatible - Works seamlessly with
@minka/ledger-sdk
and @minka/cli
📦 What's Included
Core Layout Types
LedgerLayout
- Main layout structure for defining ledger configurations
LayoutRecord
- Enumeration of all available record types
LayoutValue
- Union type representing all possible layout values
Entity Types
LedgerSchema
- Schema definitions and validation
LedgerBridge
- Bridge configurations for cross-ledger operations
LedgerCircle
- Circle management and member operations
LedgerWallet
- Wallet structures and balance management
LedgerPolicy
- Policy definitions and access control
LedgerSymbol
- Symbol configurations and metadata
LedgerSigner
- Signer management and cryptographic operations
LedgerIntent
- Intent definitions for balance transfers
LedgerEffect
- Effect structures for transaction results
Utility Types
LedgerHandle
- Unique identifiers for all entities
LedgerMeta
- Metadata structures and proofs
LedgerAccess
- Access control and permission types
LedgerFilter
- Filtering and search options
LedgerErrorReason
- Error handling and status codes
🔧 Usage Examples
Basic Layout Definition
import { LedgerLayout, LayoutRecord } from '@minka/types'
const layout: LedgerLayout = {
custom: { title: 'My Layout' },
values: [
{
record: LayoutRecord.Wallet,
values: [{ data: { handle: 'user-wallet' } }],
},
],
}
Type-Safe Entity Operations
import { LedgerWallet, LedgerSymbol, AccessAction } from '@minka/types'
const wallet: Partial<LedgerWallet> = {
handle: 'payment-wallet',
}
const action = AccessAction.Create
Error Handling
import { LedgerErrorReason } from '@minka/types'
const errorReason = LedgerErrorReason.BridgeAccountNotFound
🔗 Integration
With Minka Ledger SDK
npm install @minka/ledger-sdk @minka/types
import { LedgerSdk } from '@minka/ledger-sdk'
import { LedgerLayout } from '@minka/types'
const sdk = new LedgerSdk()
const layout: LedgerLayout = {
}
With Minka CLI
The types work seamlessly with layout files used by the Minka CLI for enhanced development experience.
📋 Requirements
- TypeScript: ^4.0.0 or later
- Node.js: ^16.0.0 or later
📚 Documentation
🤝 Related Packages
📄 License
MIT © Minka
Built for developers who value type safety and great DX ✨