@dynamic-labs-wallet/core 1.1.71 → 1.1.72
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
|
@@ -1501,7 +1501,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
1501
1501
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
1502
1502
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
1503
1503
|
|
|
1504
|
-
var version = "1.1.
|
|
1504
|
+
var version = "1.1.72";
|
|
1505
1505
|
|
|
1506
1506
|
/**
|
|
1507
1507
|
* Reads the Authorization header off an axios request config, which stores
|
|
@@ -3541,6 +3541,23 @@ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly i
|
|
|
3541
3541
|
* True when an error indicates the client's JS runtime lacks the WebAssembly
|
|
3542
3542
|
* global — a client environment issue, so it logs at `warn`, not `error`.
|
|
3543
3543
|
*/ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
|
|
3544
|
+
/**
|
|
3545
|
+
* Thrown by `assertWebAssemblyAvailable` before any MPC work starts when the
|
|
3546
|
+
* runtime has no WebAssembly global. The message intentionally matches
|
|
3547
|
+
* WASM_UNAVAILABLE_MESSAGE so log classification stays `warn`.
|
|
3548
|
+
*/ class WasmUnavailableError extends Error {
|
|
3549
|
+
constructor(){
|
|
3550
|
+
super('WebAssembly is not defined: this runtime cannot run MPC operations (e.g. iOS Lockdown Mode disables WebAssembly)');
|
|
3551
|
+
this.name = 'WasmUnavailableError';
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
/**
|
|
3555
|
+
* Fails fast when the client's JS runtime lacks the WebAssembly global — every
|
|
3556
|
+
* MPC path needs WASM, so keygen/sign/export would throw a raw ReferenceError
|
|
3557
|
+
* deeper in anyway.
|
|
3558
|
+
*/ const assertWebAssemblyAvailable = ()=>{
|
|
3559
|
+
if (typeof WebAssembly === 'undefined') throw new WasmUnavailableError();
|
|
3560
|
+
};
|
|
3544
3561
|
|
|
3545
3562
|
/**
|
|
3546
3563
|
* True when the forward enclave may already be in the room. The enclave gets
|
|
@@ -3783,7 +3800,9 @@ exports.WAAS_RESHARE_INTENT_ACTION = WAAS_RESHARE_INTENT_ACTION;
|
|
|
3783
3800
|
exports.WalletApiError = WalletApiError;
|
|
3784
3801
|
exports.WalletOperation = WalletOperation;
|
|
3785
3802
|
exports.WalletReadyState = WalletReadyState;
|
|
3803
|
+
exports.WasmUnavailableError = WasmUnavailableError;
|
|
3786
3804
|
exports.assertDynamicLocationsHaveExternalKeyShareId = assertDynamicLocationsHaveExternalKeyShareId;
|
|
3805
|
+
exports.assertWebAssemblyAvailable = assertWebAssemblyAvailable;
|
|
3787
3806
|
exports.attachRequestIds = attachRequestIds;
|
|
3788
3807
|
exports.buildForwardMpcEnclaveUrl = buildForwardMpcEnclaveUrl;
|
|
3789
3808
|
exports.chain = chain;
|
package/index.esm.js
CHANGED
|
@@ -1503,7 +1503,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
1503
1503
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
1504
1504
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
1505
1505
|
|
|
1506
|
-
var version = "1.1.
|
|
1506
|
+
var version = "1.1.72";
|
|
1507
1507
|
|
|
1508
1508
|
/**
|
|
1509
1509
|
* Reads the Authorization header off an axios request config, which stores
|
|
@@ -3543,6 +3543,23 @@ const WASM_UNAVAILABLE_MESSAGE = /can't find variable: webassembly|webassembly i
|
|
|
3543
3543
|
* True when an error indicates the client's JS runtime lacks the WebAssembly
|
|
3544
3544
|
* global — a client environment issue, so it logs at `warn`, not `error`.
|
|
3545
3545
|
*/ const isWasmUnavailableErrorMessage = (message)=>message !== undefined && WASM_UNAVAILABLE_MESSAGE.test(message);
|
|
3546
|
+
/**
|
|
3547
|
+
* Thrown by `assertWebAssemblyAvailable` before any MPC work starts when the
|
|
3548
|
+
* runtime has no WebAssembly global. The message intentionally matches
|
|
3549
|
+
* WASM_UNAVAILABLE_MESSAGE so log classification stays `warn`.
|
|
3550
|
+
*/ class WasmUnavailableError extends Error {
|
|
3551
|
+
constructor(){
|
|
3552
|
+
super('WebAssembly is not defined: this runtime cannot run MPC operations (e.g. iOS Lockdown Mode disables WebAssembly)');
|
|
3553
|
+
this.name = 'WasmUnavailableError';
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
/**
|
|
3557
|
+
* Fails fast when the client's JS runtime lacks the WebAssembly global — every
|
|
3558
|
+
* MPC path needs WASM, so keygen/sign/export would throw a raw ReferenceError
|
|
3559
|
+
* deeper in anyway.
|
|
3560
|
+
*/ const assertWebAssemblyAvailable = ()=>{
|
|
3561
|
+
if (typeof WebAssembly === 'undefined') throw new WasmUnavailableError();
|
|
3562
|
+
};
|
|
3546
3563
|
|
|
3547
3564
|
/**
|
|
3548
3565
|
* True when the forward enclave may already be in the room. The enclave gets
|
|
@@ -3681,4 +3698,4 @@ const prepareRawMessageSigningPayload = (chainName, message)=>{
|
|
|
3681
3698
|
(_requestId = (_target1 = target).requestId) != null ? _requestId : _target1.requestId = requestId;
|
|
3682
3699
|
};
|
|
3683
3700
|
|
|
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 };
|
|
3701
|
+
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.
|
|
3
|
+
"version": "1.1.72",
|
|
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.
|
|
8
|
+
"@dynamic-labs-wallet/primitives": "1.1.72",
|
|
9
9
|
"axios": "1.20.0",
|
|
10
10
|
"uuid": "11.1.1"
|
|
11
11
|
},
|
|
@@ -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"}
|