@hashgraphonline/standards-sdk
Version:
The Hashgraph Online Standards SDK provides a complete implementation of the Hashgraph Consensus Standards (HCS), giving developers all the tools needed to build applications on Hedera.
88 lines • 2.12 kB
TypeScript
import { Logger } from '../utils/logger';
import { NetworkType } from '../utils/types';
import { PointsState, PointsInfo } from './types';
/**
* HCS-20 Points Indexer for processing and maintaining points state
*/
export declare class HCS20PointsIndexer {
private logger;
private mirrorNode;
private state;
private isProcessing;
private lastIndexedSequence;
constructor(network: NetworkType, logger?: Logger, mirrorNodeUrl?: string);
/**
* Initialize empty state
*/
private initializeState;
/**
* Get current state snapshot
*/
getState(): PointsState;
/**
* Get points info for a specific tick
*/
getPointsInfo(tick: string): PointsInfo | undefined;
/**
* Get balance for an account and tick
*/
getBalance(tick: string, accountId: string): string;
/**
* Start indexing process
*/
startIndexing(options?: {
publicTopicId?: string;
registryTopicId?: string;
privateTopics?: string[];
pollInterval?: number;
}): Promise<void>;
/**
* Index topics once and wait for completion
*/
indexOnce(options?: {
publicTopicId?: string;
registryTopicId?: string;
privateTopics?: string[];
}): Promise<void>;
/**
* Stop indexing process
*/
stopIndexing(): void;
/**
* Index topics and update state
*/
private indexTopics;
/**
* Get registered topics from registry
*/
private getRegisteredTopics;
/**
* Index a single topic
*/
private indexTopic;
/**
* Process a single message
*/
private processMessage;
/**
* Process deploy message
*/
private processDeployMessage;
/**
* Process mint message
*/
private processMintMessage;
/**
* Process transfer message
*/
private processTransferMessage;
/**
* Process burn message
*/
private processBurnMessage;
/**
* Normalize tick to lowercase and trim
*/
private normalizeTick;
}
//# sourceMappingURL=points-indexer.d.ts.map