https://github.com/daoleno/lenskit
lens protocol kit
https://github.com/daoleno/lenskit
Last synced: 6 months ago
JSON representation
lens protocol kit
- Host: GitHub
- URL: https://github.com/daoleno/lenskit
- Owner: daoleno
- License: mit
- Created: 2022-09-13T13:50:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-05T16:51:07.000Z (almost 2 years ago)
- Last Synced: 2025-04-22T05:58:31.621Z (6 months ago)
- Language: TypeScript
- Homepage: lenskit-playground-react.vercel.app
- Size: 18.3 MB
- Stars: 69
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-lens-protocol - daoleno/lenskit - Starter kit by daoleno. (Development / Starter Kits)
README
# 🌿 LensKit 🌿
lenskit is a set of libraries for integrating lens protocol into your application.
## Installation
```bash
yarn add @lenskit/react
```
> **Warning**
>
> This package is still in development and not ready for production.
## Hooks
useAuth
```tsx
const { auth, token, error } = useAuth()
```
useIndexedTx
```tsx
const { tx, error } = useIndexedTx(txHash)
```
useProfile
```tsx
const { profile, loading, error } = useProfile({ profileId })
```
useProfiles
```tsx
const { profiles, loading, error } = useProfiles({ ownedBy: [address], limit: 1 })
```
useCreateProfile
```tsx
const { createProfile, profileId, loading, error } = useCreateProfile()
```
useSetProfileMetadata
```tsx
const { setProfileMetadata, tx, loading, error } = useSetProfileMetadata()
```
usePost
```tsx
const { post, publicationId, loading, error } = usePost()
```
useCollect
```tsx
const { collect, tx, loading, error } = useCollect()
```
useComment
```tsx
const { comment, publicationId, loading, error } = useComment()
```
useMirror
```tsx
const { createMirror, publicationId, loading, error } = useMirror()
```
useFollow
```tsx
const { follow, tx, loading, error } = useFollow()
```
useUnfollow
```tsx
const { unfollow, tx, loading, error } = useUnfollow()
```
usePublication
```tsx
const { publication, loading, error } = usePublication({ publicationId })
```
usePublications
```tsx
const { publications, loading, error } = usePublications({
profileId: profileId,
publicationTypes: [PublicationTypes.Post],
})
```
## License
[MIT](https://choosealicense.com/licenses/mit/)