@dynamic-labs-wallet/core 1.1.71 → 1.1.73

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
@@ -1001,12 +1001,15 @@ const getElapsedTime = (startTime)=>{
1001
1001
  * only gets a fresh error with the message, HTTP status and backend code (the
1002
1002
  * 409 recovery predicates key off `code`), never the raw error object.
1003
1003
  */ const reportRequestFailure = (err, onError)=>{
1004
- var _err_response;
1004
+ var _err_response, _err_response_data, _err_response1;
1005
1005
  const error = err instanceof Error ? err : new Error(String(err));
1006
1006
  const status = err == null ? void 0 : (_err_response = err.response) == null ? void 0 : _err_response.status;
1007
1007
  const code = extractServerErrorCode(err);
1008
+ // The server's reason (e.g. a policy denial on a held HTTP response) beats axios's generic "status code 400".
1009
+ const serverMessage = err == null ? void 0 : (_err_response1 = err.response) == null ? void 0 : (_err_response_data = _err_response1.data) == null ? void 0 : _err_response_data.error;
1010
+ const message = typeof serverMessage === 'string' && serverMessage ? serverMessage : error.message;
1008
1011
  try {
1009
- onError == null ? void 0 : onError(Object.assign(new Error(error.message), _extends({}, status !== undefined && {
1012
+ onError == null ? void 0 : onError(Object.assign(new Error(message), _extends({}, status !== undefined && {
1010
1013
  status
1011
1014
  }, code && {
1012
1015
  code
@@ -1501,7 +1504,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
1501
1504
  * before it is posted and surfaces in Datadog exactly as the recovery path does.
1502
1505
  */ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
1503
1506
 
1504
- var version = "1.1.71";
1507
+ var version = "1.1.73";
1505
1508
 
1506
1509
  /**
1507
1510
  * Reads the Authorization header off an axios request config, which stores
@@ -3541,6 +3544,23 @@ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly i
3541
3544
  * True when an error indicates the client's JS runtime lacks the WebAssembly
3542
3545
  * global — a client environment issue, so it logs at `warn`, not `error`.
3543
3546
  */ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
3547
+ /**
3548
+ * Thrown by `assertWebAssemblyAvailable` before any MPC work starts when the
3549
+ * runtime has no WebAssembly global. The message intentionally matches
3550
+ * WASM_UNAVAILABLE_MESSAGE so log classification stays `warn`.
3551
+ */ class WasmUnavailableError extends Error {
3552
+ constructor(){
3553
+ super('WebAssembly is not defined: this runtime cannot run MPC operations (e.g. iOS Lockdown Mode disables WebAssembly)');
3554
+ this.name = 'WasmUnavailableError';
3555
+ }
3556
+ }
3557
+ /**
3558
+ * Fails fast when the client's JS runtime lacks the WebAssembly global — every
3559
+ * MPC path needs WASM, so keygen/sign/export would throw a raw ReferenceError
3560
+ * deeper in anyway.
3561
+ */ const assertWebAssemblyAvailable = ()=>{
3562
+ if (typeof WebAssembly === 'undefined') throw new WasmUnavailableError();
3563
+ };
3544
3564
 
3545
3565
  /**
3546
3566
  * True when the forward enclave may already be in the room. The enclave gets
@@ -3783,7 +3803,9 @@ exports.WAAS_RESHARE_INTENT_ACTION = WAAS_RESHARE_INTENT_ACTION;
3783
3803
  exports.WalletApiError = WalletApiError;
3784
3804
  exports.WalletOperation = WalletOperation;
3785
3805
  exports.WalletReadyState = WalletReadyState;
3806
+ exports.WasmUnavailableError = WasmUnavailableError;
3786
3807
  exports.assertDynamicLocationsHaveExternalKeyShareId = assertDynamicLocationsHaveExternalKeyShareId;
3808
+ exports.assertWebAssemblyAvailable = assertWebAssemblyAvailable;
3787
3809
  exports.attachRequestIds = attachRequestIds;
3788
3810
  exports.buildForwardMpcEnclaveUrl = buildForwardMpcEnclaveUrl;
3789
3811
  exports.chain = chain;
package/index.esm.js CHANGED
@@ -1003,12 +1003,15 @@ const getElapsedTime = (startTime)=>{
1003
1003
  * only gets a fresh error with the message, HTTP status and backend code (the
1004
1004
  * 409 recovery predicates key off `code`), never the raw error object.
1005
1005
  */ const reportRequestFailure = (err, onError)=>{
1006
- var _err_response;
1006
+ var _err_response, _err_response_data, _err_response1;
1007
1007
  const error = err instanceof Error ? err : new Error(String(err));
1008
1008
  const status = err == null ? void 0 : (_err_response = err.response) == null ? void 0 : _err_response.status;
1009
1009
  const code = extractServerErrorCode(err);
1010
+ // The server's reason (e.g. a policy denial on a held HTTP response) beats axios's generic "status code 400".
1011
+ const serverMessage = err == null ? void 0 : (_err_response1 = err.response) == null ? void 0 : (_err_response_data = _err_response1.data) == null ? void 0 : _err_response_data.error;
1012
+ const message = typeof serverMessage === 'string' && serverMessage ? serverMessage : error.message;
1010
1013
  try {
1011
- onError == null ? void 0 : onError(Object.assign(new Error(error.message), _extends({}, status !== undefined && {
1014
+ onError == null ? void 0 : onError(Object.assign(new Error(message), _extends({}, status !== undefined && {
1012
1015
  status
1013
1016
  }, code && {
1014
1017
  code
@@ -1503,7 +1506,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
1503
1506
  * before it is posted and surfaces in Datadog exactly as the recovery path does.
1504
1507
  */ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
1505
1508
 
1506
- var version = "1.1.71";
1509
+ var version = "1.1.73";
1507
1510
 
1508
1511
  /**
1509
1512
  * Reads the Authorization header off an axios request config, which stores
@@ -3543,6 +3546,23 @@ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly i
3543
3546
  * True when an error indicates the client's JS runtime lacks the WebAssembly
3544
3547
  * global — a client environment issue, so it logs at `warn`, not `error`.
3545
3548
  */ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
3549
+ /**
3550
+ * Thrown by `assertWebAssemblyAvailable` before any MPC work starts when the
3551
+ * runtime has no WebAssembly global. The message intentionally matches
3552
+ * WASM_UNAVAILABLE_MESSAGE so log classification stays `warn`.
3553
+ */ class WasmUnavailableError extends Error {
3554
+ constructor(){
3555
+ super('WebAssembly is not defined: this runtime cannot run MPC operations (e.g. iOS Lockdown Mode disables WebAssembly)');
3556
+ this.name = 'WasmUnavailableError';
3557
+ }
3558
+ }
3559
+ /**
3560
+ * Fails fast when the client's JS runtime lacks the WebAssembly global — every
3561
+ * MPC path needs WASM, so keygen/sign/export would throw a raw ReferenceError
3562
+ * deeper in anyway.
3563
+ */ const assertWebAssemblyAvailable = ()=>{
3564
+ if (typeof WebAssembly === 'undefined') throw new WasmUnavailableError();
3565
+ };
3546
3566
 
3547
3567
  /**
3548
3568
  * True when the forward enclave may already be in the room. The enclave gets
@@ -3681,4 +3701,4 @@ const prepareRawMessageSigningPayload = (chainName, message)=>{
3681
3701
  (_requestId = (_target1 = target).requestId) != null ? _requestId : _target1.requestId = requestId;
3682
3702
  };
3683
3703
 
3684
- 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, generateUUID, 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 };
3704
+ 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, WasmUnavailableError, assertDynamicLocationsHaveExternalKeyShareId, assertWebAssemblyAvailable, attachRequestIds, buildForwardMpcEnclaveUrl, chain, chainEnumToVerifiedCredentialName, createExportIntent, createRejectablePromise, createReshareIntent, createSigningIntent, extractServerErrorCode, formatNamespacedVersion, formatRawMessageForSigning, forwardMpcMayHaveJoinedRoom, generateUUID, 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.71",
3
+ "version": "1.1.73",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@dynamic-labs/sdk-api-core": "0.167.0",
8
- "@dynamic-labs-wallet/primitives": "1.1.71",
8
+ "@dynamic-labs-wallet/primitives": "1.1.73",
9
9
  "axios": "1.20.0",
10
10
  "uuid": "11.1.1"
11
11
  },
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/eventStream/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAEL,KAAK,6BAA6B,EAEnC,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAEjB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAWrB;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CACrC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,YAAY,EAC3B,YAAY,CAAC,EAAE,MAAM,EACrB,yBAAyB,CAAC,EAAE,MAAM,EAClC,OAAO,CAAC,EAAE,yBAAyB,KAChC,IAAI,CAAC;AAEV,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,wCAG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AAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,KAAG,OAAO,CAAC,CAAC,CAyBZ,CAAC"}
@@ -28,4 +28,18 @@ export declare const isRecoveredForwardMpcConnectionChurn: (classification: Forw
28
28
  * global — a client environment issue, so it logs at `warn`, not `error`.
29
29
  */
30
30
  export declare const isWasmUnavailableErrorMessage: (message: string | undefined) => boolean;
31
+ /**
32
+ * Thrown by `assertWebAssemblyAvailable` before any MPC work starts when the
33
+ * runtime has no WebAssembly global. The message intentionally matches
34
+ * WASM_UNAVAILABLE_MESSAGE so log classification stays `warn`.
35
+ */
36
+ export declare class WasmUnavailableError extends Error {
37
+ constructor();
38
+ }
39
+ /**
40
+ * Fails fast when the client's JS runtime lacks the WebAssembly global — every
41
+ * MPC path needs WASM, so keygen/sign/export would throw a raw ReferenceError
42
+ * deeper in anyway.
43
+ */
44
+ export declare const assertWebAssemblyAvailable: () => void;
31
45
  //# 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;AAM7G;;;GAGG;AACH,eAAO,MAAM,6BAA6B,YAAa,MAAM,GAAG,SAAS,KAAG,OACX,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;AAElE;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;;CAO9C;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAO,IAE7C,CAAC"}