docs: add common pitfalls section clarifying @ton/core vs @ton/ton imports#348
Open
spendollars wants to merge 1 commit intoton-org:developfrom
Open
docs: add common pitfalls section clarifying @ton/core vs @ton/ton imports#348spendollars wants to merge 1 commit intoton-org:developfrom
spendollars wants to merge 1 commit intoton-org:developfrom
Conversation
Clarifies which utilities come from @ton/core vs @ton/ton, which is a frequent source of confusion (e.g. internal() message creator). Includes a reference table and code examples.
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.
What
Adds a Common pitfalls section to the README documenting the correct import packages for TON utilities.
Why
A very common source of confusion for developers starting with Blueprint is knowing which package exports which utility. In particular,
internal()(for creating internal messages) must be imported from@ton/core, not@ton/ton— but this is not documented anywhere.This causes silent runtime failures (
TypeError: internal is not a function) that are hard to debug.Changes
## Common pitfallssection at the end of README.md@ton/corevs@ton/tonvs@ton/cryptoContext
Found this issue while building TON Agent Platform, an open-source no-code AI agent platform on TON. Also opened a related issue in ton-org/ton-core: ton-org/ton-core#145