Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface, checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services, relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts. Co-authored-by: Cursor <[email protected]>
19 lines
559 B
JavaScript
19 lines
559 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.jsonSafe = jsonSafe;
|
|
/** JSON-safe hub header / nested values (ethers returns bigint). */
|
|
function jsonSafe(value) {
|
|
if (typeof value === 'bigint')
|
|
return value.toString();
|
|
if (Array.isArray(value))
|
|
return value.map(jsonSafe);
|
|
if (value !== null && typeof value === 'object') {
|
|
const out = {};
|
|
for (const [k, v] of Object.entries(value)) {
|
|
out[k] = jsonSafe(v);
|
|
}
|
|
return out;
|
|
}
|
|
return value;
|
|
}
|