@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.
56 lines • 1.88 kB
TypeScript
import { AccountId, TopicId } from '@hashgraph/sdk';
import { Logger } from '../utils/logger';
import { HederaMirrorNode } from '../services/mirror-node';
import { NetworkType } from '../utils/types';
import { HCS20ClientConfig, PointsInfo, PointsTransaction, DeployPointsOptions, MintPointsOptions, TransferPointsOptions, BurnPointsOptions, RegisterTopicOptions } from './types';
/**
* Abstract base class for HCS-20 clients
*/
export declare abstract class HCS20BaseClient {
protected logger: Logger;
protected mirrorNode: HederaMirrorNode;
protected network: NetworkType;
protected registryTopicId: string;
protected publicTopicId: string;
constructor(config: HCS20ClientConfig);
/**
* Deploy new points
*/
abstract deployPoints(options: DeployPointsOptions): Promise<PointsInfo>;
/**
* Mint points
*/
abstract mintPoints(options: MintPointsOptions): Promise<PointsTransaction>;
/**
* Transfer points
*/
abstract transferPoints(options: TransferPointsOptions): Promise<PointsTransaction>;
/**
* Burn points
*/
abstract burnPoints(options: BurnPointsOptions): Promise<PointsTransaction>;
/**
* Register a topic in the registry
*/
abstract registerTopic(options: RegisterTopicOptions): Promise<void>;
/**
* Validate HCS-20 message using Zod schema
*/
protected validateMessage(message: any): {
valid: boolean;
errors?: string[];
};
/**
* Normalize tick to lowercase and trimmed
*/
protected normalizeTick(tick: string): string;
/**
* Convert account to string format
*/
protected accountToString(account: string | AccountId): string;
/**
* Convert topic to string format
*/
protected topicToString(topic: string | TopicId): string;
}
//# sourceMappingURL=base-client.d.ts.map