@hsuite/helpers
A comprehensive collection of helper utilities for working with Hedera Hashgraph services, transactions, and configurations. This library provides a set of tools to simplify common operations and standardize interactions with the Hedera network.
Features
Transaction Management
Process and parse different types of transfers (HBAR, tokens, NFTs)
Handle offline transaction workflows
Support multi-signature operations
Transaction ID generation and management
Client Configuration
Network selection (Testnet/Mainnet)
Operator account management
Mirror node connectivity
Automatic network updates
RESTful API Integration
Authenticated mirror node interactions
Standardized request/response handling
Error management and logging
API key support
Module Configuration
Type-safe configuration management
Generic configuration templates
Error handling and validation
Configuration instance control
Installation
Usage
Transaction Helper
Process and extract transfer information from Hedera transactions:
Hedera Client Helper
Initialize and configure Hedera clients:
RESTful Helper
Make API calls to Hedera mirror nodes:
Offline Transaction Helper
Handle transactions in offline scenarios:
Configurable Module Helper
Create type-safe configurable modules:
API Reference
TransactionHelper
getHbarTransfers(transaction)
: Extract HBAR transfers from a transactiongetTokenTransfers(transaction)
: Extract fungible token transfers from a transactiongetNftTransfers(transaction)
: Extract NFT transfers from a transaction
HashgraphClientHelper
getClient()
: Get configured Hedera client instancegetNetwork()
: Get current network identifiergetNodeOperator()
: Get operator account configuration
HashgraphRestfulHelper
call(endpoint)
: Make GET request to mirror node endpoint
OfflineTransactionHelper
generateMultisigOfMultisig(smartAppPublicKey?)
: Generate multi-signature KeyListgetRandomNodeForNetwork(network)
: Get random node for specified networkgenerateTransactionId(accountId)
: Generate new transaction IDmakeBytes(network, transaction, accountId, transactionId?)
: Convert transaction to bytes
ConfigurableModuleHelper
config
: Access the instantiated configuration object
Contributing
Please read our contributing guidelines and code of conduct before submitting pull requests or issues.
License
This project is licensed under the terms specified in the LICENSE file.
Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.
Last updated