@valve-tech/chain-source 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,57 @@ this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/).
8
8
 
9
+ ## [0.14.0] — 2026-05-14
10
+
11
+ ### Changed
12
+
13
+ - `EventSource` doc comment for the `'receipt-poll'` discriminator
14
+ widened again. Previously covered per-hash *mined* checks
15
+ (v0.13.0 widening). Now explicitly covers per-hash *status*
16
+ checks — mined OR pending. `@valve-tech/tx-tracker` v0.14.0 uses
17
+ this discriminator for the new default-on
18
+ `statusPollEveryBlocks` per-hash status poll (backed by
19
+ `eth_getTransactionByHash`), which emits both `seen-in-block`
20
+ (mined-state observation) and `seen-in-mempool` (pending-state
21
+ observation) under `source: 'receipt-poll'`. The type value
22
+ itself is unchanged. No consumer migration required.
23
+
24
+ ### Notes
25
+
26
+ - The widening reflects the conceptual category that
27
+ `'receipt-poll'` has always represented: "per-hash status check,
28
+ not from the canonical block or full mempool stream." Receipt
29
+ polling and `eth_getTransactionByHash` are both
30
+ per-hash-against-the-node's-tx-index; the same authority
31
+ constraint (`buildVanishedFromBlock` rejects this source per
32
+ spec §12.3) applies to both.
33
+
34
+ ## [0.13.0] — 2026-05-12
35
+
36
+ ### Changed
37
+
38
+ - `EventSource` doc comment for the `'receipt-poll'` discriminator
39
+ widened. Previously described only the receipt-poll fallback path;
40
+ now explicitly covers any per-hash mined check that isn't the
41
+ source's own block-poll. `@valve-tech/tx-tracker` v0.13.0 uses
42
+ this discriminator for both its existing `receipt-poll-fallback`
43
+ lost-signal policy AND its new
44
+ `TrackOptions.probeMined` per-subscription consumer-supplied probe.
45
+ The type value itself is unchanged — `'receipt-poll'` is still the
46
+ same string literal in the discriminated union. No consumer
47
+ migration required.
48
+
49
+ ### Notes
50
+
51
+ - The widening reflects how the discriminator is actually consumed:
52
+ it has always meant "per-hash mined check, not from the canonical
53
+ block stream," and `buildVanishedFromBlock`'s spec §12.3 rejection
54
+ of this source has always been the authoritative constraint.
55
+ Consumers who already gate UI / business logic on
56
+ `event.source === 'receipt-poll'` will see the same set of events
57
+ they always have, plus any newly-arriving probe-derived events
58
+ from consumers that opt into the tx-tracker probe API.
59
+
9
60
  ## [0.12.0] — 2026-05-11
10
61
 
11
62
  ### Added
package/dist/types.d.ts CHANGED
@@ -131,9 +131,17 @@ export interface PollOptions {
131
131
  *
132
132
  * `'block-poll'` and `'mempool-snapshot'` indicate the source's
133
133
  * own poll cycle pulled the data via `eth_getBlockByNumber` /
134
- * `txpool_content` respectively. `'receipt-poll'` is reserved for
135
- * downstream consumers (tx-tracker) that fall back to per-hash
136
- * receipt polling when a higher-authority path is missing.
134
+ * `txpool_content` respectively. `'receipt-poll'` covers any per-hash
135
+ * status check that isn't the source's own block-poll — typically
136
+ * backed by `eth_getTransactionByHash` or `eth_getTransactionReceipt`,
137
+ * answering either the mined-state or pending-state question for a
138
+ * specific hash. The tx-tracker uses it for: (1) the
139
+ * `receipt-poll-fallback` lost-signal policy, (2) consumer-supplied
140
+ * `probeMined` inclusion probes, and (3) the default
141
+ * `statusPollEveryBlocks` per-hash status poll (and its optional
142
+ * consumer `probeTransaction` fallback). Per-hash checks via this
143
+ * source cannot authoritatively detect reorgs (spec §12.3 —
144
+ * `buildVanishedFromBlock` rejects this source).
137
145
  */
138
146
  export type EventSource = 'subscription' | 'block-poll' | 'mempool-snapshot' | 'receipt-poll';
139
147
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,KAAK;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAA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MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,QAAQ,EAAE,cAAc,GAAG,WAAW,GAAG,aAAa,CAAA;IACtD,4EAA4E;IAC5E,sBAAsB,EAAE,cAAc,GAAG,WAAW,GAAG,aAAa,CAAA;IACpE,oEAAoE;IACpE,aAAa,EAAE,WAAW,GAAG,OAAO,CAAA;IACpC,qEAAqE;IACrE,aAAa,EAAE,WAAW,GAAG,aAAa,CAAA;IAC1C,qEAAqE;IACrE,kBAAkB,EAAE,OAAO,CAAA;CAC5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valve-tech/chain-source",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Canonical EVM chain-observation primitive: a unified push-or-poll source for new blocks, mempool snapshots, on-demand receipt + tx lookups, and capability disclosure (HTTP / WS / per-method gating). Used as the shared foundation by @valve-tech/gas-oracle and @valve-tech/tx-tracker; consumable directly by anyone building their own derived view on chain state. viem-native. Part of the valve-tech/evm-toolkit synchronized release line — implementation lands in subsequent 0.3.x releases per docs/tx-tracker-spec.md.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/valve-tech/evm-toolkit/tree/main/packages/chain-source#readme",