UNPKG

@lit-protocol/auth-browser

Version:

Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana.

30 lines 763 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseResource = exports.getSessionKeyUri = void 0; const constants_1 = require("@lit-protocol/constants"); /** * * Get Session Key URI eg. lit:session: * * @returns { string } * */ const getSessionKeyUri = ({ publicKey, }) => { return constants_1.LIT_SESSION_KEY_URI + publicKey; }; exports.getSessionKeyUri = getSessionKeyUri; /** * * Parse resource * * @property { any } resource * * @returns { { protocol: string, resourceId: string } } * */ const parseResource = ({ resource, }) => { const [protocol, resourceId] = resource.split('://'); return { protocol, resourceId }; }; exports.parseResource = parseResource; //# sourceMappingURL=session.js.map