wallaby-cash 2.3.7-alpha.0 → 2.3.7

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.
@@ -196,7 +196,9 @@ export declare class WalletService extends Base {
196
196
  }): Promise<{
197
197
  isAccessVerified: boolean;
198
198
  }>;
199
- clearDevice(): Promise<void>;
199
+ clearDevice({ walletId }: {
200
+ walletId?: string;
201
+ }): Promise<void>;
200
202
  /**
201
203
  * Prepares authentication data and encrypted payload for any request.
202
204
  */
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "2.3.7-alpha.0",
3
+ "version": "2.3.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:WALLABY-WaaS/wallaby-sdk-js.git"
@@ -1,7 +1,6 @@
1
1
  import { JwtPayload } from 'jwt-decode';
2
2
  import { Merchant, MerchantAsset } from './merchants';
3
3
  import { ErrorResponseCodes } from './error-response-codes';
4
- import { NetworkDiagnosticResult } from './network-diagnostic';
5
4
  export declare type Base64URLString = string;
6
5
  export declare type UtilsResponse = string | undefined;
7
6
  export declare type GetDecryptedSeedPhraseResponse = {
@@ -16,14 +15,12 @@ export declare type GetDecryptedSeedPhraseResponse = {
16
15
  * @property {string} [errorCode] - Specific error code for categorizing the error.
17
16
  * @property {any} [data] - Additional data related to the error.
18
17
  * @property {number} [status] - Alias for statusCode for compatibility.
19
- * @property {NetworkDiagnosticResult} [networkDiagnostic] - Optional network diagnostic information for network-related errors.
20
18
  */
21
19
  export declare class WallabyError extends Error {
22
20
  errorCode?: ErrorResponseCodes | string;
23
21
  data?: any;
24
22
  status?: number;
25
23
  cause?: unknown;
26
- networkDiagnostic?: NetworkDiagnosticResult;
27
24
  onError?: () => void;
28
25
  constructor(errorPayload: {
29
26
  message: string;
@@ -32,7 +29,6 @@ export declare class WallabyError extends Error {
32
29
  data?: any;
33
30
  cause?: unknown;
34
31
  onError?: () => void;
35
- networkDiagnostic?: NetworkDiagnosticResult;
36
32
  });
37
33
  static isWallabyError(error: any): error is WallabyError;
38
34
  }
@@ -47,10 +47,5 @@ export declare enum ErrorResponseCodes {
47
47
  'sdk_passkey_prf_not_available' = "sdk_passkey_prf_not_available",
48
48
  'sdk_passkey_challenge_unavailable' = "sdk_passkey_challenge_unavailable",
49
49
  'sdk_passkey_authentication_failed' = "sdk_passkey_authentication_failed",
50
- 'sdk_passkey_registration_failed' = "sdk_passkey_registration_failed",
51
- 'sdk_network_offline' = "sdk_network_offline",
52
- 'sdk_network_connectivity' = "sdk_network_connectivity",
53
- 'sdk_network_likely_cors_or_auth' = "sdk_network_likely_cors_or_auth",
54
- 'sdk_network_fast_failure' = "sdk_network_fast_failure",
55
- 'sdk_network_unknown' = "sdk_network_unknown"
50
+ 'sdk_passkey_registration_failed' = "sdk_passkey_registration_failed"
56
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wallaby-cash",
3
- "version": "2.3.7-alpha.0",
3
+ "version": "2.3.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:WALLABY-WaaS/wallaby-sdk-js.git"
@@ -1,43 +0,0 @@
1
- import { NetworkDiagnosticResult } from '../../types/network-diagnostic';
2
- export declare class NetworkDiagnostic {
3
- /**
4
- * Run comprehensive network diagnostics after a fetch failure.
5
- * Combines multiple signals to determine the likely cause of the failure.
6
- */
7
- static run(context: {
8
- failedUrl: string;
9
- originalError: unknown;
10
- }): Promise<NetworkDiagnosticResult>;
11
- /**
12
- * Check if navigator.onLine is available and return its value.
13
- */
14
- private static getNavigatorOnline;
15
- /**
16
- * Get the PerformanceResourceTiming entry for the given URL.
17
- * Returns the most recent entry if multiple matches exist.
18
- */
19
- private static getResourceTimingForUrl;
20
- /**
21
- * Perform a simple no-cors health check to the `/healthz` endpoint.
22
- * This uses mode: 'no-cors' to avoid CORS preflight and credential issues.
23
- */
24
- private static simpleHealthCheck;
25
- /**
26
- * Derive the health check URL from the base URL origin and `/healthz`.
27
- */
28
- private static deriveHealthUrl;
29
- /**
30
- * Determine the diagnostic category based on collected signals.
31
- * Order matters - checks are performed in priority order.
32
- */
33
- private static determineCategory;
34
- /**
35
- * Get a user-facing message for the given diagnostic category.
36
- */
37
- private static getCategoryMessage;
38
- /**
39
- * Check if an error is a network-layer failure candidate that should trigger diagnostics.
40
- * Returns true for TypeErrors with fetch-related messages, or DOMException with NetworkError name.
41
- */
42
- static isNetworkFailureCandidate(error: unknown): boolean;
43
- }
@@ -1,23 +0,0 @@
1
- export declare enum NetworkDiagnosticCategory {
2
- OfflineHint = "offline_hint",
3
- LikelyCorsOrAuthOrExtension = "likely_cors_or_auth_or_extension",
4
- ConnectivityOrDns = "connectivity_or_dns",
5
- FastFailureHint = "fast_failure_hint",
6
- UnknownNetwork = "unknown_network"
7
- }
8
- export type NetworkDiagnosticSignals = {
9
- online: boolean | 'unknown';
10
- healthCheck: 'ok' | 'failed' | 'unavailable';
11
- resourceTiming?: {
12
- nextHopProtocol?: string;
13
- duration?: number;
14
- transferSize?: number;
15
- };
16
- failedRequestUrl: string;
17
- };
18
- export type NetworkDiagnosticResult = {
19
- category: NetworkDiagnosticCategory;
20
- message: string;
21
- signals: NetworkDiagnosticSignals;
22
- hints?: string[];
23
- };