@dynamic-labs-wallet/core 1.0.119 → 1.1.0
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 +67 -23
- package/index.esm.js +67 -23
- package/package.json +3 -3
- package/src/api/client.d.ts +8 -0
- package/src/api/client.d.ts.map +1 -1
- package/src/constants.d.ts +5 -13
- package/src/constants.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -163,19 +163,26 @@ const DYNAMIC_FORWARD_MPC_ENCLAVE_URL_MAP = {
|
|
|
163
163
|
["preprod"]: DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL,
|
|
164
164
|
["development"]: DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL
|
|
165
165
|
};
|
|
166
|
+
const PREPROD_FORWARD_MPC_ATTESTATION_CONFIG = {
|
|
167
|
+
expectedPcr8: [
|
|
168
|
+
'acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770',
|
|
169
|
+
'3b64661db625663481e4eb85a96214fb2356600ad4b4ba8a5951c3384ecc6150c03a411243f0390c744e33cc57516dc6'
|
|
170
|
+
],
|
|
171
|
+
strictCertValidation: true
|
|
172
|
+
};
|
|
173
|
+
// expectedPcr8 is a list so a signing-cert rotation can add the new PCR8
|
|
174
|
+
// alongside the old one; remove the old entry once the rollout completes.
|
|
166
175
|
const DYNAMIC_FORWARD_MPC_ENCLAVE_ATTESTATION_CONFIG_MAP = {
|
|
167
176
|
["production"]: {
|
|
168
|
-
expectedPcr8:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
expectedPcr8: 'acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770',
|
|
177
|
+
expectedPcr8: [
|
|
178
|
+
'484fd412249304fe7659b2a9a4869504f0e4502d8abb4f88183e65416b4f62354e4eda60e80a5b2e9d730ab0d804f83e',
|
|
179
|
+
'd35c62ae0076882804c61aab5075e77cdfde68fc4755fbb13527fc29d9d9f01d208ecb303d7d0c46740d52feab20a6cb'
|
|
180
|
+
],
|
|
173
181
|
strictCertValidation: true
|
|
174
182
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
183
|
+
// development mirrors preprod: same enclave, same rotation set.
|
|
184
|
+
["preprod"]: PREPROD_FORWARD_MPC_ATTESTATION_CONFIG,
|
|
185
|
+
["development"]: PREPROD_FORWARD_MPC_ATTESTATION_CONFIG
|
|
179
186
|
};
|
|
180
187
|
|
|
181
188
|
const DEFAULT_ED25519_VARIANT = 'ed25519Exportable';
|
|
@@ -954,8 +961,23 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
954
961
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
955
962
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
956
963
|
|
|
957
|
-
var version = "1.0
|
|
964
|
+
var version = "1.1.0";
|
|
958
965
|
|
|
966
|
+
/**
|
|
967
|
+
* Reads the Authorization header off an axios request config, which stores
|
|
968
|
+
* headers either as a plain object or as an `AxiosHeaders` instance.
|
|
969
|
+
*/ const readAuthorizationHeader = (requestHeaders)=>{
|
|
970
|
+
if (typeof requestHeaders !== 'object' || requestHeaders === null) {
|
|
971
|
+
return undefined;
|
|
972
|
+
}
|
|
973
|
+
const headers = requestHeaders;
|
|
974
|
+
var _headers_Authorization;
|
|
975
|
+
const authorization = (_headers_Authorization = headers['Authorization']) != null ? _headers_Authorization : headers['authorization'];
|
|
976
|
+
if (typeof authorization !== 'string') {
|
|
977
|
+
return undefined;
|
|
978
|
+
}
|
|
979
|
+
return authorization;
|
|
980
|
+
};
|
|
959
981
|
class BaseClient {
|
|
960
982
|
/**
|
|
961
983
|
* Fire {@link onUnauthorized} whenever a request on this axios instance sees a
|
|
@@ -969,27 +991,47 @@ class BaseClient {
|
|
|
969
991
|
* response/error; it only signals out-of-band, leaving existing error
|
|
970
992
|
* handling unchanged.
|
|
971
993
|
*/ installUnauthorizedInterceptor(client) {
|
|
972
|
-
const fireIfUnauthorized = (status)=>{
|
|
973
|
-
if (status
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
994
|
+
const fireIfUnauthorized = (status, requestHeaders)=>{
|
|
995
|
+
if (status !== 401) {
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
if (this.isSupersededAuthHeader(requestHeaders)) {
|
|
999
|
+
this.logger.info('[BaseClient] ignoring 401 for a request that carried a superseded auth token');
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
try {
|
|
1003
|
+
this.onUnauthorized == null ? void 0 : this.onUnauthorized.call(this);
|
|
1004
|
+
} catch (error) {
|
|
1005
|
+
this.logger.error('[BaseClient] onUnauthorized handler threw', {
|
|
1006
|
+
error
|
|
1007
|
+
});
|
|
981
1008
|
}
|
|
982
1009
|
};
|
|
983
1010
|
client.interceptors.response.use((response)=>{
|
|
984
|
-
|
|
1011
|
+
var _response_config;
|
|
1012
|
+
fireIfUnauthorized(response == null ? void 0 : response.status, response == null ? void 0 : (_response_config = response.config) == null ? void 0 : _response_config.headers);
|
|
985
1013
|
return response;
|
|
986
1014
|
}, (error)=>{
|
|
987
|
-
var _error_response;
|
|
1015
|
+
var _error_response, _error_config;
|
|
988
1016
|
var _error_response_status;
|
|
989
|
-
fireIfUnauthorized((_error_response_status = error == null ? void 0 : (_error_response = error.response) == null ? void 0 : _error_response.status) != null ? _error_response_status : error == null ? void 0 : error.status);
|
|
1017
|
+
fireIfUnauthorized((_error_response_status = error == null ? void 0 : (_error_response = error.response) == null ? void 0 : _error_response.status) != null ? _error_response_status : error == null ? void 0 : error.status, error == null ? void 0 : (_error_config = error.config) == null ? void 0 : _error_config.headers);
|
|
990
1018
|
return Promise.reject(error);
|
|
991
1019
|
});
|
|
992
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Whether a request was sent with an auth token that {@link syncAuthToken} has
|
|
1023
|
+
* since replaced. Its 401 says nothing about the token the client holds now,
|
|
1024
|
+
* so it must not reach {@link onUnauthorized} and log the user out.
|
|
1025
|
+
*/ isSupersededAuthHeader(requestHeaders) {
|
|
1026
|
+
if (this.authMode !== AuthMode.HEADER || !this.currentAuthHeader) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
const requestAuthHeader = readAuthorizationHeader(requestHeaders);
|
|
1030
|
+
if (!requestAuthHeader) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
return requestAuthHeader !== this.currentAuthHeader;
|
|
1034
|
+
}
|
|
993
1035
|
get forwardMPCClient() {
|
|
994
1036
|
if (!this._forwardMpcClient) {
|
|
995
1037
|
throw new Error('Forward MPC client is not initialized');
|
|
@@ -1007,6 +1049,7 @@ class BaseClient {
|
|
|
1007
1049
|
throw new Error('Auth token is required for header authentication');
|
|
1008
1050
|
}
|
|
1009
1051
|
const authHeader = `Bearer ${authToken}`;
|
|
1052
|
+
this.currentAuthHeader = authHeader;
|
|
1010
1053
|
this.apiClient.defaults.headers['Authorization'] = authHeader;
|
|
1011
1054
|
this.clientRelayApiClient.defaults.headers['Authorization'] = authHeader;
|
|
1012
1055
|
this.apiClient.defaults.headers.common['Authorization'] = authHeader;
|
|
@@ -1033,6 +1076,7 @@ class BaseClient {
|
|
|
1033
1076
|
// Only set Authorization header if using header auth mode and token is provided
|
|
1034
1077
|
if (authMode === AuthMode.HEADER && authToken) {
|
|
1035
1078
|
headers['Authorization'] = `Bearer ${authToken}`;
|
|
1079
|
+
this.currentAuthHeader = headers['Authorization'];
|
|
1036
1080
|
}
|
|
1037
1081
|
headers['x-dyn-wallet-sdk-version'] = version;
|
|
1038
1082
|
headers['x-dyn-version'] = sdkVersion;
|
|
@@ -2003,7 +2047,7 @@ class DynamicApiClient extends BaseClient {
|
|
|
2003
2047
|
"isServerSdk"
|
|
2004
2048
|
]);
|
|
2005
2049
|
super(_extends({}, options, {
|
|
2006
|
-
isServerSdk: isServerSdk != null ? isServerSdk :
|
|
2050
|
+
isServerSdk: isServerSdk != null ? isServerSdk : true
|
|
2007
2051
|
}));
|
|
2008
2052
|
}
|
|
2009
2053
|
}
|
package/index.esm.js
CHANGED
|
@@ -163,19 +163,26 @@ const DYNAMIC_FORWARD_MPC_ENCLAVE_URL_MAP = {
|
|
|
163
163
|
["preprod"]: DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL,
|
|
164
164
|
["development"]: DYNAMIC_FORWARD_MPC_PREPROD_ENCLAVE_URL
|
|
165
165
|
};
|
|
166
|
+
const PREPROD_FORWARD_MPC_ATTESTATION_CONFIG = {
|
|
167
|
+
expectedPcr8: [
|
|
168
|
+
'acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770',
|
|
169
|
+
'3b64661db625663481e4eb85a96214fb2356600ad4b4ba8a5951c3384ecc6150c03a411243f0390c744e33cc57516dc6'
|
|
170
|
+
],
|
|
171
|
+
strictCertValidation: true
|
|
172
|
+
};
|
|
173
|
+
// expectedPcr8 is a list so a signing-cert rotation can add the new PCR8
|
|
174
|
+
// alongside the old one; remove the old entry once the rollout completes.
|
|
166
175
|
const DYNAMIC_FORWARD_MPC_ENCLAVE_ATTESTATION_CONFIG_MAP = {
|
|
167
176
|
["production"]: {
|
|
168
|
-
expectedPcr8:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
expectedPcr8: 'acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770',
|
|
177
|
+
expectedPcr8: [
|
|
178
|
+
'484fd412249304fe7659b2a9a4869504f0e4502d8abb4f88183e65416b4f62354e4eda60e80a5b2e9d730ab0d804f83e',
|
|
179
|
+
'd35c62ae0076882804c61aab5075e77cdfde68fc4755fbb13527fc29d9d9f01d208ecb303d7d0c46740d52feab20a6cb'
|
|
180
|
+
],
|
|
173
181
|
strictCertValidation: true
|
|
174
182
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
183
|
+
// development mirrors preprod: same enclave, same rotation set.
|
|
184
|
+
["preprod"]: PREPROD_FORWARD_MPC_ATTESTATION_CONFIG,
|
|
185
|
+
["development"]: PREPROD_FORWARD_MPC_ATTESTATION_CONFIG
|
|
179
186
|
};
|
|
180
187
|
|
|
181
188
|
const DEFAULT_ED25519_VARIANT = 'ed25519Exportable';
|
|
@@ -954,8 +961,23 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
954
961
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
955
962
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
956
963
|
|
|
957
|
-
var version = "1.0
|
|
964
|
+
var version = "1.1.0";
|
|
958
965
|
|
|
966
|
+
/**
|
|
967
|
+
* Reads the Authorization header off an axios request config, which stores
|
|
968
|
+
* headers either as a plain object or as an `AxiosHeaders` instance.
|
|
969
|
+
*/ const readAuthorizationHeader = (requestHeaders)=>{
|
|
970
|
+
if (typeof requestHeaders !== 'object' || requestHeaders === null) {
|
|
971
|
+
return undefined;
|
|
972
|
+
}
|
|
973
|
+
const headers = requestHeaders;
|
|
974
|
+
var _headers_Authorization;
|
|
975
|
+
const authorization = (_headers_Authorization = headers['Authorization']) != null ? _headers_Authorization : headers['authorization'];
|
|
976
|
+
if (typeof authorization !== 'string') {
|
|
977
|
+
return undefined;
|
|
978
|
+
}
|
|
979
|
+
return authorization;
|
|
980
|
+
};
|
|
959
981
|
class BaseClient {
|
|
960
982
|
/**
|
|
961
983
|
* Fire {@link onUnauthorized} whenever a request on this axios instance sees a
|
|
@@ -969,27 +991,47 @@ class BaseClient {
|
|
|
969
991
|
* response/error; it only signals out-of-band, leaving existing error
|
|
970
992
|
* handling unchanged.
|
|
971
993
|
*/ installUnauthorizedInterceptor(client) {
|
|
972
|
-
const fireIfUnauthorized = (status)=>{
|
|
973
|
-
if (status
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
994
|
+
const fireIfUnauthorized = (status, requestHeaders)=>{
|
|
995
|
+
if (status !== 401) {
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
if (this.isSupersededAuthHeader(requestHeaders)) {
|
|
999
|
+
this.logger.info('[BaseClient] ignoring 401 for a request that carried a superseded auth token');
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
try {
|
|
1003
|
+
this.onUnauthorized == null ? void 0 : this.onUnauthorized.call(this);
|
|
1004
|
+
} catch (error) {
|
|
1005
|
+
this.logger.error('[BaseClient] onUnauthorized handler threw', {
|
|
1006
|
+
error
|
|
1007
|
+
});
|
|
981
1008
|
}
|
|
982
1009
|
};
|
|
983
1010
|
client.interceptors.response.use((response)=>{
|
|
984
|
-
|
|
1011
|
+
var _response_config;
|
|
1012
|
+
fireIfUnauthorized(response == null ? void 0 : response.status, response == null ? void 0 : (_response_config = response.config) == null ? void 0 : _response_config.headers);
|
|
985
1013
|
return response;
|
|
986
1014
|
}, (error)=>{
|
|
987
|
-
var _error_response;
|
|
1015
|
+
var _error_response, _error_config;
|
|
988
1016
|
var _error_response_status;
|
|
989
|
-
fireIfUnauthorized((_error_response_status = error == null ? void 0 : (_error_response = error.response) == null ? void 0 : _error_response.status) != null ? _error_response_status : error == null ? void 0 : error.status);
|
|
1017
|
+
fireIfUnauthorized((_error_response_status = error == null ? void 0 : (_error_response = error.response) == null ? void 0 : _error_response.status) != null ? _error_response_status : error == null ? void 0 : error.status, error == null ? void 0 : (_error_config = error.config) == null ? void 0 : _error_config.headers);
|
|
990
1018
|
return Promise.reject(error);
|
|
991
1019
|
});
|
|
992
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Whether a request was sent with an auth token that {@link syncAuthToken} has
|
|
1023
|
+
* since replaced. Its 401 says nothing about the token the client holds now,
|
|
1024
|
+
* so it must not reach {@link onUnauthorized} and log the user out.
|
|
1025
|
+
*/ isSupersededAuthHeader(requestHeaders) {
|
|
1026
|
+
if (this.authMode !== AuthMode.HEADER || !this.currentAuthHeader) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
const requestAuthHeader = readAuthorizationHeader(requestHeaders);
|
|
1030
|
+
if (!requestAuthHeader) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
return requestAuthHeader !== this.currentAuthHeader;
|
|
1034
|
+
}
|
|
993
1035
|
get forwardMPCClient() {
|
|
994
1036
|
if (!this._forwardMpcClient) {
|
|
995
1037
|
throw new Error('Forward MPC client is not initialized');
|
|
@@ -1007,6 +1049,7 @@ class BaseClient {
|
|
|
1007
1049
|
throw new Error('Auth token is required for header authentication');
|
|
1008
1050
|
}
|
|
1009
1051
|
const authHeader = `Bearer ${authToken}`;
|
|
1052
|
+
this.currentAuthHeader = authHeader;
|
|
1010
1053
|
this.apiClient.defaults.headers['Authorization'] = authHeader;
|
|
1011
1054
|
this.clientRelayApiClient.defaults.headers['Authorization'] = authHeader;
|
|
1012
1055
|
this.apiClient.defaults.headers.common['Authorization'] = authHeader;
|
|
@@ -1033,6 +1076,7 @@ class BaseClient {
|
|
|
1033
1076
|
// Only set Authorization header if using header auth mode and token is provided
|
|
1034
1077
|
if (authMode === AuthMode.HEADER && authToken) {
|
|
1035
1078
|
headers['Authorization'] = `Bearer ${authToken}`;
|
|
1079
|
+
this.currentAuthHeader = headers['Authorization'];
|
|
1036
1080
|
}
|
|
1037
1081
|
headers['x-dyn-wallet-sdk-version'] = version;
|
|
1038
1082
|
headers['x-dyn-version'] = sdkVersion;
|
|
@@ -2003,7 +2047,7 @@ class DynamicApiClient extends BaseClient {
|
|
|
2003
2047
|
"isServerSdk"
|
|
2004
2048
|
]);
|
|
2005
2049
|
super(_extends({}, options, {
|
|
2006
|
-
isServerSdk: isServerSdk != null ? isServerSdk :
|
|
2050
|
+
isServerSdk: isServerSdk != null ? isServerSdk : true
|
|
2007
2051
|
}));
|
|
2008
2052
|
}
|
|
2009
2053
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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.1.0",
|
|
9
9
|
"axios": "1.16.0",
|
|
10
10
|
"uuid": "11.1.0"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@dynamic-labs-wallet/forward-mpc-client": "
|
|
13
|
+
"@dynamic-labs-wallet/forward-mpc-client": "2.0.0"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"*",
|
package/src/api/client.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export declare class BaseClient {
|
|
|
13
13
|
protected backupServiceAuthToken?: string;
|
|
14
14
|
/** Notifies the host (via the reverse channel) when a 401 is seen. */
|
|
15
15
|
protected onUnauthorized?: () => void;
|
|
16
|
+
/** Authorization header this client presents on header-auth requests. */
|
|
17
|
+
protected currentAuthHeader?: string;
|
|
16
18
|
constructor({ environmentId, baseApiUrl, authToken, backupServiceAuthToken, baseClientKeysharesRelayApiUrl, authMode, sdkVersion, forwardMPCClient, logger, onUnauthorized, }: {
|
|
17
19
|
environmentId: string;
|
|
18
20
|
baseApiUrl?: string;
|
|
@@ -43,6 +45,12 @@ export declare class BaseClient {
|
|
|
43
45
|
* handling unchanged.
|
|
44
46
|
*/
|
|
45
47
|
private installUnauthorizedInterceptor;
|
|
48
|
+
/**
|
|
49
|
+
* Whether a request was sent with an auth token that {@link syncAuthToken} has
|
|
50
|
+
* since replaced. Its 401 says nothing about the token the client holds now,
|
|
51
|
+
* so it must not reach {@link onUnauthorized} and log the user out.
|
|
52
|
+
*/
|
|
53
|
+
private isSupersededAuthHeader;
|
|
46
54
|
get forwardMPCClient(): ForwardMPCClientV2;
|
|
47
55
|
set forwardMPCClient(forwardMPCClient: ForwardMPCClientV2 | undefined);
|
|
48
56
|
syncAuthToken(authToken: string): void;
|
package/src/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAWlD,OAAO,EAAE,QAAQ,EAAc,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAWlD,OAAO,EAAE,QAAQ,EAAc,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAqBlF,qBAAa,UAAU;IACd,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,8BAA8B,EAAE,MAAM,CAAC;IACvC,oBAAoB,EAAE,aAAa,CAAC;IACpC,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAC1C,sEAAsE;IACtE,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,yEAAyE;IACzE,SAAS,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;gBAEzB,EACV,aAAa,EACb,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,8BAA8B,EAC9B,QAA0B,EAE1B,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,cAAc,GACf,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;QACtC,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;KAC7B;IAoDD;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,8BAA8B;IA8BtC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAa9B,IAAI,gBAAgB,IAAI,kBAAkB,CAKzC;IAED,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,EAEpE;IAED,aAAa,CAAC,SAAS,EAAE,MAAM;IA4B/B,0BAA0B,CAAC,sBAAsB,EAAE,MAAM;CAW1D"}
|
package/src/constants.d.ts
CHANGED
|
@@ -137,18 +137,10 @@ export declare const DYNAMIC_FORWARD_MPC_ENCLAVE_URL_MAP: {
|
|
|
137
137
|
readonly preprod: "wss://mpc-client.dynamic-preprod.xyz/ws";
|
|
138
138
|
readonly development: "wss://mpc-client.dynamic-preprod.xyz/ws";
|
|
139
139
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
readonly strictCertValidation: true;
|
|
144
|
-
};
|
|
145
|
-
readonly preprod: {
|
|
146
|
-
readonly expectedPcr8: "acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770";
|
|
147
|
-
readonly strictCertValidation: true;
|
|
148
|
-
};
|
|
149
|
-
readonly development: {
|
|
150
|
-
readonly expectedPcr8: "acc59ec98dbf7ecb43f9a6b9890866141868c079aa879e05e3675e1a10e187259a64951e72cc531541b02dbdcd780770";
|
|
151
|
-
readonly strictCertValidation: true;
|
|
152
|
-
};
|
|
140
|
+
type ForwardMPCEnclaveAttestationConfig = {
|
|
141
|
+
expectedPcr8: string[];
|
|
142
|
+
strictCertValidation: boolean;
|
|
153
143
|
};
|
|
144
|
+
export declare const DYNAMIC_FORWARD_MPC_ENCLAVE_ATTESTATION_CONFIG_MAP: Record<ENVIRONMENT_ENUM, ForwardMPCEnclaveAttestationConfig>;
|
|
145
|
+
export {};
|
|
154
146
|
//# sourceMappingURL=constants.d.ts.map
|
package/src/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../packages/src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAG9E,eAAO,MAAM,6BAA6B,6BAA6B,CAAC;AACxE,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAC9D,eAAO,MAAM,oBAAoB,mBA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