@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
15 lines (10 loc) • 572 B
JavaScript
'use client'
;
Object.defineProperty(exports, '__esModule', { value: true });
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
const isAuthenticatedWithAWallet = (user) => {
const lastVerifiedCredential = user.verifiedCredentials.find((vc) => vc.id === user.lastVerifiedCredentialId);
return ((lastVerifiedCredential === null || lastVerifiedCredential === void 0 ? void 0 : lastVerifiedCredential.format) ===
sdkApiCore.JwtVerifiedCredentialFormatEnum.Blockchain);
};
exports.isAuthenticatedWithAWallet = isAuthenticatedWithAWallet;