# A retained Coinbase SDK source pair

Version 1.0.0 · Decentralised News · 3 December 2026

This free pack compares two **real, retained historical source files** from the official `coinbase/coinbase-advanced-py` repository. It supplies a bounded adapter for the [API Change Impact Register](https://decentralised.news/trading-agent-api-change-impact-register#dn-retained-sdk-source-pair). The existing `source-change-receipts-v1` teaching pack remains synthetic and unchanged.

The two files are `coinbase/jwt_generator.py` at the commits identified by releases **v1.8.2** and **v1.8.3**. Their release publication times are 3 December 2024 and 22 May 2026 respectively. **Both files were retrieved on 3 December 2026.** They are not historical DN captures, a newly observed live API change, or a claim about the latest SDK version. The requests ran in parallel; the later-version file finished downloading first. Every capture interval is retained separately from release, committer, review and execution times.

## Run it offline

Use **Python 3.9 or newer**, standard library only. No SDK installation, API key, credentials, signing operation, model call or network access is needed. From the extracted `coinbase-sdk-source-pair-v1` directory:

```sh
python3 compare.py
python3 verify.py
python3 compare.py --output ../my-source-comparison.json
python3 verify.py --output ../my-source-verification.json
```

The final two commands require a new output path and refuse to overwrite an existing file. Keep new receipts outside the immutable pack. A rerun changes the execution timestamp, not the stored source or review dates. `compare.py` exits 0 only for a completed fixed-pair comparison and exits 2 for invalid evidence or file/output failures. `verify.py` exits 0 only when its actual checks pass; missing evidence, hash failures and zero checks cannot be a passing run.

The downloadable archive is **`coinbase-sdk-source-evidence.zip`**. When that ZIP is present beside the program, validate its membership and every uncompressed file byte too:

```sh
python3 verify.py --check-zip
```

The ZIP contains the complete pack and `SHA256SUMS`, but does not contain another copy of itself. After extracting, `python3 verify.py` checks the manifest; place the original downloaded ZIP beside it to use `--check-zip`. Do **not** run the upstream `sources/*/jwt_generator.py` files. They are retained evidence, and their external dependencies are deliberately not installed by this pack.

## What the comparison establishes

The original DN program uses Python's `ast` module to inspect a declared set of syntax nodes. It never imports or executes the retained Coinbase source.

| Selected source feature | v1.8.2 | v1.8.3 |
| --- | --- | --- |
| Argument passed as `jwt.encode` algorithm | Literal `ES256` | `_algorithm_for(private_key)` |
| Key-type dispatch helper | Absent | `EdDSA` for the `Ed25519PrivateKey` branch; `ES256` for the `EllipticCurvePrivateKey` branch |
| ECDSA branch warning | No selected helper warning | `UserWarning` recommending Ed25519 |
| PEM loading branch | Present | Present |
| Additional base64/raw-key loader | Absent | Whitespace removed; validated base64 decoding; decoded length must be 32 or 64 bytes; first 32 bytes passed to the Ed25519 loader |
| JWT issuer literal | `cdp` | `cdp` |
| Expiry expression's added seconds | 120 | 120 |

The receipt has **nine changed selected fields and three unchanged selected fields**. Those are fields in DN's documented projection, not nine API changes or a complete source diff. For example, the warning is one selected object containing its message, category and stack level. The extractor is a finite contract for these two source shapes, not a general Python semantic analyzer.

The source's EC type branch does not establish that a particular reader's key, curve, account or credential will work. The unchanged expiry offset is a source expression, not a measured token lifetime or live server policy. The `nbf` and `exp` expressions make separate clock calls. No SDK code, credential flow or real request was executed to establish compatibility.

## Inspect the evidence

- `sources/v1.8.2/` and `sources/v1.8.3/`: complete unmodified retained Python files.
- `LICENSE-upstream.md`: complete unmodified Apache 2.0 license, including Coinbase's 2023 copyright notice.
- `source-metadata.json`: exact commits, source URLs, Git blob identities, SHA-256 hashes, release times and actual capture intervals. `commit_committer_at_utc` is a committer clock, not a publication date.
- `repository-tree-evidence.json`: the two recorded complete GitHub tree listings used to locate source/license blobs and check for a NOTICE file. This is retained repository metadata, not an independently authenticated signature or proof of a current tree.
- `projections/`: derived JSON bytes, kept separate from raw source bytes and hashes.
- `review.json`: substantive documentary findings bound to both raw hashes, both projection hashes, the metadata, the selected field set and extraction-program bytes. Binding checks do not authenticate a reviewer or make the explanation automatically true.
- `comparison.json`: an actual offline execution receipt for this pair.
- `expected-results.json`: authored expected projection values and change classifications, separate from program output.
- `verify.py` and `verification.json`: executed known-answer and adversarial checks. The stored report covers 63 functional checks and explicitly says packaging was not run before manifest assembly; a fresh `verify.py --check-zip` also checks the final manifest and ZIP. This avoids pretending that a report can contain a final hash of itself.
- `methodology.md`, `input-contract.json`, `source-record.json`, `RIGHTS.md` and `SHA256SUMS`: scope, contract, discovery record, rights and file identities.

`effective_at` stays null. Client compatibility stays `not_assessed`; reviewer authenticity and signatures are not independently established. The tool has no live monitoring, alert delivery, API-change timing inference, request authorization, automatic migration or deployment approval. A source mismatch is a reason to stop and review the inputs, not to force a no-change conclusion.

The original DN adapter and documentation are CC BY 4.0. The retained Coinbase code remains Apache-2.0; see `RIGHTS.md`. There is no paid dependency or affiliate recommendation in this pack.
