A comprehensive TypeScript library providing type definitions, interfaces, and models for validating Hedera Hashgraph network operations and smart app interactions.
The @hsuite/validators-types
package is a core component of the HSuite ecosystem, offering a robust type system for validating various blockchain operations including accounts, tokens, consensus services, and DAO governance. It provides type safety and standardization across the HSuite platform.
npm install @hsuite/validators-types
- Account Validation Types: Comprehensive type definitions for account creation, updates, and management operations
- Token Service Types: Type definitions for HTS (Hedera Token Service) operations including creation, transfers, and management
- Consensus Service Types: Types for HCS (Hedera Consensus Service) topic creation and message submission
- DAO Governance Types: Type definitions for DAO creation, proposals, and voting mechanisms
- Condition-based Validation: Flexible type system for defining and composing validation rules
- Helper Utilities: Common type definitions for utility functions and shared operations
The library is organized into several key namespaces:
The root namespace containing all validator interfaces and types:
-
IAccount
: Account validation interfaces -
IToken
: Token operation interfaces -
IConsensus
: Consensus service interfaces -
IDAO
: DAO governance interfaces -
IConditions
: Validation rule interfaces -
IHelper
: Utility interfaces -
IConfig
: Configuration interfaces -
IEntity
: Core entity interfaces
Implementation models and types for validation operations:
-
Account
: Account validation models -
Token
: Token operation models -
Consensus
: Consensus service models -
DAO
: DAO governance models -
Conditions
: Validation rule models -
Helper
: Utility models
import { IValidators, Validators } from '@hsuite/validators-types';
// Using interfaces
class CustomTokenValidator implements IValidators.IToken {
// Implementation
}
// Using models
const accountValidator = new Validators.Account.Create();
const tokenValidator = new Validators.Token.Create();
-
@nestjs/common
: ^10.4.2 -
@nestjs/core
: ^10.4.2
-
@hsuite/nestjs-swagger
: 1.0.3 -
@hsuite/did-sdk-js
: ^1.0.3 -
@hsuite/vc-sl-sdk-js
: ^1.0.3
Comprehensive documentation is available using Compodoc. To generate and view the documentation:
npm run compodoc
To check documentation coverage:
npm run compodoc:coverage
Current version: 2.0.0
This package is part of the HSuite Enterprise ecosystem.
Built with ❤️ by the HbarSuite Team
Copyright © 2024 HbarSuite. All rights reserved.