Skip to content

feat(appkit): how to stake#2062

Open
novusnota wants to merge 13 commits intomainfrom
closes-1923/appkit/how-to-stake
Open

feat(appkit): how to stake#2062
novusnota wants to merge 13 commits intomainfrom
closes-1923/appkit/how-to-stake

Conversation

@novusnota
Copy link
Copy Markdown
Collaborator

@novusnota novusnota commented Apr 7, 2026

Closes #1923

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive "How to stake Toncoin" guide for AppKit, covering end-to-end retail staking flows, UI examples, and provider integration.
    • Added a "Stake Toncoin" entry to the quick-start navigation.
    • Updated setup docs to include staking provider configuration (including Tonstakers) and expanded provider examples.
    • Revised connector setup examples to use a new factory-style connector initialization.

@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 7, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify-ton-docs 🟢 Ready View Preview Apr 7, 2026, 7:56 AM

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5eb7a2dc-5806-4677-87b3-4147cdef9c42

📥 Commits

Reviewing files that changed from the base of the PR and between 4e4fc23 and 70013bc.

📒 Files selected for processing (1)
  • ecosystem/appkit/stake.mdx
✅ Files skipped from review due to trivial changes (1)
  • ecosystem/appkit/stake.mdx

📝 Walkthrough

Walkthrough

Added retail staking documentation and navigation for AppKit: new "Stake Toncoin" page, connector examples switched from TonConnectConnector class to createTonConnectConnector factory, and Tonstakers provider integrated into examples and provider initialization.

Changes

Cohort / File(s) Summary
Navigation & Quick Start
docs.json, ecosystem/appkit/overview.mdx
Inserted ecosystem/appkit/stake into AppKit navigation and added a "Stake Toncoin" card to the quick-start columns.
Init / Connector Examples
ecosystem/appkit/init.mdx
Replaced TonConnectConnector class usages with createTonConnectConnector factory across React and TypeScript snippets; updated import lists and docs wording.
Staking Guide
ecosystem/appkit/stake.mdx
New comprehensive page detailing provider registration (including Tonstakers), staking quote retrieval, transaction building/submission, and querying/displaying staked balances with React hooks and TypeScript examples and error/loading handling.

Sequence Diagram(s)

sequenceDiagram
participant User as User (UI)
participant App as AppKit UI
participant Prov as Staking Provider
participant Wallet as Wallet (TonConnect)
participant Chain as Blockchain

User->>App: open Stake page / select provider & amount
App->>Prov: getStakingProviders / getStakingQuote
Prov-->>App: providers list / quote (APY, fees)
App->>Wallet: request connect / sign transaction (buildStakeTransaction)
Wallet-->>App: signed tx
App->>Chain: submit transaction
Chain-->>App: tx receipt
App->>Prov: getStakedBalance / refresh
Prov-->>App: updated staked balance
App->>User: display confirmation and balance
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A staking guide hops into view,
New providers join the AppKit crew,
Factories, quotes, and signed TX too,
Stake, refresh, and watch balances grow,
A hoppity, stakey, Toncoin show! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding documentation for staking in AppKit.
Linked Issues check ✅ Passed The PR addresses issue #1923 by creating retail-focused staking documentation with examples, provider setup, and transaction flows.
Out of Scope Changes check ✅ Passed All changes directly support the staking documentation objective: new stake.mdx page, navigation updates, overview card, and connector refactoring for provider support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch closes-1923/appkit/how-to-stake

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.

@novusnota
Copy link
Copy Markdown
Collaborator Author

/review

@github-actions

This comment was marked as off-topic.

@novusnota novusnota marked this pull request as ready for review April 7, 2026 08:35
@novusnota novusnota requested review from a team, TrueCarry and thekiba as code owners April 7, 2026 08:35
@github-actions

This comment was marked as resolved.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
coderabbitai[bot]

This comment was marked as resolved.

@novusnota
Copy link
Copy Markdown
Collaborator Author

novusnota commented Apr 8, 2026

Recent AppKit changes added rawAmountIn and rawAmountOut, which are in nanoToncoin. Hence, amount became human-readable fractional Toncoin strings.

Converted this PR to draft to address these changes.

UPD: Done.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for expanding the AppKit staking docs; I’ve left several suggestions in ecosystem/appkit/staking.mdx to tighten clarity, safety, and copy‑pasteability—please apply the inline suggestions.

@novusnota novusnota added the 3p Reviewed by someone else (a third party). Used for filtering PRs. Don't mind this. label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3p Reviewed by someone else (a third party). Used for filtering PRs. Don't mind this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ecosystem > AppKit > How to stake]

1 participant