"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.constructAuthFromWallet = void 0; async function constructAuthFromWallet(wallet, config) { const account = await wallet.getAccount(); const isPubkeyCompressed = config.publicKey.isCompressed; const auth = { algo: account.algo, getPublicKey(isCompressed) { if (isCompressed && isPubkeyCompressed) { return account.publicKey; } if (!isCompressed && !isPubkeyCompressed) { return account.publicKey; } throw new Error(`Failed to get ${isCompressed ? "compressed" : "uncompressed"} public key`); }, sign(_data) { throw new Error("Not implemented yet"); }, }; return auth; } exports.constructAuthFromWallet = constructAuthFromWallet; //# sourceMappingURL=auth.js.map