@dynamic-labs-wallet/core 1.1.61 → 1.1.62

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/index.cjs CHANGED
@@ -1450,7 +1450,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
1450
1450
  * before it is posted and surfaces in Datadog exactly as the recovery path does.
1451
1451
  */ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
1452
1452
 
1453
- var version = "1.1.61";
1453
+ var version = "1.1.62";
1454
1454
 
1455
1455
  /**
1456
1456
  * Reads the Authorization header off an axios request config, which stores
@@ -3421,6 +3421,13 @@ const RECOVERED_CONNECTION_CHURN_CODES = new Set([
3421
3421
  * and unclassified errors are NOT churn: they indicate enclave tampering or
3422
3422
  * protocol breakage and must stay at `error` so monitors can page on them.
3423
3423
  */ const isRecoveredForwardMpcConnectionChurn = (classification)=>classification.errorType === 'RATE_LIMITED' || classification.errorCode !== undefined && RECOVERED_CONNECTION_CHURN_CODES.has(classification.errorCode);
3424
+ // Missing WebAssembly global (e.g. iOS WKWebView under Lockdown Mode):
3425
+ // JSC reports "Can't find variable: WebAssembly", V8 "WebAssembly is not defined".
3426
+ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly is not defined/i;
3427
+ /**
3428
+ * True when an error indicates the client's JS runtime lacks the WebAssembly
3429
+ * global — a client environment issue, so it logs at `warn`, not `error`.
3430
+ */ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
3424
3431
 
3425
3432
  /**
3426
3433
  * True when the forward enclave may already be in the room. The enclave gets
@@ -3692,6 +3699,7 @@ exports.invokeCeremonyComplete = invokeCeremonyComplete;
3692
3699
  exports.isBusinessAccountActionRequired = isBusinessAccountActionRequired;
3693
3700
  exports.isEvmCompatibleChain = isEvmCompatibleChain;
3694
3701
  exports.isRecoveredForwardMpcConnectionChurn = isRecoveredForwardMpcConnectionChurn;
3702
+ exports.isWasmUnavailableErrorMessage = isWasmUnavailableErrorMessage;
3695
3703
  exports.normalizeAndValidatePrivateKey = normalizeAndValidatePrivateKey;
3696
3704
  exports.parseNamespacedVersion = parseNamespacedVersion;
3697
3705
  exports.prepareRawMessageSigningPayload = prepareRawMessageSigningPayload;
package/index.esm.js CHANGED
@@ -1452,7 +1452,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
1452
1452
  * before it is posted and surfaces in Datadog exactly as the recovery path does.
1453
1453
  */ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
1454
1454
 
1455
- var version = "1.1.61";
1455
+ var version = "1.1.62";
1456
1456
 
1457
1457
  /**
1458
1458
  * Reads the Authorization header off an axios request config, which stores
@@ -3423,6 +3423,13 @@ const RECOVERED_CONNECTION_CHURN_CODES = new Set([
3423
3423
  * and unclassified errors are NOT churn: they indicate enclave tampering or
3424
3424
  * protocol breakage and must stay at `error` so monitors can page on them.
3425
3425
  */ const isRecoveredForwardMpcConnectionChurn = (classification)=>classification.errorType === 'RATE_LIMITED' || classification.errorCode !== undefined && RECOVERED_CONNECTION_CHURN_CODES.has(classification.errorCode);
3426
+ // Missing WebAssembly global (e.g. iOS WKWebView under Lockdown Mode):
3427
+ // JSC reports "Can't find variable: WebAssembly", V8 "WebAssembly is not defined".
3428
+ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly is not defined/i;
3429
+ /**
3430
+ * True when an error indicates the client's JS runtime lacks the WebAssembly
3431
+ * global — a client environment issue, so it logs at `warn`, not `error`.
3432
+ */ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
3426
3433
 
