npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hsuite/smart-transaction-types

v2.0.2

Published

Type definitions and models for the HbarSuite Smart Transaction system.

Downloads

18

Readme

@hsuite/smart-transaction-types

Type definitions and models for the HbarSuite Smart Transaction system.

Description

The @hsuite/smart-transaction-types package provides TypeScript type definitions, interfaces, and model implementations for the HbarSuite Smart Transaction system. It defines the contract and implementations for handling distributed key generation (DKG), transaction processing, and other smart transaction features in the HbarSuite ecosystem.

Features

  • 🏗️ Comprehensive type definitions for smart transactions
  • 📝 Interface definitions for transaction details, execution, and requests
  • 🔄 Concrete model implementations with proper validation
  • 🎯 Type-safe transaction handling
  • 📊 Transaction status tracking
  • 🛡️ Swagger/OpenAPI integration via @hsuite/nestjs-swagger

Installation

npm install @hsuite/smart-transaction-types

Architecture

The library is organized into two main namespaces:

ISmartTransaction Namespace

Contains all interface definitions and type declarations:

  • IDetails: Interface for transaction details including status and transaction ID
  • IExecute: Interface for transaction execution with byte data
  • IRequest: Interface for transaction requests with message and job tracking

SmartTransaction Namespace

Provides concrete implementations of the interfaces:

  • Abstract: Base class with core functionality for handling transaction bytes
  • Details: Implementation for tracking transaction status and identifiers
  • Execute: Handles transaction execution and submission
  • Request: Manages transaction requests with proper context and tracking

Usage

Transaction Details

import { SmartTransaction, ISmartTransaction } from '@hsuite/smart-transaction-types';

// Create transaction details
const details = new SmartTransaction.Details(Status.SUCCESS, '[email protected]');

Transaction Execution

import { SmartTransaction } from '@hsuite/smart-transaction-types';

// Create and execute a transaction
const execute = new SmartTransaction.Execute(new Uint8Array([1,2,3,4]));
const tx = execute.fromBytes();

Transaction Requests

import { SmartTransaction } from '@hsuite/smart-transaction-types';

// Create a new transaction request
const request = new SmartTransaction.Request(
  new Uint8Array([1,2,3,4]),
  'Execute token transfer',
  'job-123' // optional job ID
);

API Documentation

Interfaces

ISmartTransaction.IDetails

  • Represents transaction details
  • Contains transaction status and unique identifier
  • Used for tracking transaction state

ISmartTransaction.IExecute

  • Defines transaction execution structure
  • Handles transaction byte data
  • Used for submitting transactions

ISmartTransaction.IRequest

  • Represents transaction requests
  • Includes transaction data and descriptive message
  • Optional job ID for tracking

Models

SmartTransaction.Abstract

Base class providing core transaction functionality:

  • Byte handling
  • Transaction reconstruction
  • Common utilities

SmartTransaction.Details

Implementation for transaction details:

  • Status management
  • Transaction ID handling
  • State tracking

SmartTransaction.Execute

Handles transaction execution:

  • Byte data processing
  • Transaction submission
  • Execution state management

SmartTransaction.Request

Manages transaction requests:

  • Request data handling
  • Message management
  • Job tracking

Documentation

Compodoc Documentation

For detailed API documentation, use Compodoc:

  1. Generate documentation:
yarn compodoc
  1. Generate with coverage information:
yarn compodoc:coverage

Version

Current Version: 2.0.0

License

This package is part of the HbarSuite ecosystem and is covered by its license terms.