@tonconnect/sdk 0.0.44 → 2.0.0

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.
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WrongAddressError = void 0;
4
+ var wrong_address_error_1 = require("./wrong-address.error");
5
+ Object.defineProperty(exports, "WrongAddressError", { enumerable: true, get: function () { return wrong_address_error_1.WrongAddressError; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WrongAddressError = void 0;
4
+ const errors_1 = require("..");
5
+ class WrongAddressError extends errors_1.TonConnectError {
6
+ constructor(...args) {
7
+ super(...args);
8
+ Object.setPrototypeOf(this, WrongAddressError.prototype);
9
+ }
10
+ }
11
+ exports.WrongAddressError = WrongAddressError;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Base64EncodeError = void 0;
4
+ const errors_1 = require("..");
5
+ class Base64EncodeError extends errors_1.TonConnectError {
6
+ constructor(...args) {
7
+ super(...args);
8
+ Object.setPrototypeOf(this, Base64EncodeError.prototype);
9
+ }
10
+ }
11
+ exports.Base64EncodeError = Base64EncodeError;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParseHexError = exports.Base64EncodeError = void 0;
4
+ var base64_encode_error_1 = require("./base64-encode.error");
5
+ Object.defineProperty(exports, "Base64EncodeError", { enumerable: true, get: function () { return base64_encode_error_1.Base64EncodeError; } });
6
+ var parse_hex_error_1 = require("./parse-hex.error");
7
+ Object.defineProperty(exports, "ParseHexError", { enumerable: true, get: function () { return parse_hex_error_1.ParseHexError; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParseHexError = void 0;
4
+ const errors_1 = require("..");
5
+ class ParseHexError extends errors_1.TonConnectError {
6
+ constructor(...args) {
7
+ super(...args);
8
+ Object.setPrototypeOf(this, ParseHexError.prototype);
9
+ }
10
+ }
11
+ exports.ParseHexError = ParseHexError;
@@ -19,6 +19,8 @@ __exportStar(require("./protocol"), exports);
19
19
  __exportStar(require("./wallet"), exports);
20
20
  __exportStar(require("./storage"), exports);
21
21
  __exportStar(require("./wallets-manager"), exports);
22
+ __exportStar(require("./address"), exports);
23
+ __exportStar(require("./binary"), exports);
22
24
  var ton_connect_error_1 = require("./ton-connect.error");
23
25
  Object.defineProperty(exports, "TonConnectError", { enumerable: true, get: function () { return ton_connect_error_1.TonConnectError; } });
24
26
  var unknown_error_1 = require("./unknown.error");
package/lib/cjs/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CHAIN = exports.default = void 0;
17
+ exports.toUserFriendlyAddress = exports.CHAIN = exports.default = void 0;
18
18
  __exportStar(require("./ton-connect"), exports);
19
19
  __exportStar(require("./models"), exports);
20
20
  __exportStar(require("./errors"), exports);
@@ -22,3 +22,5 @@ var ton_connect_1 = require("./ton-connect");
22
22
  Object.defineProperty(exports, "default", { enumerable: true, get: function () { return ton_connect_1.TonConnect; } });
23
23
  var protocol_1 = require("@tonconnect/protocol");
24
24
  Object.defineProperty(exports, "CHAIN", { enumerable: true, get: function () { return protocol_1.CHAIN; } });
25
+ var address_1 = require("./utils/address");
26
+ Object.defineProperty(exports, "toUserFriendlyAddress", { enumerable: true, get: function () { return address_1.toUserFriendlyAddress; } });
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toUserFriendlyAddress = void 0;
4
+ const errors_1 = require("../errors");
5
+ const protocol_1 = require("@tonconnect/protocol");
6
+ function toUserFriendlyAddress(hexAddress) {
7
+ const { wc, hex } = parseHexAddress(hexAddress);
8
+ const bounceableTag = 0x11;
9
+ const addr = new Int8Array(34);
10
+ addr[0] = bounceableTag;
11
+ addr[1] = wc;
12
+ addr.set(hex, 2);
13
+ const addressWithChecksum = new Uint8Array(36);
14
+ addressWithChecksum.set(addr);
15
+ addressWithChecksum.set(crc16(addr), 34);
16
+ let addressBase64 = protocol_1.Base64.encode(addressWithChecksum);
17
+ return addressBase64.replace(/\+/g, '-').replace(/\//g, '_');
18
+ }
19
+ exports.toUserFriendlyAddress = toUserFriendlyAddress;
20
+ function parseHexAddress(hexAddress) {
21
+ if (!hexAddress.includes(':')) {
22
+ throw new errors_1.WrongAddressError(`Wrong address ${hexAddress}. Address must include ":".`);
23
+ }
24
+ const parts = hexAddress.split(':');
25
+ if (parts.length !== 2) {
26
+ throw new errors_1.WrongAddressError(`Wrong address ${hexAddress}. Address must include ":" only once.`);
27
+ }
28
+ const wc = parseInt(parts[0]);
29
+ if (wc !== 0 && wc !== -1) {
30
+ throw new errors_1.WrongAddressError(`Wrong address ${hexAddress}. WC must be eq 0 or -1, but ${wc} received.`);
31
+ }
32
+ const hex = parts[1];
33
+ if ((hex === null || hex === void 0 ? void 0 : hex.length) !== 64) {
34
+ throw new errors_1.WrongAddressError(`Wrong address ${hexAddress}. Hex part must be 64bytes length, but ${hex === null || hex === void 0 ? void 0 : hex.length} received.`);
35
+ }
36
+ return {
37
+ wc,
38
+ hex: hexToBytes(hex)
39
+ };
40
+ }
41
+ function crc16(data) {
42
+ const poly = 0x1021;
43
+ let reg = 0;
44
+ const message = new Uint8Array(data.length + 2);
45
+ message.set(data);
46
+ for (let byte of message) {
47
+ let mask = 0x80;
48
+ while (mask > 0) {
49
+ reg <<= 1;
50
+ if (byte & mask) {
51
+ reg += 1;
52
+ }
53
+ mask >>= 1;
54
+ if (reg > 0xffff) {
55
+ reg &= 0xffff;
56
+ reg ^= poly;
57
+ }
58
+ }
59
+ }
60
+ return new Uint8Array([Math.floor(reg / 256), reg % 256]);
61
+ }
62
+ const toByteMap = {};
63
+ for (let ord = 0; ord <= 0xff; ord++) {
64
+ let s = ord.toString(16);
65
+ if (s.length < 2) {
66
+ s = '0' + s;
67
+ }
68
+ toByteMap[s] = ord;
69
+ }
70
+ function hexToBytes(hex) {
71
+ hex = hex.toLowerCase();
72
+ const length2 = hex.length;
73
+ if (length2 % 2 !== 0) {
74
+ throw new errors_1.ParseHexError('Hex string must have length a multiple of 2: ' + hex);
75
+ }
76
+ const length = length2 / 2;
77
+ const result = new Uint8Array(length);
78
+ for (let i = 0; i < length; i++) {
79
+ const doubled = i * 2;
80
+ const hexSubstring = hex.substring(doubled, doubled + 2);
81
+ if (!toByteMap.hasOwnProperty(hexSubstring)) {
82
+ throw new errors_1.ParseHexError('Invalid hex character: ' + hexSubstring);
83
+ }
84
+ result[i] = toByteMap[hexSubstring];
85
+ }
86
+ return result;
87
+ }
@@ -61,18 +61,22 @@ class WalletsListManager {
61
61
  aboutUrl: walletConfigDTO.about_url,
62
62
  tondns: walletConfigDTO.tondns
63
63
  };
64
- if ('bridge_url' in walletConfigDTO) {
65
- walletConfig.bridgeUrl = walletConfigDTO.bridge_url;
66
- walletConfig.universalLink = walletConfigDTO.universal_url;
67
- }
68
- if ('js_bridge_key' in walletConfigDTO) {
69
- const jsBridgeKey = walletConfigDTO.js_bridge_key;
70
- walletConfig.jsBridgeKey = jsBridgeKey;
71
- walletConfig.injected =
72
- injected_provider_1.InjectedProvider.isWalletInjected(jsBridgeKey);
73
- walletConfig.embedded =
74
- injected_provider_1.InjectedProvider.isInsideWalletBrowser(jsBridgeKey);
75
- }
64
+ walletConfigDTO.bridge.forEach(bridge => {
65
+ if (bridge.type === 'sse') {
66
+ walletConfig.bridgeUrl = bridge.url;
67
+ walletConfig.universalLink =
68
+ walletConfigDTO.universal_url;
69
+ walletConfig.deepLink = walletConfigDTO.deepLink;
70
+ }
71
+ if (bridge.type === 'js') {
72
+ const jsBridgeKey = bridge.key;
73
+ walletConfig.jsBridgeKey = jsBridgeKey;
74
+ walletConfig.injected =
75
+ injected_provider_1.InjectedProvider.isWalletInjected(jsBridgeKey);
76
+ walletConfig.embedded =
77
+ injected_provider_1.InjectedProvider.isInsideWalletBrowser(jsBridgeKey);
78
+ }
79
+ });
76
80
  return walletConfig;
77
81
  });
78
82
  }
@@ -86,10 +90,30 @@ class WalletsListManager {
86
90
  if (!containsName || !containsImage || !containsAbout) {
87
91
  return false;
88
92
  }
89
- const containsUniversalUrl = 'universal_url' in value;
90
- const containsHttpBridge = 'bridge_url' in value;
91
- const containsJsBridge = 'js_bridge_key' in value;
92
- return (containsHttpBridge && containsUniversalUrl) || containsJsBridge;
93
+ if (!('bridge' in value) ||
94
+ !Array.isArray(value.bridge) ||
95
+ !value.bridge.length) {
96
+ return false;
97
+ }
98
+ const bridge = value.bridge;
99
+ if (bridge.some(item => !item || typeof item !== 'object' || !('type' in item))) {
100
+ return false;
101
+ }
102
+ const sseBridge = bridge.find(item => item.type === 'sse');
103
+ if (sseBridge) {
104
+ if (!('url' in sseBridge) ||
105
+ !sseBridge.url ||
106
+ !value.universal_url) {
107
+ return false;
108
+ }
109
+ }
110
+ const jsBridge = bridge.find(item => item.type === 'js');
111
+ if (jsBridge) {
112
+ if (!('key' in jsBridge) || !jsBridge.key) {
113
+ return false;
114
+ }
115
+ }
116
+ return true;
93
117
  }
94
118
  }
95
119
  exports.WalletsListManager = WalletsListManager;
@@ -0,0 +1 @@
1
+ export { WrongAddressError } from './wrong-address.error';
@@ -0,0 +1,7 @@
1
+ import { TonConnectError } from "..";
2
+ export class WrongAddressError extends TonConnectError {
3
+ constructor(...args) {
4
+ super(...args);
5
+ Object.setPrototypeOf(this, WrongAddressError.prototype);
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ import { TonConnectError } from "..";
2
+ export class Base64EncodeError extends TonConnectError {
3
+ constructor(...args) {
4
+ super(...args);
5
+ Object.setPrototypeOf(this, Base64EncodeError.prototype);
6
+ }
7
+ }
@@ -0,0 +1,2 @@
1
+ export { Base64EncodeError } from './base64-encode.error';
2
+ export { ParseHexError } from './parse-hex.error';
@@ -0,0 +1,7 @@
1
+ import { TonConnectError } from "..";
2
+ export class ParseHexError extends TonConnectError {
3
+ constructor(...args) {
4
+ super(...args);
5
+ Object.setPrototypeOf(this, ParseHexError.prototype);
6
+ }
7
+ }
@@ -2,5 +2,7 @@ export * from './protocol';
2
2
  export * from './wallet';
3
3
  export * from './storage';
4
4
  export * from './wallets-manager';
5
+ export * from './address';
6
+ export * from './binary';
5
7
  export { TonConnectError } from './ton-connect.error';
6
8
  export { UnknownError } from './unknown.error';
package/lib/esm/index.js CHANGED
@@ -3,3 +3,4 @@ export * from './models';
3
3
  export * from './errors';
4
4
  export { TonConnect as default } from './ton-connect';
5
5
  export { CHAIN } from '@tonconnect/protocol';
6
+ export { toUserFriendlyAddress } from './utils/address';
@@ -0,0 +1,83 @@
1
+ import { WrongAddressError, ParseHexError } from "../errors";
2
+ import { Base64 } from '@tonconnect/protocol';
3
+ export function toUserFriendlyAddress(hexAddress) {
4
+ const { wc, hex } = parseHexAddress(hexAddress);
5
+ const bounceableTag = 0x11;
6
+ const addr = new Int8Array(34);
7
+ addr[0] = bounceableTag;
8
+ addr[1] = wc;
9
+ addr.set(hex, 2);
10
+ const addressWithChecksum = new Uint8Array(36);
11
+ addressWithChecksum.set(addr);
12
+ addressWithChecksum.set(crc16(addr), 34);
13
+ let addressBase64 = Base64.encode(addressWithChecksum);
14
+ return addressBase64.replace(/\+/g, '-').replace(/\//g, '_');
15
+ }
16
+ function parseHexAddress(hexAddress) {
17
+ if (!hexAddress.includes(':')) {
18
+ throw new WrongAddressError(`Wrong address ${hexAddress}. Address must include ":".`);
19
+ }
20
+ const parts = hexAddress.split(':');
21
+ if (parts.length !== 2) {
22
+ throw new WrongAddressError(`Wrong address ${hexAddress}. Address must include ":" only once.`);
23
+ }
24
+ const wc = parseInt(parts[0]);
25
+ if (wc !== 0 && wc !== -1) {
26
+ throw new WrongAddressError(`Wrong address ${hexAddress}. WC must be eq 0 or -1, but ${wc} received.`);
27
+ }
28
+ const hex = parts[1];
29
+ if ((hex === null || hex === void 0 ? void 0 : hex.length) !== 64) {
30
+ throw new WrongAddressError(`Wrong address ${hexAddress}. Hex part must be 64bytes length, but ${hex === null || hex === void 0 ? void 0 : hex.length} received.`);
31
+ }
32
+ return {
33
+ wc,
34
+ hex: hexToBytes(hex)
35
+ };
36
+ }
37
+ function crc16(data) {
38
+ const poly = 0x1021;
39
+ let reg = 0;
40
+ const message = new Uint8Array(data.length + 2);
41
+ message.set(data);
42
+ for (let byte of message) {
43
+ let mask = 0x80;
44
+ while (mask > 0) {
45
+ reg <<= 1;
46
+ if (byte & mask) {
47
+ reg += 1;
48
+ }
49
+ mask >>= 1;
50
+ if (reg > 0xffff) {
51
+ reg &= 0xffff;
52
+ reg ^= poly;
53
+ }
54
+ }
55
+ }
56
+ return new Uint8Array([Math.floor(reg / 256), reg % 256]);
57
+ }
58
+ const toByteMap = {};
59
+ for (let ord = 0; ord <= 0xff; ord++) {
60
+ let s = ord.toString(16);
61
+ if (s.length < 2) {
62
+ s = '0' + s;
63
+ }
64
+ toByteMap[s] = ord;
65
+ }
66
+ function hexToBytes(hex) {
67
+ hex = hex.toLowerCase();
68
+ const length2 = hex.length;
69
+ if (length2 % 2 !== 0) {
70
+ throw new ParseHexError('Hex string must have length a multiple of 2: ' + hex);
71
+ }
72
+ const length = length2 / 2;
73
+ const result = new Uint8Array(length);
74
+ for (let i = 0; i < length; i++) {
75
+ const doubled = i * 2;
76
+ const hexSubstring = hex.substring(doubled, doubled + 2);
77
+ if (!toByteMap.hasOwnProperty(hexSubstring)) {
78
+ throw new ParseHexError('Invalid hex character: ' + hexSubstring);
79
+ }
80
+ result[i] = toByteMap[hexSubstring];
81
+ }
82
+ return result;
83
+ }
@@ -58,18 +58,22 @@ export class WalletsListManager {
58
58
  aboutUrl: walletConfigDTO.about_url,
59
59
  tondns: walletConfigDTO.tondns
60
60
  };
61
- if ('bridge_url' in walletConfigDTO) {
62
- walletConfig.bridgeUrl = walletConfigDTO.bridge_url;
63
- walletConfig.universalLink = walletConfigDTO.universal_url;
64
- }
65
- if ('js_bridge_key' in walletConfigDTO) {
66
- const jsBridgeKey = walletConfigDTO.js_bridge_key;
67
- walletConfig.jsBridgeKey = jsBridgeKey;
68
- walletConfig.injected =
69
- InjectedProvider.isWalletInjected(jsBridgeKey);
70
- walletConfig.embedded =
71
- InjectedProvider.isInsideWalletBrowser(jsBridgeKey);
72
- }
61
+ walletConfigDTO.bridge.forEach(bridge => {
62
+ if (bridge.type === 'sse') {
63
+ walletConfig.bridgeUrl = bridge.url;
64
+ walletConfig.universalLink =
65
+ walletConfigDTO.universal_url;
66
+ walletConfig.deepLink = walletConfigDTO.deepLink;
67
+ }
68
+ if (bridge.type === 'js') {
69
+ const jsBridgeKey = bridge.key;
70
+ walletConfig.jsBridgeKey = jsBridgeKey;
71
+ walletConfig.injected =
72
+ InjectedProvider.isWalletInjected(jsBridgeKey);
73
+ walletConfig.embedded =
74
+ InjectedProvider.isInsideWalletBrowser(jsBridgeKey);
75
+ }
76
+ });
73
77
  return walletConfig;
74
78
  });
75
79
  }
@@ -83,9 +87,29 @@ export class WalletsListManager {
83
87
  if (!containsName || !containsImage || !containsAbout) {
84
88
  return false;
85
89
  }
86
- const containsUniversalUrl = 'universal_url' in value;
87
- const containsHttpBridge = 'bridge_url' in value;
88
- const containsJsBridge = 'js_bridge_key' in value;
89
- return (containsHttpBridge && containsUniversalUrl) || containsJsBridge;
90
+ if (!('bridge' in value) ||
91
+ !Array.isArray(value.bridge) ||
92
+ !value.bridge.length) {
93
+ return false;
94
+ }
95
+ const bridge = value.bridge;
96
+ if (bridge.some(item => !item || typeof item !== 'object' || !('type' in item))) {
97
+ return false;
98
+ }
99
+ const sseBridge = bridge.find(item => item.type === 'sse');
100
+ if (sseBridge) {
101
+ if (!('url' in sseBridge) ||
102
+ !sseBridge.url ||
103
+ !value.universal_url) {
104
+ return false;
105
+ }
106
+ }
107
+ const jsBridge = bridge.find(item => item.type === 'js');
108
+ if (jsBridge) {
109
+ if (!('key' in jsBridge) || !jsBridge.key) {
110
+ return false;
111
+ }
112
+ }
113
+ return true;
90
114
  }
91
115
  }
@@ -0,0 +1 @@
1
+ export { WrongAddressError } from './wrong-address.error';
@@ -0,0 +1,4 @@
1
+ import { TonConnectError } from "..";
2
+ export declare class WrongAddressError extends TonConnectError {
3
+ constructor(...args: ConstructorParameters<typeof Error>);
4
+ }
@@ -0,0 +1,4 @@
1
+ import { TonConnectError } from "..";
2
+ export declare class Base64EncodeError extends TonConnectError {
3
+ constructor(...args: ConstructorParameters<typeof Error>);
4
+ }
@@ -0,0 +1,2 @@
1
+ export { Base64EncodeError } from './base64-encode.error';
2
+ export { ParseHexError } from './parse-hex.error';
@@ -0,0 +1,4 @@
1
+ import { TonConnectError } from "..";
2
+ export declare class ParseHexError extends TonConnectError {
3
+ constructor(...args: ConstructorParameters<typeof Error>);
4
+ }
@@ -2,5 +2,7 @@ export * from './protocol';
2
2
  export * from './wallet';
3
3
  export * from './storage';
4
4
  export * from './wallets-manager';
5
+ export * from './address';
6
+ export * from './binary';
5
7
  export { TonConnectError } from './ton-connect.error';
6
8
  export { UnknownError } from './unknown.error';
@@ -5,3 +5,4 @@ export { IStorage } from './storage/models/storage.interface';
5
5
  export { TonConnect as default } from './ton-connect';
6
6
  export { ITonConnect } from './ton-connect.interface';
7
7
  export { CHAIN, DeviceInfo } from '@tonconnect/protocol';
8
+ export { toUserFriendlyAddress } from './utils/address';
@@ -21,6 +21,10 @@ export interface WalletInfoRemote extends WalletInfoBase {
21
21
  * Base part of the wallet universal url. The link should support [Ton Connect parameters]{@link https://github.com/ton-connect/docs/blob/main/bridge.md#universal-link}.
22
22
  */
23
23
  universalLink: string;
24
+ /**
25
+ * Native wallet app deepLink. The link should support [Ton Connect parameters]{@link https://github.com/ton-connect/docs/blob/main/bridge.md#universal-link}.
26
+ */
27
+ deepLink: string;
24
28
  /**
25
29
  * Url of the wallet's implementation of the [HTTP bridge]{@link https://github.com/ton-connect/docs/blob/main/bridge.md#http-bridge}.
26
30
  */
@@ -41,18 +45,21 @@ export interface WalletInfoInjected extends WalletInfoBase {
41
45
  embedded: boolean;
42
46
  }
43
47
  export declare type WalletInfo = WalletInfoRemote | WalletInfoInjected | (WalletInfoRemote & WalletInfoInjected);
44
- export interface WalletInfoDTOBase {
48
+ export interface WalletInfoDTO {
45
49
  name: string;
46
50
  image: string;
47
51
  tondns?: string;
48
52
  about_url: string;
49
- }
50
- export interface WalletInfoRemoteDTO extends WalletInfoDTOBase {
51
53
  universal_url: string;
52
- bridge_url: string;
54
+ deepLink: string;
55
+ bridge: (WalletInfoBridgeRemoteDTO | WalletInfoBridgeInjectedDTO)[];
56
+ }
57
+ export interface WalletInfoBridgeRemoteDTO {
58
+ type: 'sse';
59
+ url: string;
53
60
  }
54
- export interface WalletInfoInjectedDTO extends WalletInfoDTOBase {
55
- js_bridge_key: string;
61
+ export interface WalletInfoBridgeInjectedDTO {
62
+ type: 'js';
63
+ key: string;
56
64
  }
57
- export declare type WalletInfoDTO = WalletInfoRemoteDTO | WalletInfoInjectedDTO | (WalletInfoRemoteDTO & WalletInfoInjectedDTO);
58
65
  export declare function isWalletInfoInjected(value: WalletInfo): value is WalletInfoInjected;
@@ -0,0 +1 @@
1
+ export declare function toUserFriendlyAddress(hexAddress: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonconnect/sdk",
3
- "version": "0.0.44",
3
+ "version": "2.0.0",
4
4
  "scripts": {
5
5
  "build": "npx rimraf lib && ttsc --outDir ./lib/cjs && ttsc --module esnext --outDir ./lib/esm && npx rimraf dist && webpack --mode development",
6
6
  "build:production": "npx rimraf lib && ttsc --project tsconfig.cjs.json --sourceMap false && ttsc --project tsconfig.esm.json --sourceMap false && npx rimraf dist && webpack --mode production"
@@ -28,7 +28,7 @@
28
28
  "tweetnacl": "^1.0.3",
29
29
  "eventsource": "^2.0.2",
30
30
  "node-fetch": "^2.6.7",
31
- "@tonconnect/protocol": "^0.0.25"
31
+ "@tonconnect/protocol": "^2.0.0"
32
32
  },
33
33
  "files": [
34
34
  "lib",