Skip to content

Feature/node 3500 support of dapp id in sdk bm and bk#246

Open
sauin wants to merge 17 commits into
mainfrom
feature/node-3500-support-of-dapp-id-in-sdk-bm-and-bk
Open

Feature/node 3500 support of dapp id in sdk bm and bk#246
sauin wants to merge 17 commits into
mainfrom
feature/node-3500-support-of-dapp-id-in-sdk-bm-and-bk

Conversation

@sauin
Copy link
Copy Markdown
Contributor

@sauin sauin commented May 28, 2026

Adds dapp_id support to the tvm_client SDK and tvm-cli for the v3 BM/BK REST API (/v2/account, /v2/messages) while keeping compatibility with pre-1.0.0 servers. The wire format is selected at runtime from the server's GraphQL info.version:

  • version >= "1.0.0" → new fields account_id and dapp_id are sent and returned.
  • version < "1.0.0" → legacy address / dst_dapp_id shape is used.

The selection happens transparently inside the SDK after a one-time GraphQL endpoint resolution; callers always work with the new types.

Breaking changes

  • ParamsOfGetAccount: addressaccount_id (strict 64-char hex, no 0x, no workchain). New required dapp_id field.
  • ResultOfGetAccount: dapp_id is now String (not Option). New account_id field.
  • ParamsOfSendMessage: dst_dapp_id: Option<String>dapp_id: String (empty allowed only against pre-1.0.0 servers).
  • ResultOfSendMessage: now exposes account_id and dapp_id, always populated (server response on v>=1.0.0, locally derived from request on legacy servers).
  • ParamsOfProcessMessage: dst_dapp_iddapp_id: String.

The tvm-cli flag --dst-dapp-id is preserved — only the SDK field name changes.

tvm-cli behavior

The account command now requires a dapp_id when connected to a v>=1.0.0 server. Provide it as part of the address:

tvm-cli account ::
tvm-cli account :

On older servers the legacy single-address form continues to work; the CLI auto-detects which mode applies based on the server's reported version.

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.

1 participant