@zerodev/sdk
Advanced tools
Comparing version 4.3.3 to 4.3.4
@@ -73,3 +73,3 @@ "use strict"; | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const rpcClient = typeof params.rpcClient === "string" | ||
@@ -76,0 +76,0 @@ ? (0, create_client_js_1.createZeroDevPublicErc4337Client)({ |
@@ -72,3 +72,5 @@ "use strict"; | ||
204: "https://opbnb.rpc.thirdweb.com/eed98c1f30120c0508f17c1f01d3102b", | ||
42069: "https://rpc.op-testnet.gelato.digital", | ||
1261120: "https://rpc.zkatana.gelato.digital", | ||
}; | ||
//# sourceMappingURL=constants.js.map |
@@ -10,2 +10,3 @@ "use strict"; | ||
const paymaster_js_1 = require("../middleware/paymaster.js"); | ||
const utils_js_1 = require("../utils.js"); | ||
class ZeroDevEthersProvider extends providers_1.JsonRpcProvider { | ||
@@ -57,3 +58,4 @@ constructor(validatorType, params) { | ||
let bundlerProvider = params.bundlerProvider; | ||
const shouldUsePaymaster = params.usePaymaster === undefined || params.usePaymaster; | ||
const shouldUsePaymaster = (params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if (params.opts?.paymasterConfig && | ||
@@ -85,3 +87,3 @@ params.opts?.paymasterConfig.policy === "TOKEN_PAYMASTER" && | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new ZeroDevEthersProvider(validatorType, { | ||
@@ -88,0 +90,0 @@ ...params, |
@@ -10,5 +10,8 @@ "use strict"; | ||
let overrides = await (0, aa_core_1.resolveProperties)({ | ||
maxFeePerGas: struct.maxFeePerGas ?? 0n, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas ?? 0n, | ||
maxFeePerGas: struct.maxFeePerGas, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas, | ||
}); | ||
if (provider.bundlerProvider === "GELATO") { | ||
return { maxFeePerGas: 0n, maxPriorityFeePerGas: 0n }; | ||
} | ||
let maxFeePerGas, maxPriorityFeePerGas; | ||
@@ -28,5 +31,7 @@ try { | ||
} | ||
if (maxFeePerGas < BigInt(overrides.maxFeePerGas) || | ||
maxPriorityFeePerGas < BigInt(overrides.maxPriorityFeePerGas)) { | ||
return overrides; | ||
if (overrides.maxFeePerGas || overrides.maxPriorityFeePerGas) { | ||
return { | ||
maxFeePerGas: overrides.maxFeePerGas ?? maxFeePerGas, | ||
maxPriorityFeePerGas: overrides.maxPriorityFeePerGas ?? maxPriorityFeePerGas, | ||
}; | ||
} | ||
@@ -91,2 +96,3 @@ return { maxFeePerGas, maxPriorityFeePerGas }; | ||
PIMLICO: "pimlico_getUserOperationGasPrice", | ||
GELATO: "eth_maxPriorityFeePerGas", | ||
}; | ||
@@ -93,0 +99,0 @@ const eip1559GasPrice = async (provider) => { |
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
type GetCustodialOwnerParams = Readonly<{ | ||
type GetCustodialOwnerParams = { | ||
apiUrl?: string; | ||
@@ -9,4 +9,4 @@ turnKeyClient?: unknown; | ||
custodialFilePath?: string; | ||
}>; | ||
}; | ||
export declare function getCustodialOwner(identifier: string, { custodialFilePath, privateKey, publicKey, keyId, apiUrl, turnKeyClient, }: GetCustodialOwnerParams): Promise<SmartAccountSigner | undefined>; | ||
export {}; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -32,28 +9,58 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const axios_1 = __importDefault(require("axios")); | ||
const radash_1 = require("radash"); | ||
async function getCustodialOwner(identifier, { custodialFilePath, privateKey, publicKey, keyId, apiUrl = constants_js_1.API_URL, turnKeyClient, }) { | ||
if (custodialFilePath) { | ||
[privateKey, publicKey, keyId] = await loadSignDataFromCustodialFile(custodialFilePath); | ||
let fsModule; | ||
try { | ||
fsModule = require.resolve("fs") && require("fs"); | ||
} | ||
catch (error) { | ||
console.log("FS module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
const values = data.split("\n"); | ||
[privateKey, publicKey, keyId] = values; | ||
} | ||
if (!keyId) { | ||
throw new Error("You must provide custodialFilePath or a keyId."); | ||
if (!privateKey || !publicKey || !keyId) { | ||
throw new Error("Must provide custodialFilePath or privateKey, publicKey, and keyId."); | ||
} | ||
let ensuredTurnkeyClient = turnKeyClient; | ||
if (!ensuredTurnkeyClient && privateKey && publicKey) { | ||
ensuredTurnkeyClient = await getDefaultTurnkeyClient({ | ||
privateKey, | ||
publicKey, | ||
}); | ||
if (!turnKeyClient) { | ||
let TurnkeyClient; | ||
let ApiKeyStamper; | ||
try { | ||
TurnkeyClient = | ||
require.resolve("@turnkey/http") && | ||
require("@turnkey/http").TurnkeyClient; | ||
ApiKeyStamper = | ||
require.resolve("@turnkey/api-key-stamper") && | ||
require("@turnkey/api-key-stamper").ApiKeyStamper; | ||
} | ||
catch (error) { | ||
console.log("@turnkey/http or @turnkey/api-key-stamper module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
turnKeyClient = new TurnkeyClient({ | ||
baseUrl: "https://api.turnkey.com", | ||
}, new ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
})); | ||
} | ||
else { | ||
throw new Error("No turnkey client available, if you don't provide one you should provide private and public key or a custodial file path"); | ||
const response = await axios_1.default.post(`${apiUrl}/wallets/${identifier}`, { | ||
keyId, | ||
}); | ||
let createAccount; | ||
try { | ||
createAccount = | ||
require.resolve("@turnkey/viem") && | ||
require("@turnkey/viem").createAccount; | ||
} | ||
const response = await fetchWallet({ identifier, keyId, apiUrl }); | ||
if (!response?.data?.walletId) { | ||
throw new Error(`No wallet id found for ${identifier}`); | ||
catch (error) { | ||
console.log("@turnkey/viem module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const turnkeySigner = await getTurnkeySigner({ | ||
keyId, | ||
const turnkeySigner = await createAccount({ | ||
client: turnKeyClient, | ||
organizationId: keyId, | ||
privateKeyId: response.data.walletId, | ||
turnkeyClient: ensuredTurnkeyClient, | ||
}); | ||
@@ -74,54 +81,2 @@ return { | ||
exports.getCustodialOwner = getCustodialOwner; | ||
const loadSignDataFromCustodialFile = (0, radash_1.memo)(async (custodialFilePath) => { | ||
const [, fsModule] = await (0, radash_1.tryit)(() => Promise.resolve().then(() => __importStar(require("fs"))))(); | ||
if (!fsModule) { | ||
console.error("FS module not available"); | ||
throw new Error("FS module not available, you must provide each keys or install this module"); | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
return data.split("\n"); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: (custodialFilePath) => `${custodialFilePath}`, | ||
}); | ||
const getDefaultTurnkeyClient = (0, radash_1.memo)(async ({ privateKey, publicKey, }) => { | ||
const [, turnkeyHttp] = await (0, radash_1.tryit)(() => Promise.resolve().then(() => __importStar(require("@turnkey/http"))))(); | ||
const [, turnkeyApiKeyStamper] = await (0, radash_1.tryit)(() => Promise.resolve().then(() => __importStar(require("@turnkey/api-key-stamper"))))(); | ||
if (!turnkeyHttp || !turnkeyApiKeyStamper) { | ||
console.error("@turnkey/http or @turnkey/api-key-stamper module not available."); | ||
throw new Error("Turnkey http or api-key-stamper modules not available, you must provide a turnkey client or install this modules"); | ||
} | ||
return new turnkeyHttp.TurnkeyClient({ | ||
baseUrl: "https://api.turnkey.com", | ||
}, new turnkeyApiKeyStamper.ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
})); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ privateKey, publicKey, }) => `${privateKey}-${publicKey}`, | ||
}); | ||
const fetchWallet = (0, radash_1.memo)(({ identifier, keyId, apiUrl, }) => { | ||
return axios_1.default.post(`${apiUrl}/wallets/${identifier}`, { | ||
keyId, | ||
}); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ identifier, keyId, apiUrl, }) => `${identifier}-${keyId}-${apiUrl}`, | ||
}); | ||
const getTurnkeySigner = (0, radash_1.memo)(async ({ keyId, privateKeyId, turnkeyClient, }) => { | ||
const [, turnkeyViem] = await (0, radash_1.tryit)(() => Promise.resolve().then(() => __importStar(require("@turnkey/viem"))))(); | ||
if (!turnkeyViem) { | ||
console.error("@turnkey/viem module not available"); | ||
throw new Error("Turnkey viem module not available, can't create a turnkey signer for the custodial owner"); | ||
} | ||
return turnkeyViem.createAccount({ | ||
client: turnkeyClient, | ||
organizationId: keyId, | ||
privateKeyId, | ||
}); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ keyId, privateKeyId, }) => `${keyId}-${privateKeyId}`, | ||
}); | ||
//# sourceMappingURL=getCustodialOwner.js.map |
@@ -42,6 +42,6 @@ "use strict"; | ||
body: { | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD", | ||
organizationId: id, | ||
parameters: { | ||
signWith: walletId, | ||
privateKeyId: walletId, | ||
payload: msg, | ||
@@ -48,0 +48,0 @@ encoding: "PAYLOAD_ENCODING_HEXADECIMAL", |
import type { Hex } from "viem"; | ||
import type { Paymaster } from "./base.js"; | ||
import type { ZeroDevProvider } from "../provider.js"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO" | "GELATO"; | ||
export type SupportedGasToken = "USDC" | "PEPE" | "TEST_ERC20"; | ||
@@ -6,0 +6,0 @@ export type PaymasterPolicy = "VERIFYING_PAYMASTER" | "TOKEN_PAYMASTER"; |
@@ -13,2 +13,3 @@ "use strict"; | ||
const create_client_js_1 = require("./client/create-client.js"); | ||
const utils_js_1 = require("./utils.js"); | ||
var Operation; | ||
@@ -21,3 +22,3 @@ (function (Operation) { | ||
constructor({ projectId, chain, entryPointAddress = constants_js_1.ENTRYPOINT_ADDRESS, rpcUrl = constants_js_1.BUNDLER_URL, account, bundlerProvider, opts, }) { | ||
const _chain = typeof chain === "number" ? (0, aa_core_1.getChain)(chain) : chain; | ||
const _chain = typeof chain === "number" ? (0, utils_js_1.getChain)(chain) : chain; | ||
const rpcClient = (0, create_client_js_1.createZeroDevPublicErc4337Client)({ | ||
@@ -244,11 +245,20 @@ chain: _chain, | ||
for (let i = 0; i < this._txMaxRetries; i++) { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: constants_js_1.ENTRYPOINT_ADDRESS, | ||
event: (0, viem_1.getAbiItem)({ abi: aa_core_1.EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
if (this.bundlerProvider === "GELATO") { | ||
const receipt = await this.getUserOperationReceipt(hash) | ||
.catch(() => null); | ||
if (receipt) { | ||
return this.getTransaction(receipt.receipt.transactionHash).then((x) => x.hash); | ||
} | ||
} | ||
else { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: constants_js_1.ENTRYPOINT_ADDRESS, | ||
event: (0, viem_1.getAbiItem)({ abi: aa_core_1.EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
} | ||
} | ||
await new Promise((resolve) => setTimeout(resolve, this._txRetryIntervalMs)); | ||
@@ -255,0 +265,0 @@ } |
import { type Hex, type WalletClient } from "viem"; | ||
import * as chains from "viem/chains"; | ||
import type { SmartAccountSigner, UserOperationCallData } from "@alchemy/aa-core"; | ||
@@ -19,1 +20,2 @@ import { Signer } from "@ethersproject/abstract-signer"; | ||
export declare const fixSignedData: (sig: Hex) => Hex; | ||
export declare const getChain: (chainId: number) => chains.Chain; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fixSignedData = exports.randomHexString = exports.convertEthersSignerToAccountSigner = exports.isWallet = exports.convertWalletClientToAccountSigner = exports.getGasTokenAddress = exports.bytesToBase64 = exports.base64ToBytes = exports.encodeMultiSend = void 0; | ||
exports.getChain = exports.fixSignedData = exports.randomHexString = exports.convertEthersSignerToAccountSigner = exports.isWallet = exports.convertWalletClientToAccountSigner = exports.getGasTokenAddress = exports.bytesToBase64 = exports.base64ToBytes = exports.encodeMultiSend = void 0; | ||
const viem_1 = require("viem"); | ||
const chains = __importStar(require("viem/chains")); | ||
const customChains = __importStar(require("./utils/custom-chains.js")); | ||
const constants_js_1 = require("./constants.js"); | ||
@@ -85,2 +110,11 @@ const encodeCall = (_tx) => { | ||
exports.fixSignedData = fixSignedData; | ||
const getChain = (chainId) => { | ||
for (const chain of Object.values(chains).concat(Object.values(customChains))) { | ||
if (chain.id === chainId) { | ||
return chain; | ||
} | ||
} | ||
throw new Error("could not find chain"); | ||
}; | ||
exports.getChain = getChain; | ||
//# sourceMappingURL=utils.js.map |
@@ -11,3 +11,4 @@ "use strict"; | ||
let bundlerProvider = params.bundlerProvider; | ||
const shouldUsePaymaster = params.usePaymaster === undefined || params.usePaymaster; | ||
const shouldUsePaymaster = (params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if (params.opts?.paymasterConfig && | ||
@@ -14,0 +15,0 @@ params.opts?.paymasterConfig.policy === "TOKEN_PAYMASTER" && |
@@ -6,9 +6,9 @@ "use strict"; | ||
const ecdsa_validator_js_1 = require("../validator/ecdsa-validator.js"); | ||
const aa_core_1 = require("@alchemy/aa-core"); | ||
const index_js_1 = require("../api/index.js"); | ||
const chains_1 = require("viem/chains"); | ||
const utils_js_1 = require("../utils.js"); | ||
class ECDSAProvider extends base_js_1.ValidatorProvider { | ||
constructor(params) { | ||
const chain = typeof params.opts?.providerConfig?.chain === "number" | ||
? (0, aa_core_1.getChain)(params.opts.providerConfig.chain) | ||
? (0, utils_js_1.getChain)(params.opts.providerConfig.chain) | ||
: params.opts?.providerConfig?.chain ?? chains_1.polygonMumbai; | ||
@@ -46,3 +46,3 @@ const validator = new ecdsa_validator_js_1.ECDSAValidator({ | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new ECDSAProvider({ | ||
@@ -49,0 +49,0 @@ ...params, |
@@ -6,10 +6,10 @@ "use strict"; | ||
const erc165_session_key_validator_js_1 = require("../validator/erc165-session-key-validator.js"); | ||
const aa_core_1 = require("@alchemy/aa-core"); | ||
const index_js_1 = require("../api/index.js"); | ||
const chains_1 = require("viem/chains"); | ||
const constants_js_1 = require("../constants.js"); | ||
const utils_js_1 = require("../utils.js"); | ||
class ERC165SessionKeyProvider extends base_js_1.ValidatorProvider { | ||
constructor(params) { | ||
const chain = typeof params.opts?.providerConfig?.chain === "number" | ||
? (0, aa_core_1.getChain)(params.opts.providerConfig.chain) | ||
? (0, utils_js_1.getChain)(params.opts.providerConfig.chain) | ||
: params.opts?.providerConfig?.chain ?? chains_1.polygonMumbai; | ||
@@ -50,3 +50,3 @@ const validator = new erc165_session_key_validator_js_1.ERC165SessionKeyValidator({ | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new ERC165SessionKeyProvider({ | ||
@@ -53,0 +53,0 @@ ...params, |
@@ -6,10 +6,10 @@ "use strict"; | ||
const kill_switch_validator_js_1 = require("../validator/kill-switch-validator.js"); | ||
const aa_core_1 = require("@alchemy/aa-core"); | ||
const index_js_1 = require("../api/index.js"); | ||
const chains_1 = require("viem/chains"); | ||
const constants_js_1 = require("../constants.js"); | ||
const utils_js_1 = require("../utils.js"); | ||
class KillSwitchProvider extends base_js_1.ValidatorProvider { | ||
constructor(params) { | ||
const chain = typeof params.opts?.providerConfig?.chain === "number" | ||
? (0, aa_core_1.getChain)(params.opts.providerConfig.chain) | ||
? (0, utils_js_1.getChain)(params.opts.providerConfig.chain) | ||
: params.opts?.providerConfig?.chain ?? chains_1.polygonMumbai; | ||
@@ -50,3 +50,3 @@ const validator = new kill_switch_validator_js_1.KillSwitchValidator({ | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new KillSwitchProvider({ | ||
@@ -53,0 +53,0 @@ ...params, |
@@ -6,3 +6,2 @@ "use strict"; | ||
const recovery_validator_js_1 = require("../validator/recovery-validator.js"); | ||
const aa_core_1 = require("@alchemy/aa-core"); | ||
const index_js_1 = require("../api/index.js"); | ||
@@ -18,3 +17,3 @@ const chains_1 = require("viem/chains"); | ||
const chain = typeof params.opts?.providerConfig?.chain === "number" | ||
? (0, aa_core_1.getChain)(params.opts.providerConfig.chain) | ||
? (0, utils_js_1.getChain)(params.opts.providerConfig.chain) | ||
: params.opts?.providerConfig?.chain ?? chains_1.polygonMumbai; | ||
@@ -62,3 +61,3 @@ const validator = new recovery_validator_js_1.RecoveryValidator({ | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
let accountAddress, enableData, signatures, serializedRecoveryConfig, recoveryConfig; | ||
@@ -65,0 +64,0 @@ if (params.recoveryId) { |
@@ -14,3 +14,3 @@ "use strict"; | ||
const chain = typeof params.opts?.providerConfig?.chain === "number" | ||
? (0, aa_core_1.getChain)(params.opts.providerConfig.chain) | ||
? (0, utils_js_1.getChain)(params.opts.providerConfig.chain) | ||
: params.opts?.providerConfig?.chain ?? chains_1.polygonMumbai; | ||
@@ -51,3 +51,3 @@ const validator = new session_key_validator_js_1.SessionKeyValidator({ | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new SessionKeyProvider({ | ||
@@ -54,0 +54,0 @@ ...params, |
@@ -28,3 +28,3 @@ "use strict"; | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new ECDSAValidator({ ...params, chain }); | ||
@@ -31,0 +31,0 @@ return instance; |
@@ -36,3 +36,3 @@ "use strict"; | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new ERC165SessionKeyValidator({ ...params, chain }); | ||
@@ -39,0 +39,0 @@ return instance; |
@@ -36,3 +36,3 @@ "use strict"; | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new KillSwitchValidator({ ...params, chain }); | ||
@@ -39,0 +39,0 @@ return instance; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RecoveryValidator = exports.recoverySelector = exports.isEthereumProvider = exports.isLocalAccount = void 0; | ||
const aa_core_1 = require("@alchemy/aa-core"); | ||
const base_js_1 = require("./base.js"); | ||
@@ -111,3 +110,3 @@ const viem_1 = require("viem"); | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new RecoveryValidator({ ...params, chain }); | ||
@@ -114,0 +113,0 @@ return instance; |
@@ -141,3 +141,3 @@ "use strict"; | ||
} | ||
const chain = (0, aa_core_1.getChain)(chainId); | ||
const chain = (0, utils_js_1.getChain)(chainId); | ||
const instance = new SessionKeyValidator({ ...params, chain }); | ||
@@ -144,0 +144,0 @@ return instance; |
@@ -5,5 +5,5 @@ import { concatHex, encodeFunctionData, hashMessage, toBytes, } from "viem"; | ||
import { KernelFactoryAbi } from "./abis/KernelFactoryAbi.js"; | ||
import { BaseSmartContractAccount, defineReadOnly, getChain, wrapWith6492, } from "@alchemy/aa-core"; | ||
import { BaseSmartContractAccount, defineReadOnly, wrapWith6492, } from "@alchemy/aa-core"; | ||
import { BUNDLER_URL, ENTRYPOINT_ADDRESS, KERNEL_FACTORY_ADDRESS, KERNEL_IMPL_ADDRESS, MULTISEND_ADDR, } from "./constants.js"; | ||
import { encodeMultiSend } from "./utils.js"; | ||
import { encodeMultiSend, getChain } from "./utils.js"; | ||
import { MultiSendAbi } from "./abis/MultiSendAbi.js"; | ||
@@ -10,0 +10,0 @@ import { polygonMumbai } from "viem/chains"; |
@@ -69,3 +69,5 @@ import { parseUnits } from "viem"; | ||
204: "https://opbnb.rpc.thirdweb.com/eed98c1f30120c0508f17c1f01d3102b", | ||
42069: "https://rpc.op-testnet.gelato.digital", | ||
1261120: "https://rpc.zkatana.gelato.digital", | ||
}; | ||
//# sourceMappingURL=constants.js.map |
import { getChainId } from "../api/index.js"; | ||
import { getChain, BaseSmartContractAccount, defineReadOnly, } from "@alchemy/aa-core"; | ||
import { BaseSmartContractAccount, defineReadOnly, } from "@alchemy/aa-core"; | ||
import { ZeroDevAccountSigner } from "./account-signer.js"; | ||
@@ -7,2 +7,3 @@ import { JsonRpcProvider } from "@ethersproject/providers"; | ||
import { withZeroDevPaymasterAndData } from "../middleware/paymaster.js"; | ||
import { getChain } from "../utils.js"; | ||
export class ZeroDevEthersProvider extends JsonRpcProvider { | ||
@@ -54,3 +55,4 @@ constructor(validatorType, params) { | ||
let bundlerProvider = params.bundlerProvider; | ||
const shouldUsePaymaster = params.usePaymaster === undefined || params.usePaymaster; | ||
const shouldUsePaymaster = (params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if (params.opts?.paymasterConfig && | ||
@@ -57,0 +59,0 @@ params.opts?.paymasterConfig.policy === "TOKEN_PAYMASTER" && |
@@ -8,5 +8,8 @@ import { deepHexlify, resolveProperties, } from "@alchemy/aa-core"; | ||
let overrides = await resolveProperties({ | ||
maxFeePerGas: struct.maxFeePerGas ?? 0n, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas ?? 0n, | ||
maxFeePerGas: struct.maxFeePerGas, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas, | ||
}); | ||
if (provider.bundlerProvider === "GELATO") { | ||
return { maxFeePerGas: 0n, maxPriorityFeePerGas: 0n }; | ||
} | ||
let maxFeePerGas, maxPriorityFeePerGas; | ||
@@ -26,5 +29,7 @@ try { | ||
} | ||
if (maxFeePerGas < BigInt(overrides.maxFeePerGas) || | ||
maxPriorityFeePerGas < BigInt(overrides.maxPriorityFeePerGas)) { | ||
return overrides; | ||
if (overrides.maxFeePerGas || overrides.maxPriorityFeePerGas) { | ||
return { | ||
maxFeePerGas: overrides.maxFeePerGas ?? maxFeePerGas, | ||
maxPriorityFeePerGas: overrides.maxPriorityFeePerGas ?? maxPriorityFeePerGas, | ||
}; | ||
} | ||
@@ -86,2 +91,3 @@ return { maxFeePerGas, maxPriorityFeePerGas }; | ||
PIMLICO: "pimlico_getUserOperationGasPrice", | ||
GELATO: "eth_maxPriorityFeePerGas", | ||
}; | ||
@@ -88,0 +94,0 @@ export const eip1559GasPrice = async (provider) => { |
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
type GetCustodialOwnerParams = Readonly<{ | ||
type GetCustodialOwnerParams = { | ||
apiUrl?: string; | ||
@@ -9,4 +9,4 @@ turnKeyClient?: unknown; | ||
custodialFilePath?: string; | ||
}>; | ||
}; | ||
export declare function getCustodialOwner(identifier: string, { custodialFilePath, privateKey, publicKey, keyId, apiUrl, turnKeyClient, }: GetCustodialOwnerParams): Promise<SmartAccountSigner | undefined>; | ||
export {}; |
import { API_URL } from "../constants.js"; | ||
import axios from "axios"; | ||
import { memo, tryit } from "radash"; | ||
export async function getCustodialOwner(identifier, { custodialFilePath, privateKey, publicKey, keyId, apiUrl = API_URL, turnKeyClient, }) { | ||
if (custodialFilePath) { | ||
[privateKey, publicKey, keyId] = await loadSignDataFromCustodialFile(custodialFilePath); | ||
let fsModule; | ||
try { | ||
fsModule = require.resolve("fs") && require("fs"); | ||
} | ||
catch (error) { | ||
console.log("FS module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
const values = data.split("\n"); | ||
[privateKey, publicKey, keyId] = values; | ||
} | ||
if (!keyId) { | ||
throw new Error("You must provide custodialFilePath or a keyId."); | ||
if (!privateKey || !publicKey || !keyId) { | ||
throw new Error("Must provide custodialFilePath or privateKey, publicKey, and keyId."); | ||
} | ||
let ensuredTurnkeyClient = turnKeyClient; | ||
if (!ensuredTurnkeyClient && privateKey && publicKey) { | ||
ensuredTurnkeyClient = await getDefaultTurnkeyClient({ | ||
privateKey, | ||
publicKey, | ||
}); | ||
if (!turnKeyClient) { | ||
let TurnkeyClient; | ||
let ApiKeyStamper; | ||
try { | ||
TurnkeyClient = | ||
require.resolve("@turnkey/http") && | ||
require("@turnkey/http").TurnkeyClient; | ||
ApiKeyStamper = | ||
require.resolve("@turnkey/api-key-stamper") && | ||
require("@turnkey/api-key-stamper").ApiKeyStamper; | ||
} | ||
catch (error) { | ||
console.log("@turnkey/http or @turnkey/api-key-stamper module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
turnKeyClient = new TurnkeyClient({ | ||
baseUrl: "https://api.turnkey.com", | ||
}, new ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
})); | ||
} | ||
else { | ||
throw new Error("No turnkey client available, if you don't provide one you should provide private and public key or a custodial file path"); | ||
const response = await axios.post(`${apiUrl}/wallets/${identifier}`, { | ||
keyId, | ||
}); | ||
let createAccount; | ||
try { | ||
createAccount = | ||
require.resolve("@turnkey/viem") && | ||
require("@turnkey/viem").createAccount; | ||
} | ||
const response = await fetchWallet({ identifier, keyId, apiUrl }); | ||
if (!response?.data?.walletId) { | ||
throw new Error(`No wallet id found for ${identifier}`); | ||
catch (error) { | ||
console.log("@turnkey/viem module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const turnkeySigner = await getTurnkeySigner({ | ||
keyId, | ||
const turnkeySigner = await createAccount({ | ||
client: turnKeyClient, | ||
organizationId: keyId, | ||
privateKeyId: response.data.walletId, | ||
turnkeyClient: ensuredTurnkeyClient, | ||
}); | ||
@@ -43,54 +73,2 @@ return { | ||
} | ||
const loadSignDataFromCustodialFile = memo(async (custodialFilePath) => { | ||
const [, fsModule] = await tryit(() => import("fs"))(); | ||
if (!fsModule) { | ||
console.error("FS module not available"); | ||
throw new Error("FS module not available, you must provide each keys or install this module"); | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
return data.split("\n"); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: (custodialFilePath) => `${custodialFilePath}`, | ||
}); | ||
const getDefaultTurnkeyClient = memo(async ({ privateKey, publicKey, }) => { | ||
const [, turnkeyHttp] = await tryit(() => import("@turnkey/http"))(); | ||
const [, turnkeyApiKeyStamper] = await tryit(() => import("@turnkey/api-key-stamper"))(); | ||
if (!turnkeyHttp || !turnkeyApiKeyStamper) { | ||
console.error("@turnkey/http or @turnkey/api-key-stamper module not available."); | ||
throw new Error("Turnkey http or api-key-stamper modules not available, you must provide a turnkey client or install this modules"); | ||
} | ||
return new turnkeyHttp.TurnkeyClient({ | ||
baseUrl: "https://api.turnkey.com", | ||
}, new turnkeyApiKeyStamper.ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
})); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ privateKey, publicKey, }) => `${privateKey}-${publicKey}`, | ||
}); | ||
const fetchWallet = memo(({ identifier, keyId, apiUrl, }) => { | ||
return axios.post(`${apiUrl}/wallets/${identifier}`, { | ||
keyId, | ||
}); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ identifier, keyId, apiUrl, }) => `${identifier}-${keyId}-${apiUrl}`, | ||
}); | ||
const getTurnkeySigner = memo(async ({ keyId, privateKeyId, turnkeyClient, }) => { | ||
const [, turnkeyViem] = await tryit(() => import("@turnkey/viem"))(); | ||
if (!turnkeyViem) { | ||
console.error("@turnkey/viem module not available"); | ||
throw new Error("Turnkey viem module not available, can't create a turnkey signer for the custodial owner"); | ||
} | ||
return turnkeyViem.createAccount({ | ||
client: turnkeyClient, | ||
organizationId: keyId, | ||
privateKeyId, | ||
}); | ||
}, { | ||
ttl: 1000 * 60, | ||
key: ({ keyId, privateKeyId, }) => `${keyId}-${privateKeyId}`, | ||
}); | ||
//# sourceMappingURL=getCustodialOwner.js.map |
@@ -33,6 +33,6 @@ import { browserInit, TurnkeyApi } from "@turnkey/http"; | ||
body: { | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD", | ||
organizationId: id, | ||
parameters: { | ||
signWith: walletId, | ||
privateKeyId: walletId, | ||
payload: msg, | ||
@@ -39,0 +39,0 @@ encoding: "PAYLOAD_ENCODING_HEXADECIMAL", |
import type { Hex } from "viem"; | ||
import type { Paymaster } from "./base.js"; | ||
import type { ZeroDevProvider } from "../provider.js"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO" | "GELATO"; | ||
export type SupportedGasToken = "USDC" | "PEPE" | "TEST_ERC20"; | ||
@@ -6,0 +6,0 @@ export type PaymasterPolicy = "VERIFYING_PAYMASTER" | "TOKEN_PAYMASTER"; |
import { fromHex, getAbiItem, } from "viem"; | ||
import { deepHexlify, resolveProperties, getChain, asyncPipe, noOpMiddleware, SmartAccountProvider, EntryPointAbi, } from "@alchemy/aa-core"; | ||
import { deepHexlify, resolveProperties, asyncPipe, noOpMiddleware, SmartAccountProvider, EntryPointAbi, } from "@alchemy/aa-core"; | ||
import { BUNDLER_URL, DEFAULT_SEND_TX_MAX_RETRIES, DEFAULT_SEND_TX_RETRY_INTERVAL_MS, ENTRYPOINT_ADDRESS, minPriorityFeePerBidDefaults, } from "./constants.js"; | ||
@@ -10,2 +10,3 @@ import { KernelSmartContractAccount, isKernelAccount } from "./account.js"; | ||
import { createZeroDevPublicErc4337Client } from "./client/create-client.js"; | ||
import { getChain } from "./utils.js"; | ||
export var Operation; | ||
@@ -240,11 +241,20 @@ (function (Operation) { | ||
for (let i = 0; i < this._txMaxRetries; i++) { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: ENTRYPOINT_ADDRESS, | ||
event: getAbiItem({ abi: EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
if (this.bundlerProvider === "GELATO") { | ||
const receipt = await this.getUserOperationReceipt(hash) | ||
.catch(() => null); | ||
if (receipt) { | ||
return this.getTransaction(receipt.receipt.transactionHash).then((x) => x.hash); | ||
} | ||
} | ||
else { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: ENTRYPOINT_ADDRESS, | ||
event: getAbiItem({ abi: EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
} | ||
} | ||
await new Promise((resolve) => setTimeout(resolve, this._txRetryIntervalMs)); | ||
@@ -251,0 +261,0 @@ } |
import { type Hex, type WalletClient } from "viem"; | ||
import * as chains from "viem/chains"; | ||
import type { SmartAccountSigner, UserOperationCallData } from "@alchemy/aa-core"; | ||
@@ -19,1 +20,2 @@ import { Signer } from "@ethersproject/abstract-signer"; | ||
export declare const fixSignedData: (sig: Hex) => Hex; | ||
export declare const getChain: (chainId: number) => chains.Chain; |
import { encodePacked, fromBytes, toBytes, toHex, isHex, hexToSignature, signatureToHex, } from "viem"; | ||
import * as chains from "viem/chains"; | ||
import * as customChains from "./utils/custom-chains.js"; | ||
import { Signer } from "@ethersproject/abstract-signer"; | ||
@@ -75,2 +77,10 @@ import { Wallet } from "@ethersproject/wallet"; | ||
}; | ||
export const getChain = (chainId) => { | ||
for (const chain of Object.values(chains).concat(Object.values(customChains))) { | ||
if (chain.id === chainId) { | ||
return chain; | ||
} | ||
} | ||
throw new Error("could not find chain"); | ||
}; | ||
//# sourceMappingURL=utils.js.map |
@@ -9,3 +9,4 @@ import {} from "@alchemy/aa-core"; | ||
let bundlerProvider = params.bundlerProvider; | ||
const shouldUsePaymaster = params.usePaymaster === undefined || params.usePaymaster; | ||
const shouldUsePaymaster = (params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if (params.opts?.paymasterConfig && | ||
@@ -12,0 +13,0 @@ params.opts?.paymasterConfig.policy === "TOKEN_PAYMASTER" && |
import { ValidatorProvider, } from "./base.js"; | ||
import { ECDSAValidator, } from "../validator/ecdsa-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { getChain } from "../utils.js"; | ||
export class ECDSAProvider extends ValidatorProvider { | ||
@@ -7,0 +7,0 @@ constructor(params) { |
import { ValidatorProvider, } from "./base.js"; | ||
import { ERC165SessionKeyValidator, } from "../validator/erc165-session-key-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { ERC165_SESSION_KEY_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { getChain } from "../utils.js"; | ||
export class ERC165SessionKeyProvider extends ValidatorProvider { | ||
@@ -8,0 +8,0 @@ constructor(params) { |
import { ValidatorProvider, } from "./base.js"; | ||
import { KillSwitchValidator, } from "../validator/kill-switch-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { KILL_SWITCH_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { getChain } from "../utils.js"; | ||
export class KillSwitchProvider extends ValidatorProvider { | ||
@@ -8,0 +8,0 @@ constructor(params) { |
import { ValidatorProvider, } from "./base.js"; | ||
import { RecoveryValidator, } from "../validator/recovery-validator.js"; | ||
import { getChain, } from "@alchemy/aa-core"; | ||
import {} from "@alchemy/aa-core"; | ||
import { getChainId, getRecoveryData, postRecoveryData, setSignatures, } from "../api/index.js"; | ||
@@ -10,3 +10,3 @@ import { polygonMumbai } from "viem/chains"; | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { base64ToBytes, bytesToBase64 } from "../utils.js"; | ||
import { base64ToBytes, bytesToBase64, getChain } from "../utils.js"; | ||
export class RecoveryProvider extends ValidatorProvider { | ||
@@ -13,0 +13,0 @@ constructor(params) { |
import { ValidatorProvider, } from "./base.js"; | ||
import { SessionKeyValidator, } from "../validator/session-key-validator.js"; | ||
import { getChain, LocalAccountSigner, } from "@alchemy/aa-core"; | ||
import { LocalAccountSigner, } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { SESSION_KEY_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { base64ToBytes, bytesToBase64 } from "../utils.js"; | ||
import { base64ToBytes, bytesToBase64, getChain } from "../utils.js"; | ||
export class SessionKeyProvider extends ValidatorProvider { | ||
@@ -9,0 +9,0 @@ constructor(params) { |
@@ -1,2 +0,2 @@ | ||
import { getChain, getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { KernelBaseValidator } from "./base.js"; | ||
@@ -8,3 +8,3 @@ import { encodeFunctionData, toBytes } from "viem"; | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
export class ECDSAValidator extends KernelBaseValidator { | ||
@@ -11,0 +11,0 @@ constructor(params) { |
@@ -1,2 +0,2 @@ | ||
import { getUserOperationHash, getChain, } from "@alchemy/aa-core"; | ||
import { getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { KernelBaseValidator, ValidatorMode, } from "./base.js"; | ||
@@ -8,3 +8,3 @@ import { encodeFunctionData, toBytes, concat, pad, toHex } from "viem"; | ||
import { getChainId } from "../api/index.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
export class ERC165SessionKeyValidator extends KernelBaseValidator { | ||
@@ -11,0 +11,0 @@ constructor(params) { |
@@ -1,2 +0,2 @@ | ||
import { getChain, getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { KernelBaseValidator, ValidatorMode, } from "./base.js"; | ||
@@ -8,3 +8,3 @@ import { concat, concatHex, encodeFunctionData, getContract, keccak256, pad, toBytes, toHex, } from "viem"; | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
export class KillSwitchValidator extends KernelBaseValidator { | ||
@@ -11,0 +11,0 @@ constructor(params) { |
@@ -1,2 +0,2 @@ | ||
import { getChain, } from "@alchemy/aa-core"; | ||
import {} from "@alchemy/aa-core"; | ||
import { KernelBaseValidator, ValidatorMode, } from "./base.js"; | ||
@@ -8,3 +8,3 @@ import { concatHex, encodeAbiParameters, encodeFunctionData, getContract, parseAbiParameters, createWalletClient, http, custom, publicActions, getFunctionSelector, } from "viem"; | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
@@ -11,0 +11,0 @@ import { RecoveryActionAbi } from "../abis/RecoveryActionAbi.js"; |
@@ -1,2 +0,2 @@ | ||
import { getUserOperationHash, getChain, } from "@alchemy/aa-core"; | ||
import { getUserOperationHash, } from "@alchemy/aa-core"; | ||
import { KernelBaseValidator, ValidatorMode, } from "./base.js"; | ||
@@ -10,3 +10,3 @@ import { encodeFunctionData, toBytes, concat, pad, toHex, encodeAbiParameters, concatHex, zeroAddress, decodeFunctionData, isHex, getFunctionSelector, keccak256, } from "viem"; | ||
import { getChainId } from "../api/index.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
import {} from "abitype"; | ||
@@ -13,0 +13,0 @@ BigInt.prototype.toJSON = function () { |
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
type GetCustodialOwnerParams = Readonly<{ | ||
type GetCustodialOwnerParams = { | ||
apiUrl?: string; | ||
@@ -9,5 +9,5 @@ turnKeyClient?: unknown; | ||
custodialFilePath?: string; | ||
}>; | ||
}; | ||
export declare function getCustodialOwner(identifier: string, { custodialFilePath, privateKey, publicKey, keyId, apiUrl, turnKeyClient, }: GetCustodialOwnerParams): Promise<SmartAccountSigner | undefined>; | ||
export {}; | ||
//# sourceMappingURL=getCustodialOwner.d.ts.map |
import type { Hex } from "viem"; | ||
import type { Paymaster } from "./base.js"; | ||
import type { ZeroDevProvider } from "../provider.js"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO" | "GELATO"; | ||
export type SupportedGasToken = "USDC" | "PEPE" | "TEST_ERC20"; | ||
@@ -6,0 +6,0 @@ export type PaymasterPolicy = "VERIFYING_PAYMASTER" | "TOKEN_PAYMASTER"; |
import { type Hex, type WalletClient } from "viem"; | ||
import * as chains from "viem/chains"; | ||
import type { SmartAccountSigner, UserOperationCallData } from "@alchemy/aa-core"; | ||
@@ -19,2 +20,3 @@ import { Signer } from "@ethersproject/abstract-signer"; | ||
export declare const fixSignedData: (sig: Hex) => Hex; | ||
export declare const getChain: (chainId: number) => chains.Chain; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@zerodev/sdk", | ||
"version": "4.3.3", | ||
"version": "4.3.4", | ||
"description": "A collection of ERC-4337 compliant smart contract account interfaces", | ||
@@ -48,3 +48,3 @@ "author": "ZeroDev", | ||
"@turnkey/api-key-stamper": "^0.1.1", | ||
"@turnkey/http": "^2.1.0", | ||
"@turnkey/http": "^1.2.0", | ||
"@turnkey/viem": "^0.2.4", | ||
@@ -74,5 +74,4 @@ "typescript": "^5.0.4", | ||
"merkletreejs": "^0.3.10", | ||
"radash": "^11.0.0", | ||
"viem": "^1.5.3" | ||
} | ||
} |
@@ -20,3 +20,2 @@ import type { Address } from "abitype"; | ||
defineReadOnly, | ||
getChain, | ||
type SignTypedDataParams, | ||
@@ -32,3 +31,3 @@ wrapWith6492, | ||
} from "./constants.js"; | ||
import { encodeMultiSend } from "./utils.js"; | ||
import { encodeMultiSend, getChain } from "./utils.js"; | ||
import { MultiSendAbi } from "./abis/MultiSendAbi.js"; | ||
@@ -35,0 +34,0 @@ import { polygonMumbai } from "viem/chains"; |
@@ -106,3 +106,5 @@ import { parseUnits, type Hex } from "viem"; | ||
204: "https://opbnb.rpc.thirdweb.com/eed98c1f30120c0508f17c1f01d3102b", | ||
42069: "https://rpc.op-testnet.gelato.digital", | ||
1261120: "https://rpc.zkatana.gelato.digital", | ||
// 5611: 'opBnb-testnet', | ||
}; |
import { getChainId } from "../api/index.js"; | ||
import { | ||
getChain, | ||
BaseSmartContractAccount, | ||
@@ -21,2 +20,3 @@ defineReadOnly, | ||
import { withZeroDevPaymasterAndData } from "../middleware/paymaster.js"; | ||
import { getChain } from "../utils.js"; | ||
@@ -31,3 +31,4 @@ export class ZeroDevEthersProvider< | ||
const shouldUsePaymaster = | ||
params.usePaymaster === undefined || params.usePaymaster; | ||
(params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if ( | ||
@@ -34,0 +35,0 @@ params.opts?.paymasterConfig && |
@@ -19,6 +19,10 @@ import type { ZeroDevProvider } from "../provider.js"; | ||
let overrides = await resolveProperties({ | ||
maxFeePerGas: struct.maxFeePerGas ?? 0n, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas ?? 0n, | ||
maxFeePerGas: struct.maxFeePerGas, | ||
maxPriorityFeePerGas: struct.maxPriorityFeePerGas, | ||
}); | ||
if (provider.bundlerProvider === "GELATO") { | ||
return { maxFeePerGas: 0n, maxPriorityFeePerGas: 0n }; | ||
} | ||
let maxFeePerGas, maxPriorityFeePerGas; | ||
@@ -44,7 +48,8 @@ | ||
if ( | ||
maxFeePerGas < BigInt(overrides.maxFeePerGas) || | ||
maxPriorityFeePerGas < BigInt(overrides.maxPriorityFeePerGas) | ||
) { | ||
return overrides; | ||
if (overrides.maxFeePerGas || overrides.maxPriorityFeePerGas) { | ||
return { | ||
maxFeePerGas: overrides.maxFeePerGas ?? maxFeePerGas, | ||
maxPriorityFeePerGas: | ||
overrides.maxPriorityFeePerGas ?? maxPriorityFeePerGas, | ||
}; | ||
} | ||
@@ -133,2 +138,3 @@ return { maxFeePerGas, maxPriorityFeePerGas }; | ||
PIMLICO: "pimlico_getUserOperationGasPrice", | ||
GELATO: "eth_maxPriorityFeePerGas", | ||
}; | ||
@@ -135,0 +141,0 @@ |
import type { SignTypedDataParams, SmartAccountSigner } from "@alchemy/aa-core"; | ||
import { API_URL } from "../constants.js"; | ||
import axios from "axios"; | ||
import { memo, tryit } from "radash"; | ||
@@ -10,3 +9,3 @@ /** | ||
*/ | ||
type GetCustodialOwnerParams = Readonly<{ | ||
type GetCustodialOwnerParams = { | ||
// ZeroDev api url | ||
@@ -24,3 +23,3 @@ apiUrl?: string; | ||
custodialFilePath?: string; | ||
}>; | ||
}; | ||
@@ -43,22 +42,51 @@ /** | ||
if (custodialFilePath) { | ||
[privateKey, publicKey, keyId] = await loadSignDataFromCustodialFile( | ||
custodialFilePath | ||
); | ||
let fsModule; | ||
try { | ||
fsModule = require.resolve("fs") && require("fs"); | ||
} catch (error) { | ||
console.log("FS module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
const values = data.split("\n"); | ||
// Override the values, if they are provided, to the one from the custodial file | ||
[privateKey, publicKey, keyId] = values; | ||
} | ||
// Ensure we have the required values | ||
if (!keyId) { | ||
throw new Error("You must provide custodialFilePath or a keyId."); | ||
if (!privateKey || !publicKey || !keyId) { | ||
throw new Error( | ||
"Must provide custodialFilePath or privateKey, publicKey, and keyId." | ||
); | ||
} | ||
// Get our turnkey client (build it if needed) | ||
let ensuredTurnkeyClient = turnKeyClient; | ||
if (!ensuredTurnkeyClient && privateKey && publicKey) { | ||
ensuredTurnkeyClient = await getDefaultTurnkeyClient({ | ||
privateKey, | ||
publicKey, | ||
}); | ||
} else { | ||
throw new Error( | ||
"No turnkey client available, if you don't provide one you should provide private and public key or a custodial file path" | ||
if (!turnKeyClient) { | ||
// Try to fetch turnkey client & api key stamper | ||
let TurnkeyClient; | ||
let ApiKeyStamper; | ||
// TODO: Would be cleaner with something like radash and a tryit function? | ||
try { | ||
TurnkeyClient = | ||
require.resolve("@turnkey/http") && | ||
require("@turnkey/http").TurnkeyClient; | ||
ApiKeyStamper = | ||
require.resolve("@turnkey/api-key-stamper") && | ||
require("@turnkey/api-key-stamper").ApiKeyStamper; | ||
} catch (error) { | ||
console.log( | ||
"@turnkey/http or @turnkey/api-key-stamper module not available. Skipping FS operation..." | ||
); | ||
return; | ||
} | ||
// Build the turnkey client | ||
turnKeyClient = new TurnkeyClient( | ||
{ | ||
baseUrl: "https://api.turnkey.com", | ||
}, | ||
new ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
}) | ||
); | ||
@@ -68,12 +96,23 @@ } | ||
// Get the wallet identifier from the API | ||
const response = await fetchWallet({ identifier, keyId, apiUrl }); | ||
if (!response?.data?.walletId) { | ||
throw new Error(`No wallet id found for ${identifier}`); | ||
} | ||
const response = await axios.post<any, { data: { walletId: string } }>( | ||
`${apiUrl}/wallets/${identifier}`, | ||
{ | ||
keyId, | ||
} | ||
); | ||
// Build the turnkey viem account | ||
const turnkeySigner = await getTurnkeySigner({ | ||
keyId, | ||
let createAccount; | ||
try { | ||
createAccount = | ||
require.resolve("@turnkey/viem") && | ||
require("@turnkey/viem").createAccount; | ||
} catch (error) { | ||
console.log("@turnkey/viem module not available. Skipping FS operation..."); | ||
return; | ||
} | ||
const turnkeySigner = await createAccount({ | ||
client: turnKeyClient, | ||
organizationId: keyId, | ||
privateKeyId: response.data.walletId, | ||
turnkeyClient: ensuredTurnkeyClient, | ||
}); | ||
@@ -97,152 +136,1 @@ | ||
} | ||
/** | ||
* Try to load sign data from a local custodial file path | ||
*/ | ||
const loadSignDataFromCustodialFile = memo( | ||
async (custodialFilePath: string) => { | ||
const [, fsModule] = await tryit(() => import("fs"))(); | ||
if (!fsModule) { | ||
console.error("FS module not available"); | ||
throw new Error( | ||
"FS module not available, you must provide each keys or install this module" | ||
); | ||
} | ||
const data = fsModule.readFileSync(custodialFilePath, "utf8"); | ||
return data.split("\n"); | ||
}, | ||
{ | ||
// TTL of 1min in the memory cache | ||
ttl: 1000 * 60, | ||
// The key in the cache | ||
key: (custodialFilePath: string) => `${custodialFilePath}`, | ||
} | ||
); | ||
/** | ||
* Get our default turnkey client | ||
*/ | ||
const getDefaultTurnkeyClient = memo( | ||
async ({ | ||
privateKey, | ||
publicKey, | ||
}: { | ||
privateKey: string; | ||
publicKey: string; | ||
}) => { | ||
// Try to fetch turnkey client & api key stamper | ||
const [, turnkeyHttp] = await tryit(() => import("@turnkey/http"))(); | ||
const [, turnkeyApiKeyStamper] = await tryit( | ||
() => import("@turnkey/api-key-stamper") | ||
)(); | ||
if (!turnkeyHttp || !turnkeyApiKeyStamper) { | ||
console.error( | ||
"@turnkey/http or @turnkey/api-key-stamper module not available." | ||
); | ||
throw new Error( | ||
"Turnkey http or api-key-stamper modules not available, you must provide a turnkey client or install this modules" | ||
); | ||
} | ||
// Build the turnkey client | ||
return new turnkeyHttp.TurnkeyClient( | ||
{ | ||
baseUrl: "https://api.turnkey.com", | ||
}, | ||
new turnkeyApiKeyStamper.ApiKeyStamper({ | ||
apiPublicKey: publicKey, | ||
apiPrivateKey: privateKey, | ||
}) | ||
); | ||
}, | ||
{ | ||
// TTL of 1min in the memory cache | ||
ttl: 1000 * 60, | ||
// The key in the cache | ||
key: ({ | ||
privateKey, | ||
publicKey, | ||
}: { | ||
privateKey: string; | ||
publicKey: string; | ||
}) => `${privateKey}-${publicKey}`, | ||
} | ||
); | ||
/** | ||
* Simple function used to fetch the wallet id from the API using an identifier | ||
*/ | ||
const fetchWallet = memo( | ||
({ | ||
identifier, | ||
keyId, | ||
apiUrl, | ||
}: { | ||
identifier: string; | ||
keyId: string; | ||
apiUrl: string; | ||
}) => { | ||
return axios.post<any, { data: { walletId: string } }>( | ||
`${apiUrl}/wallets/${identifier}`, | ||
{ | ||
keyId, | ||
} | ||
); | ||
}, | ||
{ | ||
// TTL of 1min in the memory cache | ||
ttl: 1000 * 60, | ||
// The key in the cache | ||
key: ({ | ||
identifier, | ||
keyId, | ||
apiUrl, | ||
}: { | ||
identifier: string; | ||
keyId: string; | ||
apiUrl: string; | ||
}) => `${identifier}-${keyId}-${apiUrl}`, | ||
} | ||
); | ||
/** | ||
* Get a turnkey signer | ||
*/ | ||
const getTurnkeySigner = memo( | ||
async ({ | ||
keyId, | ||
privateKeyId, | ||
turnkeyClient, | ||
}: { | ||
keyId: string; | ||
privateKeyId: string; | ||
turnkeyClient: unknown; | ||
}) => { | ||
// Get the turnkey viem account | ||
const [, turnkeyViem] = await tryit(() => import("@turnkey/viem"))(); | ||
if (!turnkeyViem) { | ||
console.error("@turnkey/viem module not available"); | ||
throw new Error( | ||
"Turnkey viem module not available, can't create a turnkey signer for the custodial owner" | ||
); | ||
} | ||
return turnkeyViem.createAccount({ | ||
client: turnkeyClient as any, | ||
organizationId: keyId, | ||
privateKeyId, | ||
}); | ||
}, | ||
{ | ||
// TTL of 1min in the memory cache | ||
ttl: 1000 * 60, | ||
// The key in the cache | ||
key: ({ | ||
keyId, | ||
privateKeyId, | ||
}: { | ||
keyId: string; | ||
privateKeyId: string; | ||
turnkeyClient: unknown; | ||
}) => `${keyId}-${privateKeyId}`, | ||
} | ||
); |
@@ -50,6 +50,6 @@ import { browserInit, TurnkeyApi } from "@turnkey/http"; | ||
body: { | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", | ||
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD", | ||
organizationId: id, | ||
parameters: { | ||
signWith: walletId, | ||
privateKeyId: walletId, | ||
payload: msg, | ||
@@ -56,0 +56,0 @@ encoding: "PAYLOAD_ENCODING_HEXADECIMAL", |
@@ -5,3 +5,7 @@ import type { Hex } from "viem"; | ||
export type PaymasterAndBundlerProviders = "ALCHEMY" | "STACKUP" | "PIMLICO"; | ||
export type PaymasterAndBundlerProviders = | ||
| "ALCHEMY" | ||
| "STACKUP" | ||
| "PIMLICO" | ||
| "GELATO"; | ||
@@ -8,0 +12,0 @@ export type SupportedGasToken = "USDC" | "PEPE" | "TEST_ERC20"; |
@@ -15,3 +15,2 @@ import { | ||
type SmartAccountProviderOpts, | ||
getChain, | ||
type UserOperationCallData, | ||
@@ -47,2 +46,3 @@ type BatchUserOperationCallData, | ||
} from "./paymaster/types.js"; | ||
import { getChain } from "./utils.js"; | ||
@@ -378,10 +378,23 @@ export type ZeroDevProviderConfig = { | ||
for (let i = 0; i < this._txMaxRetries; i++) { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: ENTRYPOINT_ADDRESS, | ||
event: getAbiItem({ abi: EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
if (this.bundlerProvider === "GELATO") { | ||
const receipt = await this.getUserOperationReceipt( | ||
hash as `0x${string}` | ||
) | ||
// TODO: should maybe log the error? | ||
.catch(() => null); | ||
if (receipt) { | ||
return this.getTransaction(receipt.receipt.transactionHash).then( | ||
(x) => x.hash | ||
); | ||
} | ||
} else { | ||
const logs = await this.rpcClient.getLogs({ | ||
address: ENTRYPOINT_ADDRESS, | ||
event: getAbiItem({ abi: EntryPointAbi, name: "UserOperationEvent" }), | ||
args: { userOpHash: hash }, | ||
fromBlock: blockNumber - 100n, | ||
}); | ||
if (logs.length) { | ||
return logs[0].transactionHash; | ||
} | ||
} | ||
@@ -388,0 +401,0 @@ await new Promise((resolve) => |
@@ -12,2 +12,4 @@ import { | ||
} from "viem"; | ||
import * as chains from "viem/chains"; | ||
import * as customChains from "./utils/custom-chains.js"; | ||
import type { | ||
@@ -136,1 +138,20 @@ SignTypedDataParams, | ||
}; | ||
// Modified from @alchemy/aa-core | ||
/** | ||
* Utility method for converting a chainId to a {@link chains.Chain} object | ||
* | ||
* @param chainId | ||
* @returns a {@link chains.Chain} object for the given chainId | ||
* @throws if the chainId is not found | ||
*/ | ||
export const getChain = (chainId: number): chains.Chain => { | ||
for (const chain of Object.values(chains).concat( | ||
Object.values(customChains) | ||
)) { | ||
if (chain.id === chainId) { | ||
return chain; | ||
} | ||
} | ||
throw new Error("could not find chain"); | ||
}; |
@@ -62,3 +62,4 @@ import { type Hex, type SendUserOperationResult } from "@alchemy/aa-core"; | ||
const shouldUsePaymaster = | ||
params.usePaymaster === undefined || params.usePaymaster; | ||
(params.usePaymaster === undefined || params.usePaymaster) && | ||
bundlerProvider !== "GELATO"; | ||
if ( | ||
@@ -65,0 +66,0 @@ params.opts?.paymasterConfig && |
@@ -9,5 +9,5 @@ import { | ||
} from "../validator/ecdsa-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { getChain } from "../utils.js"; | ||
@@ -14,0 +14,0 @@ export class ECDSAProvider extends ValidatorProvider< |
@@ -9,6 +9,6 @@ import { | ||
} from "../validator/erc165-session-key-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { ERC165_SESSION_KEY_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { getChain } from "../utils.js"; | ||
@@ -15,0 +15,0 @@ export class ERC165SessionKeyProvider extends ValidatorProvider< |
@@ -9,6 +9,6 @@ import { | ||
} from "../validator/kill-switch-validator.js"; | ||
import { getChain } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
import { KILL_SWITCH_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { getChain } from "../utils.js"; | ||
@@ -15,0 +15,0 @@ export class KillSwitchProvider extends ValidatorProvider< |
@@ -10,8 +10,4 @@ import { | ||
} from "../validator/recovery-validator.js"; | ||
import { type Address, type SendUserOperationResult } from "@alchemy/aa-core"; | ||
import { | ||
getChain, | ||
type Address, | ||
type SendUserOperationResult, | ||
} from "@alchemy/aa-core"; | ||
import { | ||
getChainId, | ||
@@ -37,3 +33,3 @@ getRecoveryData, | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { base64ToBytes, bytesToBase64 } from "../utils.js"; | ||
import { base64ToBytes, bytesToBase64, getChain } from "../utils.js"; | ||
@@ -40,0 +36,0 @@ export interface RecoveryProviderParams |
@@ -12,3 +12,2 @@ import { | ||
import { | ||
getChain, | ||
LocalAccountSigner, | ||
@@ -21,3 +20,3 @@ type Hex, | ||
import { SESSION_KEY_VALIDATOR_ADDRESS } from "../constants.js"; | ||
import { base64ToBytes, bytesToBase64 } from "../utils.js"; | ||
import { base64ToBytes, bytesToBase64, getChain } from "../utils.js"; | ||
import type { RequiredProps, WithRequired } from "../types.js"; | ||
@@ -24,0 +23,0 @@ import type { KernelBaseValidatorParams } from "../validator/base.js"; |
import { | ||
getChain, | ||
getUserOperationHash, | ||
@@ -16,3 +15,3 @@ type Address, | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
@@ -19,0 +18,0 @@ export interface ECDSAValidatorParams extends KernelBaseValidatorParams { |
@@ -7,3 +7,2 @@ import { | ||
type UserOperationRequest, | ||
getChain, | ||
type SignTypedDataParams, | ||
@@ -21,3 +20,3 @@ } from "@alchemy/aa-core"; | ||
import { getChainId } from "../api/index.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
@@ -24,0 +23,0 @@ export interface ERC165SessionKeyValidatorParams |
import { | ||
getChain, | ||
getUserOperationHash, | ||
@@ -29,3 +28,3 @@ type Address, | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
@@ -32,0 +31,0 @@ export interface KillSwitchValidatorParams extends KernelBaseValidatorParams { |
import { | ||
getChain, | ||
type Address, | ||
@@ -41,3 +40,3 @@ type Hex, | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
import type { EthereumProvider } from "./types.js"; | ||
@@ -44,0 +43,0 @@ import { polygonMumbai } from "viem/chains"; |
@@ -7,3 +7,2 @@ import { | ||
type UserOperationRequest, | ||
getChain, | ||
type SignTypedDataParams, | ||
@@ -39,3 +38,3 @@ type Abi, | ||
import { getChainId } from "../api/index.js"; | ||
import { fixSignedData } from "../utils.js"; | ||
import { fixSignedData, getChain } from "../utils.js"; | ||
import type { GetAbiItemReturnType } from "viem/dist/types/utils/abi/getAbiItem.js"; | ||
@@ -42,0 +41,0 @@ import { type AbiFunction } from "abitype"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2165389
6
565
35281
4
- Removedradash@^11.0.0
- Removedradash@11.0.0(transitive)