Add Zapier interface simulator, tree-node Merkle lookups, and user docs
Some checks are pending
offline / test (push) Waiting to run

In-process trace console validates hops, faults, recoveries, and
suggested changes before zapier-platform push. User guide covers
signup through central-chain and bulk-summary tree-node hash lookup.
This commit is contained in:
George Lambert 2026-09-11 12:58:03 -04:00
parent 3daa88866d
commit f3dc0e6eee
56 changed files with 2341 additions and 8 deletions

View file

@ -18,6 +18,10 @@ export const SUBJECTS = Object.freeze({
WEBHOOKS_DELIVER: 'verae.zapier.webhooks.deliver',
/** Optional metering stream */
USAGE: 'verae.zapier.usage',
/** Off-chain WORM / tree-node puts */
ARCHIVE_PUT: 'verae.archive.put',
/** Broadcast hash lookup to every WORM and tree node (no queue group) */
ARCHIVE_QUERY: 'verae.archive.query',
});
/**

View file

@ -15,7 +15,9 @@ hashRoutes.get(
if (!sha256 || !/^[a-fA-F0-9]{64}$/.test(sha256)) {
throw new AppError('sha256 must be 64 hex chars', { status: 400, code: 'VALIDATION_ERROR' });
}
const result = await lookupHash(req.auth, sha256);
const includeAttached = req.query.includeAttached === 'true' || req.query.includeAttached === '1';
const includeTree = req.query.includeTree === 'true' || req.query.includeTree === '1';
const result = await lookupHash(req.auth, sha256, { includeAttached, includeTree });
res.json(result);
}),
);

View file

@ -151,9 +151,19 @@ export async function getJobVerification(ctx, jobId) {
/**
* @param {object} ctx
* @param {string} sha256
* @param {{ includeAttached?: boolean, includeTree?: boolean }} [opts]
*/
export async function lookupHash(ctx, sha256) {
export async function lookupHash(ctx, sha256, opts = {}) {
const result = await veraeClient.lookupHash(ctx.veraeToken, sha256);
recordUsage(ctx.tenantId, 'status');
return result;
if (!opts.includeAttached && !opts.includeTree) return result;
return {
...result,
includeAttached: Boolean(opts.includeAttached),
includeTree: Boolean(opts.includeTree),
note:
opts.includeTree && !result?.exists
? 'Chain miss: middleware should broadcast verae.archive.query kinds=["tree"] (wired in simulator; live aggregator hook TBD).'
: undefined,
};
}