@flop-labs/sdk 0.5.2 → 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.
Files changed (58) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +20 -5
  3. package/dist/bundle/index.esm.js +1 -1
  4. package/dist/bundle/index.esm.js.map +1 -1
  5. package/dist/bundle/index.umd.cjs +1 -1
  6. package/dist/bundle/index.umd.cjs.map +1 -1
  7. package/dist/compute-channel/capacity-reservation.d.ts +85 -0
  8. package/dist/compute-channel/capacity-reservation.d.ts.map +1 -0
  9. package/dist/compute-channel/capacity-reservation.js +127 -0
  10. package/dist/compute-channel/capacity-reservation.js.map +1 -0
  11. package/dist/compute-channel/chain.d.ts +4 -0
  12. package/dist/compute-channel/chain.d.ts.map +1 -1
  13. package/dist/compute-channel/chain.js +1 -1
  14. package/dist/compute-channel/chain.js.map +1 -1
  15. package/dist/compute-channel/direct-session-chain.d.ts.map +1 -1
  16. package/dist/compute-channel/direct-session-chain.js +1 -1
  17. package/dist/compute-channel/direct-session-chain.js.map +1 -1
  18. package/dist/compute-channel/flop-submitter.d.ts +6 -2
  19. package/dist/compute-channel/flop-submitter.d.ts.map +1 -1
  20. package/dist/compute-channel/flop-submitter.js +13 -6
  21. package/dist/compute-channel/flop-submitter.js.map +1 -1
  22. package/dist/compute-channel/index.d.ts +1 -0
  23. package/dist/compute-channel/index.d.ts.map +1 -1
  24. package/dist/compute-channel/index.js +1 -0
  25. package/dist/compute-channel/index.js.map +1 -1
  26. package/dist/compute-channel/miner-host.d.ts +1 -0
  27. package/dist/compute-channel/miner-host.d.ts.map +1 -1
  28. package/dist/compute-channel/miner-host.js +10 -1
  29. package/dist/compute-channel/miner-host.js.map +1 -1
  30. package/dist/compute-channel/qwen4-exp.d.ts +83 -0
  31. package/dist/compute-channel/qwen4-exp.d.ts.map +1 -0
  32. package/dist/compute-channel/qwen4-exp.js +311 -0
  33. package/dist/compute-channel/qwen4-exp.js.map +1 -0
  34. package/dist/faucet.d.ts +42 -25
  35. package/dist/faucet.d.ts.map +1 -1
  36. package/dist/faucet.js +94 -136
  37. package/dist/faucet.js.map +1 -1
  38. package/dist/index.d.ts +2 -2
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/model-loader/verify.d.ts +5 -2
  43. package/dist/model-loader/verify.d.ts.map +1 -1
  44. package/dist/model-loader/verify.js +2 -1
  45. package/dist/model-loader/verify.js.map +1 -1
  46. package/dist/quickstart.d.ts +5 -5
  47. package/dist/quickstart.d.ts.map +1 -1
  48. package/dist/quickstart.js +15 -8
  49. package/dist/quickstart.js.map +1 -1
  50. package/dist/runtime-compatibility.d.ts +1 -1
  51. package/dist/runtime-compatibility.d.ts.map +1 -1
  52. package/dist/runtime-compatibility.js +5 -2
  53. package/dist/runtime-compatibility.js.map +1 -1
  54. package/dist/watch-transaction.d.ts +1 -0
  55. package/dist/watch-transaction.d.ts.map +1 -1
  56. package/dist/watch-transaction.js +1 -1
  57. package/dist/watch-transaction.js.map +1 -1
  58. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2026-11-12
11
+
12
+ ### Changed
13
+
14
+ - `SUPPORTED_SPEC_VERSIONS` admits runtimes `1014015` through `1014020`, and
15
+ `SUPPORTED_SPEC_VERSION_RANGE` ends at `1014020`. They add the per-miner capacity reservations,
16
+ the model weights lock, the VRF committee seed and the D-0544 unsigned-open tariff. The wire
17
+ bytes the SDK signs are unchanged.
18
+
19
+ ### Fixed
20
+
21
+ - Faucet POSTs are no longer automatically retried after ambiguous outcomes. Grant
22
+ confirmation no longer equates a sufficient balance with an attributable grant;
23
+ QuickStart stops on an unknown result instead of silently continuing.
24
+
25
+ - Preserve an unknown cooperative settlement outcome when finalized-event polling
26
+ reaches its deadline, preventing a competing force settlement or timeout refund.
27
+
28
+ ### Added
29
+
30
+ - `computeChannel.readMinerCapacity` reads a miner's D-0542 capacity reservations at the
31
+ finalized head and returns its live accepted cap, reserved total, the rate the next open would
32
+ reserve, and whether it fits; `undefined` on a runtime without the storage. `minerCapacity`,
33
+ `reservationRateForSessions` and `reservationRateUpdate` are the pure rules behind it.
34
+
35
+ - `fundFromFaucetDetailed` distinguishes refused from unknown requests. The current
36
+ faucet protocol lacks an authenticated request-to-transaction binding, so even a
37
+ successful response remains unknown. `waitForAvailableBalance` explicitly checks
38
+ balance; the older boolean helpers remain as deprecated compatibility aliases.
39
+
40
+ - `SubmitResult.blockHash` names the finalized block when the submitter waits for finality;
41
+ `settlementArgs` and `mapChainEvents` are exported for callers that hold a signer lane.
42
+ - `verifyMirror` accepts `revision`, pinning a whole-repo Hugging Face check to that
43
+ commit instead of resolving `main`.
44
+
10
45
  ## [0.5.2] - 2026-11-09
