UNPKG

tensaikit

Version:

An autonomous DeFi AI Agent Kit on Katana enabling AI agents to plan and execute on-chain financial operations.

23 lines (22 loc) 695 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatError = exports.formatTransactionHash = exports.formatAddress = void 0; const formatAddress = (address) => { if (!address) return ""; return `${address.slice(0, 6)}...${address.slice(-4)}`; }; exports.formatAddress = formatAddress; const formatTransactionHash = (hash) => { if (!hash) return ""; return `${hash.slice(0, 10)}...${hash.slice(-8)}`; }; exports.formatTransactionHash = formatTransactionHash; const formatError = (error) => { if (error instanceof Error) { return error.message; } return String(error); }; exports.formatError = formatError;