@dynamic-labs/ton 5.11.0 → 5.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,22 @@
1
1
 
2
+ ### [5.12.1](https://github.com/dynamic-labs/dynamic-auth/compare/v5.12.0...v5.12.1) (2026-10-20)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * rabby not using native rabby:// scheme when redirecting on android devices [main] ([#12541](https://github.com/dynamic-labs/dynamic-auth/issues/12541)) ([923a372](https://github.com/dynamic-labs/dynamic-auth/commit/923a3724eae5e82ef896de78641320b7320933df))
8
+ * **sui,ton:** sign serialized Sui txs without parsing; native TON balance for jetton sends ([#12503](https://github.com/dynamic-labs/dynamic-auth/issues/12503)) ([6a5bfd6](https://github.com/dynamic-labs/dynamic-auth/commit/6a5bfd6bd0118b8ed7ce079159c10ac47cade337))
9
+
10
+ ## [5.12.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.11.0...v5.12.0) (2026-10-16)
11
+
12
+
13
+ ### Features
14
+
15
+ * **embedded-wallet-solana:** add getSolanaSponsorAddress ([#12517](https://github.com/dynamic-labs/dynamic-auth/issues/12517)) ([b95c550](https://github.com/dynamic-labs/dynamic-auth/commit/b95c550e3dab783b7ff0b019051a17b22ea44f97))
16
+ * **embedded-wallet:** show chain and wallet in private key export modal ([#12507](https://github.com/dynamic-labs/dynamic-auth/issues/12507)) ([4bfb6d6](https://github.com/dynamic-labs/dynamic-auth/commit/4bfb6d6168aac3f800792fde933e0597f288058f))
17
+ * **sdk-react-core:** send OTP purpose from step-up flows ([#12511](https://github.com/dynamic-labs/dynamic-auth/issues/12511)) ([0d2d8a3](https://github.com/dynamic-labs/dynamic-auth/commit/0d2d8a31058b3e75c71af7a34f459e2a3ddf383b)), closes [#12898](https://github.com/dynamic-labs/dynamic-auth/issues/12898) [#816](https://github.com/dynamic-labs/dynamic-auth/issues/816) [#203](https://github.com/dynamic-labs/dynamic-auth/issues/203) [#12512](https://github.com/dynamic-labs/dynamic-auth/issues/12512)
18
+ * **wallet-connect:** back WalletConnect storage with native secure storage on mobile ([#12515](https://github.com/dynamic-labs/dynamic-auth/issues/12515)) ([7b57903](https://github.com/dynamic-labs/dynamic-auth/commit/7b5790325fce707d73d591483a0130b960ed055c))
19
+
2
20
  ## [5.11.0](https://github.com/dynamic-labs/dynamic-auth/compare/v5.10.0...v5.11.0) (2026-10-14)
3
21
 
4
22
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "5.11.0";
6
+ var version = "5.12.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "5.11.0";
2
+ var version = "5.12.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ton",
3
- "version": "5.11.0",
3
+ "version": "5.12.1",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,15 +18,16 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs-sdk/client": "1.39.1",
22
- "@dynamic-labs/assert-package-version": "5.11.0",
23
- "@dynamic-labs/logger": "5.11.0",
24
- "@dynamic-labs/sdk-api-core": "0.92.0",
25
- "@dynamic-labs/types": "5.11.0",
26
- "@dynamic-labs/utils": "5.11.0",
27
- "@dynamic-labs/waas": "5.11.0",
28
- "@dynamic-labs/wallet-book": "5.11.0",
29
- "@dynamic-labs/wallet-connector-core": "5.11.0",
21
+ "@dynamic-labs-wallet/core": "1.1.43",
22
+ "@dynamic-labs-sdk/client": "1.41.0",
23
+ "@dynamic-labs/assert-package-version": "5.12.1",
24
+ "@dynamic-labs/logger": "5.12.1",
25
+ "@dynamic-labs/sdk-api-core": "0.104.0",
26
+ "@dynamic-labs/types": "5.12.1",
27
+ "@dynamic-labs/utils": "5.12.1",
28
+ "@dynamic-labs/waas": "5.12.1",
29
+ "@dynamic-labs/wallet-book": "5.12.1",
30
+ "@dynamic-labs/wallet-connector-core": "5.12.1",
30
31
  "@ton/core": "0.62.0",
31
32
  "@ton/crypto": "3.3.0",
32
33
  "@ton/ton": "16.0.0",
@@ -1,4 +1,5 @@
1
1
  import { TonClient } from '@ton/ton';
2
+ import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
2
3
  import { Chain, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
3
4
  import { GenericNetwork } from '@dynamic-labs/types';
4
5
  import { TonWallet } from './wallet/TonWallet';
@@ -48,7 +49,10 @@ export declare abstract class TonWalletConnector extends WalletConnectorBase<typ
48
49
  * @param message - The message to sign
49
50
  * @returns The signature as a string
50
51
  */
51
- abstract signMessage(message: string): Promise<string>;
52
+ abstract signMessage(message: string, options?: {
53
+ address?: string;
54
+ approvalQuorum?: ApprovalQuorumRequestContext;
55
+ }): Promise<string>;
52
56
  /**
53
57
  * Sends a TON Connect transaction.
54
58
  * @param request - The SendTransactionRequest containing messages to send
@@ -290,7 +290,10 @@ class TonConnectConnector extends TonWalletConnector.TonWalletConnector {
290
290
  /**
291
291
  * Sign a message using TonConnect UI
292
292
  */
293
- signMessage(messageToSign) {
293
+ signMessage(messageToSign,
294
+ // TON Connect wallets have no approvalQuorum channel; only the WaaS connector consumes it
295
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
296
+ _options) {
294
297
  return _tslib.__awaiter(this, void 0, void 0, function* () {
295
298
  const ui = this.getTonConnectUI();
296
299
  if (!ui.connected) {
@@ -1,4 +1,5 @@
1
1
  import { TonConnectUI } from '@tonconnect/ui';
2
+ import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
2
3
  import type { IUITransaction } from '@dynamic-labs/types';
3
4
  import { TonWalletConnector } from '../../TonWalletConnector';
4
5
  import { type SendTransactionRequest, type TonConnectConnectorOpts, type TonConnectProof } from '../../types';
@@ -72,7 +73,9 @@ export declare class TonConnectConnector extends TonWalletConnector {
72
73
  /**
73
74
  * Sign a message using TonConnect UI
74
75
  */
75
- signMessage(messageToSign: string): Promise<string>;
76
+ signMessage(messageToSign: string, _options?: {
77
+ approvalQuorum?: ApprovalQuorumRequestContext;
78
+ }): Promise<string>;
76
79
  /**
77
80
  * Send a transaction via TonConnect UI.
78
81
  * Returns the BOC string from the wallet response.
@@ -286,7 +286,10 @@ class TonConnectConnector extends TonWalletConnector {
286
286
  /**
287
287
  * Sign a message using TonConnect UI
288
288
  */
289
- signMessage(messageToSign) {
289
+ signMessage(messageToSign,
290
+ // TON Connect wallets have no approvalQuorum channel; only the WaaS connector consumes it
291
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
292
+ _options) {
290
293
  return __awaiter(this, void 0, void 0, function* () {
291
294
  const ui = this.getTonConnectUI();
292
295
  if (!ui.connected) {
@@ -107,15 +107,13 @@ class TonUiTransaction {
107
107
  });
108
108
  }
109
109
  /**
110
- * Get the balance for the from address
110
+ * Get the balance for the from address. Always returns the native TON
111
+ * balance — fees are paid in TON even for jetton transfers, and the
112
+ * confirmation screen compares this against the fee estimate.
111
113
  */
112
114
  getBalance() {
113
115
  return _tslib.__awaiter(this, void 0, void 0, function* () {
114
116
  try {
115
- if (this.nonNativeAddress) {
116
- walletConnectorCore.logger.debug('Jetton balance fetching not yet implemented');
117
- return BigInt(0);
118
- }
119
117
  const address = ton.Address.parse(this.from);
120
118
  const balance = yield this.client.getBalance(address);
121
119
  return balance;
@@ -57,7 +57,9 @@ export declare class TonUiTransaction implements IUITransaction {
57
57
  */
58
58
  submit(): Promise<string>;
59
59
  /**
60
- * Get the balance for the from address
60
+ * Get the balance for the from address. Always returns the native TON
61
+ * balance — fees are paid in TON even for jetton transfers, and the
62
+ * confirmation screen compares this against the fee estimate.
61
63
  */
62
64
  getBalance(): Promise<bigint>;
63
65
  /**
@@ -103,15 +103,13 @@ class TonUiTransaction {
103
103
  });
104
104
  }
105
105
  /**
106
- * Get the balance for the from address
106
+ * Get the balance for the from address. Always returns the native TON
107
+ * balance — fees are paid in TON even for jetton transfers, and the
108
+ * confirmation screen compares this against the fee estimate.
107
109
  */
108
110
  getBalance() {
109
111
  return __awaiter(this, void 0, void 0, function* () {
110
112
  try {
111
- if (this.nonNativeAddress) {
112
- logger.debug('Jetton balance fetching not yet implemented');
113
- return BigInt(0);
114
- }
115
113
  const address = Address.parse(this.from);
116
114
  const balance = yield this.client.getBalance(address);
117
115
  return balance;
@@ -145,16 +145,16 @@ class DynamicWaasTonConnector extends waas.withDynamicWaas(TonWalletConnector.To
145
145
  yield this.getWaasWalletClient();
146
146
  });
147
147
  }
148
- signMessage(message) {
148
+ signMessage(message, options) {
149
149
  return _tslib.__awaiter(this, void 0, void 0, function* () {
150
150
  return this.walletUiUtils.signMessage({
151
- handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
151
+ handler: () => _tslib.__awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
152
152
  message,
153
153
  walletConnector: this,
154
154
  });
155
155
  });
156
156
  }
157
- internalSignMessage(message) {
157
+ internalSignMessage(message, approvalQuorum) {
158
158
  return _tslib.__awaiter(this, void 0, void 0, function* () {
159
159
  var _a, _b, _c;
160
160
  const walletClient = yield this.getWaasWalletClient();
@@ -173,6 +173,7 @@ class DynamicWaasTonConnector extends waas.withDynamicWaas(TonWalletConnector.To
173
173
  });
174
174
  const signedMessage = yield walletClient.signMessage({
175
175
  accountAddress: this.activeAccountAddress,
176
+ approvalQuorum,
176
177
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
177
178
  elevatedAccessToken,
178
179
  message,
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import type { LogoutReason } from '@dynamic-labs-sdk/client';
4
+ import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
4
5
  import { JwtVerifiedCredential, MFAAction, SignMessageContext, TokenScope } from '@dynamic-labs/sdk-api-core';
5
6
  import { IUITransaction, WalletUiUtils } from '@dynamic-labs/types';
6
7
  import { IDynamicWaasConnector, InternalWalletConnector } from '@dynamic-labs/wallet-connector-core';
@@ -63,7 +64,7 @@ declare const DynamicWaasTonConnector_base: (abstract new (...args: any[]) => {
63
64
  delegateKeyShares({ accountAddress, password, initialSignerRules, }: {
64
65
  accountAddress: string;
65
66
  password?: string | undefined;
66
- initialSignerRules?: import("@dynamic-labs/sdk-api-core").WaasPolicyRule[] | undefined;
67
+ initialSignerRules?: import("@dynamic-labs-wallet/core").WaasPolicyRule[] | undefined;
67
68
  }): Promise<void>;
68
69
  createRevocableSignedSessionCallback(): {
69
70
  getSignedSessionId: () => Promise<string>;
@@ -155,8 +156,9 @@ declare const DynamicWaasTonConnector_base: (abstract new (...args: any[]) => {
155
156
  accountAddress: string;
156
157
  newPassword: string;
157
158
  }): Promise<void>;
158
- signRawMessage({ accountAddress, context, message, password, }: {
159
+ signRawMessage({ accountAddress, approvalQuorum, context, message, password, }: {
159
160
  accountAddress: string;
161
+ approvalQuorum?: ApprovalQuorumRequestContext | undefined;
160
162
  context?: SignMessageContext | undefined;
161
163
  message: string;
162
164
  password?: string | undefined;
@@ -240,8 +242,10 @@ export declare class DynamicWaasTonConnector extends DynamicWaasTonConnector_bas
240
242
  validateActiveWallet(expectedAddress: string): Promise<void>;
241
243
  getAddress(): Promise<string | undefined>;
242
244
  connect(): Promise<void>;
243
- signMessage(message: string): Promise<string>;
244
- internalSignMessage(message: string): Promise<string>;
245
+ signMessage(message: string, options?: {
246
+ approvalQuorum?: ApprovalQuorumRequestContext;
247
+ }): Promise<string>;
248
+ internalSignMessage(message: string, approvalQuorum?: ApprovalQuorumRequestContext): Promise<string>;
245
249
  endSession(reason?: LogoutReason): Promise<void>;
246
250
  signMessageWithContext(_params: {
247
251
  message: string | {
@@ -141,16 +141,16 @@ class DynamicWaasTonConnector extends withDynamicWaas(TonWalletConnector) {
141
141
  yield this.getWaasWalletClient();
142
142
  });
143
143
  }
144
- signMessage(message) {
144
+ signMessage(message, options) {
145
145
  return __awaiter(this, void 0, void 0, function* () {
146
146
  return this.walletUiUtils.signMessage({
147
- handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message); }),
147
+ handler: () => __awaiter(this, void 0, void 0, function* () { return this.internalSignMessage(message, options === null || options === void 0 ? void 0 : options.approvalQuorum); }),
148
148
  message,
149
149
  walletConnector: this,
150
150
  });
151
151
  });
152
152
  }
153
- internalSignMessage(message) {
153
+ internalSignMessage(message, approvalQuorum) {
154
154
  return __awaiter(this, void 0, void 0, function* () {
155
155
  var _a, _b, _c;
156
156
  const walletClient = yield this.getWaasWalletClient();
@@ -169,6 +169,7 @@ class DynamicWaasTonConnector extends withDynamicWaas(TonWalletConnector) {
169
169
  });
170
170
  const signedMessage = yield walletClient.signMessage({
171
171
  accountAddress: this.activeAccountAddress,
172
+ approvalQuorum,
172
173
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
173
174
  elevatedAccessToken,
174
175
  message,
@@ -95,10 +95,12 @@ class TonWallet extends walletConnectorCore.Wallet {
95
95
  * @param message - Message to sign (string or Uint8Array)
96
96
  * @returns Signature
97
97
  */
98
- signMessage(message) {
98
+ signMessage(message, options) {
99
99
  return _tslib.__awaiter(this, void 0, void 0, function* () {
100
100
  const messageString = typeof message === 'string' ? message : new TextDecoder().decode(message);
101
- const signature = yield this._connector.signMessage(messageString);
101
+ const signature = yield this._connector.signMessage(messageString, {
102
+ approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
103
+ });
102
104
  if (!signature) {
103
105
  throw new utils.DynamicError('Failed to sign message', 'sign_message_failed');
104
106
  }
@@ -1,3 +1,4 @@
1
+ import type { ApprovalQuorumRequestContext } from '@dynamic-labs-wallet/core';
1
2
  import { Wallet, WalletProps } from '@dynamic-labs/wallet-connector-core';
2
3
  import type { TonConnectConnector } from '../../connectors/TonConnectConnector/TonConnectConnector';
3
4
  import type { SendJettonOptions, TonTransactionResult } from '../../types';
@@ -50,7 +51,9 @@ export declare class TonWallet extends Wallet<TonConnectConnector> {
50
51
  * @param message - Message to sign (string or Uint8Array)
51
52
  * @returns Signature
52
53
  */
53
- signMessage(message: string | Uint8Array): Promise<string>;
54
+ signMessage(message: string | Uint8Array, options?: {
55
+ approvalQuorum?: ApprovalQuorumRequestContext;
56
+ }): Promise<string>;
54
57
  /**
55
58
  * Get balance of an address
56
59
  *
@@ -91,10 +91,12 @@ class TonWallet extends Wallet {
91
91
  * @param message - Message to sign (string or Uint8Array)
92
92
  * @returns Signature
93
93
  */
94
- signMessage(message) {
94
+ signMessage(message, options) {
95
95
  return __awaiter(this, void 0, void 0, function* () {
96
96
  const messageString = typeof message === 'string' ? message : new TextDecoder().decode(message);
97
- const signature = yield this._connector.signMessage(messageString);
97
+ const signature = yield this._connector.signMessage(messageString, {
98
+ approvalQuorum: options === null || options === void 0 ? void 0 : options.approvalQuorum,
99
+ });
98
100
  if (!signature) {
99
101
  throw new DynamicError('Failed to sign message', 'sign_message_failed');
100
102
  }