@myronkoch/andromeda-mcp-queries
Version:
Andromeda MCP Server - Queries Package: 12 read-only tools for safe Andromeda blockchain exploration and discovery
16 lines • 793 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.safeBigIntStringify = exports.setupBigIntSerialization = void 0;
// Polyfill BigInt serialization for JSON.stringify
// This is necessary because JSON.stringify does not natively support BigInt.
// It converts BigInt values to strings before serialization.
const setupBigIntSerialization = () => {
BigInt.prototype.toJSON = function () { return this.toString(); };
};
exports.setupBigIntSerialization = setupBigIntSerialization;
// Safe BigInt stringification utility
const safeBigIntStringify = (obj) => {
return JSON.stringify(obj, (key, value) => typeof value === 'bigint' ? value.toString() : value);
};
exports.safeBigIntStringify = safeBigIntStringify;
//# sourceMappingURL=serialization.js.map