@meantjs/reconcile 0.4.0 → 0.6.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 +9 -0
- package/README.md +5 -5
- package/package.json +2 -2
- package/src/index.mjs +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
The five Candid Profile library packages (`@meantjs/profile`, `/format`, `/consent`, `/tools`, `/reconcile`) release together under one version and pin each other exactly; a version appears here even when this package did not change. Release steps: `docs/releasing.md` in the repository.
|
|
4
4
|
|
|
5
|
+
## 0.6.0 — 2026-11-01
|
|
6
|
+
|
|
7
|
+
No changes in this package.
|
|
8
|
+
|
|
9
|
+
## 0.5.0 — 2026-10-30
|
|
10
|
+
|
|
11
|
+
- Docs: the README and the source comments cite spec §5.3's outcome handling rules for consumers, not a §7.3 that
|
|
12
|
+
does not exist (D-057). No change in behavior.
|
|
13
|
+
|
|
5
14
|
## 0.4.0 — 2026-10-30
|
|
6
15
|
|
|
7
16
|
No changes in this package.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @meantjs/reconcile
|
|
2
2
|
|
|
3
|
-
Consumer rule 1 (`docs/profile-v0.md` section
|
|
4
|
-
attempt, is the original in the ledger's ICRC-3 history? One dependency:
|
|
5
|
-
text to bytes).
|
|
3
|
+
Consumer rule 1 (`docs/profile-v0.md` section 5.3, outcome handling rules for consumers) without a transport: after an
|
|
4
|
+
unknown outcome, before any new attempt, is the original in the ledger's ICRC-3 history? One dependency:
|
|
5
|
+
`@meantjs/format` (principal text to bytes).
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npm install @meantjs/reconcile
|
|
@@ -54,8 +54,8 @@ Rules, all in the safe direction (`src/index.mjs` header):
|
|
|
54
54
|
an approval and writes the capped amount). A block of the same operation naming another recipient or spender is
|
|
55
55
|
another call. `notOriginal` takes blocks the person rejected out of the next read.
|
|
56
56
|
- `absent` only when nothing can still land: every send answered (`answered`), a TooOld (`too_old`), or the
|
|
57
|
-
ledger's clock past stamp + `windowNs` (`window_passed`). `windowNs` is the ledger's own window (spec section
|
|
58
|
-
the ledger defines it); without it nothing closes by the clock and the answer is `not_yet` with a `reason`.
|
|
57
|
+
ledger's clock past stamp + `windowNs` (`window_passed`). `windowNs` is the ledger's own window (spec section 5.3,
|
|
58
|
+
`idempotency`: the ledger defines it); without it nothing closes by the clock and the answer is `not_yet` with a `reason`.
|
|
59
59
|
`DEDUP_WINDOW_NS` (24 h 2 min, the DFINITY ledger's default) is exported for a caller that has checked its ledger
|
|
60
60
|
uses it. Otherwise `not_yet`. Without a ledger clock, the later of `ledgerTimeAtLeast` and the tip block's time stands in.
|
|
61
61
|
- Blocks that do not cover `floor..logLength-1`, or a block in that range whose operation or amount (or stamp, when
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meantjs/reconcile",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Consumer rule 1 without a transport: the ICRC-3 block an ICRC-1/2 write leaves, and whether the blocks a caller read since its first send hold it (found, absent, not yet, or unreadable with a lookalike). Browser-safe.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test": "node --test \"test/*.test.mjs\""
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@meantjs/format": "0.
|
|
46
|
+
"@meantjs/format": "0.6.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"esbuild": "0.28.2"
|
package/src/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Consumer rule 1 (docs/profile-v0.md section
|
|
2
|
-
// attempt, look for the original in the ledger's history: the ICRC-3 blocks since
|
|
3
|
-
// operation, the stamp, the amount, the fee, the accounts (the caller's included), the
|
|
4
|
-
// its expiry and expected allowance.
|
|
1
|
+
// Consumer rule 1 (docs/profile-v0.md section 5.3, outcome handling rules for consumers) without a transport. After
|
|
2
|
+
// an unknown outcome, before any new attempt, look for the original in the ledger's history: the ICRC-3 blocks since
|
|
3
|
+
// the first send, matched on the operation, the stamp, the amount, the fee, the accounts (the caller's included), the
|
|
4
|
+
// memo and, for an approval, its expiry and expected allowance.
|
|
5
5
|
//
|
|
6
6
|
// The caller reads the blocks (certified, and from archives when it needs them) and passes them in; this module
|
|
7
7
|
// only maps a call to the block it leaves and judges the blocks. It imports no Node built-in and needs no codec:
|