@dynamic-labs-wallet/browser 1.0.73 → 1.0.74
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 +18 -10
- package/index.esm.js +18 -10
- package/package.json +4 -4
- package/src/utils.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -1099,8 +1099,12 @@ const logRetryFailure = (operationName, attempts, maxAttempts, errorContext, log
|
|
|
1099
1099
|
willRetry: !isNonRetryable && attempts < maxAttempts
|
|
1100
1100
|
}));
|
|
1101
1101
|
};
|
|
1102
|
+
// Logged at `warn`, not `error`: retry exhaustion always re-throws, and the
|
|
1103
|
+
// calling operation's own catch logs the terminal failure at error level (e.g.
|
|
1104
|
+
// "Error in keyGen"). Logging this at error too double-counted every exhausted
|
|
1105
|
+
// ceremony in error dashboards / the catch-all monitor.
|
|
1102
1106
|
const logRetryExhausted = (operationName, maxAttempts, errorContext, logContext)=>{
|
|
1103
|
-
core.Logger.
|
|
1107
|
+
core.Logger.warn(`Failed to execute ${operationName} after ${maxAttempts} attempts - stopping retry`, _extends({}, logContext, errorContext, {
|
|
1104
1108
|
totalAttempts: maxAttempts
|
|
1105
1109
|
}));
|
|
1106
1110
|
};
|
|
@@ -1178,19 +1182,23 @@ const logRetryExhausted = (operationName, maxAttempts, errorContext, logContext)
|
|
|
1178
1182
|
return NON_RETRYABLE_CEREMONY_ERROR_MESSAGES.some((msg)=>message.includes(msg));
|
|
1179
1183
|
};
|
|
1180
1184
|
/**
|
|
1181
|
-
* Client-error (4xx) responses won't succeed on retry:
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1185
|
+
* Client-error (4xx) responses won't succeed on retry: 400 (invalid request)
|
|
1186
|
+
* and 422 (unprocessable content) mean the request itself is malformed, 401
|
|
1187
|
+
* (missing auth) and 403 (forbidden) can't gain credentials by retrying, 409
|
|
1188
|
+
* (already exists, e.g. an already-imported key) is terminal, and retrying a 429
|
|
1189
|
+
* burst just amplifies the rate limiter. These dominate keyGen retry exhaustions
|
|
1190
|
+
* in production. Status is read from `WalletApiError.status`, a raw `AxiosError`
|
|
1191
|
+
* (`getHttpStatus`), a `.status` assigned onto a plain Error (SSE error-event
|
|
1192
|
+
* shape), or parsed from the SSE handler's `Request failed with status <code>`
|
|
1193
|
+
* message. Note 409 reaches us via that SSE message — `handleAxiosError` remaps
|
|
1194
|
+
* unlisted statuses (incl. 409) to 500, so it never arrives as `WalletApiError(409)`.
|
|
1195
|
+
* 5xx / network stay retryable.
|
|
1190
1196
|
*/ const NON_RETRYABLE_CEREMONY_STATUSES = new Set([
|
|
1197
|
+
400,
|
|
1191
1198
|
401,
|
|
1192
1199
|
403,
|
|
1193
1200
|
409,
|
|
1201
|
+
422,
|
|
1194
1202
|
429
|
|
1195
1203
|
]);
|
|
1196
1204
|
const SSE_STATUS_MESSAGE = /Request failed with status (\d{3})/;
|
package/index.esm.js
CHANGED
|
@@ -1100,8 +1100,12 @@ const logRetryFailure = (operationName, attempts, maxAttempts, errorContext, log
|
|
|
1100
1100
|
willRetry: !isNonRetryable && attempts < maxAttempts
|
|
1101
1101
|
}));
|
|
1102
1102
|
};
|
|
1103
|
+
// Logged at `warn`, not `error`: retry exhaustion always re-throws, and the
|
|
1104
|
+
// calling operation's own catch logs the terminal failure at error level (e.g.
|
|
1105
|
+
// "Error in keyGen"). Logging this at error too double-counted every exhausted
|
|
1106
|
+
// ceremony in error dashboards / the catch-all monitor.
|
|
1103
1107
|
const logRetryExhausted = (operationName, maxAttempts, errorContext, logContext)=>{
|
|
1104
|
-
Logger.
|
|
1108
|
+
Logger.warn(`Failed to execute ${operationName} after ${maxAttempts} attempts - stopping retry`, _extends({}, logContext, errorContext, {
|
|
1105
1109
|
totalAttempts: maxAttempts
|
|
1106
1110
|
}));
|
|
1107
1111
|
};
|
|
@@ -1179,19 +1183,23 @@ const logRetryExhausted = (operationName, maxAttempts, errorContext, logContext)
|
|
|
1179
1183
|
return NON_RETRYABLE_CEREMONY_ERROR_MESSAGES.some((msg)=>message.includes(msg));
|
|
1180
1184
|
};
|
|
1181
1185
|
/**
|
|
1182
|
-
* Client-error (4xx) responses won't succeed on retry:
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1186
|
-
*
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1186
|
+
* Client-error (4xx) responses won't succeed on retry: 400 (invalid request)
|
|
1187
|
+
* and 422 (unprocessable content) mean the request itself is malformed, 401
|
|
1188
|
+
* (missing auth) and 403 (forbidden) can't gain credentials by retrying, 409
|
|
1189
|
+
* (already exists, e.g. an already-imported key) is terminal, and retrying a 429
|
|
1190
|
+
* burst just amplifies the rate limiter. These dominate keyGen retry exhaustions
|
|
1191
|
+
* in production. Status is read from `WalletApiError.status`, a raw `AxiosError`
|
|
1192
|
+
* (`getHttpStatus`), a `.status` assigned onto a plain Error (SSE error-event
|
|
1193
|
+
* shape), or parsed from the SSE handler's `Request failed with status <code>`
|
|
1194
|
+
* message. Note 409 reaches us via that SSE message — `handleAxiosError` remaps
|
|
1195
|
+
* unlisted statuses (incl. 409) to 500, so it never arrives as `WalletApiError(409)`.
|
|
1196
|
+
* 5xx / network stay retryable.
|
|
1191
1197
|
*/ const NON_RETRYABLE_CEREMONY_STATUSES = new Set([
|
|
1198
|
+
400,
|
|
1192
1199
|
401,
|
|
1193
1200
|
403,
|
|
1194
1201
|
409,
|
|
1202
|
+
422,
|
|
1195
1203
|
429
|
|
1196
1204
|
]);
|
|
1197
1205
|
const SSE_STATUS_MESSAGE = /Request failed with status (\d{3})/;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.74",
|
|
4
4
|
"license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "1.0.
|
|
7
|
+
"@dynamic-labs-wallet/core": "1.0.74",
|
|
8
8
|
"@dynamic-labs-wallet/forward-mpc-client": "1.0.1",
|
|
9
|
-
"@dynamic-labs-wallet/primitives": "1.0.
|
|
10
|
-
"@dynamic-labs/sdk-api-core": "^0.0.
|
|
9
|
+
"@dynamic-labs-wallet/primitives": "1.0.74",
|
|
10
|
+
"@dynamic-labs/sdk-api-core": "^0.0.1082",
|
|
11
11
|
"argon2id": "1.0.1",
|
|
12
12
|
"axios": "1.16.0",
|
|
13
13
|
"p-queue": "9.1.0",
|
package/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EACL,cAAc,EAId,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAkBhD,eAAO,MAAM,SAAS,eAAwC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,aAAa,WAAY,GAAG,KAAG,UAAU,GAAG,cAsBxD,CAAC;AAEF,eAAO,MAAM,+BAA+B,iEAIzC;IACD,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,WAGA,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAAa;IAC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