@hashgraphonline/conversational-agent
Version:
Hashgraph Online conversational AI agent implementing HCS-10 communication, HCS-2 registries, and content inscription on Hedera. https://hol.org
33 lines (30 loc) • 887 B
text/typescript
import { NetworkType } from '@hashgraphonline/standards-sdk';
export enum EntityFormat {
TOPIC_ID = 'topicId',
HRL = 'hrl',
SCHEDULE_ID = 'scheduleId',
TOKEN_ID = 'tokenId',
ADDRESS = 'address',
SYMBOL = 'symbol',
SERIAL_NUMBER = 'serialNumber',
METADATA = 'metadata',
ACCOUNT_ID = 'accountId',
ALIAS = 'alias',
EVM_ADDRESS = 'evmAddress',
CONTRACT_ID = 'contractId',
FILE_ID = 'fileId',
ANY = 'any'
}
export interface ConversionContext {
networkType?: NetworkType;
sessionId?: string;
toolName?: string;
toolPreferences?: Record<string, string>;
[key: string]: unknown;
}
export interface FormatConverter<TSource = string, TTarget = string> {
sourceFormat: EntityFormat;
targetFormat: EntityFormat;
canConvert(source: string, context: ConversionContext): boolean;
convert(entity: TSource, context: ConversionContext): Promise<TTarget>;
}