@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.
53 lines • 1.42 kB
TypeScript
import { LogLevel } from './logger';
import { NetworkType } from './types';
/**
* Options for HRL resolution
*/
export interface HRLResolutionOptions {
network: NetworkType;
returnRaw?: boolean;
cdnEndpoint?: string;
}
/**
* Result of an HRL resolution operation
*/
export interface HRLResolutionResult {
content: string | ArrayBuffer;
contentType: string;
topicId: string;
isBinary: boolean;
}
export interface ContentWithType {
content: string | ArrayBuffer;
contentType: string;
isBinary: boolean;
}
/**
* Utility class for resolving Hedera Resource Locators across the SDK
*/
export declare class HRLResolver {
private logger;
private defaultEndpoint;
constructor(logLevel?: LogLevel);
/**
* Determines if a MIME type represents binary content
*/
private isBinaryContentType;
/**
* Parses an HRL string into its components
*/
parseHRL(hrl: string): {
standard: string;
topicId: string;
} | null;
/**
* Validates if a string is a valid HRL
*/
isValidHRL(hrl: string): boolean;
getContentWithType(hrl: string, options: HRLResolutionOptions): Promise<ContentWithType>;
/**
* Resolves HRL content with proper content type detection
*/
resolveHRL(hrl: string, options: HRLResolutionOptions): Promise<HRLResolutionResult>;
}
//# sourceMappingURL=hrl-resolver.d.ts.map