From 627f4b24bb2eb29eda42a298256cc18c605d2f24 Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:42 +0000 Subject: [PATCH 01/10] docs(pages): add the GitBook table of contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs/SUMMARY.md lists the seven pages in reading order, which is what GitBook reads as the book's table of contents. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/SUMMARY.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/SUMMARY.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..9dceca7 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,9 @@ +# Summary + +- [Introduction](./introduction.md) +- [For contributors](./for-contributors.md) +- [For maintainers](./for-maintainers.md) +- [CLI reference](./cli-reference.md) +- [SDK reference](./sdk-reference.md) +- [Developer guide](./developer-guide.md) +- [Contributing](./contributing.md) From b82feb87f2770890d3d63dad66d1ae2e332bff77 Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:44 +0000 Subject: [PATCH 02/10] docs(pages): add the Introduction page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Orients the reader on the three-repo split, what the SDK and CLI are, and which parts of the cross-repo contract this repo only consumes. Links the sibling repositories to their GitBook sites. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/introduction.md | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/introduction.md diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000..6df6256 --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1,64 @@ +# Introduction + +SplitStream is a Soroban settlement protocol that lets a Drips Wave team turn +pooled treasury funds into a verifiable, disputable, on-chain distribution to +contributors, instead of working out who gets what by hand. The pieces are +[splitstream-core] β€” the vault contract that holds the pool, enforces the cycle +rules, and pays claims β€” [splitstream-actions] β€” the GitHubβ†’chain bridge that +computes each cycle's payout manifest and relays its Merkle root on-chain β€” and +this repo, splitstream-sdk-cli. + +This repo is the client half of that system. It reads the manifests the action +publishes, reads chain state from the vault, and builds the transactions a +contributor claims with. It never holds funds and never holds a private key on +anyone's behalf. + +| Repo | Docs | Role | +| --- | --- | --- | +| splitstream-core | | The Soroban vault contract that holds and settles the funds | +| splitstream-actions | | The GitHubβ†’chain bridge that computes each cycle's payout manifest and relays its Merkle root on-chain | +| **splitstream-sdk-cli** | **this site** | The client SDK and CLI contributors claim with and maintainers simulate and report with | + +## The two packages + +- **`@splitstream/sdk`** β€” a thin, typed client over the deployed vault. It + never signs: the `build*` methods return unsigned transactions for you to sign + with a wallet, a hardware device, or a locally stored testnet key. It is + browser-safe: no `node:crypto`, no CLI-only dependencies. +- **`splitstream`** (CLI) β€” the operational cockpit built on the SDK: + `simulate`, `status`, `claim` and `report`. + +## What this repo owns, and what it only consumes + +The payout formula, the manifest shape, the Merkle leaf format and the contract +error codes are a frozen cross-repo contract. They are not this repo's +invention, and this repo does not get to change them alone. + +- The **manifest format** is written by [splitstream-actions] and only read + here β€” see its [Manifest reference][actions-manifest]. +- The **Merkle scheme** is built by [splitstream-actions] and verified by + [splitstream-core]; `merkleProof.ts` reconstructs proofs that must match both + byte for byte. +- **Contract error codes** are raised by the vault. `errors.ts` carries a local + copy of the enum because Soroban only surfaces `Error(Contract, #N)` on the + wire. + +What this repo does own is the client side of that contract: manifest parsing, +proof reconstruction, amount arithmetic, the typed vault client, and the +terminal workflow around them. + +## Read on + +- [For contributors](./for-contributors.md) β€” check a position, claim a cycle, + get the money out. +- [For maintainers](./for-maintainers.md) β€” dry-run a cycle and publish the + report. +- [CLI reference](./cli-reference.md) β€” every command and flag. +- [SDK reference](./sdk-reference.md) β€” the exported API. +- [Developer guide](./developer-guide.md) β€” build, test, and the cross-repo + golden fixture. +- [Contributing](./contributing.md) β€” what a change here can break elsewhere. + +[splitstream-core]: https://splitstream.gitbook.io/splitstream-core/ +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[actions-manifest]: https://splitstream.gitbook.io/splitstream-actions/manifest-reference From 385a3f8273815bf0d1c09fd41dc50110f720f8ae Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:46 +0000 Subject: [PATCH 03/10] docs(pages): add the For contributors page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Covers checking a position, the two-transaction claim flow, both signing paths, and where the amount comes from. Points the registry question at splitstream-actions, which owns it. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/for-contributors.md | 135 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 docs/for-contributors.md diff --git a/docs/for-contributors.md b/docs/for-contributors.md new file mode 100644 index 0000000..08a7a5a --- /dev/null +++ b/docs/for-contributors.md @@ -0,0 +1,135 @@ +# For contributors + +If you closed issues that were counted in a cycle, your allocation is already +on-chain before you do anything: [splitstream-actions] wrote the manifest and +relayed the cycle's Merkle root to the vault. This repo is how you check what +you are owed and pull it out. + +## Check your position + +```bash +splitstream status --contributor GABC...XYZ +``` + +With `--contributor`, status reads the vault and reports: + +- **claimable in vault** β€” your credit balance, from `get_balance`. +- **vesting** β€” the schedule from `get_vesting`, or `none`. +- **pending claimable cycles** β€” cycles whose root is posted and which you have + not claimed yet. +- **already claimed cycles** β€” cycles where `has_claimed` is already true. + +Add `--json` for machine-readable output, or `--cycles ` to widen the range. +There is no contributor list on-chain β€” the contract does not expose one, and +this tooling does not pretend otherwise. Per-contributor amounts come from the +manifest, so a local `manifests/` directory makes the output richer. + +## Claim a cycle + +```bash +splitstream claim --cycle 3 +``` + +`--cycle` is required: there is no way to guess which cycle you mean. The +manifest for that cycle is read from `--manifest `, a local checkout +passed with `--repo `, `--repo owner/name` at `--ref` on GitHub, or +`manifests/cycle-.json` in your working directory. + +Claiming is **two separately signed transactions**, always: + +1. `credit_claim` proves your allocation against the cycle's Merkle root and + credits your balance inside the vault. +2. `withdraw` moves that credited balance out to your account. + +The command submits the first, then offers the second explicitly. They are never +merged into one transaction. Pass `--no-withdraw` to stop after `credit_claim`. + +### What the command checks before it signs + +1. It builds your proof from the manifest row for your address, or for your + GitHub handle if you pass one as `--contributor`. +2. It **recomputes the Merkle root from the manifest's own rows** and compares it + to the published `merkleRoot`. If they disagree it refuses to submit, because + the proof would burn a fee and fail on-chain. `--force` overrides that, prints + a warning, and should only be used when you are certain. +3. It checks `has_claimed` for your cycle and address, and stops before signing + if you have already claimed. +4. It asks you to confirm, unless you pass `-y, --yes`. + +## Signing + +There are two ways to sign, and neither is "paste a secret key into the +terminal". + +### Local testnet keypair + +Set `SPLITSTREAM_DEV_SECRET_KEY` in `.env`. This is a testnet-only path: it is +labelled `INSECURE, testnet-only` wherever it is printed, and it is +**hard-blocked on mainnet**. The key is read only from that environment +variable β€” never from a flag and never from a config file. If the key does not +control your claimant address, the command fails before signing. + +### Hardware wallet + +```bash +splitstream claim --cycle 3 --wallet hardware +``` + +Signing is delegated to a Ledger device through the optional +`@ledgerhq/hw-app-str` and `@ledgerhq/hw-transport-node-hid` packages, which +keep the key off the machine. They are not installed by default; the CLI tells +you the `npm install --save-optional` line if they are missing. The default +derivation path is `44'/148'/0'`. + +The device's address is read first and matched against the address the claim is +sourced from, so a wrong device fails before you approve anything. + +A mainnet claim therefore requires a hardware wallet, by construction. + +## Where your amount comes from + +Your row in the manifest has `stellar` (your `G...` account), `issuesClosed` +(the count that produced the payout) and `amount` (base units, as a decimal +string). Amounts are computed as: + +``` +contributor_amount = floor(poolAmount * contributor_issues_closed / totalIssuesClosed) +``` + +The remainder that does not divide evenly is `dustRemainder` and stays in the +vault. An issue counts when it was closed by a merged pull request containing a +recognized closing keyword β€” `Closes #N`, `Fixes #N` or `Resolves #N`. No label +is read, and every qualifying issue counts equally. Credit goes to the PR +author. + +**If you are not in the manifest, you are not paid by this cycle.** Who is +eligible is decided by the contributor registry, which is owned by +[splitstream-actions] β€” see its +[maintainer page on `.github/splitstream.yml`][actions-registry]. Missing or +wrong addresses in that registry are the usual reason a contributor is absent or +unmapped, so check there before opening an issue here. + +## Vesting + +If a cycle granted you a vesting schedule, part of your allocation unlocks over +time rather than all at once. `splitstream status --contributor
` +reports the unvested remainder, the start ledger and the duration. The vault's +`claim_vested` entrypoint and the SDK's `buildClaimVestedTx` handle it, but there +is no CLI command for it yet β€” the SDK path is in the +[SDK reference](./sdk-reference.md). + +## When something refuses to run + +- **"has already claimed cycle N"** β€” you already credited this cycle. Run + `splitstream status --contributor
` to see the balance instead. +- **"the manifest root does not match the tree recomputed from its own rows"** β€” + the manifest and this repo's proof code disagree. Re-generate the manifest, or + report it. Do not reach for `--force` first. +- **"is not present in the cycle N manifest"** β€” your address or handle is not in + the eligible set. See the registry note above. + +Every message is a single line by default; `-v, --verbose` adds stack traces and +raw RPC detail. + +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[actions-registry]: https://splitstream.gitbook.io/splitstream-actions/for-maintainers From a86a3af233a893a305d0bb271ebdc8b5cf394ef9 Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:48 +0000 Subject: [PATCH 04/10] docs(pages): add the For maintainers page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Covers configuration, the simulate dry run, the cycle report, the status aggregate, and how manifests are located. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/for-maintainers.md | 128 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 docs/for-maintainers.md diff --git a/docs/for-maintainers.md b/docs/for-maintainers.md new file mode 100644 index 0000000..0c4fe53 --- /dev/null +++ b/docs/for-maintainers.md @@ -0,0 +1,128 @@ +# For maintainers + +Maintainers use this repo to answer two questions before a cycle is settled and +after it lands: what would the pool pay out, and what did it actually pay. The +cycle itself β€” the manifest and the on-chain relay β€” is owned by +[splitstream-actions]. + +## Configuration + +Chain-touching commands need four values. They come from flags, then +`SPLITSTREAM_*` environment variables, then a JSON config file, in that order. +Copy `.env.example` to `.env` and fill it in; `.env` is loaded on startup and is +never committed. + +| Variable | Purpose | +| --- | --- | +| `SPLITSTREAM_RPC_URL` | Soroban RPC endpoint, e.g. `https://soroban-testnet.stellar.org` | +| `SPLITSTREAM_NETWORK_PASSPHRASE` | Must match the RPC endpoint's network | +| `SPLITSTREAM_VAULT_CONTRACT_ID` | Vault contract (`C...`) | +| `SPLITSTREAM_TOKEN_CONTRACT_ID` | Payout token contract (`C...`) | +| `GITHUB_TOKEN` | Optional; raises `simulate`'s GitHub rate limit | +| `SPLITSTREAM_CONFIG` | Optional path to a JSON config file | + +Contract ids are validated as real Soroban ids, checksum included. When several +are missing, the command lists them all at once rather than failing one at a +time. + +`simulate` never touches the chain and needs none of the chain variables. + +A JSON config file is read from `SPLITSTREAM_CONFIG`, then +`./splitstream.config.json`, then `~/.config/splitstream/config.json`. A file +containing `devSecretKey`, `secretKey`, `secret`, `seed` or `stellarSecret` is +rejected outright: a signing key is never read from a file. + +## Dry-run a cycle + +```bash +splitstream simulate --cycle 3 --pool 100000 --map handles.json +splitstream simulate --repo owner/name --manifest manifests/cycle-3.json +``` + +`simulate` reads merged pull requests from GitHub, counts the distinct issues +each contributor closed with the same rule the deployed action uses, and +estimates the pro-rata payout. It contacts no RPC endpoint and signs nothing, so +it is safe to run against any repository. + +- **The cycle window** is `--since ` when you pass it. Otherwise it is the + `generatedAt` of cycle *N-1*'s manifest β€” the same source of truth the action + uses. If that manifest cannot be read, no window is applied and every merged + PR is considered. +- **Repositories** come from `--repo `, repeatable, summed across + every repo. With no `--repo`, the `origin` remote of the current directory is + used. +- **The pool** comes from `--pool ` (whole tokens) or from a manifest via + `--cycle`/`--manifest`. With neither, the command stops and says so. +- **`--map `** is a JSON object of `handle -> Stellar address`. Unmapped + contributors are listed under the table as a warning, because they cannot be + paid until the registry carries their address. +- **`--decimals `** (default `7`) is used for display and for parsing + `--pool`. Token decimals belong to the token contract, which `simulate` never + reads; the manifest does not carry them either. +- **`--max-prs `** (default `300`) caps how many merged PRs are read. + +The output ends with an **estimated `post_cycle_root` cost** β€” instructions, +ledger-entry reads and writes, and fees in stroops, with the assumptions printed +underneath. That is an estimate to plan with. The authoritative number comes from +simulating the real transaction at relay time. + +Add `--json` for machine-readable output; all amounts are strings of base units. + +## Report on a settled cycle + +```bash +splitstream report --cycle 3 --manifest manifests/cycle-3.json +splitstream report --cycle 3 --stdout > report.md +``` + +`report` writes plain markdown β€” no embedded HTML β€” so it renders correctly in +release notes, PR descriptions and issue comments. It reads claim status for +every contributor in the manifest, so it needs the chain configuration, and it +reads token decimals from the token contract. + +The output path defaults to `SPLITSTREAM_REPORT.md`; `--out ` changes it +and `--stdout` prints instead of writing. `--concurrency ` (1–20, default `5`) +bounds the parallel contract reads. + +The report contains the cycle summary (pool funded, contributors, issues closed, +allocated, claimed so far, dust remainder), a per-contributor table sorted by +issues closed, the dust note when the pool does not divide evenly, and a +`splitstream status` snippet that reproduces every number. + +## Inspect the vault + +Without `--contributor`, `status` is the maintainer view: the vault's unallocated +reserve, recent cycle roots, and β€” when a manifest is available locally β€” the +last cycle's distribution summary. + +```bash +splitstream status --cycles 10 +splitstream status --cycle 3 --json +``` + +The contract has no cycle counter on its public surface, so the range is anchored +on the highest cycle id with a manifest in `manifests/`, and falls back to +counting up. `--cycles` accepts 1–200; `--cycle` pins a single cycle. + +## Where manifests come from + +Manifests are committed by [splitstream-actions] as +`manifests/cycle-.json`, and this tooling reads them in this order: + +1. an explicit `--manifest `; +2. the `manifests/` directory of a local checkout passed via `--repo `; +3. `manifests/cycle-.json` at `--ref` (default `main`) on GitHub, for + `--repo owner/name`; +4. `manifests/cycle-.json`, `manifests/.json`, or `cycle-.json` in + the working directory. + +A manifest is validated on read: amounts must be integer strings of base units, +Stellar addresses are checksum-verified, and duplicate contributor addresses are +rejected. `merkleRoot` is the canonical root field; `root` is accepted only as a +read-compatibility alias. + +Publishing a cycle, and the registry that decides who is eligible, are covered in +[splitstream-actions' maintainer page][actions-maintainers]. + +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[actions-maintainers]: https://splitstream.gitbook.io/splitstream-actions/for-maintainers From bebf17128d850c23a0a3ddb2a7aef09a71b4c89c Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:51 +0000 Subject: [PATCH 05/10] docs(pages): add the CLI reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documents every command and flag, checked against the built CLI's own help output, plus the global options and configuration precedence. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/cli-reference.md | 151 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 docs/cli-reference.md diff --git a/docs/cli-reference.md b/docs/cli-reference.md new file mode 100644 index 0000000..5be9ec0 --- /dev/null +++ b/docs/cli-reference.md @@ -0,0 +1,151 @@ +# CLI reference + +The CLI installs as `splitstream` and is built on Commander. Every command ends +up in one place that turns an exception into a single readable line; raw stack +traces appear only with `--verbose`. + +```bash +splitstream [options] +splitstream --help +``` + +## Global options + +| Flag | Meaning | +| --- | --- | +| `-v, --verbose` | Print stack traces and raw RPC detail on failure | +| `-V, --version` | Output the version number | +| `-h, --help` | Display help for a command | + +`splitstream` with no command lists the commands and examples. + +## Commands + +| Command | Needs chain config | Purpose | +| --- | --- | --- | +| `simulate` | no | Dry-run payout calculations against merged PRs | +| `status` | yes | Vault reserve, recent cycle distributions, contributor position | +| `claim` | yes | Claim a cycle allocation, and optionally withdraw it | +| `report` | yes | Generate the per-cycle markdown transparency report | + +Configuration precedence is flags, then `SPLITSTREAM_*` environment variables, +then a JSON config file. `status`, `claim` and `report` accept +`--rpc-url `, `--network-passphrase `, `--vault ` and +`--token ` to override the environment for one invocation. `simulate` does +not, because it never touches the chain. + +A command that fails prints one line and exits non-zero. + +## `splitstream simulate` + +Dry run over merged pull requests. Counts the distinct issues each contributor +closed, estimates the pro-rata payout, and estimates the cost of the eventual +`post_cycle_root` call. Never contacts RPC and never signs. + +| Flag | Default | Meaning | +| --- | --- | --- | +| `--cycle ` | β€” | Cycle id to simulate | +| `--manifest ` | β€” | Read cycle id and pool from a manifest file | +| `--repo ` | `origin` remote | Repository to read merged PRs from; repeatable | +| `--ref ` | `main` | Git ref to read manifests from when `--repo` is remote | +| `--since ` | previous cycle manifest | Cycle window lower bound, ISO 8601 | +| `--pool ` | manifest | Pool size in whole tokens; overrides the manifest | +| `--decimals ` | `7` | Token decimals for display and `--pool` parsing, 0–38 | +| `--map ` | β€” | JSON map of GitHub handle β†’ Stellar address | +| `--max-prs ` | `300` | Maximum merged pull requests to consider | +| `--json` | off | Print the result as JSON instead of a table | + +`--repo` may be repeated or take several values (`--repo a/b c/d`). With no +`--repo` at all, the `origin` remote of the working directory is used, and the +command fails with a clear message if it cannot determine one. + +`--cycle` must be a non-negative integer, `--max-prs` a positive integer, and +`--since` a valid ISO 8601 timestamp; anything else is rejected before any +network call. + +## `splitstream status` + +Vault reserve, recent cycle distributions, and β€” with `--contributor` β€” a single +contributor's balance, vesting and claimed/pending cycles. + +| Flag | Default | Meaning | +| --- | --- | --- | +| `--contributor ` | β€” | Contributor address to report on | +| `--cycle ` | β€” | Show a single cycle instead of a range | +| `--cycles ` | `5` | How many recent cycles to show, 1–200 | +| `--manifest ` | β€” | Manifest supplying the last cycle summary | +| `--repo ` | β€” | Repository to fetch the manifest from | +| `--ref ` | `main` | Git ref to read manifests from | +| `--json` | off | Print the result as JSON instead of tables | +| `--rpc-url ` | env | Override `SPLITSTREAM_RPC_URL` | +| `--network-passphrase ` | env | Override `SPLITSTREAM_NETWORK_PASSPHRASE` | +| `--vault ` | env | Override `SPLITSTREAM_VAULT_CONTRACT_ID` | +| `--token ` | env | Override `SPLITSTREAM_TOKEN_CONTRACT_ID` | + +Cycle ranges are anchored on the highest cycle id that has a manifest in +`manifests/`, so discovering recent cycles needs no extra contract call. A +manifest is optional context here: without one, status still prints chain state +and says so, because contributor-level breakdowns are not available on-chain. + +## `splitstream claim` + +Claims a cycle allocation and optionally withdraws it, as two separately signed +transactions. + +| Flag | Default | Meaning | +| --- | --- | --- | +| `--cycle ` | **required** | Cycle to claim | +| `--manifest ` | β€” | Manifest file for the cycle | +| `--repo ` | β€” | Repository to fetch the manifest from | +| `--ref ` | `main` | Git ref to read manifests from | +| `--contributor ` | signing wallet | Who is claiming | +| `--wallet ` | prompt | Signing method: `local` or `hardware` | +| `-y, --yes` | off | Skip the confirmation prompt | +| `--force` | off | Proceed even if the manifest root does not match the recomputed tree | +| `--no-withdraw` | withdraw offered | Stop after `credit_claim` | +| `--rpc-url ` | env | Override `SPLITSTREAM_RPC_URL` | +| `--network-passphrase ` | env | Override `SPLITSTREAM_NETWORK_PASSPHRASE` | +| `--vault ` | env | Override `SPLITSTREAM_VAULT_CONTRACT_ID` | +| `--token ` | env | Override `SPLITSTREAM_TOKEN_CONTRACT_ID` | + +`--wallet` accepts only `local` or `hardware`. Without it you are prompted. +`--contributor` takes an address or a GitHub handle; without it the claimant is +the local testnet key if one is configured, otherwise the connected Ledger +device, matched against the manifest before anything is signed. + +`claim` has no `--json` flag: it is an interactive signing flow, and its output +is the transaction hashes it submitted. + +## `splitstream report` + +Generates the per-cycle markdown transparency report. + +| Flag | Default | Meaning | +| --- | --- | --- | +| `--cycle ` | **required** | Cycle to report on | +| `--manifest ` | β€” | Manifest file for the cycle | +| `--repo ` | β€” | Repository to fetch the manifest from | +| `--ref ` | `main` | Git ref to read manifests from | +| `--out ` | `SPLITSTREAM_REPORT.md` | Output path | +| `--concurrency ` | `5` | Parallel contract reads, 1–20 | +| `--stdout` | off | Print the report instead of writing it to disk | +| `--rpc-url ` | env | Override `SPLITSTREAM_RPC_URL` | +| `--network-passphrase ` | env | Override `SPLITSTREAM_NETWORK_PASSPHRASE` | +| `--vault ` | env | Override `SPLITSTREAM_VAULT_CONTRACT_ID` | +| `--token ` | env | Override `SPLITSTREAM_TOKEN_CONTRACT_ID` | + +`--concurrency` bounds the in-flight contract reads used to check each +contributor's claim status; a value outside 1–20 is rejected before the run. + +## Examples + +```bash +splitstream simulate --cycle 3 --pool 100000 --map handles.json +splitstream simulate --repo owner/name --manifest manifests/cycle-3.json --json +splitstream status --contributor GABC...XYZ +splitstream status --cycles 10 --json +splitstream claim --cycle 3 --manifest manifests/cycle-3.json +splitstream claim --cycle 3 --repo owner/name --wallet hardware +splitstream report --cycle 3 --manifest manifests/cycle-3.json +splitstream report --cycle 3 --stdout > report.md +``` From f12ee249905dd9991913355ea4bdbae2e39ae4de Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:53 +0000 Subject: [PATCH 06/10] docs(pages): add the SDK reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documents the client, the exported helpers, the contract error table and the frozen Merkle scheme, and links the manifest format to the repo that owns it. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/sdk-reference.md | 218 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 docs/sdk-reference.md diff --git a/docs/sdk-reference.md b/docs/sdk-reference.md new file mode 100644 index 0000000..3094a27 --- /dev/null +++ b/docs/sdk-reference.md @@ -0,0 +1,218 @@ +# SDK reference + +`@splitstream/sdk` is a thin, typed client over the deployed `splitstream-core` +vault, plus the manifest, Merkle, amount and XDR helpers the CLI is built from. +It is browser-safe: no `node:crypto`, no `commander`, no `inquirer`. + +Design rules the package holds to: + +- **The SDK never signs.** The `build*` methods return unsigned transactions; + you sign them and hand them back to `submitSigned`. +- **Token amounts are `bigint` end to end.** Decimal strings appear only at + display and parse boundaries. +- **Nothing is defaulted about the network.** Every network identity is a + required option. + +## `SplitStreamClient` + +```ts +import { SplitStreamClient } from '@splitstream/sdk'; + +const client = new SplitStreamClient({ + rpcUrl: process.env.SPLITSTREAM_RPC_URL!, + networkPassphrase: process.env.SPLITSTREAM_NETWORK_PASSPHRASE!, + vaultContractId: process.env.SPLITSTREAM_VAULT_CONTRACT_ID!, + tokenContractId: process.env.SPLITSTREAM_TOKEN_CONTRACT_ID!, +}); +``` + +| Option | Required | Meaning | +| --- | --- | --- | +| `rpcUrl` | yes | Soroban RPC endpoint; must be an absolute http(s) URL | +| `networkPassphrase` | yes | Must match `rpcUrl`'s network | +| `vaultContractId` | yes | Deployed vault contract id (`C...`) | +| `tokenContractId` | yes | Payout token contract id (`C...`) | +| `server` | no | Inject an already-constructed `rpc.Server` (a test seam) | +| `pollIntervalMs` | no | Poll interval while waiting for a submitted transaction; default `2000` | +| `pollTimeoutMs` | no | Give up after this long; default `60000` | + +The constructor validates all four required values up front and throws +`SplitStreamError` when one is missing or malformed, so a misconfigured client +fails immediately rather than at the first call. + +### Read methods + +Reads run a read-only simulation and decode the return value. They never need a +funded account. + +| Method | Returns | +| --- | --- | +| `getBalance(contributor)` | Claimable balance in the vault, base units (`bigint`) | +| `getCycleRoot(cycleId)` | Published Merkle root, lowercase hex, or `null` if unposted | +| `hasClaimed(cycleId, contributor)` | Whether that contributor has pulled that cycle | +| `getVesting(contributor)` | `VestingInfo`, or `null` when there is no schedule | +| `getTokenDecimals()` | Decimals read from the token contract | +| `getReserveBalance()` | The vault's own token balance β€” the reserve for future cycles | + +Addresses are validated as `G...` accounts before a call is made. No read +method enumerates contributors: the contract does not expose a contributor list. + +### Unsigned transactions + +| Method | Builds | +| --- | --- | +| `buildClaimTx(contributor, cycleId, amount, proof)` | `credit_claim` | +| `buildWithdrawTx(contributor)` | `withdraw` | +| `buildClaimVestedTx(contributor)` | `claim_vested` | + +Each returns an assembled `Transaction` built from the contributor's account, +simulated and assembled (footprint and resource fees included) β€” and **unsigned**. +`buildClaimTx` rejects a negative amount and an empty proof before it touches the +network. + +### Submitting + +```ts +const tx = await client.buildClaimTx(address, 3, amount, proof); // unsigned +const signedXdr = await myWallet.sign(tx); // you sign it +const { hash, status } = await client.submitSigned(signedXdr); +``` + +`submitSigned` decodes the envelope against the client's network passphrase, +sends it, and polls until the transaction is final. It retries while the node +answers `TRY_AGAIN_LATER` (three attempts, spaced by `pollIntervalMs`) and then +fails with a clear message rather than hanging. A transaction that fails on-chain +raises `SplitStreamError` with the contract's numeric code decoded into its name +when the diagnostics carry one. + +`VAULT_METHODS` and `TOKEN_METHODS` are exported as the entrypoint names the +client calls, so the wire surface is auditable from one place. + +## Errors + +`SplitStreamError` carries `code` (the numeric contract error, when the failure +came from the contract), `codeName` (its decoded name) and `details` (the raw +RPC or XDR blob). `contractError`, `parseContractErrorCode`, +`splitstreamErrorName` and `toSplitStreamError` are exported for callers that +need to classify a failure themselves. + +Soroban reports contract failures as `Error(Contract, #N)` in diagnostics, so +the SDK carries a local copy of the vault's error enum β€” +`SPLITSTREAM_CONTRACT_ERRORS`. Anything not in the table is reported as +`UnknownSplitStreamError()` rather than guessed at. The table must be updated +in the same change that renumbers the contract: a stale table prints a +*misspelled* name, which is worse than an unknown code. + +| Code | Name | Code | Name | +| ---: | --- | ---: | --- | +| 1 | `NotInitialized` | 11 | `InvalidAmount` | +| 2 | `AlreadyInitialized` | 12 | `Overflow` | +| 3 | `Unauthorized` | 13 | `VestingNotFound` | +| 4 | `Paused` | 14 | `VestingNotStarted` | +| 5 | `CycleNotFound` | 15 | `VestingNotComplete` | +| 6 | `CycleAlreadyPosted` | 16 | `InvalidContributor` | +| 7 | `InvalidMerkleRoot` | 17 | `InvalidCycleId` | +| 8 | `InvalidProof` | 18 | `ReentrancyDetected` | +| 9 | `AlreadyClaimed` | 19 | `RootNotSet` | +| 10 | `NothingToClaim` | 20 | `InsufficientReserve` | + +That table is a copy of the vault's enum, so it is owned by +[splitstream-core] β€” not by this repo. + +## Manifests + +```ts +import { parseManifest, findManifestEntry } from '@splitstream/sdk'; + +const manifest = parseManifest(JSON.parse(jsonText)); +const entry = findManifestEntry(manifest, 'GABC...XYZ'); // address, or a handle +``` + +`parseManifest` validates and normalizes a raw manifest into a `Manifest`: +`cycleId`, `generatedAt`, `poolAmount`, `totalIssuesClosed`, `entries`, +`dustRemainder` and `merkleRoot`. It throws `ManifestParseError` naming the +offending field when something is wrong, and it refuses duplicate contributor +addresses. Amounts must be integer strings of base units: a JSON number beyond +the safe integer range is rejected rather than silently rounded. + +Entry fields are `github`, `stellar`, `issuesClosed` and `amount`. `stellar` is +the `G...` account and `issuesClosed` is the count that produced the payout β€” +there is no `address` and no `points`. `merkleRoot` is canonical; `root` is +accepted only as a read-compatibility alias. + +The manifest's shape, the payout rule and the Merkle leaf/tree format are all +owned by [splitstream-actions] β€” see its +[Manifest reference][actions-manifest]. This package parses that format and +reconstructs those proofs; it does not define them. `isValidStellarAddress`, +`isValidContractId`, `parseVesting` and `findManifestEntry` are exported +alongside the types (`Manifest`, `ManifestEntry`, `RawManifest`, `VestingInfo`, +`CycleInfo`). + +## Merkle proofs + +`buildClaimProof(manifest, identifier)` is the one call contributors need: it +finds the entry, hashes its leaf, builds the tree and returns a `ClaimProof` with +`proof` (sibling hashes, lowercase hex), `leaf`, `leafIndex`, `computedRoot`, +`manifestRoot` and `rootMatches`. + +The rest of the surface exists so the scheme can be checked locally: +`merkleLeaf`, `hashPair`, `buildMerkleTree`, `merkleProofForLeaf`, +`manifestToLeafInputs`, `computeMerkleRoot`, `computeManifestRoot` and +`verifyMerkleProof`. + +The scheme is a port, and the port must stay byte-exact β€” a different leaf +pre-image, leaf order or odd-node rule fails every claim with `InvalidProof` even +though the manifest is correct. It is the frozen cross-repo contract shared with +[splitstream-actions] (which builds the root) and [splitstream-core] (which +verifies it): + +``` +leaf(stellar, amount) = SHA-256( ScVal(Address(stellar)).toXDR() || ScVal(i128(amount)).toXDR() ) + +Address XDR (44 bytes): u32(SCV_ADDRESS=18) | u32(SC_ADDRESS_TYPE_ACCOUNT=0) | u32(publickey ED25519=0) | ed25519(32) +i128 XDR (20 bytes): u32(SCV_I128=10) | int64 hi | uint64 lo + +node(a, b) = SHA-256( min(a, b) || max(a, b) ) +``` + +Leaves are ordered by ascending Stellar public-key bytes β€” not by leaf hash and +not by manifest row order β€” so the root is reproducible from the manifest alone. +An unpaired node is promoted unchanged (it is not hashed with itself), which is +why a proof may be shorter than the tree is tall. + +SHA-256 comes from `@stellar/stellar-sdk`'s `hash`, which is pure JS, so this +path works in a browser too. + +## Amounts + +Amounts are `bigint` base units everywhere; these helpers exist for the display +and parse boundaries. + +| Helper | Behaviour | +| --- | --- | +| `formatTokenAmount(value, decimals)` | Base units β†’ decimal string, trailing zeros trimmed | +| `formatTokenAmountWithSeparators(value, decimals)` | The same, with thousands separators | +| `parseTokenAmount(input, decimals)` | Decimal string β†’ base units; rejects excess precision instead of rounding | +| `percentOf(part, total, digits)` | Truncated percentage, pure integer arithmetic | +| `truncateAddress(address, leading, trailing)` | Shortens an address for table output | + +Decimals must be an integer between 0 and 38. There is no `Number` conversion +anywhere in the amount path, so values above `Number.MAX_SAFE_INTEGER` survive +intact. + +## Bytes and XDR + +The byte helpers work on `Uint8Array` (never Node's `Buffer`): +`bytesToHex`, `hexToBytes`, `bytesEqual`, `compareBytes`, `concatBytes`, +`i128ToBytes`, `bytesToI128`, `bytesToBase64`, plus the +`ED25519_PUBLIC_KEY_BYTES` and `MERKLE_HASH_BYTES` constants. + +The XDR helpers keep the rest of the package out of the XDR classes: +`addressToScVal`, `u32ToScVal`, `i128ToScVal`, `bytesToScVal`, `proofToScVal`, +`scValToNativeValue`, `scValToBigInt`, `scValToBool`, `scValToHexOrNull`, +`isVoidScVal` and `findContractErrorCode`. `proofToScVal` rejects a sibling hash +that is not a full 32 bytes locally, rather than letting the contract reject it. + +[splitstream-core]: https://splitstream.gitbook.io/splitstream-core/ +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[actions-manifest]: https://splitstream.gitbook.io/splitstream-actions/manifest-reference From 0de31db061e5f30b255d052717b336adce05961e Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:55 +0000 Subject: [PATCH 07/10] docs(pages): add the Developer guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Covers requirements, the build/typecheck/test commands, the package layout, and why the cross-repo Merkle golden test must never be fixed by editing its fixture. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/developer-guide.md | 103 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/developer-guide.md diff --git a/docs/developer-guide.md b/docs/developer-guide.md new file mode 100644 index 0000000..cda8ad7 --- /dev/null +++ b/docs/developer-guide.md @@ -0,0 +1,103 @@ +# Developer guide + +## Requirements + +Node.js 20 or newer β€” `package.json` declares `engines.node: ">=20"` in both +workspaces, and CI uses the version pinned in `.nvmrc`. No other toolchain is +required. + +## Build, typecheck, test + +```bash +npm install +npm run build # builds the SDK, then the CLI +npm run typecheck # type-checks both workspaces without emitting +npm test # runs both workspaces' vitest suites +``` + +This is an npm workspace with two packages, so the root scripts fan out to each +workspace in order: the CLI depends on the SDK's build output. + +Run the CLI straight from the build output: + +```bash +node packages/cli/dist/index.js --help +``` + +`dist/` is build output and is not committed. + +## Layout + +``` +packages/ + sdk/ @splitstream/sdk - typed vault client, Merkle proofs, amount math + cli/ splitstream-cli - commander-based terminal app (bin: splitstream) +``` + +| Path | Responsibility | +| --- | --- | +| `packages/sdk/src/types.ts` | Manifest parsing and domain types | +| `packages/sdk/src/merkleProof.ts` | Frozen leaf hashing and the sorted-pair tree | +| `packages/sdk/src/client.ts` | Typed Soroban client; never signs | +| `packages/sdk/src/errors.ts` | Contract error table and error decoding | +| `packages/sdk/src/amounts.ts` | bigint amount formatting and parsing | +| `packages/sdk/src/bytes.ts`, `xdr.ts` | Byte and ScVal conversion helpers | +| `packages/cli/src/contributions.ts` | Count-based ingest and the payout formula | +| `packages/cli/src/manifest.ts` | Locating and loading a cycle manifest | +| `packages/cli/src/commands/` | `simulate`, `status`, `claim`, `report` | +| `packages/cli/src/wallet.ts` | Signing: local testnet keypair or Ledger | +| `packages/cli/src/report.ts` | Markdown transparency report | + +## Tests + +- `packages/sdk/test/` covers manifest parsing, amount math, XDR plumbing, the + Merkle scheme, and the RPC client against a stubbed server. +- `packages/cli/test/` covers the commands, configuration precedence, manifest + loading, the wallet paths and the count-based rule. + +### The cross-repo golden test + +`packages/sdk/test/merkleGolden.test.ts` is not an internal consistency check. It +loads `test/fixtures/merkle.golden.json` β€” copied verbatim from +[splitstream-actions] β€” plus a real-shaped manifest fixture, and proves this +repo's proof reconstruction verifies against the *other repo's* committed root. + +If it fails, the implementation has diverged from the cross-repo Merkle contract +and real claims would fail `InvalidProof` on-chain. **Never fix it by editing the +fixture.** Fix the implementation, or coordinate the format change across all +three repos. + +## Working on the payout path + +Two rules matter more than style here: + +- **Amounts are `bigint` or strings, never JS `number`.** A rounded payout is a + wrong payout, and the failure is silent. +- **Token decimals come from the token contract at runtime** via + `getTokenDecimals`. They are never read from a manifest, and a manifest that + carries them is out of date. + +When you change how a transaction is assembled, exercise it against a stubbed +`rpc.Server` rather than a live network β€” the client accepts an injected server +precisely so tests stay offline. + +## Cross-repo changes + +Some changes here cannot land alone: + +- **The manifest format** is written by [splitstream-actions] and parsed here. + Do not add fields to the parser that the writer does not produce. +- **The Merkle scheme** is shared byte-for-byte with [splitstream-actions] and + [splitstream-core]. A change to leaf pre-image, leaf order or the odd-node rule + is a breaking change for both. +- **The contract error table** mirrors the vault's enum. Update it in the same + change that renumbers the contract. + +The [Contributing](./contributing.md) page says more about what to coordinate; +the sibling sites carry the other side of each contract: +[splitstream-actions docs][actions-docs], [splitstream-core docs][core-docs]. + +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[splitstream-core]: https://splitstream.gitbook.io/splitstream-core/ +[actions-docs]: https://splitstream.gitbook.io/splitstream-actions/ +[core-docs]: https://splitstream.gitbook.io/splitstream-core/ From d3bb5eccf250a3ad870d698c6ea29fa4f8137cbf Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:57 +0000 Subject: [PATCH 08/10] docs(pages): add the Contributing page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Defers to CONTRIBUTING.md as the source of truth and spells out which changes here are cross-repo breaking changes. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- docs/contributing.md | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/contributing.md diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..75c96c4 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,58 @@ +# Contributing + +The build/test workflow, commit conventions and the non-negotiables checklist +for this repo live in [CONTRIBUTING.md](../CONTRIBUTING.md) β€” that file is the +source of truth for how to land a change here, and this page does not duplicate +it. In short: one commit per logical unit, conventional commit subjects, stage +exactly what belongs to the change, and never "fix" the cross-repo Merkle golden +test by editing its fixture. + +Changes reach `main` through a pull request: the branch rules require one, and +they require the CI status check to pass before merge. CI runs the typecheck and +both workspaces' test suites. + +## What this repo affects + +Three repos split the protocol, and a change here can break the other two: + +- **splitstream-sdk-cli** (this repo) is how people check status and claim. It + reads the manifest and the on-chain state, reconstructs Merkle proofs, and + builds the transactions contributors sign. +- **[splitstream-actions]** produces what gets settled. It reads GitHub activity, + decides the amounts, writes the manifest and relays the root. It is the + authoritative source for the manifest format. +- **[splitstream-core]** enforces and pays it. The vault holds the pool, verifies + the proof against the relayed root and pays claims. Its `merkle::leaf_hash` and + `hash_pair` must stay byte-identical to `merkleProof.ts`. + +So a change to **manifest parsing** or to the **Merkle scheme** is a +cross-repo change, not an internal refactor. Land it in coordination with the +other repos and say so in the PR description, linking what depends on this +repo's output: + +- [splitstream-actions docs][actions-docs] +- [splitstream-core docs][core-docs] + +Three areas deserve specific care: + +| Area | Why it is cross-repo | +| --- | --- | +| `parseManifest` | Must read the field names the writer actually emits (`entries`, `stellar`, `issuesClosed`, `totalIssuesClosed`, `dustRemainder`, `merkleRoot`), never an invented shape | +| `merkleProof.ts` | Leaves are `sha256(ScVal(Address).toXDR() || ScVal(i128).toXDR())`, ordered by ascending Stellar public-key bytes, internal nodes are `sha256(min||max)`, and an unpaired node is promoted unchanged | +| `errors.ts` | The error table mirrors the vault's enum; a stale table prints a wrong name, which is worse than an unknown code | + +Two more rules that are not cross-repo but are not negotiable either: token +decimals are always read from the token contract, never from a manifest; and +monetary amounts are always `bigint` or strings, never JS `number`. + +## Where to start + +- A claim that fails locally or on-chain: [For contributors](./for-contributors.md). +- A cycle report that looks wrong: [For maintainers](./for-maintainers.md). +- Setup, tests and the golden fixture: [Developer guide](./developer-guide.md). +- The exported API: [SDK reference](./sdk-reference.md). + +[splitstream-actions]: https://splitstream.gitbook.io/splitstream-actions/ +[splitstream-core]: https://splitstream.gitbook.io/splitstream-core/ +[actions-docs]: https://splitstream.gitbook.io/splitstream-actions/ +[core-docs]: https://splitstream.gitbook.io/splitstream-core/ From 072f6dbc17b186a7dac9307a62a83f93ecb0b621 Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:33:59 +0000 Subject: [PATCH 09/10] chore(gitbook): point Git Sync at docs/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The earlier config pointed content at the repository root, which holds no book. This matches the working configs in splitstream-core and splitstream-actions: one space reading ./docs, with docs/SUMMARY.md as the table of contents. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- gitbook-docs.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gitbook-docs.yaml b/gitbook-docs.yaml index d02204b..76fd953 100644 --- a/gitbook-docs.yaml +++ b/gitbook-docs.yaml @@ -1,11 +1,21 @@ +# GitBook Site Git Sync configuration. +# Site project directory: repository root. Content directories are resolved +# from here, so ./docs reads the docs/ directory at the repository root. +# Branch: main. The sync target cannot be read from the GitBook API without an +# account token, so this file matches splitstream-core's and splitstream-actions' +# working configs: the same owner, the same docs/ layout, the same flat pages. $schema: https://api.gitbook.com/gitbook-docs.yaml site: title: SplitStream SDK & CLI structure: + # The repository holds a single documentation directory, docs/, which is + # read as one book (docs/SUMMARY.md is its table of contents). No sections + # are declared, so this space is listed at the top level and marked as the + # site default. - type: space key: space-docs - title: SplitStream SDK & CLI + title: Documentation path: docs default: true content: - directory: ./ + directory: ./docs From 51ef842635c4195b266b131f6da6ff21e44ef08f Mon Sep 17 00:00:00 2001 From: Oyinkans0la12 <147610565+Oyinkans0la12@users.noreply.github.com> Date: Wed, 16 Sep 2026 12:34:01 +0000 Subject: [PATCH 10/10] docs(readme): add the published docs site to the quick links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The docs now live on GitBook, so the quick-links row leads with them. πŸ€– Generated with Codebuff Co-Authored-By: Codebuff --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 980cf9a..c2d6464 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Client tooling for SplitStream, the pro-rata contributor payout vault on Stellar ![Node](https://img.shields.io/badge/node-24-green) ![License](https://img.shields.io/github/license/Oyinkans0la12/splitstream-sdk-cli) -[Testnet Explorer](https://stellar.expert/explorer/testnet/contract/CCC2LP2LOYZOLA2JW4C4K7JMR3TRJZIKHDSQYSFJ3R3MCDJLVBT3PZOC) Β· [Contributing](CONTRIBUTING.md) Β· [Security](SECURITY.md) +[Docs](https://splitstream.gitbook.io/splitstream-sdk-cli/) Β· [Testnet Explorer](https://stellar.expert/explorer/testnet/contract/CCC2LP2LOYZOLA2JW4C4K7JMR3TRJZIKHDSQYSFJ3R3MCDJLVBT3PZOC) Β· [Contributing](CONTRIBUTING.md) Β· [Security](SECURITY.md) ## What it is