lenskit is a set of libraries for integrating lens protocol into your application.
yarn add @lenskit/react
Warning This package is still in development and not ready for production.
useAuth
const { auth, token, error } = useAuth()
useIndexedTx
const { tx, error } = useIndexedTx(txHash)
useProfile
const { profile, loading, error } = useProfile('profileId')
useProfiles
const { profiles, loading, error } = useProfiles(['profileId1', 'profileId2'])
useCreateProfile
const { createProfile, profileId, loading, error } = useCreateProfile()
useSetProfileMetadata
const { setProfileMetadata, tx, loading, error } = useSetProfileMetadata()
usePost
const { post, publicationId, loading, error } = usePost()
useCollect
const { collect, tx, loading, error } = useCollect()
useComment
const { comment, publicationId, loading, error } = useComment()
useMirror
const { createMirror, publicationId, loading, error } = useMirror()
useFollow
const { follow, tx, loading, error } = useFollow()
useUnfollow
const { unfollow, tx, loading, error } = useUnfollow()
usePublication
const { publication, loading, error } = usePublication(publicationId)
usePublications
const { publications, loading, error } = usePublications(profileId, [PublicationTypes.Post])