11
46
 
12
47
  ### Fixed
package/README.md CHANGED
@@ -4,9 +4,24 @@
4
4
  It returns `false` for HTTP 503 or a request failure, including a live faucet
5
5
  whose caller IP classification has not been checked. This is not a process-liveness
6
6
  or grant-eligibility test. The health GET does not request funds or classify the IP.
7
- An explicit `requestFaucetFunding()` attempt performs admission and returns the
8
- refusal reason and `retryAfterSeconds`; respect that delay before retrying.
9
- Do not gate a user's explicit funding request solely on `healthCheck()`.
7
+ An explicit `requestFaucetFunding()` attempt performs admission and returns a
8
+ refusal reason and `retryAfterSeconds` when supplied. It never automatically
9
+ repeats a funding POST. An `unknown` outcome can mean a grant occurred: preserve
10
+ the result and reconcile before requesting again. The health check alone must not
11
+ block an explicit funding request.
12
+
13
+ **Unreleased faucet migration:** `fundFromFaucet` retains its boolean signature
14
+ but currently always returns `false`; false means unconfirmed, not unpaid. The
15
+ faucet does not yet expose an authenticated durable binding from a unique request
16
+ to its transaction, so the SDK cannot establish request-specific confirmation.
17
+ Use `fundFromFaucetDetailed` to distinguish refusal, unavailable preflight, and
18
+ unknown outcomes and retain the returned hash when available. Its accepted HTTP
19
+ response is still unknown as a grant. QuickStart throws `FaucetUnconfirmedError`
20
+ with the outcome when funding cannot be confirmed; reconcile the original request
21
+ before retrying. Faucet-enabled QuickStart requires a caller-owned signer or keypair
22
+ so an unconfirmed payment cannot be stranded in an inaccessible generated wallet. For the separate question of whether an account has enough funds,
23
+ use `waitForAvailableBalance`; the old `waitForFaucetFunding` name is a deprecated
24
+ balance-check alias. No source-only test confirms a live grant.
10
25
 
11
26
  Ordinary HTLC creation requires a registered EconomicCritical appraisal profile.
12
27
  Supply `tee_requirements` / `teeRequirements` as `{profile: {profile_id, version}, model_hash, measurement_hash}` (32-byte hex hashes), or its canonical 100-byte SCALE hex.
@@ -15,9 +30,9 @@ For the examples, set `FLOP_HTLC_TEE_REQUIREMENTS` to that canonical hex from yo
15
30
 
16
31
  TypeScript SDK for the FLOP Network — HTLC workflows, PoI proofs, and account management.
17
32
 
18
- `SUPPORTED_SPEC_VERSIONS` in this source admits exactly `1013000`, `1014000`, `1014001`, `1014002`, `1014003`, `1014004`, `1014005`, `1014007`, `1014008`, `1014009`, `1014010`, `1014011`, `1014012`, `1014013`, `1014014`.
33
+ `SUPPORTED_SPEC_VERSIONS` in this source admits exactly `1013000`, `1014000`, `1014001`, `1014002`, `1014003`, `1014004`, `1014005`, `1014007`, `1014008`, `1014009`, `1014010`, `1014011`, `1014012`, `1014013`, `1014014`, `1014015`, `1014016`, `1014017`, `1014018`, `1014019`, `1014020`.
19
34
  `SUPPORTED_SPEC_VERSION_RANGE` retains its exported shape as the envelope
20
- `1013000..1014014`; admission requires exact membership (including no `1014006`). The published `0.4.0` executable stops at `1014011` and also excludes `1014006`;
35
+ `1013000..1014020`; admission requires exact membership (including no `1014006`). The published `0.4.0` executable stops at `1014011` and also excludes `1014006`;
21
36
  its bundled README has stale connection and HTLC examples. These source corrections
22
37
  are unreleased: installing `@latest` does not deliver them until a new version is
23
38
  published. The examples below describe this source candidate. Qualification covers