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

39 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; const viem_1 = require("viem"); const version_js_1 = require("../version.js"); class BaseError extends viem_1.BaseError { 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_js_1.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"); } } exports.BaseError = BaseError; //# sourceMappingURL=base.js.map