Deep links and universal links

May 12, 2026 · View on GitHub

This document is normative for dApps, wallets, bridge operators, SDKs. The keywords MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as described in RFC 2119.

TON Connect uses deep-link transport for connect flows opened from QR codes, browsers, native dApps and in-app browsers.

Wallet-specific HTTPS link from wallets-list universal_url:

https://<wallet-universal-url>?
                               v=2&
                               id=<to_hex_str(A)>&
                               r=<urlsafe(json.stringify(ConnectRequest))>&
                               ret=back&
                               trace_id=<uuid>&
                               e=<base64url(json.stringify(EmbeddedWireRequest))>

In addition to the wallet-specific universal link, wallets MUST support:

tc://?v=2&id=<to_hex_str(A)>&r=<urlsafe(json.stringify(ConnectRequest))>&ret=back&trace_id=<uuid>&e=<base64url(json.stringify(EmbeddedWireRequest))>

A single tc:// link addresses any wallet that supports the unified scheme, so one QR code reaches them all.

Wallets MAY expose a wallet-specific custom scheme from wallets-list deepLink (for example tonkeeper-tc://, mytonwallet-tc://).

If deepLink is published, the wallet MUST accept the same TON Connect query parameters as universal links (v, id, r, optional ret, optional trace_id, optional e) and MUST apply the same validation and processing rules.

Parameters

ParamRequiredMeaning
vyesProtocol version. Wallets MUST reject unsupported versions.
idyesdApp client_id encoded as hex (without 0x).
ryesURL-safe JSON of ConnectRequest.
retnoReturn strategy after approval or rejection.
trace_idnoUUID for analytics correlation. UUIDv7 is recommended. The wallet SHOULD reuse this value when it posts the matching connect-event reply to the bridge. See bridge.md § trace_id.
enoBase64url JSON of embedded request.

The id and ret parameters SHOULD be supported even in empty deep links:

https://<wallet-universal-url>?id=<to_hex_str(A)>&ret=back

Return strategy (ret)

Allowed values:

  • back (default): return to the dApp that initiated the jump.
  • none: no return jump.
  • custom URL: wallet opens that URL after user action.

dApps SHOULD NOT pass their own webpage URL as ret when running as a webpage.

For wallet-side handling of platform-specific return targets (Telegram in-app browser, iOS Safari, browser-specific deep links), see guides/wallet-guidelines.md § Deep-link return targets.

Embedded requests (e)

The e parameter embeds sendTransaction, signMessage or signData into the connect link, so connection and action complete in one flow.

  • Wallets that support this feature MUST advertise { name: 'EmbeddedRequest' } in DeviceInfo.features.
  • Wallets that do not support the feature MUST ignore e.
  • Wallets MUST accept connect links both with and without e.
  • e value format is base64url(JSON.stringify(EmbeddedWireRequest)) without padding.

Wire format

This section defines EmbeddedWireRequest. Wallet-side implementation guidance lives in guides/embedded-requests.md.

Field names are abbreviated to fit a URL. Each shape expands to the equivalent AppRequest payload before further processing.

Method discriminator

The top-level m field selects the request shape.

mMethodWire shape
stsendTransactionWireSendTransaction
smsignMessageWireSignMessage
sdsignDataWireSignData

WireSendTransaction / WireSignMessage

Both methods share the same payload shape. Only m differs.

Wire fieldFull nameRequiredTypeDescription
myes"st" | "sm"Method discriminator.
ffromnostringSender address (raw or friendly format). Defaults to the connected account.
nnetworknoNETWORK_IDTarget TON network global_id as a stringified integer.
vuvalid_untilnointegerUnix seconds. The wallet MUST reject the request after this moment.
msmessagesone ofWireMessage[]Raw outgoing messages. Exactly one of ms or i MUST be present.
iitemsone ofWireItem[]Structured items. Exactly one of ms or i MUST be present.

WireSignData

The t field discriminates the payload variant.

Wire fieldFull nameRequiredTypeDescription
myes"sd"Method discriminator.
ffromnostringSigner address.
nnetworknoNETWORK_IDTarget network.
ttypeyes"text" | "binary" | "cell"Payload variant.

Variant-specific fields:

Variant (t)Wire fieldFull nameRequiredTypeDescription
texttxtextyesstringUTF-8 text payload.
binarybbytesyesstringBase64-encoded bytes.
cellsschemayesstringTL-B schema describing the cell.
cellccellyesstringBase64-encoded cell BoC.

WireMessage

Raw outgoing message inside ms.

Wire fieldFull nameRequiredTypeDescription
aaddressyesstringDestination address in friendly format.
amamountyesstringNanocoins as a decimal string.
ppayloadnostringRaw one-cell BoC, base64-encoded.
sistateInitnostringRaw one-cell BoC, base64-encoded.
ecextra_currencynoobjectMap of extra-currency ID (integer) to amount (decimal string).

WireItem

Structured item inside i. The t field discriminates the variant: ton, jetton, or nft.

WireTonItem (t: "ton")
Wire fieldFull nameRequiredTypeDescription
ttypeyes"ton"Item discriminator.
aaddressyesstringDestination address in friendly format.
amamountyesstringNanocoins as a decimal string.
ppayloadnostringRaw one-cell BoC, base64-encoded.
sistateInitnostringRaw one-cell BoC, base64-encoded.
ecextra_currencynoobjectMap of extra-currency ID to amount.
WireJettonItem (t: "jetton")
Wire fieldFull nameRequiredTypeDescription
ttypeyes"jetton"Item discriminator.
mamasteryesstringJetton master contract address.
ddestinationyesstringRecipient address.
amamountyesstringJetton amount in elementary units.
aaattachAmountnostringTON value (nanocoins) to attach for transfer execution.
rdresponseDestinationnostringAddress for the excess-TON refund. Defaults to the sender.
cpcustomPayloadnostringRaw one-cell BoC, base64-encoded.
faforwardAmountnostringNanocoins forwarded to the destination.
fpforwardPayloadnostringRaw one-cell BoC, base64-encoded.
qiqueryIdnostringQuery ID for the transfer body.
WireNftItem (t: "nft")
Wire fieldFull nameRequiredTypeDescription
ttypeyes"nft"Item discriminator.
nanftAddressyesstringNFT item contract address.
nonewOwneryesstringNew owner address.
aaattachAmountnostringTON value (nanocoins) to attach.
rdresponseDestinationnostringAddress for the excess-TON refund. Defaults to the sender.
cpcustomPayloadnostringRaw one-cell BoC, base64-encoded.
faforwardAmountnostringNanocoins forwarded to the destination.
fpforwardPayloadnostringRaw one-cell BoC, base64-encoded.
qiqueryIdnostringQuery ID for the transfer body.

The expanded payload is the same JSON shape that the wallet would receive over the standard bridge for sendTransaction, signMessage or signData.

See also