From 7f72564f4b636c87b3f1f3c72b0e59c3c4f6da94 Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Sat, 28 Nov 2026 13:08:38 +0100 Subject: [PATCH] Delete change.md --- change.md | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 change.md diff --git a/change.md b/change.md deleted file mode 100644 index 8bc6f2a..0000000 --- a/change.md +++ /dev/null @@ -1,11 +0,0 @@ -# SplitStream SDK & CLI — Explanation of Changes - -This document explains, in plain prose, what was changed in `SplitStream-Labs/splitstream-sdk-cli` after the repository was rejected from the Stellar Wave program (Drips Wave), and why. The rejection was relayed internally as the instruction to "rebase this project fully on Soroban," so we verified that premise before acting on it. The repository at the rejected baseline was already a native Soroban client: it depended on `@stellar/stellar-sdk` 17, spoke to Soroban RPC, encoded `ScVal` arguments with the SDK's XDR types, read a deployed `C...` vault contract, and reconstructed the same sorted-pair Merkle proofs the Rust contract verifies. There is no EVM contract, no second chain, and no porting layer to migrate away from, so no chain migration was possible or performed. We therefore treated the rejection as a correctness and credibility problem: an SDK is only useful if it matches the contract that is actually deployed, and this one did not. - -The substantive defect was ABI drift against the redeployed `splitstream-core` vault. The vault now lives at `CB456KGXH4233BHW5BUEJMN6OJ4ZMWMPP3OXJU5HVQ2T2F7A7XHWLTAT`, declares cycle ids as `u64` rather than `u32`, and exposes `get_cycle_info(cycle_id) -> Option` instead of the old `get_cycle_root`. A posted root is also no longer immediately claimable: `CycleInfo` carries `root`, `total_amount`, `posted_at`, `claims_started` and `replaced`, and `credit_claim` rejects any claim made inside the fixed 24-hour (`86_400s`) challenge window with `ClaimsNotYetOpen`. At the rejected baseline this repository encoded every cycle id as `u32` and called `get_cycle_root`, so `status`, `claim` and `report` would fail at simulation time against the live vault, and the README pointed at the superseded address `CCC2LP2...`. We rebuilt the client on the deployed ABI: cycle ids are encoded as `u64`, `getCycleInfo` decodes the real `CycleInfo` record (including the derived `claimsOpenAt`), `getCycleRoot` remains only as a convenience alias, and three new liability views (`getTotalCredited`, `getVestingReserved`, `getAvailableFunds`) expose the vault's solvency position instead of treating its raw token balance as unallocated reserve. The local copy of the contract error enum was replaced wholesale with the current 1–19 discriminants, because the old table would have printed confidently wrong names for `InvalidProof`, `AlreadyClaimed`, `InsufficientFreeFunds` and the challenge-window errors. - -The CLI was changed to make that behavior visible rather than merely compile. `splitstream status` now separates the token balance on hand from credited balances, vesting liability and sweepable funds, labels each cycle as not posted, in its challenge window, open for claims, or already started, and splits a contributor's cycles into pending, challenge-window and already-claimed groups; a manifest that exists but does not parse is now reported as malformed instead of being silently presented as "no local manifest found." `splitstream claim` previously checked only that the manifest agreed with its own recomputed tree; it now also reads `get_cycle_info`, refuses a proof against a root the vault does not store (for example a stale manifest after a challenge), reports the on-chain root alongside the manifest root, and refuses to submit during the challenge window unless `--force` is passed. `report` and the unsigned `credit_claim`/`withdraw`/`claim_vested` builders use the same `u64` encoding, and the signer and key-handling model is unchanged: the SDK still never signs, local keys remain testnet-only and environment-only, and mainnet still requires a hardware wallet. - -All of this is verified rather than asserted. `npm run typecheck` builds the SDK and type-checks both workspaces cleanly, and `npm test` runs 98 passing tests across the two packages, with a live Testnet smoke test committed behind the `SPLITSTREAM_TESTNET_E2E=1` opt-in so the default suite never needs the network; a `CHANGELOG.md` records the `0.2.0` release and its upgrade notes. New regression coverage pins the parts that were wrong: the `credit_claim` instruction is asserted to carry a `scvU64` cycle id; a real-shaped `CycleInfo` map is decoded into `root`, `totalAmount`, `postedAt`, `claimsStarted`, `replaced` and `claimsOpenAt`; `get_total_credited`, `get_vesting_reserved` and `get_available_funds` are asserted by entrypoint name; the corrected error table is exercised through both simulation and on-chain diagnostics; and the CLI tests cover an unposted cycle, a replaced root, a cycle still inside the challenge window, and a malformed manifest. We also exercised the built SDK against the live Testnet vault at `CB456...` with the native SAC token `CDLZ...`: `getTokenDecimals` returned `7`, cycle 0 correctly returned `null`, and the vault reported an on-hand balance of `10,000,000` stroops with `0` credited, `0` vesting reserved and `10,000,000` available — the same post-deployment state `splitstream-core` recorded after its smoke-test deposit. That is a real read against the deployed contract, not a fixture, and the same reads are now reproducible with `SPLITSTREAM_TESTNET_E2E=1 npm test -w @splitstream/sdk`. - -The documentation was corrected rather than appended to: the README and package README now show `getCycleInfo`, the new read methods and the `u64` cycle-id rule, describe the 24-hour challenge window in the claim flow, and point at the current Testnet deployment; the SDK reference has the new read table and the exact 1–19 error table; and the contributor, maintainer and CLI pages describe challenge-window states and the new pre-signing checks. We would rather state the limits than have them found in review: this repository is client tooling and does not deploy the vault, so the changes target the existing `CB456...` deployment and cannot redeploy it; the previous address `CCC2LP2...` is superseded rather than migrated; the challenge-window check in the CLI compares ledger timestamps to the local clock as a convenience, while the contract remains the authority; everything here is Testnet-only; and the code remains unaudited.