FRE-600: Fix code review blockers

- Consolidated duplicate UndoManagers to single instance
- Fixed connection promise to only resolve on 'connected' status
- Fixed WebSocketProvider import (WebsocketProvider)
- Added proper doc.destroy() cleanup
- Renamed isPresenceInitialized property to avoid conflict

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-25 00:08:01 -04:00
parent 65b552bb08
commit 7c684a42cc
48450 changed files with 5679671 additions and 383 deletions

1320
node_modules/ox/_cjs/erc4337/EntryPoint.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/ox/_cjs/erc4337/EntryPoint.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

3
node_modules/ox/_cjs/erc4337/RpcSchema.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=RpcSchema.js.map

1
node_modules/ox/_cjs/erc4337/RpcSchema.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"RpcSchema.js","sourceRoot":"","sources":["../../erc4337/RpcSchema.ts"],"names":[],"mappings":""}

152
node_modules/ox/_cjs/erc4337/UserOperation.js generated vendored Normal file
View File

@@ -0,0 +1,152 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.from = from;
exports.fromRpc = fromRpc;
exports.getSignPayload = getSignPayload;
exports.hash = hash;
exports.toPacked = toPacked;
exports.toRpc = toRpc;
const AbiParameters = require("../core/AbiParameters.js");
const Hash = require("../core/Hash.js");
const Hex = require("../core/Hex.js");
const Signature = require("../core/Signature.js");
function from(userOperation, options = {}) {
const signature = (() => {
if (!options.signature)
return undefined;
if (typeof options.signature === 'string')
return options.signature;
return Signature.toHex(options.signature);
})();
return { ...userOperation, signature };
}
function fromRpc(rpc) {
return {
...rpc,
callGasLimit: BigInt(rpc.callGasLimit),
maxFeePerGas: BigInt(rpc.maxFeePerGas),
maxPriorityFeePerGas: BigInt(rpc.maxPriorityFeePerGas),
nonce: BigInt(rpc.nonce),
preVerificationGas: BigInt(rpc.preVerificationGas),
verificationGasLimit: BigInt(rpc.verificationGasLimit),
...(rpc.paymasterPostOpGasLimit && {
paymasterPostOpGasLimit: BigInt(rpc.paymasterPostOpGasLimit),
}),
...(rpc.paymasterVerificationGasLimit && {
paymasterVerificationGasLimit: BigInt(rpc.paymasterVerificationGasLimit),
}),
};
}
function getSignPayload(userOperation, options) {
return hash(userOperation, options);
}
function hash(userOperation, options) {
const { chainId, entryPointAddress, entryPointVersion } = options;
const { callData, callGasLimit, initCode, factory, factoryData, maxFeePerGas, maxPriorityFeePerGas, nonce, paymaster, paymasterAndData, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit, preVerificationGas, sender, verificationGasLimit, } = userOperation;
const packedUserOp = (() => {
if (entryPointVersion === '0.6') {
return AbiParameters.encode([
{ type: 'address' },
{ type: 'uint256' },
{ type: 'bytes32' },
{ type: 'bytes32' },
{ type: 'uint256' },
{ type: 'uint256' },
{ type: 'uint256' },
{ type: 'uint256' },
{ type: 'uint256' },
{ type: 'bytes32' },
], [
sender,
nonce,
Hash.keccak256(initCode ?? '0x'),
Hash.keccak256(callData),
callGasLimit,
verificationGasLimit,
preVerificationGas,
maxFeePerGas,
maxPriorityFeePerGas,
Hash.keccak256(paymasterAndData ?? '0x'),
]);
}
if (entryPointVersion === '0.7') {
const accountGasLimits = Hex.concat(Hex.padLeft(Hex.fromNumber(verificationGasLimit), 16), Hex.padLeft(Hex.fromNumber(callGasLimit), 16));
const gasFees = Hex.concat(Hex.padLeft(Hex.fromNumber(maxPriorityFeePerGas), 16), Hex.padLeft(Hex.fromNumber(maxFeePerGas), 16));
const initCode_hashed = Hash.keccak256(factory && factoryData ? Hex.concat(factory, factoryData) : '0x');
const paymasterAndData_hashed = Hash.keccak256(paymaster
? Hex.concat(paymaster, Hex.padLeft(Hex.fromNumber(paymasterVerificationGasLimit || 0), 16), Hex.padLeft(Hex.fromNumber(paymasterPostOpGasLimit || 0), 16), paymasterData || '0x')
: '0x');
return AbiParameters.encode([
{ type: 'address' },
{ type: 'uint256' },
{ type: 'bytes32' },
{ type: 'bytes32' },
{ type: 'bytes32' },
{ type: 'uint256' },
{ type: 'bytes32' },
{ type: 'bytes32' },
], [
sender,
nonce,
initCode_hashed,
Hash.keccak256(callData),
accountGasLimits,
preVerificationGas,
gasFees,
paymasterAndData_hashed,
]);
}
throw new Error(`entryPointVersion "${entryPointVersion}" not supported.`);
})();
return Hash.keccak256(AbiParameters.encode([{ type: 'bytes32' }, { type: 'address' }, { type: 'uint256' }], [Hash.keccak256(packedUserOp), entryPointAddress, BigInt(chainId)]));
}
function toPacked(userOperation) {
const { callGasLimit, callData, factory, factoryData, maxPriorityFeePerGas, maxFeePerGas, nonce, paymaster, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit, sender, signature, verificationGasLimit, } = userOperation;
const accountGasLimits = Hex.concat(Hex.padLeft(Hex.fromNumber(verificationGasLimit || 0n), 16), Hex.padLeft(Hex.fromNumber(callGasLimit || 0n), 16));
const initCode = factory && factoryData ? Hex.concat(factory, factoryData) : '0x';
const gasFees = Hex.concat(Hex.padLeft(Hex.fromNumber(maxPriorityFeePerGas || 0n), 16), Hex.padLeft(Hex.fromNumber(maxFeePerGas || 0n), 16));
const paymasterAndData = paymaster
? Hex.concat(paymaster, Hex.padLeft(Hex.fromNumber(paymasterVerificationGasLimit || 0n), 16), Hex.padLeft(Hex.fromNumber(paymasterPostOpGasLimit || 0n), 16), paymasterData || '0x')
: '0x';
const preVerificationGas = userOperation.preVerificationGas ?? 0n;
return {
accountGasLimits,
callData,
initCode,
gasFees,
nonce,
paymasterAndData,
preVerificationGas,
sender,
signature,
};
}
function toRpc(userOperation) {
const rpc = {};
rpc.callData = userOperation.callData;
rpc.callGasLimit = Hex.fromNumber(userOperation.callGasLimit);
rpc.maxFeePerGas = Hex.fromNumber(userOperation.maxFeePerGas);
rpc.maxPriorityFeePerGas = Hex.fromNumber(userOperation.maxPriorityFeePerGas);
rpc.nonce = Hex.fromNumber(userOperation.nonce);
rpc.preVerificationGas = Hex.fromNumber(userOperation.preVerificationGas);
rpc.sender = userOperation.sender;
rpc.verificationGasLimit = Hex.fromNumber(userOperation.verificationGasLimit);
if (userOperation.factory)
rpc.factory = userOperation.factory;
if (userOperation.factoryData)
rpc.factoryData = userOperation.factoryData;
if (userOperation.initCode)
rpc.initCode = userOperation.initCode;
if (userOperation.paymaster)
rpc.paymaster = userOperation.paymaster;
if (userOperation.paymasterData)
rpc.paymasterData = userOperation.paymasterData;
if (typeof userOperation.paymasterPostOpGasLimit === 'bigint')
rpc.paymasterPostOpGasLimit = Hex.fromNumber(userOperation.paymasterPostOpGasLimit);
if (typeof userOperation.paymasterVerificationGasLimit === 'bigint')
rpc.paymasterVerificationGasLimit = Hex.fromNumber(userOperation.paymasterVerificationGasLimit);
if (userOperation.signature)
rpc.signature = userOperation.signature;
return rpc;
}
//# sourceMappingURL=UserOperation.js.map

1
node_modules/ox/_cjs/erc4337/UserOperation.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

31
node_modules/ox/_cjs/erc4337/UserOperationGas.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromRpc = fromRpc;
exports.toRpc = toRpc;
const Hex = require("../core/Hex.js");
function fromRpc(rpc) {
return {
...rpc,
callGasLimit: BigInt(rpc.callGasLimit),
preVerificationGas: BigInt(rpc.preVerificationGas),
verificationGasLimit: BigInt(rpc.verificationGasLimit),
...(rpc.paymasterVerificationGasLimit && {
paymasterVerificationGasLimit: BigInt(rpc.paymasterVerificationGasLimit),
}),
...(rpc.paymasterPostOpGasLimit && {
paymasterPostOpGasLimit: BigInt(rpc.paymasterPostOpGasLimit),
}),
};
}
function toRpc(userOperationGas) {
const rpc = {};
rpc.callGasLimit = Hex.fromNumber(userOperationGas.callGasLimit);
rpc.preVerificationGas = Hex.fromNumber(userOperationGas.preVerificationGas);
rpc.verificationGasLimit = Hex.fromNumber(userOperationGas.verificationGasLimit);
if (typeof userOperationGas.paymasterVerificationGasLimit === 'bigint')
rpc.paymasterVerificationGasLimit = Hex.fromNumber(userOperationGas.paymasterVerificationGasLimit);
if (typeof userOperationGas.paymasterPostOpGasLimit === 'bigint')
rpc.paymasterPostOpGasLimit = Hex.fromNumber(userOperationGas.paymasterPostOpGasLimit);
return rpc;
}
//# sourceMappingURL=UserOperationGas.js.map

1
node_modules/ox/_cjs/erc4337/UserOperationGas.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"UserOperationGas.js","sourceRoot":"","sources":["../../erc4337/UserOperationGas.ts"],"names":[],"mappings":";;AAyDA,0BAaC;AAmBD,sBAmBC;AA5GD,sCAAqC;AAyDrC,SAAgB,OAAO,CAAC,GAAQ;IAC9B,OAAO;QACL,GAAG,GAAG;QACN,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;QACtC,kBAAkB,EAAE,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC;QAClD,oBAAoB,EAAE,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC;QACtD,GAAG,CAAC,GAAG,CAAC,6BAA6B,IAAI;YACvC,6BAA6B,EAAE,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC;SACzE,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,uBAAuB,IAAI;YACjC,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC;SAC7D,CAAC;KACiB,CAAA;AACvB,CAAC;AAmBD,SAAgB,KAAK,CAAC,gBAAkC;IACtD,MAAM,GAAG,GAAG,EAAS,CAAA;IAErB,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAChE,GAAG,CAAC,kBAAkB,GAAG,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;IAC5E,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,UAAU,CACvC,gBAAgB,CAAC,oBAAoB,CACtC,CAAA;IAED,IAAI,OAAO,gBAAgB,CAAC,6BAA6B,KAAK,QAAQ;QACpE,GAAG,CAAC,6BAA6B,GAAG,GAAG,CAAC,UAAU,CAChD,gBAAgB,CAAC,6BAA6B,CAC/C,CAAA;IACH,IAAI,OAAO,gBAAgB,CAAC,uBAAuB,KAAK,QAAQ;QAC9D,GAAG,CAAC,uBAAuB,GAAG,GAAG,CAAC,UAAU,CAC1C,gBAAgB,CAAC,uBAAuB,CACzC,CAAA;IAEH,OAAO,GAAG,CAAA;AACZ,CAAC"}

