Skip to content

YNU-864: Build SDK and IA cleanup#159

Open
ihsraham wants to merge 1 commit into
feat/ynu-864-learn-protocol-reconciliationfrom
feat/ynu-864-docs-ia-go-build-cleanup
Open

YNU-864: Build SDK and IA cleanup#159
ihsraham wants to merge 1 commit into
feat/ynu-864-learn-protocol-reconciliationfrom
feat/ynu-864-docs-ia-go-build-cleanup

Conversation

@ihsraham
Copy link
Copy Markdown
Collaborator

@ihsraham ihsraham commented May 19, 2026

Summary

Finishes the Build/SDK, IA, and build-gate cleanup work stacked on #158. This PR should be rebased onto docs/reorg-for-v1 after #158 merges.

Changes

  • Refreshes Go SDK docs around github.com/layer-3/nitrolite/sdk/go, adds Go examples, and separates normal app-builder methods from security-token operator methods.
  • Adds the SDK MCP page with source-checkout setup and common AI tool setup shapes. The npm package remains marked coming soon because @yellow-org/sdk-mcp is still unpublished.
  • Removes the dead Nitrolite tutorials placeholder route and sidebar.
  • Updates docs config: GitHub edit URL now uses main, Prism defaults to TypeScript, broken links throw, and markdown broken-link handling uses the Docusaurus hooks location.
  • Fixes existing broken links and broken anchors in versioned Nitrolite 0.5.x and Clearnet docs so the build can run with strict link handling.

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 build succeeds 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/nitrolite returns no hits.
  • rg -n "Clearnode|clearnode|wss://clearnode" docs/nitrolite/build/sdk/go returns no hits.
  • npm view @yellow-org/sdk-mcp version returns 404, so the MCP page keeps the npm command marked coming soon.
  • git diff --check

Review Status

Independently re-reviewed as a stacked diff against #158. One Go SDK signature mismatch found during review was corrected: GetOnChainBalance is documented as returning decimal.Decimal, matching the current Go SDK. Ready for review.

@ihsraham ihsraham requested a review from dpatsora as a code owner May 19, 2026 06:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 61903cbe-e9b0-4726-8bc2-a4080337e34c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ynu-864-docs-ia-go-build-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ihsraham ihsraham force-pushed the feat/ynu-864-docs-ia-go-build-cleanup branch from dba9a31 to aa9d97b Compare May 19, 2026 08:47
Comment on lines +129 to +139
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and I believe it is better to not document it to avoid confusion

Copy link
Copy Markdown
Contributor

@nksazonov nksazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants