@alchemy/aa-core
Version:
viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts
37 lines (35 loc) • 900 B
text/typescript
import type { UserOperationStruct } from "../types.js";
import { BaseError } from "./base.js";
/**
* Thrown when a {@link UserOperationStruct} is not a valid request
*
* extends viem BaseError
*/
export class InvalidUserOperationError extends BaseError {
/**
* @inheritdoc
*/
override name = "InvalidUserOperationError";
/**
* Creates an instance of InvalidUserOperationError.
*
* InvalidUserOperationError constructor
*
* @param uo the invalid user operation struct
*/
constructor(uo: UserOperationStruct) {
super(
`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(
uo,
(_key, value) =>
typeof value === "bigint"
? {
type: "bigint",
value: value.toString(),
}
: value,
2
)}`
);
}
}