@tonconnect/sdk 3.3.0-beta.2 → 3.3.0-beta.3

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.
@@ -593,6 +593,16 @@ export declare interface ITonConnect {
593
593
  onRequestSent?: () => void;
594
594
  signal?: AbortSignal;
595
595
  }): Promise<SignDataResponse>;
596
+ /**
597
+ * Gets the current session ID if available.
598
+ * @returns session ID string or null if not available.
599
+ */
600
+ getSessionId(): Promise<string | null>;
601
+ }
602
+
603
+ export declare interface KeyPair {
604
+ publicKey: string;
605
+ secretKey: string;
596
606
  }
597
607
 
598
608
  /**
@@ -745,6 +755,19 @@ export declare interface SendTransactionResponse {
745
755
  boc: string;
746
756
  }
747
757
 
758
+ export declare class SessionCrypto {
759
+ private readonly nonceLength;
760
+ private readonly keyPair;
761
+ readonly sessionId: string;
762
+ constructor(keyPair?: KeyPair);
763
+ private createKeypair;
764
+ private createKeypairFromString;
765
+ private createNonce;
766
+ encrypt(message: string, receiverPublicKey: Uint8Array): Uint8Array;
767
+ decrypt(message: Uint8Array, senderPublicKey: Uint8Array): string;
768
+ stringifyKeypair(): KeyPair;
769
+ }
770
+
748
771
  export declare enum SIGN_DATA_ERROR_CODES {
749
772
  UNKNOWN_ERROR = 0,
750
773
  BAD_REQUEST_ERROR = 1,
@@ -903,6 +926,11 @@ declare class TonConnect implements ITonConnect {
903
926
  disconnect(options?: {
904
927
  signal?: AbortSignal;
905
928
  }): Promise<void>;
929
+ /**
930
+ * Gets the current session ID if available.
931
+ * @returns session ID string or null if not available.
932
+ */
933
+ getSessionId(): Promise<string | null>;
906
934
  /**
907
935
  * Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused,
908
936
  * or if you use SDK with NodeJS and want to save server resources.
@@ -1331,8 +1359,8 @@ export declare class WalletNotSupportFeatureError extends TonConnectError {
1331
1359
  }
1332
1360
 
1333
1361
  export declare class WalletsListManager {
1334
- private walletsListCache;
1335
- private walletsListCacheCreationTimestamp;
1362
+ private walletsListDTOCache;
1363
+ private walletsListDTOCacheCreationTimestamp;
1336
1364
  private readonly cacheTTLMs;
1337
1365
  private readonly walletsListSource;
1338
1366
  constructor(options?: {
@@ -1341,7 +1369,9 @@ export declare class WalletsListManager {
1341
1369
  });
1342
1370
  getWallets(): Promise<WalletInfo[]>;
1343
1371
  getEmbeddedWallet(): Promise<WalletInfoCurrentlyEmbedded | null>;
1344
- private fetchWalletsList;
1372
+ private fetchWalletsListDTO;
1373
+ private fetchWalletsListFromSource;
1374
+ private getCurrentlyInjectedWallets;
1345
1375
  private walletConfigDTOListToWalletConfigList;
1346
1376
  private mergeWalletsLists;
1347
1377
  private isCorrectWalletConfigDTO;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonconnect/sdk",
3
- "version": "3.3.0-beta.2",
3
+ "version": "3.3.0-beta.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ton-connect/sdk.git"
@@ -43,6 +43,7 @@
43
43
  "@rollup/plugin-replace": "6.0.2",
44
44
  "@rollup/plugin-typescript": "^12.1.4",
45
45
  "@types/node": "^24.2.0",
46
+ "@vitest/coverage-istanbul": "3.2.4",
46
47
  "rollup": "^4.46.2",
47
48
  "ts-loader": "^9.4.1",
48
49
  "ts-patch": "^3.3.0",