A utility to normalize disparate order wire formats into a unified schema. Use this to decouple downstream business logic from external API protocol changes.
// Source: https://github.com/nitrocloudofficial/nitrostack | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { NormalizedOrder, Product } from './gateway.types.js';
import type { AcpPayload, RawOrderPayload, X402Payload } from '../../fixtures/orders.js';
/**
* Protocol normalization.
*
* The gateway supports two wire formats with different field names, different
* nesting, and different amounts of information (x402 carries a declared
* settlement amount and a payee; ACP carries neither). Everything downstream —
* screening, scoring, verification — consumes only `NormalizedOrder`, so the
* evidence path is chosen exactly once, here.
*/
export class UnknownSkuEr
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key