Socket
Book a DemoInstallSign in
Socket

@minka/types

Package Overview
Dependencies
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minka/types

TypeScript type definitions for Minka Ledger

latest
npmnpm
Version
2.28.1
Version published
Maintainers
7
Created
Source

@minka/types

TypeScript type definitions for Minka Ledger - Enable full autocomplete and type safety for Minka Ledger development.

npm version License: MIT

🚀 Quick Start

npm install @minka/types
import { LedgerLayout, LayoutRecord, LedgerSchema } from '@minka/types'

// Get full IntelliSense support for layout definitions
const layout: LedgerLayout = {
  custom: {
    title: 'Payment Processing Layout',
    version: '1.0.0',
  },
  values: [
    {
      record: LayoutRecord.Schema,
      values: [
        {
          data: {
            handle: 'payment-schema',
            // TypeScript provides full autocomplete here ✨
          },
        },
      ],
    },
  ],
}

✨ 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',
  // Full autocomplete available for all properties
}

const action = AccessAction.Create // Enum autocomplete

Error Handling

import { LedgerErrorReason } from '@minka/types'

// Type-safe error handling
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(/* config */)
const layout: LedgerLayout = {
  /* typed layout */
}

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

📄 License

MIT © Minka

Built for developers who value type safety and great DX

Keywords

minka

FAQs

Package last updated on 08 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts