@dynamic-labs-wallet/core 1.1.16 → 1.1.18
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 +62 -48
- package/index.esm.js +60 -45
- package/package.json +18 -5
- package/src/api/api.d.ts +68 -239
- package/src/api/api.d.ts.map +1 -1
- package/src/api/index.d.ts +1 -0
- package/src/api/index.d.ts.map +1 -1
- package/src/api/types.d.ts +26 -0
- package/src/api/types.d.ts.map +1 -0
- package/src/businessAccounts/types.d.ts +9 -60
- package/src/businessAccounts/types.d.ts.map +1 -1
- package/src/eventStream/utils.d.ts.map +1 -1
- package/src/internal/sdk-api-core/index.d.ts +2 -0
- package/src/internal/sdk-api-core/index.d.ts.map +1 -0
- package/src/mpc/constants.d.ts +2 -1
- package/src/mpc/constants.d.ts.map +1 -1
- package/src/types.d.ts +35 -129
- package/src/types.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var primitives = require('@dynamic-labs-wallet/primitives');
|
|
4
4
|
var uuid = require('uuid');
|
|
5
|
-
var
|
|
5
|
+
var WaasChainEnum = require('@dynamic-labs/sdk-api-core/models/WaasChainEnum');
|
|
6
|
+
var WaasPolicyConstraintCondition = require('@dynamic-labs/sdk-api-core/models/WaasPolicyConstraintCondition');
|
|
7
|
+
var WaasPolicyRuleType = require('@dynamic-labs/sdk-api-core/models/WaasPolicyRuleType');
|
|
6
8
|
var axios = require('axios');
|
|
7
9
|
var utils = require('@dynamic-labs-wallet/forward-mpc-client/utils');
|
|
8
10
|
|
|
@@ -602,22 +604,6 @@ function _extends() {
|
|
|
602
604
|
return _extends.apply(this, arguments);
|
|
603
605
|
}
|
|
604
606
|
|
|
605
|
-
function _object_without_properties_loose(source, excluded) {
|
|
606
|
-
if (source == null) return {};
|
|
607
|
-
var target = {};
|
|
608
|
-
var sourceKeys = Object.keys(source);
|
|
609
|
-
var key, i;
|
|
610
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
611
|
-
key = sourceKeys[i];
|
|
612
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
613
|
-
target[key] = source[key];
|
|
614
|
-
}
|
|
615
|
-
return target;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
// Local mirror of the business-account models generated into
|
|
619
|
-
// `@dynamic-labs/sdk-api-core`. Swap these for the generated imports once that
|
|
620
|
-
// package is bumped with the SDK routes (redcoast PR #9792).
|
|
621
607
|
var BusinessAccountMemberRole = /*#__PURE__*/ function(BusinessAccountMemberRole) {
|
|
622
608
|
BusinessAccountMemberRole["Owner"] = "owner";
|
|
623
609
|
BusinessAccountMemberRole["Admin"] = "admin";
|
|
@@ -812,6 +798,19 @@ const getElapsedTime = (startTime)=>{
|
|
|
812
798
|
reject
|
|
813
799
|
};
|
|
814
800
|
};
|
|
801
|
+
/**
|
|
802
|
+
* Redcoast's 422 intent_required envelope (`{ code, payload: { intent } }`),
|
|
803
|
+
* normalized to the same `{ reason, intent }` shape a 202 consent-pending
|
|
804
|
+
* body already carries. `undefined` for any other 422 body.
|
|
805
|
+
*/ const asIntentRequiredFrom422Body = (parsed)=>{
|
|
806
|
+
var _body_payload;
|
|
807
|
+
if (typeof parsed !== 'object' || parsed === null) return undefined;
|
|
808
|
+
const body = parsed;
|
|
809
|
+
return body.code === 'intent_required' && ((_body_payload = body.payload) == null ? void 0 : _body_payload.intent) ? {
|
|
810
|
+
intent: body.payload.intent,
|
|
811
|
+
reason: 'INTENT_REQUIRED'
|
|
812
|
+
} : undefined;
|
|
813
|
+
};
|
|
815
814
|
/** Drains a fetch-adapter stream body into its full text. */ const readStreamToText = async (reader)=>{
|
|
816
815
|
const decoder = new TextDecoder();
|
|
817
816
|
let text = '';
|
|
@@ -880,7 +879,12 @@ const getElapsedTime = (startTime)=>{
|
|
|
880
879
|
apiClient.post(endpoint, body, {
|
|
881
880
|
responseType: 'stream',
|
|
882
881
|
headers: _extends({}, headers),
|
|
883
|
-
adapter: 'fetch'
|
|
882
|
+
adapter: 'fetch',
|
|
883
|
+
// Axios's default validateStatus treats any non-2xx as an error,
|
|
884
|
+
// rejecting before the intent_required body below is ever read. 422
|
|
885
|
+
// is added to the accepted range so it resolves the same way 202
|
|
886
|
+
// already does (202 is 2xx, so it needed no override).
|
|
887
|
+
validateStatus: (status)=>status >= 200 && status < 300 || status === 422
|
|
884
888
|
}).then((response)=>{
|
|
885
889
|
headersReceived = true;
|
|
886
890
|
return createSuccessErrorEventStreamHandler({
|
|
@@ -926,14 +930,45 @@ const getElapsedTime = (startTime)=>{
|
|
|
926
930
|
* @returns {function} A response handler function that processes the event stream
|
|
927
931
|
*/ const createSuccessErrorEventStreamHandler = ({ resolve, reject, successEventType, onError, onCeremonyComplete, onEvent })=>{
|
|
928
932
|
return (response)=>{
|
|
933
|
+
const rejectWithStatusError = ()=>{
|
|
934
|
+
const error = new Error(`Request failed with status ${response.status}`);
|
|
935
|
+
reject(error);
|
|
936
|
+
onError == null ? void 0 : onError(error);
|
|
937
|
+
};
|
|
929
938
|
// Reject immediately for non-2xx HTTP responses (e.g. 429 rate limit).
|
|
930
939
|
// With axios fetch adapter + responseType: 'stream', non-2xx responses
|
|
931
940
|
// may not be rejected automatically and arrive here as a stream of
|
|
932
941
|
// non-SSE content that would never parse into success/error events.
|
|
933
942
|
if (response.status && (response.status < 200 || response.status >= 300)) {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
943
|
+
// A governed ceremony with nothing signed yet answers 422
|
|
944
|
+
// intent_required — read its body for the intent to sign instead of
|
|
945
|
+
// reporting a generic failure.
|
|
946
|
+
if (response.status !== 422) {
|
|
947
|
+
rejectWithStatusError();
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
readStreamToText(response.data.getReader()).then((text)=>{
|
|
951
|
+
let parsed;
|
|
952
|
+
try {
|
|
953
|
+
parsed = JSON.parse(text);
|
|
954
|
+
} catch (parseError) {
|
|
955
|
+
Logger.warn('Unparsable 422 body — reporting a generic failure', {
|
|
956
|
+
parseError
|
|
957
|
+
});
|
|
958
|
+
rejectWithStatusError();
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
const intentRequired = asIntentRequiredFrom422Body(parsed);
|
|
962
|
+
if (intentRequired) {
|
|
963
|
+
resolve(intentRequired);
|
|
964
|
+
} else {
|
|
965
|
+
rejectWithStatusError();
|
|
966
|
+
}
|
|
967
|
+
}).catch((err)=>{
|
|
968
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
969
|
+
reject(error);
|
|
970
|
+
onError == null ? void 0 : onError(error);
|
|
971
|
+
});
|
|
937
972
|
return;
|
|
938
973
|
}
|
|
939
974
|
// A governed business-account mutation answers 202 with a single JSON
|
|
@@ -1171,7 +1206,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
1171
1206
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
1172
1207
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
1173
1208
|
|
|
1174
|
-
var version = "1.1.
|
|
1209
|
+
var version = "1.1.18";
|
|
1175
1210
|
|
|
1176
1211
|
/**
|
|
1177
1212
|
* Reads the Authorization header off an axios request config, which stores
|
|
@@ -1879,12 +1914,8 @@ class DynamicApiClient extends BaseClient {
|
|
|
1879
1914
|
});
|
|
1880
1915
|
return data;
|
|
1881
1916
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
* `isServerSdk` — refreshing implies a JWT already exists from a prior
|
|
1885
|
-
* exchange, and the route doesn't exist under `/api/v0/server` (404s).
|
|
1886
|
-
*/ async refreshUser(traceContext) {
|
|
1887
|
-
const { data } = await this.apiClient.post(`${BROWSER_SDK_ROUTE_PREFIX}/${this.environmentId}/refresh`, undefined, {
|
|
1917
|
+
async refreshUser(traceContext) {
|
|
1918
|
+
const { data } = await this.apiClient.post(`${this.sdkRoutePrefix}/${this.environmentId}/refresh`, undefined, {
|
|
1888
1919
|
headers: {
|
|
1889
1920
|
[DynamicRequestIdHeader]: uuid.v4().replace('-', ''),
|
|
1890
1921
|
[DynamicTraceIdHeader]: traceContext == null ? void 0 : traceContext.traceId,
|
|
@@ -2271,22 +2302,6 @@ class DynamicApiClient extends BaseClient {
|
|
|
2271
2302
|
this.businessAccountsRoutePrefix = `${this.sdkRoutePrefix}/${this.environmentId}/businessAccounts`;
|
|
2272
2303
|
}
|
|
2273
2304
|
}
|
|
2274
|
-
/**
|
|
2275
|
-
* Server SDK variant of {@link DynamicApiClient}. Defaults `isServerSdk` to `true`
|
|
2276
|
-
* so routes use the `/api/v0/server` prefix.
|
|
2277
|
-
* Server SDKs (e.g. `@dynamic-labs-wallet/node`) instantiate this;
|
|
2278
|
-
* the browser SDK keeps using {@link DynamicApiClient} (browser `/api/v0/sdk` prefix).
|
|
2279
|
-
* @see DYNT-537
|
|
2280
|
-
*/ class DynamicServerApiClient extends DynamicApiClient {
|
|
2281
|
-
constructor(_param){
|
|
2282
|
-
var { isServerSdk } = _param, options = _object_without_properties_loose(_param, [
|
|
2283
|
-
"isServerSdk"
|
|
2284
|
-
]);
|
|
2285
|
-
super(_extends({}, options, {
|
|
2286
|
-
isServerSdk: isServerSdk != null ? isServerSdk : true
|
|
2287
|
-
}));
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
2305
|
|
|
2291
2306
|
const SUPPORTED_IDENTIFIER_TYPES = new Set([
|
|
2292
2307
|
'email',
|
|
@@ -2729,15 +2744,15 @@ Object.defineProperty(exports, "SigningAlgorithm", {
|
|
|
2729
2744
|
});
|
|
2730
2745
|
Object.defineProperty(exports, "WaasChainEnum", {
|
|
2731
2746
|
enumerable: true,
|
|
2732
|
-
get: function () { return
|
|
2747
|
+
get: function () { return WaasChainEnum.WaasChainEnum; }
|
|
2733
2748
|
});
|
|
2734
2749
|
Object.defineProperty(exports, "WaasPolicyConstraintCondition", {
|
|
2735
2750
|
enumerable: true,
|
|
2736
|
-
get: function () { return
|
|
2751
|
+
get: function () { return WaasPolicyConstraintCondition.WaasPolicyConstraintCondition; }
|
|
2737
2752
|
});
|
|
2738
2753
|
Object.defineProperty(exports, "WaasPolicyRuleType", {
|
|
2739
2754
|
enumerable: true,
|
|
2740
|
-
get: function () { return
|
|
2755
|
+
get: function () { return WaasPolicyRuleType.WaasPolicyRuleType; }
|
|
2741
2756
|
});
|
|
2742
2757
|
Object.defineProperty(exports, "isAxiosError", {
|
|
2743
2758
|
enumerable: true,
|
|
@@ -2788,7 +2803,6 @@ exports.DynamicElevatedAccessTokenHeader = DynamicElevatedAccessTokenHeader;
|
|
|
2788
2803
|
exports.DynamicForwardMPCHeader = DynamicForwardMPCHeader;
|
|
2789
2804
|
exports.DynamicMfaTokenHeader = DynamicMfaTokenHeader;
|
|
2790
2805
|
exports.DynamicRequestIdHeader = DynamicRequestIdHeader;
|
|
2791
|
-
exports.DynamicServerApiClient = DynamicServerApiClient;
|
|
2792
2806
|
exports.DynamicSessionPublicKeyHeader = DynamicSessionPublicKeyHeader;
|
|
2793
2807
|
exports.DynamicTraceElapsedTimeHeader = DynamicTraceElapsedTimeHeader;
|
|
2794
2808
|
exports.DynamicTraceIdHeader = DynamicTraceIdHeader;
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SigningAlgorithm } from '@dynamic-labs-wallet/primitives';
|
|
2
2
|
export { SigningAlgorithm } from '@dynamic-labs-wallet/primitives';
|
|
3
3
|
import { v4 } from 'uuid';
|
|
4
|
-
export { WaasChainEnum
|
|
4
|
+
export { WaasChainEnum } from '@dynamic-labs/sdk-api-core/models/WaasChainEnum';
|
|
5
|
+
export { WaasPolicyConstraintCondition } from '@dynamic-labs/sdk-api-core/models/WaasPolicyConstraintCondition';
|
|
6
|
+
export { WaasPolicyRuleType } from '@dynamic-labs/sdk-api-core/models/WaasPolicyRuleType';
|
|
5
7
|
import axios from 'axios';
|
|
6
8
|
export { isAxiosError } from 'axios';
|
|
7
9
|
export { classifyForwardMpcError, isAttestationError, isForwardMpcError } from '@dynamic-labs-wallet/forward-mpc-client/utils';
|
|
@@ -602,22 +604,6 @@ function _extends() {
|
|
|
602
604
|
return _extends.apply(this, arguments);
|
|
603
605
|
}
|
|
604
606
|
|
|
605
|
-
function _object_without_properties_loose(source, excluded) {
|
|
606
|
-
if (source == null) return {};
|
|
607
|
-
var target = {};
|
|
608
|
-
var sourceKeys = Object.keys(source);
|
|
609
|
-
var key, i;
|
|
610
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
611
|
-
key = sourceKeys[i];
|
|
612
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
613
|
-
target[key] = source[key];
|
|
614
|
-
}
|
|
615
|
-
return target;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
// Local mirror of the business-account models generated into
|
|
619
|
-
// `@dynamic-labs/sdk-api-core`. Swap these for the generated imports once that
|
|
620
|
-
// package is bumped with the SDK routes (redcoast PR #9792).
|
|
621
607
|
var BusinessAccountMemberRole = /*#__PURE__*/ function(BusinessAccountMemberRole) {
|
|
622
608
|
BusinessAccountMemberRole["Owner"] = "owner";
|
|
623
609
|
BusinessAccountMemberRole["Admin"] = "admin";
|
|
@@ -812,6 +798,19 @@ const getElapsedTime = (startTime)=>{
|
|
|
812
798
|
reject
|
|
813
799
|
};
|
|
814
800
|
};
|
|
801
|
+
/**
|
|
802
|
+
* Redcoast's 422 intent_required envelope (`{ code, payload: { intent } }`),
|
|
803
|
+
* normalized to the same `{ reason, intent }` shape a 202 consent-pending
|
|
804
|
+
* body already carries. `undefined` for any other 422 body.
|
|
805
|
+
*/ const asIntentRequiredFrom422Body = (parsed)=>{
|
|
806
|
+
var _body_payload;
|
|
807
|
+
if (typeof parsed !== 'object' || parsed === null) return undefined;
|
|
808
|
+
const body = parsed;
|
|
809
|
+
return body.code === 'intent_required' && ((_body_payload = body.payload) == null ? void 0 : _body_payload.intent) ? {
|
|
810
|
+
intent: body.payload.intent,
|
|
811
|
+
reason: 'INTENT_REQUIRED'
|
|
812
|
+
} : undefined;
|
|
813
|
+
};
|
|
815
814
|
/** Drains a fetch-adapter stream body into its full text. */ const readStreamToText = async (reader)=>{
|
|
816
815
|
const decoder = new TextDecoder();
|
|
817
816
|
let text = '';
|
|
@@ -880,7 +879,12 @@ const getElapsedTime = (startTime)=>{
|
|
|
880
879
|
apiClient.post(endpoint, body, {
|
|
881
880
|
responseType: 'stream',
|
|
882
881
|
headers: _extends({}, headers),
|
|
883
|
-
adapter: 'fetch'
|
|
882
|
+
adapter: 'fetch',
|
|
883
|
+
// Axios's default validateStatus treats any non-2xx as an error,
|
|
884
|
+
// rejecting before the intent_required body below is ever read. 422
|
|
885
|
+
// is added to the accepted range so it resolves the same way 202
|
|
886
|
+
// already does (202 is 2xx, so it needed no override).
|
|
887
|
+
validateStatus: (status)=>status >= 200 && status < 300 || status === 422
|
|
884
888
|
}).then((response)=>{
|
|
885
889
|
headersReceived = true;
|
|
886
890
|
return createSuccessErrorEventStreamHandler({
|
|
@@ -926,14 +930,45 @@ const getElapsedTime = (startTime)=>{
|
|
|
926
930
|
* @returns {function} A response handler function that processes the event stream
|
|
927
931
|
*/ const createSuccessErrorEventStreamHandler = ({ resolve, reject, successEventType, onError, onCeremonyComplete, onEvent })=>{
|
|
928
932
|
return (response)=>{
|
|
933
|
+
const rejectWithStatusError = ()=>{
|
|
934
|
+
const error = new Error(`Request failed with status ${response.status}`);
|
|
935
|
+
reject(error);
|
|
936
|
+
onError == null ? void 0 : onError(error);
|
|
937
|
+
};
|
|
929
938
|
// Reject immediately for non-2xx HTTP responses (e.g. 429 rate limit).
|
|
930
939
|
// With axios fetch adapter + responseType: 'stream', non-2xx responses
|
|
931
940
|
// may not be rejected automatically and arrive here as a stream of
|
|
932
941
|
// non-SSE content that would never parse into success/error events.
|
|
933
942
|
if (response.status && (response.status < 200 || response.status >= 300)) {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
943
|
+
// A governed ceremony with nothing signed yet answers 422
|
|
944
|
+
// intent_required — read its body for the intent to sign instead of
|
|
945
|
+
// reporting a generic failure.
|
|
946
|
+
if (response.status !== 422) {
|
|
947
|
+
rejectWithStatusError();
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
readStreamToText(response.data.getReader()).then((text)=>{
|
|
951
|
+
let parsed;
|
|
952
|
+
try {
|
|
953
|
+
parsed = JSON.parse(text);
|
|
954
|
+
} catch (parseError) {
|
|
955
|
+
Logger.warn('Unparsable 422 body — reporting a generic failure', {
|
|
956
|
+
parseError
|
|
957
|
+
});
|
|
958
|
+
rejectWithStatusError();
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
const intentRequired = asIntentRequiredFrom422Body(parsed);
|
|
962
|
+
if (intentRequired) {
|
|
963
|
+
resolve(intentRequired);
|
|
964
|
+
} else {
|
|
965
|
+
rejectWithStatusError();
|
|
966
|
+
}
|
|
967
|
+
}).catch((err)=>{
|
|
968
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
969
|
+
reject(error);
|
|
970
|
+
onError == null ? void 0 : onError(error);
|
|
971
|
+
});
|
|
937
972
|
return;
|
|
938
973
|
}
|
|
939
974
|
// A governed business-account mutation answers 202 with a single JSON
|
|
@@ -1171,7 +1206,7 @@ const getRequiredExternalKeyShareId = (ks)=>{
|
|
|
1171
1206
|
* before it is posted and surfaces in Datadog exactly as the recovery path does.
|
|
1172
1207
|
*/ const assertDynamicLocationsHaveExternalKeyShareId = (locations)=>locations.filter((location)=>location.location === BackupLocation.DYNAMIC).forEach((location)=>getRequiredExternalKeyShareId(location));
|
|
1173
1208
|
|
|
1174
|
-
var version = "1.1.
|
|
1209
|
+
var version = "1.1.18";
|
|
1175
1210
|
|
|
1176
1211
|
/**
|
|
1177
1212
|
* Reads the Authorization header off an axios request config, which stores
|
|
@@ -1879,12 +1914,8 @@ class DynamicApiClient extends BaseClient {
|
|
|
1879
1914
|
});
|
|
1880
1915
|
return data;
|
|
1881
1916
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
* `isServerSdk` — refreshing implies a JWT already exists from a prior
|
|
1885
|
-
* exchange, and the route doesn't exist under `/api/v0/server` (404s).
|
|
1886
|
-
*/ async refreshUser(traceContext) {
|
|
1887
|
-
const { data } = await this.apiClient.post(`${BROWSER_SDK_ROUTE_PREFIX}/${this.environmentId}/refresh`, undefined, {
|
|
1917
|
+
async refreshUser(traceContext) {
|
|
1918
|
+
const { data } = await this.apiClient.post(`${this.sdkRoutePrefix}/${this.environmentId}/refresh`, undefined, {
|
|
1888
1919
|
headers: {
|
|
1889
1920
|
[DynamicRequestIdHeader]: v4().replace('-', ''),
|
|
1890
1921
|
[DynamicTraceIdHeader]: traceContext == null ? void 0 : traceContext.traceId,
|
|
@@ -2271,22 +2302,6 @@ class DynamicApiClient extends BaseClient {
|
|
|
2271
2302
|
this.businessAccountsRoutePrefix = `${this.sdkRoutePrefix}/${this.environmentId}/businessAccounts`;
|
|
2272
2303
|
}
|
|
2273
2304
|
}
|
|
2274
|
-
/**
|
|
2275
|
-
* Server SDK variant of {@link DynamicApiClient}. Defaults `isServerSdk` to `true`
|
|
2276
|
-
* so routes use the `/api/v0/server` prefix.
|
|
2277
|
-
* Server SDKs (e.g. `@dynamic-labs-wallet/node`) instantiate this;
|
|
2278
|
-
* the browser SDK keeps using {@link DynamicApiClient} (browser `/api/v0/sdk` prefix).
|
|
2279
|
-
* @see DYNT-537
|
|
2280
|
-
*/ class DynamicServerApiClient extends DynamicApiClient {
|
|
2281
|
-
constructor(_param){
|
|
2282
|
-
var { isServerSdk } = _param, options = _object_without_properties_loose(_param, [
|
|
2283
|
-
"isServerSdk"
|
|
2284
|
-
]);
|
|
2285
|
-
super(_extends({}, options, {
|
|
2286
|
-
isServerSdk: isServerSdk != null ? isServerSdk : true
|
|
2287
|
-
}));
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
2305
|
|
|
2291
2306
|
const SUPPORTED_IDENTIFIER_TYPES = new Set([
|
|
2292
2307
|
'email',
|
|
@@ -2723,4 +2738,4 @@ const handleAxiosError = (error, message, context, /**
|
|
|
2723
2738
|
throw new WalletApiError(status, resolvedMessage, extractServerErrorCode(error));
|
|
2724
2739
|
};
|
|
2725
2740
|
|
|
2726
|
-
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,
|
|
2741
|
+
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, 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, SigningConsentRequiredError, SuccessEventType, ThresholdSignatureScheme, URL_PATTERNS, WalletApiError, WalletOperation, WalletReadyState, assertDynamicLocationsHaveExternalKeyShareId, buildForwardMpcEnclaveUrl, chain, chainEnumToVerifiedCredentialName, createRejectablePromise, extractServerErrorCode, formatNamespacedVersion, getBitcoinChainConfig, getClientThreshold, getDynamicServerThreshold, getEnvironmentFromUrl, getMPCChainConfig, getRequiredExternalKeyShareId, getReshareConfig, getServerWalletReshareConfig, getTSSConfig, getVersionNamespace, getVersionWithoutNamespace, handleAxiosError, isBusinessAccountActionRequired, isEvmCompatibleChain, isRecoveredForwardMpcConnectionChurn, parseNamespacedVersion, sanitizeBusinessAccountSignedIntent, serializeError, serializeMessageForForwardMPC, verifiedCredentialNameToChainEnum };
|
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.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs/sdk-api-core": "
|
|
8
|
-
"@dynamic-labs-wallet/primitives": "1.1.
|
|
7
|
+
"@dynamic-labs/sdk-api-core": "0.50.0",
|
|
8
|
+
"@dynamic-labs-wallet/primitives": "1.1.18",
|
|
9
9
|
"axios": "1.16.0",
|
|
10
10
|
"uuid": "11.1.0"
|
|
11
11
|
},
|
|
@@ -24,7 +24,18 @@
|
|
|
24
24
|
"projectType": "library",
|
|
25
25
|
"name": "core",
|
|
26
26
|
"targets": {
|
|
27
|
-
"build": {
|
|
27
|
+
"build": {
|
|
28
|
+
"inputs": [
|
|
29
|
+
"production",
|
|
30
|
+
"^production"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"rollup-build": {
|
|
34
|
+
"inputs": [
|
|
35
|
+
"production",
|
|
36
|
+
"^production"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
28
39
|
}
|
|
29
40
|
},
|
|
30
41
|
"main": "./index.cjs",
|
|
@@ -39,5 +50,7 @@
|
|
|
39
50
|
"default": "./index.esm.js"
|
|
40
51
|
}
|
|
41
52
|
},
|
|
42
|
-
"
|
|
53
|
+
"imports": {
|
|
54
|
+
"#internal/sdk-api-core": "./src/internal/sdk-api-core/index.js"
|
|
55
|
+
}
|
|
43
56
|
}
|