YNU-864: Build SDK and IA cleanup#159
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dba9a31 to
aa9d97b
Compare
| Security-token methods are operator surface, not the normal app-builder flow. | ||
|
|
||
| ```go | ||
| client.Close() // Close connection | ||
| client.WaitCh() // Connection monitor channel | ||
| client.SignState(state) // Sign a state (advanced) | ||
| client.GetUserAddress() // Get signer's address | ||
| client.SetHomeBlockchain(asset, chainID) // Set default blockchain | ||
| client.ApproveSecurityToken(ctx, chainID, amount) | ||
| client.EscrowSecurityTokens(ctx, targetWalletAddress, blockchainID, amount) | ||
| client.InitiateSecurityTokensWithdrawal(ctx, blockchainID) | ||
| client.CancelSecurityTokensWithdrawal(ctx, blockchainID) | ||
| client.WithdrawSecurityTokens(ctx, blockchainID, destinationWalletAddress) | ||
| ``` | ||
|
|
||
| --- | ||
| Use these only when building node-operator or security-token tooling. |
There was a problem hiding this comment.
I think, security token topic is about a previously-active feature of locking $YELLOW to get higher rate limits, but certainly not about node-operator
There was a problem hiding this comment.
Yeah, and I believe it is better to not document it to avoid confusion
nksazonov
left a comment
There was a problem hiding this comment.
Good job! All stated changes are implemented correctly — broken link fixes verified, anchor targets confirmed, Docusaurus 3.10 markdown.hooks placement is valid, and the rg validation checks pass cleanly. Two small things to address in index.md before landing.
Out-of-diff note — docs/nitrolite/build/sdk/index.md (not modified in this PR):
Comment 1 — Line 18: The MCP row in the "Choose your SDK" table uses a plain backtick — `@yellow-org/sdk-mcp@1.2.1` — while every other entry (TypeScript, compat, Go) wraps its package name in a hyperlink. This PR adds mcp.mdx but doesn't wire it into the overview table. Change to [\@yellow-org/sdk-mcp`](./mcp)` so users landing on the overview can navigate to the new page.
Comment 2 — Line 47: The "Choosing an SDK" guidance section covers TypeScript (new app), TypeScript (compat migration), and Go, but has no entry for AI agents / agentic IDEs despite mcp.mdx now being live. Suggest adding: - **AI agents / agentic IDEs**: Use the [MCP Server](./mcp) to give AI coding tools structured access to the SDK and protocol docs.
Summary
Finishes the Build/SDK, IA, and build-gate cleanup work stacked on #158. This PR should be rebased onto
docs/reorg-for-v1after #158 merges.Changes
github.com/layer-3/nitrolite/sdk/go, adds Go examples, and separates normal app-builder methods from security-token operator methods.@yellow-org/sdk-mcpis still unpublished.main, Prism defaults to TypeScript, broken links throw, and markdown broken-link handling uses the Docusaurus hooks location.Rationale
This is the merge-last cleanup layer because it depends on the content routes being stable. The Go docs now follow the current SDK method surface and separate app-builder calls from operator-only security-token calls so builders do not treat registry/security-token methods as normal app flow. The MCP page stays source-based and clearly marked coming soon until the package exists on npm. Link handling is tightened only after the existing 0.5.x and Clearnet warnings are fixed, so future broken links fail early instead of accumulating as warnings.
Validation
npm run buildsucceeds with no broken-link or broken-anchor warnings while link handling is set to throw.rg -n "tree/master|defaultLanguage: 'javascript'|onBrokenLinks: 'warn'|onBrokenMarkdownLinks: 'warn'|tutorialsSidebar|Work in Progress" docusaurus.config.ts sidebars-nitrolite.ts docs/nitrolitereturns no hits.rg -n "Clearnode|clearnode|wss://clearnode" docs/nitrolite/build/sdk/goreturns no hits.npm view @yellow-org/sdk-mcp versionreturns 404, so the MCP page keeps the npm command marked coming soon.git diff --checkReview Status
Independently re-reviewed as a stacked diff against #158. One Go SDK signature mismatch found during review was corrected:
GetOnChainBalanceis documented as returningdecimal.Decimal, matching the current Go SDK. Ready for review.