UNPKG

@biconomy/sdk

Version:

SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.

36 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getActiveHook = getActiveHook; const actions_1 = require("viem/actions"); const utils_1 = require("viem/utils"); const AccountNotFound_1 = require("../../../account/utils/AccountNotFound.js"); async function getActiveHook(client, parameters) { const account_ = parameters?.account ?? client.account; if (!account_) { throw new AccountNotFound_1.AccountNotFoundError({ docsPath: "/nexus-client/methods#sendtransaction" }); } const account = (0, utils_1.parseAccount)(account_); const publicClient = account.client; return (0, utils_1.getAction)(publicClient, actions_1.readContract, "readContract")({ address: account.address, abi: [ { inputs: [], name: "getActiveHook", outputs: [ { internalType: "address", name: "hook", type: "address" } ], stateMutability: "view", type: "function" } ], functionName: "getActiveHook" }); } //# sourceMappingURL=getActiveHook.js.map