import { HashName } from "../crypto/hashes/Hasher.js";
import { Buffer } from "./buffer.js";
import { BaseName } from "./MultiBaseEncoder.js";

//#region src/utils/HashlinkEncoder.d.ts
type Metadata = {
  urls?: string[];
  contentType?: string;
};
type HashlinkData = {
  checksum: string;
  metadata?: Metadata;
};
declare class HashlinkEncoder {
  /**
   * Encodes a buffer, with optional metadata, into a hashlink
   *
   * @param buffer the buffer to encode into a hashlink
   * @param hashAlgorithm the name of the hashing algorithm 'sha-256'
   * @param baseEncoding the name of the base encoding algorithm 'base58btc'
   * @param metadata the optional metadata in the hashlink
   *
   * @returns hashlink hashlink with optional metadata
   */
  static encode(buffer: Buffer | Uint8Array, hashAlgorithm: HashName, baseEncoding?: BaseName, metadata?: Metadata): string;
  /**
   * Decodes a hashlink into HashlinkData object
   *
   * @param hashlink the hashlink that needs decoding
   *
   * @returns object the decoded hashlink
   */
  static decode(hashlink: string): HashlinkData;
  /**
   * Validates a hashlink
   *
   * @param hashlink the hashlink that needs validating
   *
   * @returns a boolean whether the hashlink is valid
   *
   * */
  static isValid(hashlink: string): boolean;
  private static encodeMultiHash;
  private static encodeMetadata;
  private static decodeMetadata;
}
//#endregion
export { HashlinkEncoder };
//# sourceMappingURL=HashlinkEncoder.d.ts.map