@hashgraphonline/standards-agent-kit
Version:
A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication. https://hol.org
23 lines (22 loc) • 779 B
JavaScript
function generateDefaultMetadata(params) {
const defaultName = params.fileName?.replace(/\.[^/.]+$/, "") || "Hashinal NFT";
let defaultType = "media";
if (params.mimeType?.startsWith("image/")) {
defaultType = "image";
} else if (params.mimeType?.startsWith("video/")) {
defaultType = "video";
} else if (params.mimeType?.startsWith("audio/")) {
defaultType = "audio";
}
return {
name: params.name || defaultName,
creator: params.creator || params.operatorAccount,
description: params.description || `${defaultType.charAt(0).toUpperCase() + defaultType.slice(1)} NFT inscribed as Hashinal`,
type: params.type || defaultType,
image: ""
};
}
export {
generateDefaultMetadata
};
//# sourceMappingURL=standards-agent-kit.es55.js.map