@privy-io/js-sdk-core
Version:
Vanilla JS client for the Privy Auth API
2 lines (1 loc) • 722 B
JavaScript
import{getUserEmbeddedEthereumWallet as e}from"./getUserEmbeddedEthereumWallet.mjs";import{getUserEmbeddedSolanaWallet as r}from"./getUserEmbeddedSolanaWallet.mjs";import"./getAllUserEmbeddedEthereumWallets.mjs";import"./embedded-wallets.mjs";import"./getAllUserEmbeddedSolanaWallets.mjs";const t=(t,l)=>{if(!t)return null;if(l?.imported)return d(l);let m=e(t)??r(t);return m?d(m):null},d=e=>{if("ethereum"===e.chain_type)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chain_type)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Invalid embedded wallet account type")};export{d as getEntropyDetailsFromAccount,t as getEntropyDetailsFromUser};