3427
3434
  /**
3428
3435
  * True when the forward enclave may already be in the room. The enclave gets
@@ -3561,4 +3568,4 @@ const prepareRawMessageSigningPayload = (chainName, message)=>{
3561
3568
  (_requestId = (_target1 = target).requestId) != null ? _requestId : _target1.requestId = requestId;
3562
3569
  };
3563
3570
 
3564
- export { AuthMode, BITCOIN_ADDRESS_TYPE_CONFIG, BITCOIN_DERIVATION_PATHS, BROWSER_SDK_ROUTE_PREFIX, BackupLocation, BitcoinAddressType, BitcoinNetwork, BusinessAccountClient, BusinessAccountMemberRole, BusinessAccountSignerType, CreateRoomPartiesOptions, DEFAULT_ED25519_VARIANT, DELEGATED_SHARE_COUNT, DYNAMIC_AUTH_BASE_API_URL_MAP, DYNAMIC_AUTH_DEV_BASE_API_URL, DYNAMIC_AUTH_PREPROD_BASE_API_URL, DYNAMIC_AUTH_PROD_BASE_API_URL, DYNAMIC_CLIENT_RELAY_REDCOAST_API_KEY_MAP, DYNAMIC_CLIENT_RELAY_REDCOAST_APP_ID_MAP, DYNAMIC_FORWARD_MPC_DEV_ENCLAVE_URL, DYNAMIC_FORWARD_MPC_ENCLAVE_ATTESTATION_CONFIG_MAP, DYNAMIC_FORWARD_MPC_ENCLAVE_URL_MAP, DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL, DYNAMIC_FORWARD_MPC_PROD_ENCLAVE_URL, DYNAMIC_KEYSHARES_RELAY_MAP, DYNAMIC_KEYSHARES_RELAY_PREPROD_BASE_API_URL, DYNAMIC_KEYSHARES_RELAY_PROD_BASE_API_URL, DynamicApiClient, DynamicClientSessionSignature, DynamicElevatedAccessTokenHeader, DynamicForwardMPCHeader, DynamicMfaTokenHeader, DynamicRequestIdHeader, DynamicSessionPublicKeyHeader, DynamicTraceElapsedTimeHeader, DynamicTraceIdHeader, ENCRYPTED_SHARES_STORAGE_SUFFIX, ENVIRONMENT_ENUM, EVM_COMPATIBLE_CHAINS, EarnClient, FEATURE_FLAGS, IFRAME_DOMAIN_MAP, Logger, MIDNIGHT_DERIVATION_PATHS, MPC_CHAIN_CONFIG, MPC_CONFIG, MPC_RELAY_DEV_API_URL, MPC_RELAY_PREPROD_API_URL, MPC_RELAY_PROD_API_URL, MPC_RELAY_URL_MAP, NETWORK_ERROR_CODE, NETWORK_ERROR_STATUS, NoopLogger, PREPROD_RELAY_API_KEY, PREPROD_RELAY_APP_ID, PROD_RELAY_API_KEY, PROD_RELAY_APP_ID, RELAY_API_KEY_HEADER, RELAY_APP_ID_HEADER, SDK_NAMESPACE, SERVER_SDK_ROUTE_PREFIX, SOLANA_RPC_URL, SignAndBroadcastRequestTooLargeError, SigningConsentRequiredError, SuccessEventType, ThresholdSignatureScheme, URL_PATTERNS, WAAS_EXPORT_INTENT_ACTION, WAAS_RESHARE_INTENT_ACTION, WalletApiError, WalletOperation, WalletReadyState, assertDynamicLocationsHaveExternalKeyShareId, attachRequestIds, buildForwardMpcEnclaveUrl, chain, chainEnumToVerifiedCredentialName, createExportIntent, createRejectablePromise, createReshareIntent, createSigningIntent, extractServerErrorCode, formatNamespacedVersion, formatRawMessageForSigning, forwardMpcMayHaveJoinedRoom, getBitcoinChainConfig, getClientThreshold, getDynamicServerThreshold, getEnvironmentFromUrl, getMPCChainConfig, getRequiredExternalKeyShareId, getReshareConfig, getServerWalletReshareConfig, getTSSConfig, getVersionNamespace, getVersionWithoutNamespace, handleAxiosError, invokeCeremonyComplete, isBusinessAccountActionRequired, isEvmCompatibleChain, isRecoveredForwardMpcConnectionChurn, normalizeAndValidatePrivateKey, parseNamespacedVersion, prepareRawMessageSigningPayload, runWithForwardMpcFallback, sanitizeBusinessAccountSignedIntent, serializeError, serializeMessageForForwardMPC, toJsonSafeContext, verifiedCredentialNameToChainEnum, withTraceId };
3571
+ export { AuthMode, BITCOIN_ADDRESS_TYPE_CONFIG, BITCOIN_DERIVATION_PATHS, BROWSER_SDK_ROUTE_PREFIX, BackupLocation, BitcoinAddressType, BitcoinNetwork, BusinessAccountClient, BusinessAccountMemberRole, BusinessAccountSignerType, CreateRoomPartiesOptions, DEFAULT_ED25519_VARIANT, DELEGATED_SHARE_COUNT, DYNAMIC_AUTH_BASE_API_URL_MAP, DYNAMIC_AUTH_DEV_BASE_API_URL, DYNAMIC_AUTH_PREPROD_BASE_API_URL, DYNAMIC_AUTH_PROD_BASE_API_URL, DYNAMIC_CLIENT_RELAY_REDCOAST_API_KEY_MAP, DYNAMIC_CLIENT_RELAY_REDCOAST_APP_ID_MAP, DYNAMIC_FORWARD_MPC_DEV_ENCLAVE_URL, DYNAMIC_FORWARD_MPC_ENCLAVE_ATTESTATION_CONFIG_MAP, DYNAMIC_FORWARD_MPC_ENCLAVE_URL_MAP, DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL, DYNAMIC_FORWARD_MPC_PROD_ENCLAVE_URL, DYNAMIC_KEYSHARES_RELAY_MAP, DYNAMIC_KEYSHARES_RELAY_PREPROD_BASE_API_URL, DYNAMIC_KEYSHARES_RELAY_PROD_BASE_API_URL, DynamicApiClient, DynamicClientSessionSignature, DynamicElevatedAccessTokenHeader, DynamicForwardMPCHeader, DynamicMfaTokenHeader, DynamicRequestIdHeader, DynamicSessionPublicKeyHeader, DynamicTraceElapsedTimeHeader, DynamicTraceIdHeader, ENCRYPTED_SHARES_STORAGE_SUFFIX, ENVIRONMENT_ENUM, EVM_COMPATIBLE_CHAINS, EarnClient, FEATURE_FLAGS, IFRAME_DOMAIN_MAP, Logger, MIDNIGHT_DERIVATION_PATHS, MPC_CHAIN_CONFIG, MPC_CONFIG, MPC_RELAY_DEV_API_URL, MPC_RELAY_PREPROD_API_URL, MPC_RELAY_PROD_API_URL, MPC_RELAY_URL_MAP, NETWORK_ERROR_CODE, NETWORK_ERROR_STATUS, NoopLogger, PREPROD_RELAY_API_KEY, PREPROD_RELAY_APP_ID, PROD_RELAY_API_KEY, PROD_RELAY_APP_ID, RELAY_API_KEY_HEADER, RELAY_APP_ID_HEADER, SDK_NAMESPACE, SERVER_SDK_ROUTE_PREFIX, SOLANA_RPC_URL, SignAndBroadcastRequestTooLargeError, SigningConsentRequiredError, SuccessEventType, ThresholdSignatureScheme, URL_PATTERNS, WAAS_EXPORT_INTENT_ACTION, WAAS_RESHARE_INTENT_ACTION, WalletApiError, WalletOperation, WalletReadyState, assertDynamicLocationsHaveExternalKeyShareId, attachRequestIds, buildForwardMpcEnclaveUrl, chain, chainEnumToVerifiedCredentialName, createExportIntent, createRejectablePromise, createReshareIntent, createSigningIntent, extractServerErrorCode, formatNamespacedVersion, formatRawMessageForSigning, forwardMpcMayHaveJoinedRoom, getBitcoinChainConfig, getClientThreshold, getDynamicServerThreshold, getEnvironmentFromUrl, getMPCChainConfig, getRequiredExternalKeyShareId, getReshareConfig, getServerWalletReshareConfig, getTSSConfig, getVersionNamespace, getVersionWithoutNamespace, handleAxiosError, invokeCeremonyComplete, isBusinessAccountActionRequired, isEvmCompatibleChain, isRecoveredForwardMpcConnectionChurn, isWasmUnavailableErrorMessage, normalizeAndValidatePrivateKey, parseNamespacedVersion, prepareRawMessageSigningPayload, runWithForwardMpcFallback, sanitizeBusinessAccountSignedIntent, serializeError, serializeMessageForForwardMPC, toJsonSafeContext, verifiedCredentialNameToChainEnum, withTraceId };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/core",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@dynamic-labs/sdk-api-core": "0.144.0",
8
- "@dynamic-labs-wallet/primitives": "1.1.61",
8
+ "@dynamic-labs-wallet/primitives": "1.1.62",
9
9
  "axios": "1.20.0",
10
10
  "uuid": "11.1.1"
11
11
  },
@@ -23,4 +23,9 @@ export type { ForwardMpcErrorType, ForwardMpcErrorClassification } from '@dynami
23
23
  * protocol breakage and must stay at `error` so monitors can page on them.
24
24
  */
