@pbnjam/types
v0.7.2
Published
Centralized type definitions for the JAM protocol
Downloads
56
Maintainers
Readme
@pbnjam/types
Centralized type definitions for the JAM Protocol implementation.
Overview
This package serves as a single source of truth for all type definitions used across the JAM protocol implementation. It consolidates types from all packages to ensure consistency and reduce duplication.
Structure
The package is organized into logical modules:
core- Fundamental types used throughout the protocolconsensus- Safrole consensus protocol typesnetwork- Network communication and protocol message typespvm- Polkadot Virtual Machine typesblock-authoring- Block creation and validation typescli- Command-line interface typesvrf- Verifiable Random Function typescodec- Data encoding and decoding typesserialization- Gray Paper serialization types
Usage
import type {
Bytes,
BlockHeader,
Ticket,
PVMState,
VRFPublicKey
} from '@pbnjam/types'Migration
All packages have been updated to use this centralized types package. The following packages now depend on @pbnjam/types:
@pbnjam/core@pbnjam/safrole@pbnjam/pvm@pbnjam/cli@pbnjam/bandersnatch-vrf@pbnjam/block-authoring@pbnjam/codec@pbnjam/codec
Development
To build the types package:
cd packages/types
bun run buildGray Paper Compliance
All types are designed to comply with the Gray Paper specifications. Each module includes references to relevant sections of the Gray Paper where applicable.
