@hsuite/native-connect-angular 3.0.0 → 3.0.2

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/dist/index.d.ts CHANGED
@@ -209,6 +209,19 @@ declare class NoAccountsForNetworkError extends Error {
209
209
  */
210
210
  constructor(networkId: string, providerType: ProviderType, sharedChains?: readonly string[]);
211
211
  }
212
+ /**
213
+ * A connect was asked for while another one is still waiting for the wallet,
214
+ * and it cannot share that request: a QR pairing next to a window connect, or
215
+ * a pending session this call did not start. Nothing was started. The connect
216
+ * modal shows it as the `'busy'` error.
217
+ */
218
+ declare class ConnectionInProgressError extends Error {
219
+ readonly providerType: ProviderType;
220
+ /**
221
+ * @param providerType - Provider that already has a connect waiting
222
+ */
223
+ constructor(providerType: ProviderType);
224
+ }
212
225
 
213
226
  /**
214
227
  * HSuite Native Connect
@@ -885,6 +898,11 @@ declare class HsuiteNativeProvider extends BaseWalletProvider {
885
898
  * Cross-device connections use QR/URL flow (no discovery needed).
886
899
  */
887
900
  private initializeLocalDiscovery;
901
+ /**
902
+ * The connect waiting for the wallet's answer, if any. A second window
903
+ * connect returns this promise instead of starting another request.
904
+ */
905
+ private pendingConnect;
888
906
  /**
889
907
  * Maps the internal channel state to the provider connection status.
890
908
  *
@@ -941,8 +959,15 @@ declare class HsuiteNativeProvider extends BaseWalletProvider {
941
959
  * @throws {Error} If configuration is invalid
942
960
  * @throws {Error} If connection times out (default 120 seconds)
943
961
  * @throws {Error} If popup is blocked and wallet cannot be opened
962
+ * @throws {ConnectionInProgressError} If another connect is waiting for the
963
+ * wallet and this one cannot share its request
944
964
  */
945
965
  connect(config: ConnectionConfig$1): Promise<void>;
966
+ /**
967
+ * Create the invite, deliver it and wait for the wallet's answer.
968
+ * @param config - HSuite Native connection configuration
969
+ */
970
+ private startConnect;
946
971
  /**
947
972
  * Open wallet window with LOCAL-FIRST discovery.
948
973
  *
@@ -1954,9 +1979,10 @@ declare class WalletConnectionModalComponent implements OnInit, OnDestroy {
1954
1979
  */
1955
1980
  private connectDirect;
1956
1981
  /**
1957
- * The provider ignores a connect while another one is pending (it resolves
1958
- * immediately), so re-picking HSuite Wallet after backing out re-attaches to
1959
- * the request the wallet is still showing instead of starting a new one.
1982
+ * Re-picking HSuite Wallet after backing out re-attaches to the request the
1983
+ * wallet is still showing instead of starting a new one. The provider does
1984
+ * the same for a request this modal did not start (one left pending by a
1985
+ * modal that was closed): its connect waits for that request's answer.
1960
1986
  * @param network
1961
1987
  */
1962
1988
  private connectHsuiteWallet;
@@ -7905,5 +7931,5 @@ declare function getLedgerName(ledgerId: string): string;
7905
7931
  */
7906
7932
  declare function getTokenIcon(tokenIconUrl: string | undefined, ledgerId: string): string;
7907
7933
 
