@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
78 lines (77 loc) • 2.33 kB
JavaScript
function createInscriptionSuccess(params) {
const { hrl, topicId, standard, cdnUrl, transactionId, metadata } = params;
return {
success: true,
type: "inscription",
title: `${standard} Hashinal Inscription Complete`,
message: `Successfully inscribed "${metadata.name || "your content"}" as a ${standard} Hashinal. The content is now ready for NFT minting.`,
inscription: {
hrl,
topicId,
standard,
cdnUrl,
transactionId
},
metadata,
nextSteps: {
primary: "CRITICAL: When minting NFTs, use ONLY the mintingMetadata value as a single string in the metadata array. Do NOT create JSON objects.",
context: 'The metadata parameter for minting should be exactly: ["' + hrl + '"] - just the HRL string in an array, nothing else.',
mintingMetadata: hrl
}
};
}
function createInscriptionQuote(params) {
const { totalCostHbar, validUntil, breakdown, content } = params;
return {
success: true,
type: "quote",
title: "Inscription Cost Quote",
message: `Estimated cost to inscribe "${content.name || "your content"}" is ${totalCostHbar} HBAR.`,
quote: {
totalCostHbar,
validUntil,
breakdown
},
content
};
}
function createInscriptionError(params) {
const { code, details, suggestions } = params;
return {
success: false,
type: "error",
title: "Inscription Failed",
message: `Unable to complete inscription: ${details}`,
error: {
code,
details,
suggestions
}
};
}
function createInscriptionPending(params) {
const { transactionId, details, suggestions } = params;
const d = details || `Inscription submitted but not yet confirmed. Transaction ID: ${transactionId}`;
return {
success: false,
type: "error",
title: "Inscription Submitted (Pending)",
message: d,
error: {
code: "INSCRIPTION_PENDING",
details: d,
suggestions: suggestions || [
"Wait a few moments for confirmation",
"Check the transaction status on a Hedera explorer",
"Try the inscription again if it doesn't confirm within 5 minutes"
]
}
};
}
export {
createInscriptionError,
createInscriptionPending,
createInscriptionQuote,
createInscriptionSuccess
};
//# sourceMappingURL=standards-agent-kit.es56.js.map