25
25
  export declare const isRecoveredForwardMpcConnectionChurn: (classification: ForwardMpcErrorClassification) => boolean;
26
+ /**
27
+ * True when an error indicates the client's JS runtime lacks the WebAssembly
28
+ * global — a client environment issue, so it logs at `warn`, not `error`.
29
+ */
30
+ export declare const isWasmUnavailableErrorMessage: (message: string | undefined) => boolean;
26
31
  //# sourceMappingURL=forwardMpcErrorHandling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forwardMpcErrorHandling.d.ts","sourceRoot":"","sources":["../../src/utils/forwardMpcErrorHandling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAEnG;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,+CAA+C,CAAC;AAEvD,YAAY,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAYxH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oCAAoC,mBAAoB,6BAA6B,KAAG,OAEO,CAAC"}
1
+ {"version":3,"file":"forwardMpcErrorHandling.d.ts","sourceRoot":"","sources":["../../src/utils/forwardMpcErrorHandling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAEnG;;;GAGG;AACH,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,+CAA+C,CAAC;AAEvD,YAAY,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAYxH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oCAAoC,mBAAoB,6BAA6B,KAAG,OAEO,CAAC;AAM7G;;;GAGG;AACH,eAAO,MAAM,6BAA6B,YAAa,MAAM,GAAG,SAAS,KAAG,OACX,CAAC"}