# No-funds contribution compatibility reference

Copyright © 2026 Gateway Information Group LLC. All rights reserved.

This standalone Node.js module checks contribution decisions using fixed, public, synthetic scenarios. It makes no network requests, creates no quotes, holds no wallet credentials, and signs or transfers nothing. Its addresses and network names are deliberately synthetic and must not be used for a real payment.

These are **Gateway's own fixtures**, not an independent audit, certification, integration test, or proof of live payment compatibility. A passing decision model does not establish that a wallet, provider, network, or production client behaves correctly.

## Run the included model

Download `compatibility-reference.mjs` into a local folder. With Node.js 22.13 or later:

```sh
node compatibility-reference.mjs --self-test
```

The command prints one JSON report and exits with 0 when all synthetic decisions match, 1 on a failed check, or 2 for unsupported arguments. There are no dependencies to install. Running the supplied module alone performs no external I/O beyond printing its report.

## Check your own decision adapter

Write a separate local module alongside the reference:

```js
import { runCompatibilitySuite } from './compatibility-reference.mjs';
import { decideContribution } from './my-reviewed-pure-policy.mjs';

const report = runCompatibilitySuite((syntheticInput) => {
  // Adapt your client policy into a pure, synchronous decision function.
  // Do not pass a wallet, network transport, signer, or production credentials.
  return decideContribution(syntheticInput);
});
console.log(JSON.stringify(report, null, 2));
process.exitCode = report.passed ? 0 : 1;
```

The hook receives a frozen input object and returns exactly one string: `decline`, `stop`, `quote-only`, `await-confirmation`, or `confirmed`. Exceptions and non-string results fail that case. The suite is **not a security sandbox**: use only trusted, reviewed adapter code with no I/O. It cannot detect or prevent hidden side effects inside code you supply. An asynchronous adapter is unsupported.

## What the cases check

- Missing or declined operator permission returns `decline`.
- Recipient, asset, network, exact amount, and budget mismatches return `stop`.
- A zero intended contribution returns `decline`; the smallest token unit, 0.000001 USDC, is accepted by the quote decision. There is no application minimum or maximum contribution amount; six-decimal precision, the token atomic-unit range, and the operator's own budget apply.
- A quote is not settlement. Pending payment and verification alone are not confirmation.
- A finalized label without the fixture's explicit synthetic evidence marker is insufficient.
- Amounts are decimal strings converted to exact six-decimal atomic units using `BigInt`, including values beyond JavaScript's safe integer range. No floating-point money arithmetic is used.

`finalizedEvidence: true` is a **fixture marker only**. Production software must establish real finalized-chain evidence through its verified payment implementation, never trust a client-supplied boolean. Likewise, `operatorAuthorized: true` in a fixture is not real permission. None of the returned strings instructs a wallet to pay.

Exports: `scenarios` (frozen public fixtures), `amountUnits(decimalString)` (exact `BigInt` conversion), `evaluateContribution(input)` (the included pure model), and `runCompatibilitySuite(adapter?)` (the comparison report). Extend your own tests for real provider responses, identity binding, nonce/replay handling, outages, and durable recovery before enabling a wallet.
