Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daoleno/lenskit
lens protocol kit
https://github.com/daoleno/lenskit
Last synced: 3 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 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-05T16:51:07.000Z (10 months ago)
- Last Synced: 2024-07-08T06:48:59.301Z (4 months ago)
- Language: TypeScript
- Homepage: lenskit-playground-react.vercel.app
- Size: 18.3 MB
- Stars: 68
- 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/)