Skip to content

feat(signing): put in agreement with styleguide and port code samples to Tolk#2127

Open
aigerimu wants to merge 2 commits intomainfrom
pr-closes-2116-sign
Open

feat(signing): put in agreement with styleguide and port code samples to Tolk#2127
aigerimu wants to merge 2 commits intomainfrom
pr-closes-2116-sign

Conversation

@aigerimu
Copy link
Copy Markdown
Contributor

@aigerimu aigerimu commented Apr 23, 2026

closes #2116

Summary by CodeRabbit

  • Documentation
    • Improved clarity and consistency throughout signing techniques documentation with rewritten sections and reorganized content.
    • Updated code examples from FunC to Tolk syntax with corresponding method naming.
    • Restructured signing pipeline and signature verification sections into numbered sequences.
    • Simplified TypeScript setup instructions.
    • Enhanced wallet interaction examples with detailed step-by-step guidance.
    • Expanded mnemonic protection guidance.

@aigerimu aigerimu requested a review from a team as a code owner April 23, 2026 18:49
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@aigerimu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 8 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 8 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f10c829f-78de-4e2d-9cdf-ce2ff13d130b

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab6493 and ab392e9.

📒 Files selected for processing (1)
  • contract-dev/techniques/signing.mdx
📝 Walkthrough

Walkthrough

This pull request updates the signing technique documentation to align with styleguides and modernize code examples. Changes include restructuring sections from bullet lists to numbered sequences, translating code examples from FunC syntax to Tolk syntax with updated method calls, normalizing formatting conventions, and expanding explanatory content for clarity.

Changes

Cohort / File(s) Summary
Documentation Update
contract-dev/techniques/signing.mdx
Updated page metadata; restructured "Signing pipeline" and signature verification sections from bullet lists to numbered sequences; reordered verification methods (CHKSIGNU before CHKSIGNS); translated code examples from FunC to Tolk syntax with updated method calls (slice.hash(), cell.hash(), builder.hash()); normalized "key characteristics" role labels to lowercase; reformatted "Other primitives" table; expanded mnemonic protection aside wording; revised three wallet interaction examples with sentence-style numbered steps; updated gas analysis and optimization tips to match new syntax.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A signing guide so fresh and bright,
From FunC code to Tolk's light,
With numbered steps and clearer prose,
The hash functions bloom and grow!
Now styleguides and syntax align,
Our documentation doth shine!

🚥 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 PR title clearly summarizes the main changes: updating documentation to align with styleguide and converting code samples from FunC to Tolk.
Linked Issues check ✅ Passed The changes directly address issue #2116 by aligning signing documentation with styleguide requirements and converting code examples to Tolk language.
Out of Scope Changes check ✅ Passed All changes are within scope: documentation updates to signing.mdx for styleguide alignment and Tolk code example conversion as requested in issue #2116.
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 pr-closes-2116-sign

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.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 23, 2026

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

Project Status Preview Updated (UTC)
mintlify-ton-docs 🟢 Ready View Preview Apr 23, 2026, 6:52 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
contract-dev/techniques/signing.mdx (1)

73-79: LanguageTool: repeated sentence openings.

In both Example 1 (Lines 75-79) and Example 2 (Lines 98-101), four consecutive steps start with "Wallet contract …". Consider varying the subject (e.g., "It verifies …", "Then checks seqno …") or merging tightly related steps to improve readability. Low priority.

