@dynamic-labs-wallet/core 1.0.110 → 1.0.111
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
|
@@ -953,7 +953,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
953
953
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
954
954
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
955
955
|
|
|
956
|
-
var version = "1.0.
|
|
956
|
+
var version = "1.0.111";
|
|
957
957
|
|
|
958
958
|
class BaseClient {
|
|
959
959
|
/**
|
|
@@ -2267,6 +2267,20 @@ const RECOVERED_CONNECTION_CHURN_CODES = new Set([
|
|
|
2267
2267
|
* protocol breakage and must stay at `error` so monitors can page on them.
|
|
2268
2268
|
*/ const isRecoveredForwardMpcConnectionChurn = (classification)=>classification.errorType === 'RATE_LIMITED' || classification.errorCode !== undefined && RECOVERED_CONNECTION_CHURN_CODES.has(classification.errorCode);
|
|
2269
2269
|
|
|
2270
|
+
/**
|
|
2271
|
+
* Appends `envId` to the ForwardMPC enclave WebSocket URL.
|
|
2272
|
+
*
|
|
2273
|
+
* The enclave binds the value to its session logger at the WS upgrade, and the
|
|
2274
|
+
* Cloudflare WAF rules on `mpc-client.*` match `envId=<uuid>` in the query
|
|
2275
|
+
* string to exempt approved environments from the per-IP /ws rate limits.
|
|
2276
|
+
*/ const buildForwardMpcEnclaveUrl = (baseEnclaveUrl, environmentId)=>{
|
|
2277
|
+
if (!environmentId) {
|
|
2278
|
+
return baseEnclaveUrl;
|
|
2279
|
+
}
|
|
2280
|
+
const separator = baseEnclaveUrl.includes('?') ? '&' : '?';
|
|
2281
|
+
return `${baseEnclaveUrl}${separator}envId=${encodeURIComponent(environmentId)}`;
|
|
2282
|
+
};
|
|
2283
|
+
|
|
2270
2284
|
/**
|
|
2271
2285
|
* Normalizes an unknown thrown value into flat, log-friendly fields.
|
|
2272
2286
|
*
|
|
@@ -2613,6 +2627,7 @@ exports.WalletApiError = WalletApiError;
|
|
|
2613
2627
|
exports.WalletOperation = WalletOperation;
|
|
2614
2628
|
exports.WalletReadyState = WalletReadyState;
|
|
2615
2629
|
exports.assertDynamicLocationsHaveExternalKeyShareId = assertDynamicLocationsHaveExternalKeyShareId;
|
|
2630
|
+
exports.buildForwardMpcEnclaveUrl = buildForwardMpcEnclaveUrl;
|
|
2616
2631
|
exports.chain = chain;
|
|
2617
2632
|
exports.chainEnumToVerifiedCredentialName = chainEnumToVerifiedCredentialName;
|
|
2618
2633
|
exports.formatNamespacedVersion = formatNamespacedVersion;
|
package/index.esm.js
CHANGED
|
@@ -953,7 +953,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
953
953
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
954
954
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
955
955
|
|
|
956
|
-
var version = "1.0.
|
|
956
|
+
var version = "1.0.111";
|
|
957
957
|
|
|
958
958
|
class BaseClient {
|
|
959
959
|
/**
|
|
@@ -2267,6 +2267,20 @@ const RECOVERED_CONNECTION_CHURN_CODES = new Set([
|
|
|
2267
2267
|
* protocol breakage and must stay at `error` so monitors can page on them.
|
|
2268
2268
|
*/ const isRecoveredForwardMpcConnectionChurn = (classification)=>classification.errorType === 'RATE_LIMITED' || classification.errorCode !== undefined && RECOVERED_CONNECTION_CHURN_CODES.has(classification.errorCode);
|
|
2269
2269
|
|
|
2270
|
+
/**
|
|
2271
|
+
* Appends `envId` to the ForwardMPC enclave WebSocket URL.
|
|
2272
|
+
*
|
|
2273
|
+
* The enclave binds the value to its session logger at the WS upgrade, and the
|
|
2274
|
+
* Cloudflare WAF rules on `mpc-client.*` match `envId=<uuid>` in the query
|
|
2275
|
+
* string to exempt approved environments from the per-IP /ws rate limits.
|
|
2276
|
+
*/ const buildForwardMpcEnclaveUrl = (baseEnclaveUrl, environmentId)=>{
|
|
2277
|
+
if (!environmentId) {
|
|
2278
|
+
return baseEnclaveUrl;
|
|
2279
|
+
}
|
|
2280
|
+
const separator = baseEnclaveUrl.includes('?') ? '&' : '?';
|
|
2281
|
+
return `${baseEnclaveUrl}${separator}envId=${encodeURIComponent(environmentId)}`;
|
|
2282
|
+
};
|
|
2283
|
+
|
|
2270
2284
|
/**
|
|
2271
2285
|
* Normalizes an unknown thrown value into flat, log-friendly fields.
|
|
2272
2286
|
*
|
|
@@ -2512,4 +2526,4 @@ const handleAxiosError = (error, message, context, /**
|
|
|
2512
2526
|
throw new WalletApiError(status, resolvedMessage, extractServerErrorCode(error));
|
|
2513
2527
|
};
|
|
2514
2528
|
|
|
2515
|
-
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, DynamicServerApiClient, DynamicSessionPublicKeyHeader, DynamicTraceElapsedTimeHeader, DynamicTraceIdHeader, ENCRYPTED_SHARES_STORAGE_SUFFIX, ENVIRONMENT_ENUM, EVM_COMPATIBLE_CHAINS, 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, SuccessEventType, ThresholdSignatureScheme, URL_PATTERNS, WalletApiError, WalletOperation, WalletReadyState, assertDynamicLocationsHaveExternalKeyShareId, chain, chainEnumToVerifiedCredentialName, formatNamespacedVersion, getBitcoinChainConfig, getClientThreshold, getDynamicServerThreshold, getEnvironmentFromUrl, getMPCChainConfig, getRequiredExternalKeyShareId, getReshareConfig, getServerWalletReshareConfig, getTSSConfig, getVersionNamespace, getVersionWithoutNamespace, handleAxiosError, isEvmCompatibleChain, isRecoveredForwardMpcConnectionChurn, parseNamespacedVersion, serializeError, serializeMessageForForwardMPC, verifiedCredentialNameToChainEnum };
|
|
2529
|
+
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, DynamicServerApiClient, DynamicSessionPublicKeyHeader, DynamicTraceElapsedTimeHeader, DynamicTraceIdHeader, ENCRYPTED_SHARES_STORAGE_SUFFIX, ENVIRONMENT_ENUM, EVM_COMPATIBLE_CHAINS, 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, SuccessEventType, ThresholdSignatureScheme, URL_PATTERNS, WalletApiError, WalletOperation, WalletReadyState, assertDynamicLocationsHaveExternalKeyShareId, buildForwardMpcEnclaveUrl, chain, chainEnumToVerifiedCredentialName, formatNamespacedVersion, getBitcoinChainConfig, getClientThreshold, getDynamicServerThreshold, getEnvironmentFromUrl, getMPCChainConfig, getRequiredExternalKeyShareId, getReshareConfig, getServerWalletReshareConfig, getTSSConfig, getVersionNamespace, getVersionWithoutNamespace, handleAxiosError, isEvmCompatibleChain, isRecoveredForwardMpcConnectionChurn, parseNamespacedVersion, serializeError, serializeMessageForForwardMPC, verifiedCredentialNameToChainEnum };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.111",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@dynamic-labs/sdk-api-core": "^0.16.0",
|
|
8
|
-
"@dynamic-labs-wallet/primitives": "1.0.
|
|
8
|
+
"@dynamic-labs-wallet/primitives": "1.0.111",
|
|
9
9
|
"axios": "1.16.0",
|
|
10
10
|
"uuid": "11.1.0"
|
|
11
11
|
},
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appends `envId` to the ForwardMPC enclave WebSocket URL.
|
|
3
|
+
*
|
|
4
|
+
* The enclave binds the value to its session logger at the WS upgrade, and the
|
|
5
|
+
* Cloudflare WAF rules on `mpc-client.*` match `envId=<uuid>` in the query
|
|
6
|
+
* string to exempt approved environments from the per-IP /ws rate limits.
|
|
7
|
+
*/
|
|
8
|
+
export declare const buildForwardMpcEnclaveUrl: (baseEnclaveUrl: string, environmentId: string | undefined) => string;
|
|
9
|
+
//# sourceMappingURL=forwardMpcEnclaveUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwardMpcEnclaveUrl.d.ts","sourceRoot":"","sources":["../../src/utils/forwardMpcEnclaveUrl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,mBAAoB,MAAM,iBAAiB,MAAM,GAAG,SAAS,KAAG,MAQrG,CAAC"}
|
package/src/utils/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './sdkVersion.js';
|
|
|
2
2
|
export * from './messageSerialization.js';
|
|
3
3
|
export * from './keyShare.js';
|
|
4
4
|
export * from './forwardMpcErrorHandling.js';
|
|
5
|
+
export { buildForwardMpcEnclaveUrl } from './forwardMpcEnclaveUrl.js';
|
|
5
6
|
export { serializeError, type SerializedError } from './serializeError.js';
|
|
6
7
|
export { EVM_COMPATIBLE_CHAINS, isEvmCompatibleChain, type EvmCompatibleChain } from './isEvmCompatibleChain/index.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/src/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}
|