35
node_modules/ox/_cjs/erc4337/UserOperationReceipt.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromRpc = fromRpc;
exports.toRpc = toRpc;
const Hex = require("../core/Hex.js");
const Log = require("../core/Log.js");
const TransactionReceipt = require("../core/TransactionReceipt.js");
function fromRpc(rpc) {
return {
...rpc,
actualGasCost: BigInt(rpc.actualGasCost),
actualGasUsed: BigInt(rpc.actualGasUsed),
logs: rpc.logs.map((log) => Log.fromRpc(log)),
nonce: BigInt(rpc.nonce),
receipt: TransactionReceipt.fromRpc(rpc.receipt),
};
}
function toRpc(userOperationReceipt) {
const rpc = {};
rpc.actualGasCost = Hex.fromNumber(userOperationReceipt.actualGasCost);
rpc.actualGasUsed = Hex.fromNumber(userOperationReceipt.actualGasUsed);
rpc.entryPoint = userOperationReceipt.entryPoint;
rpc.logs = userOperationReceipt.logs.map((log) => Log.toRpc(log));
rpc.nonce = Hex.fromNumber(userOperationReceipt.nonce);
rpc.receipt = TransactionReceipt.toRpc(userOperationReceipt.receipt);
rpc.sender = userOperationReceipt.sender;
rpc.success = userOperationReceipt.success;
rpc.userOpHash = userOperationReceipt.userOpHash;
if (userOperationReceipt.paymaster)
rpc.paymaster = userOperationReceipt.paymaster;
if (userOperationReceipt.reason)
rpc.reason = userOperationReceipt.reason;
return rpc;
}
//# sourceMappingURL=UserOperationReceipt.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"UserOperationReceipt.js","sourceRoot":"","sources":["../../erc4337/UserOperationReceipt.ts"],"names":[],"mappings":";;AAqFA,0BASC;AA0BD,sBAkBC;AAzID,sCAAqC;AACrC,sCAAqC;AACrC,oEAAmE;AAkFnE,SAAgB,OAAO,CAAC,GAAQ;IAC9B,OAAO;QACL,GAAG,GAAG;QACN,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;QACxC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;QACxC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7C,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;QACxB,OAAO,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;KACzB,CAAA;AAC3B,CAAC;AA0BD,SAAgB,KAAK,CAAC,oBAA0C;IAC9D,MAAM,GAAG,GAAG,EAAS,CAAA;IAErB,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IACtE,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IACtE,GAAG,CAAC,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAA;IAChD,GAAG,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;IACjE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAA;IACtD,GAAG,CAAC,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAA;IACpE,GAAG,CAAC,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAA;IACxC,GAAG,CAAC,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAA;IAC1C,GAAG,CAAC,UAAU,GAAG,oBAAoB,CAAC,UAAU,CAAA;IAEhD,IAAI,oBAAoB,CAAC,SAAS;QAChC,GAAG,CAAC,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAA;IAChD,IAAI,oBAAoB,CAAC,MAAM;QAAE,GAAG,CAAC,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAA;IAEzE,OAAO,GAAG,CAAA;AACZ,CAAC"}

9
node_modules/ox/_cjs/erc4337/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserOperationReceipt = exports.UserOperationGas = exports.UserOperation = exports.RpcSchema = exports.EntryPoint = void 0;
exports.EntryPoint = require("./EntryPoint.js");
exports.RpcSchema = require("./RpcSchema.js");
exports.UserOperation = require("./UserOperation.js");
exports.UserOperationGas = require("./UserOperationGas.js");
exports.UserOperationReceipt = require("./UserOperationReceipt.js");
//# sourceMappingURL=index.js.map

1
node_modules/ox/_cjs/erc4337/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../erc4337/index.ts"],"names":[],"mappings":";;;AASA,gDAA6C;AAO7C,8CAA2C;AAO3C,sDAAmD;AAOnD,4DAAyD;AAOzD,oEAAiE"}