Also applies to: 93-101

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@contract-dev/techniques/signing.mdx` around lines 73 - 79, The steps list
repeats the subject "Wallet contract" several times in both Example 1 and
Example 2; update the step wording to improve flow by varying sentence openings
or merging closely related steps: for instance, change some "Wallet contract
verifies the signature." to "It verifies the signature.", merge "Wallet contract
checks seqno for replay protection." and "Wallet contract accepts the message
and pays gas..." into "It checks seqno for replay protection, accepts the
message, and pays gas from the wallet balance.", and/or reorder to combine
verification, seqno check and acceptance into one coherent step; apply similar
edits to the other example so the repeated "Wallet contract ..." phrasing is
reduced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contract-dev/techniques/signing.mdx`:
- Line 202: The sentence "This approach is used in preprocessed wallet v2,
highload wallet v3" is missing terminal punctuation; edit the line in
signing.mdx (the sentence text) to add a period (or other appropriate terminal
punctuation) at the end so it reads "This approach is used in preprocessed
wallet v2, highload wallet v3." and matches surrounding documentation style.
- Line 254: The sentence currently implies all TVM versions introduce builder
hashing; update the phrasing around `HASHBU` to align with the earlier "Recent
TVM versions" wording and, if possible, name the specific TVM release that added
`HASHBU` (e.g., "since TVM vX.Y.Z") or otherwise prefix with "Recent TVM
versions" and add a citation/reference; ensure the sentence mentions the
`HASHBU` instruction explicitly and clarifies that it is an optimization that
reduces gas cost by hashing builder data rather than treating it as a slice.
- Line 43: Edit the sentence in signing.mdx that states "consistent signing
time" for Ed25519; remove that phrase and rephrase to say Ed25519 signatures in
TON operate on hashes to ensure fixed-size input and to satisfy the 1016-bit /
ignored-refs limitation of CHKSIGNS (keep the existing CHKSIGNS explanation at
Line 61). Update the line mentioning Ed25519 so it only references fixed-size
input and the CHKSIGNS limitation, not timing implications.

---

Nitpick comments:
In `@contract-dev/techniques/signing.mdx`:
- Around line 73-79: The steps list repeats the subject "Wallet contract"
several times in both Example 1 and Example 2; update the step wording to
improve flow by varying sentence openings or merging closely related steps: for
instance, change some "Wallet contract verifies the signature." to "It verifies
the signature.", merge "Wallet contract checks seqno for replay protection." and
"Wallet contract accepts the message and pays gas..." into "It checks seqno for
replay protection, accepts the message, and pays gas from the wallet balance.",
and/or reorder to combine verification, seqno check and acceptance into one
coherent step; apply similar edits to the other example so the repeated "Wallet
contract ..." phrasing is reduced.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dce42ec4-76a4-4105-bbc1-3ff11c4be72d

📥 Commits

Reviewing files that changed from the base of the PR and between 1f92393 and 3ab6493.

📒 Files selected for processing (1)
  • contract-dev/techniques/signing.mdx

Comment thread contract-dev/techniques/signing.mdx Outdated
Comment thread contract-dev/techniques/signing.mdx Outdated
Comment thread contract-dev/techniques/signing.mdx
Comment thread contract-dev/techniques/signing.mdx
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the updates to contract-dev/techniques/signing.mdx: there are a couple of suggestions to better align the how-to structure and prerequisites, so please apply the inline suggestions.


Per-comment submission: 1 posted, 1 failed.

Unposted inline comments (raw text):

  • contract-dev/techniques/signing.mdx:L281-L289

    [HIGH] Prerequisites under-specify required TypeScript environment and TON packages

    The TypeScript how-to section shows usage of @ton/core and @ton/crypto but the prerequisites list only mentions Node.js. This omits the need for a configured TypeScript environment and the specific TON packages, which can cause confusion or failures when readers run the examples without having the necessary tooling installed. Making these prerequisites explicit and concrete (with clear software items and installation steps) aligns with the style guidance for verifiable prerequisites.

    Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

@aigerimu
Copy link
Copy Markdown
Contributor Author

/review

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 the improvements in contract-dev/techniques/signing.mdx: please apply the inline suggestion to keep the safety callout aligned with the documentation style.

Comment thread contract-dev/techniques/signing.mdx
@aigerimu aigerimu requested a review from Shvandre April 24, 2026 06:57
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.

[Contract dev > Techniques > Signing] put in agreement with styleguide and translate code examples to Tolk

1 participant