UNPKG

@hashgraphonline/hedera-agent-kit

Version:

Build LLM-powered applications that interact with the Hedera Network. Create conversational agents that can understand user requests in natural language and execute Hedera transactions, or build backend systems that leverage AI for on-chain operations.

11 lines (8 loc) 283 B
export function convertStringToTimestamp(input: string): number { const date = new Date(input); if (isNaN(date.getTime())) { throw new Error("Invalid date format"); } const timestamp = date.getTime(); return parseFloat((timestamp / 1000).toFixed(6)); }