@pimlico/alto 0.0.0-main.20250422T210948 → 0.0.0-main.20250428T104157
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/esm/executor/executorManager.js +5 -5
- package/esm/executor/executorManager.js.map +1 -1
- package/esm/handlers/eventManager.d.ts +11 -10
- package/esm/handlers/eventManager.js +58 -40
- package/esm/handlers/eventManager.js.map +1 -1
- package/esm/mempool/mempool.js +1 -2
- package/esm/mempool/mempool.js.map +1 -1
- package/esm/rpc/methods/eth_sendUserOperation.js +1 -1
- package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
- package/esm/rpc/rpcHandler.js +0 -3
- package/esm/rpc/rpcHandler.js.map +1 -1
- package/esm/rpc/validation/SafeValidator.d.ts +1 -2
- package/esm/rpc/validation/SafeValidator.js +2 -25
- package/esm/rpc/validation/SafeValidator.js.map +1 -1
- package/esm/rpc/validation/UnsafeValidator.d.ts +1 -2
- package/esm/rpc/validation/UnsafeValidator.js +2 -25
- package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
- package/esm/types/interfaces.d.ts +0 -1
- package/esm/utils/asyncTimeout.d.ts +5 -0
- package/esm/utils/asyncTimeout.js +23 -0
- package/esm/utils/asyncTimeout.js.map +1 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -1
- package/lib/executor/executorManager.js +5 -5
- package/lib/executor/executorManager.js.map +1 -1
- package/lib/handlers/eventManager.d.ts +11 -10
- package/lib/handlers/eventManager.js +58 -40
- package/lib/handlers/eventManager.js.map +1 -1
- package/lib/mempool/mempool.js +1 -2
- package/lib/mempool/mempool.js.map +1 -1
- package/lib/rpc/methods/eth_sendUserOperation.js +1 -1
- package/lib/rpc/methods/eth_sendUserOperation.js.map +1 -1
- package/lib/rpc/rpcHandler.js +0 -3
- package/lib/rpc/rpcHandler.js.map +1 -1
- package/lib/rpc/validation/SafeValidator.d.ts +1 -2
- package/lib/rpc/validation/SafeValidator.js +1 -24
- package/lib/rpc/validation/SafeValidator.js.map +1 -1
- package/lib/rpc/validation/UnsafeValidator.d.ts +1 -2
- package/lib/rpc/validation/UnsafeValidator.js +1 -24
- package/lib/rpc/validation/UnsafeValidator.js.map +1 -1
- package/lib/types/interfaces.d.ts +0 -1
- package/lib/utils/asyncTimeout.d.ts +5 -0
- package/lib/utils/asyncTimeout.js +51 -0
- package/lib/utils/asyncTimeout.js.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.asyncCallWithTimeout = exports.AsyncTimeoutError = void 0;
|
|
27
|
+
const opentelemetry = __importStar(require("@opentelemetry/api"));
|
|
28
|
+
class AsyncTimeoutError extends Error {
|
|
29
|
+
constructor() {
|
|
30
|
+
super("Operation timed out");
|
|
31
|
+
this.name = "AsyncTimeoutError";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AsyncTimeoutError = AsyncTimeoutError;
|
|
35
|
+
const asyncCallWithTimeout = async (asyncPromise, timeLimit) => {
|
|
36
|
+
let timeoutHandle;
|
|
37
|
+
const timeoutPromise = new Promise((_resolve, reject) => {
|
|
38
|
+
timeoutHandle = setTimeout(() => reject(new AsyncTimeoutError()), timeLimit);
|
|
39
|
+
});
|
|
40
|
+
return Promise.race([asyncPromise, timeoutPromise])
|
|
41
|
+
.then((result) => {
|
|
42
|
+
clearTimeout(timeoutHandle);
|
|
43
|
+
return result;
|
|
44
|
+
})
|
|
45
|
+
.catch((error) => {
|
|
46
|
+
opentelemetry.trace.getActiveSpan()?.recordException(error);
|
|
47
|
+
throw error;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.asyncCallWithTimeout = asyncCallWithTimeout;
|
|
51
|
+
//# sourceMappingURL=asyncTimeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncTimeout.js","sourceRoot":"","sources":["../../utils/asyncTimeout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAmD;AAEnD,MAAa,iBAAkB,SAAQ,KAAK;IACxC;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAA;IACnC,CAAC;CACJ;AALD,8CAKC;AAEM,MAAM,oBAAoB,GAAG,KAAK,EACrC,YAAwB,EACxB,SAAiB,EACP,EAAE;IACZ,IAAI,aAA4C,CAAA;IAEhD,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;QACpD,aAAa,GAAG,UAAU,CACtB,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,iBAAiB,EAAE,CAAC,EACrC,SAAS,CACZ,CAAA;IACL,CAAC,CAAC,CAAA;IAEF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;SAC9C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACb,YAAY,CAAC,aAAa,CAAC,CAAA;QAC3B,OAAO,MAAW,CAAA;IACtB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,aAAa,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;QAC3D,MAAM,KAAK,CAAA;IACf,CAAC,CAAC,CAAA;AACV,CAAC,CAAA;AAtBY,QAAA,oBAAoB,wBAsBhC"}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -20,4 +20,5 @@ __exportStar(require("./bigInt.js"), exports);
|
|
|
20
20
|
__exportStar(require("./validation.js"), exports);
|
|
21
21
|
__exportStar(require("./userop.js"), exports);
|
|
22
22
|
__exportStar(require("./helpers.js"), exports);
|
|
23
|
+
__exportStar(require("./asyncTimeout.js"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,4CAAyB;AACzB,2CAAwB;AACxB,+CAA4B;AAC5B,2CAAwB;AACxB,4CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,4CAAyB;AACzB,2CAAwB;AACxB,+CAA4B;AAC5B,2CAAwB;AACxB,4CAAyB;AACzB,iDAA8B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pimlico/alto",
|
|
3
|
-
"version": "0.0.0-main.
|
|
3
|
+
"version": "0.0.0-main.20250428T104157",
|
|
4
4
|
"description": "A performant and modular ERC-4337 Bundler written in Typescript",
|
|
5
5
|
"repository": "https://github.com/pimlicolabs/alto.git",
|
|
6
6
|
"author": "Pimlico",
|