Problem
When building TON applications that need to send internal messages, developers often import internal() from the wrong package.
The function is only available in @ton/core:
// ✅ CORRECT
import { internal } from '@ton/core';
// ❌ WRONG — internal() does not exist here
import { internal } from '@ton/ton';
This causes a runtime error like TypeError: internal is not a function which is confusing because @ton/ton depends on @ton/core and re-exports many things.
Proposed Fix
Add a note in the @ton/ton README or JSDoc pointing to @ton/core for message creation utilities, or re-export internal from @ton/ton for convenience.
Context
This is a common pain point for developers building Telegram bots and platforms on TON. I encountered this while building TON Agent Platform, and the confusion cost significant debugging time.
Packages
@ton/ton ^14
@ton/core ^0.57
Problem
When building TON applications that need to send internal messages, developers often import
internal()from the wrong package.The function is only available in
@ton/core:This causes a runtime error like
TypeError: internal is not a functionwhich is confusing because@ton/tondepends on@ton/coreand re-exports many things.Proposed Fix
Add a note in the
@ton/tonREADME or JSDoc pointing to@ton/corefor message creation utilities, or re-exportinternalfrom@ton/tonfor convenience.Context
This is a common pain point for developers building Telegram bots and platforms on TON. I encountered this while building TON Agent Platform, and the confusion cost significant debugging time.
Packages
@ton/ton^14@ton/core^0.57