diff --git a/src/cli/config/options.ts b/src/cli/config/options.ts index e3d67ead..263bd429 100644 --- a/src/cli/config/options.ts +++ b/src/cli/config/options.ts @@ -182,7 +182,7 @@ export const bundlerOptions: CliCommandOptions = { }, "enable-instant-bundling-endpoint": { description: - "Should the bundler enable the pimlico_sendInstantUserOperation endpoint", + "Should the bundler enable the pimlico_sendUserOperationNow endpoint", type: "boolean", default: false } diff --git a/src/rpc/rpcHandler.ts b/src/rpc/rpcHandler.ts index 108625a6..ecd40a22 100644 --- a/src/rpc/rpcHandler.ts +++ b/src/rpc/rpcHandler.ts @@ -307,10 +307,10 @@ export class RpcHandler implements IRpcEndpoint { ...request.params ) } - case "pimlico_sendInstantUserOperation": + case "pimlico_sendUserOperationNow": return { method, - result: await this.pimlico_sendInstantUserOperation( + result: await this.pimlico_sendUserOperationNow( apiVersion, ...request.params ) @@ -936,14 +936,14 @@ export class RpcHandler implements IRpcEndpoint { return "queued" } - async pimlico_sendInstantUserOperation( + async pimlico_sendUserOperationNow( apiVersion: ApiVersion, userOperation: UserOperation, entryPoint: Address ) { if (!this.enableInstantBundlingEndpoint) { throw new RpcError( - "pimlico_sendInstantUserOperation endpoint is not enabled", + "pimlico_sendUserOperationNow endpoint is not enabled", ValidationErrors.InvalidFields ) } diff --git a/src/types/schemas.ts b/src/types/schemas.ts index 6bf5eef6..e8c90dc0 100644 --- a/src/types/schemas.ts +++ b/src/types/schemas.ts @@ -343,8 +343,8 @@ const pimlicoSendCompressedUserOperationRequestSchema = z.object({ params: z.tuple([hexDataSchema, addressSchema, addressSchema]) }) -const pimlicoSendInstantBundleRequestSchema = z.object({ - method: z.literal("pimlico_sendInstantUserOperation"), +const pimlicoSendUserOperationNowRequestSchema = z.object({ + method: z.literal("pimlico_sendUserOperationNow"), params: z.tuple([userOperationSchema, addressSchema]) }) @@ -369,7 +369,7 @@ const bundlerRequestSchema = z.discriminatedUnion("method", [ pimlicoGetUserOperationStatusRequestSchema, pimlicoGetUserOperationGasPriceRequestSchema, pimlicoSendCompressedUserOperationRequestSchema, - pimlicoSendInstantBundleRequestSchema + pimlicoSendUserOperationNowRequestSchema ]) const chainIdResponseSchema = z.object({ @@ -578,8 +578,8 @@ const pimlicoSendCompressedUserOperationResponseSchema = z.object({ result: hexData32Schema }) -const pimlicoSendInstantBundleResponseSchema = z.object({ - method: z.literal("pimlico_sendInstantUserOperation"), +const pimlicoSendUserOperationNowResponseSchema = z.object({ + method: z.literal("pimlico_sendUserOperationNow"), result: userOperationReceiptSchema }) @@ -601,7 +601,7 @@ const bundlerResponseSchema = z.discriminatedUnion("method", [ pimlicoGetUserOperationStatusResponseSchema, pimlicoGetUserOperationGasPriceResponseSchema, pimlicoSendCompressedUserOperationResponseSchema, - pimlicoSendInstantBundleResponseSchema + pimlicoSendUserOperationNowResponseSchema ]) export type BundlingMode = z.infer< diff --git a/test/e2e/tests/pimlico_sendInstantUserOperation.test.ts b/test/e2e/tests/pimlico_sendUserOperationNow.test.ts similarity index 93% rename from test/e2e/tests/pimlico_sendInstantUserOperation.test.ts rename to test/e2e/tests/pimlico_sendUserOperationNow.test.ts index 3eabec17..b7502e2d 100644 --- a/test/e2e/tests/pimlico_sendInstantUserOperation.test.ts +++ b/test/e2e/tests/pimlico_sendUserOperationNow.test.ts @@ -21,7 +21,7 @@ describe.each([ entryPointVersion: "0.7" as EntryPointVersion } ])( - "$entryPointVersion supports pimlico_sendInstantUserOperation", + "$entryPointVersion supports pimlico_sendUserOperationNow", ({ entryPoint, entryPointVersion }) => { beforeEach(async () => { await beforeEachCleanUp() @@ -50,7 +50,7 @@ describe.each([ const receipt = (await bundlerClient.request({ // @ts-ignore - method: "pimlico_sendInstantUserOperation", + method: "pimlico_sendUserOperationNow", params: [deepHexlify(op), entryPoint] })) as UserOperationReceipt