7908
- export { ACTIVE_ACCOUNT_SOURCE, AccountActionsComponent, AccountChipComponent, AccountFilterComponent, AccountFormattingService, AccountGroupingService, AccountListComponent, AccountMenuComponent, AccountSelectorComponent, AccountSelectorService, BaseWalletProvider, ChannelClientService, ChromeExtensionTransport, DEFAULT_LEDGER_ICONS, DEFAULT_WALLET_URL, HSUITE_AUTH_HEADER, HSUITE_LEDGER_HEADER, HederaSigner, HederaTransactionBuilderService, HsuiteAuthInterceptor, HsuiteNativeProvider, HsuiteWalletModule, LEDGER_COLORS, LEDGER_ICON_NAMES, LEDGER_NAMES, LedgerUIRegistry, LoggerService, MAX_NATIVE_SESSIONS, NATIVE_SESSION_KEY_PREFIX, NativeSessionLimitError, NoAccountsForNetworkError, SMART_SESSION_CONFIG, SessionNoticeService, SignerFactory, SmartSessionService, TransactionService, UnifiedWalletService, WALLET_UI_CONFIG, WalletAccountDisplayComponent, WalletButtonComponent, WalletConnectButtonComponent, WalletConnectClientManager, WalletConnectPromptComponent, WalletConnectSessionStore, WalletConnectSigningOrchestrator, WalletConnectV2Provider, WalletConnectedDirective, WalletConnectedGuardComponent, WalletConnectionModalComponent, WalletContextDirective, WalletContextService, WalletErrorHandler, WalletEventBus, WalletEventsDirective, WalletSessionDisplayComponent, WalletTransactionStatusComponent, WalletUiService, XrplSigner, XrplTransactionBuilderService, channelIdFromSessionKey, getExtensionVersion, getLedgerColor, getLedgerIcon, getLedgerName, getTokenIcon, hsuiteAuthInterceptor, isExtensionInstalled, isHsuiteNativeConfig, isWalletConnectV2Config, nativeSessionKeyFor, parseNativeSessionKey, provideWalletErrorHandler, provideWalletUi, registerLedgerIcons, scaleHederaAmountToBaseUnits, supportsSessionManagement };
7934
+ export { ACTIVE_ACCOUNT_SOURCE, AccountActionsComponent, AccountChipComponent, AccountFilterComponent, AccountFormattingService, AccountGroupingService, AccountListComponent, AccountMenuComponent, AccountSelectorComponent, AccountSelectorService, BaseWalletProvider, ChannelClientService, ChromeExtensionTransport, ConnectionInProgressError, DEFAULT_LEDGER_ICONS, DEFAULT_WALLET_URL, HSUITE_AUTH_HEADER, HSUITE_LEDGER_HEADER, HederaSigner, HederaTransactionBuilderService, HsuiteAuthInterceptor, HsuiteNativeProvider, HsuiteWalletModule, LEDGER_COLORS, LEDGER_ICON_NAMES, LEDGER_NAMES, LedgerUIRegistry, LoggerService, MAX_NATIVE_SESSIONS, NATIVE_SESSION_KEY_PREFIX, NativeSessionLimitError, NoAccountsForNetworkError, SMART_SESSION_CONFIG, SessionNoticeService, SignerFactory, SmartSessionService, TransactionService, UnifiedWalletService, WALLET_UI_CONFIG, WalletAccountDisplayComponent, WalletButtonComponent, WalletConnectButtonComponent, WalletConnectClientManager, WalletConnectPromptComponent, WalletConnectSessionStore, WalletConnectSigningOrchestrator, WalletConnectV2Provider, WalletConnectedDirective, WalletConnectedGuardComponent, WalletConnectionModalComponent, WalletContextDirective, WalletContextService, WalletErrorHandler, WalletEventBus, WalletEventsDirective, WalletSessionDisplayComponent, WalletTransactionStatusComponent, WalletUiService, XrplSigner, XrplTransactionBuilderService, channelIdFromSessionKey, getExtensionVersion, getLedgerColor, getLedgerIcon, getLedgerName, getTokenIcon, hsuiteAuthInterceptor, isExtensionInstalled, isHsuiteNativeConfig, isWalletConnectV2Config, nativeSessionKeyFor, parseNativeSessionKey, provideWalletErrorHandler, provideWalletUi, registerLedgerIcons, scaleHederaAmountToBaseUnits, supportsSessionManagement };
7909
7935
  export type { AccountChangeEvent, AccountCreateOptions, AccountGroupingMode, AccountItem, AccountSelectorConfig, AccountSelectorPresentationMode, AccountSelectorResult, AccountWithBalance, AccountsUpdateEvent, ActiveAccountData, ActiveAccountSource, BatchInnerTransaction, BatchInnerTransactionType, BuildNamespaceOptions, ChannelConnectConfig, ChromeExtensionTransportOptions, CompactHeaderFormat, CompactHeaderSize, ConnectErrorKind, ConnectResult, ConnectionConfig, ConnectionEvent, ConnectionStatus, DisconnectPreview, DisconnectTarget, DisconnectionEvent, GetWalletLinks, HederaKeyConfig, HsuiteNativeConfig, HsuiteNativeInviteReady, IWalletConnectSigner, LedgerGroup$1 as LedgerGroup, LedgerUiDescriptor, NativeActiveSession, NativeSessionKey, NativeSessionRemovalEvent, NetworkGroup, OpenAccountsOptions, OpenConnectOptions, ProtocolGroup, ProviderErrorEvent, ProviderMetadata, ProviderSessionInfo, ProviderStatusEvent, ProviderType, RemovedSessionNotice, SelectedAccountData, SessionAccountVm, SessionEvent, SessionManagingProvider, SessionMetadata, SessionVm, SignMessageOptions, SignMessageResult, SignResult, SignTransactionOptions, SignerContext, SignerOperationParams, SigningOrchestratorConfig, SmartHostChallenge, SmartHostHealth, SmartHostVerifyRequest, SmartHostVerifyResponse, SmartSessionConfig, StoredSessionData, SubmitResult, SubmitTransactionOptions, TokenCreateOptions, TopicCreateOptions, UnifiedAccount, WCAppMetadata, WalletConnectSession, WalletConnectSignerConfig, WalletConnectV2Config, WalletConnectedEvent, WalletContext, WalletErrorHandlerConfig, WalletOptionId, WalletSession, WalletUiConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsuite/native-connect-angular",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "license": "PolyForm-Noncommercial-1.0.0",
5
5
  "description": "Angular integration SDK for HSuite Wallet - provides direct SDK integration without wrappers",
6
6
  "type": "module",
@@ -13,6 +13,14 @@
13
13
  "fesm2022": "./dist/fesm2022/hsuite-native-connect-angular.mjs",
14
14
  "typings": "./dist/index.d.ts",
15
15
  "types": "./dist/index.d.ts",
16
+ "scripts": {
17
+ "build": "./node_modules/.bin/ng-packagr -p ng-package.json",
18
+ "clean": "rm -rf dist",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest --watch",
21
+ "test:coverage": "vitest run --coverage",
22
+ "docs": "compodoc -p tsconfig.json -c ../../compodoc.base.json -d dist/docs --name 'Angular SDK API' --includes docs"
23
+ },
16
24
  "peerDependencies": {
17
25
  "@angular/common": "^20.0.0",
18
26
  "@angular/core": "^20.0.0",
@@ -23,15 +31,15 @@
23
31
  "dependencies": {
24
32
  "@hashgraph/proto": "^2.25.0",
25
33
  "@hashgraph/sdk": "^2.76.0",
34
+ "@hsuite/native-connect-sdk": "^3.0.2",
35
+ "@hsuite/native-connect-types": "^3.0.2",
26
36
  "@walletconnect/modal": "^2.7.0",
27
37
  "@walletconnect/sign-client": "^2.23.0",
28
38
  "@walletconnect/types": "^2.23.0",
29
39
  "qr-scanner": "^1.4.2",
30
40
  "qrcode": "^1.5.4",
31
41
  "tslib": "^2.6.0",
32
- "xrpl": "^3.0.0",
33
- "@hsuite/native-connect-sdk": "^3.0.0",
34
- "@hsuite/native-connect-types": "^2.2.1"
42
+ "xrpl": "^3.0.0"
35
43
  },
36
44
  "devDependencies": {
37
45
  "@angular-devkit/build-angular": "^20.3.14",
@@ -83,13 +91,5 @@
83
91
  "url": "https://github.com/HSuiteNetwork/hsuite-native-connect.git",
84
92
  "directory": "packages/angular-sdk"
85
93
  },
86
- "homepage": "https://github.com/HSuiteNetwork/hsuite-native-connect/tree/master/packages/angular-sdk",
87
- "scripts": {
88
- "build": "./node_modules/.bin/ng-packagr -p ng-package.json",
89
- "clean": "rm -rf dist",
90
- "test": "vitest run",
91
- "test:watch": "vitest --watch",
92
- "test:coverage": "vitest run --coverage",
93
- "docs": "compodoc -p tsconfig.json -c ../../compodoc.base.json -d dist/docs --name 'Angular SDK API' --includes docs"
94
- }
95
- }
94
+ "homepage": "https://github.com/HSuiteNetwork/hsuite-native-connect/tree/master/packages/angular-sdk"
95
+ }