UNPKG

@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

35 lines 1.24 kB
import { BaseError as ViemBaseError } from "viem"; import { VERSION } from "../version.js"; export class BaseError extends ViemBaseError { constructor(shortMessage, args = {}) { super(shortMessage, args); Object.defineProperty(this, "name", { enumerable: true, configurable: true, writable: true, value: "AASDKError" }); Object.defineProperty(this, "version", { enumerable: true, configurable: true, writable: true, value: VERSION }); const docsPath = args.cause instanceof BaseError ? args.cause.docsPath || args.docsPath : args.docsPath; this.message = [ shortMessage || "An error occurred.", "", ...(args.metaMessages ? [...args.metaMessages, ""] : []), ...(docsPath ? [ `Docs: https://accountkit.alchemy.com${docsPath}${args.docsSlug ? `#${args.docsSlug}` : ""}`, ] : []), ...(this.details ? [`Details: ${this.details}`] : []), `Version: ${this.version}`, ].join("\n"); } } //# sourceMappingURL=base.js.map