Repository navigation
docs(sdk): add TSDoc to the remaining public exports - #10
Merged
Merged
Conversation
38 of the 150 named exports reachable from sdk/src/index.ts had no doc comment, so editor tooltips were empty on most of the integration surface. bulkPayout had none at all; claimableBalance, network and feePayer were partly covered. Documents params, returns and the behaviour a caller cannot infer from the signature: parseCSV row numbers are CSV lines rather than indices into the returned rows, executePayout records a failed batch and continues instead of rejecting, buildClaimLink hardcodes the hosted wallet host, and FeePayerMode 'legacy' derives from the credential ID, which is not a secret. Comments only. No runtime, type or export-surface changes.
dxfareed
force-pushed
the
docs/sdk-tsdoc-6
branch
from
September 5, 2026 17:32
8157cfb to
84347ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6
What changed: Added TSDoc to the 38 exported symbols reachable from
sdk/src/index.tsthat had none, taking the public surface from 112/150 documented to 150/150. Comments only, no runtime, type or export-surface changes.Why: Editor tooltips were empty across most of the integration surface.
bulkPayouthad no doc comments at all;claimableBalance,networkandfeePayerwere partly covered.Where the behaviour isn't inferable from the signature, the comment says so rather than restating the types:
parseCSVreportsValidationError.rowas a CSV line number, not an index into the returnedrows(which omits rejected rows).executePayoutrecords a failed batch infailedRowsand continues, so it does not reject on a batch failure.buildClaimLinkhardcodes the hosted wallet host, so self-hosted deployments need to build their own link.FeePayerMode: 'legacy'derives from the credential ID, which is not a secret; cross-linked to the existing warning onderiveFeePayerKeypair.signMessage'sVEIL_SIGNED_MESSAGE_V1domain prefix is what prevents the signature being replayed as a Soroban auth approval.How tested:
npm run buildinsdk/green, and the comments are present in the emitteddist/*.d.ts, which is what actually reaches consumers.npm testinsdk/green: 24 suites, 273 tests.api-surface.test.tspassing is the guard that the export surface is unchanged.npm run sizebyte-identical tomain(228.21 kB / 214.85 kB, limits 230 / 225). Checked because main sits ~1.8 kB under its limit; comments strip in minification.Not tested: nothing on a device. This change cannot reach a device.
Notes:
Two things I hit while working, both left out of this diff deliberately:
scripts/flatten-dist.jsis not idempotent. ItrenameSyncsdist/src/*up intodist/, which throwsENOTEMPTYwhen the target already exists, so a secondnpm run buildover an existingdist/fails andnpm run size(which builds) fails with it. Workaround isrm -rf distfirst. Happy to open a separate issue or a one-linefs.rmSync(distDir, { recursive: true, force: true })PR if you want it.sdk/src/vanilla.tsis a separate entry point rather than somethingindex.tsre-exports, so I read it as outside this issue's stated key files and left it alone. Both of its exports (InvisibleWallet,createInvisibleWallet) are undocumented. Say the word and I'll fold it in here or do it as a follow-up.Also worth a second look:
sdk/builds clean only afternpm cithere. On a stalenode_modulesthe Vue/Svelte/Solid adapters fail to resolve their optional peers. Pre-existing onmain, unrelated to this change, just noting it in case CI ever caches that directory.