Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of NDKKind #1

Open
garywoodfine opened this issue Oct 21, 2024 · 1 comment
Open

Usage of NDKKind #1

garywoodfine opened this issue Oct 21, 2024 · 1 comment

Comments

@garywoodfine
Copy link

Hi,

I've been using your repo as a guide to help get up to speed with Nuxt and NDK and have found it really useful.

I just wanted to return the favour and point out something I'v also learned.

In the NDK, I discovered the NDKKind type, which defines an Enum for all the Note Types within nostr which can be used on
the filters etc.

So for instance in your Feed.vue where you define the fetchKinds it can be defined as follows

     import { ref } from "vue"
  import { useNdkStore } from '~/stores/Ndk'
  import {NDKKind} from "@nostr-dev-kit/ndk";

  const NdkStore = useNdkStore()
  const events = ref()

  const fetchKinds = [
    NDKKind.Metadata, // Profile metadata
    NDKKind.Text, // Notes
    NDKKind.Contacts, // Contacts
    NDKKind.Repost, // Repost
    NDKKind.Reaction, // Reaction
    NDKKind.Label, // Label
    NDKKind.Zap, // Zap receipt event
    NDKKind.RelayList, // Relay list metadata
    NDKKind.Article // Long-form content
  ]

Just thought this might be helpful.

Thanks for this repo BTW, I have found it really useful!

@Sebastix
Copy link
Member

Sebastix commented Oct 25, 2024

Thanks for your feedback and warm compliments @garywoodfine!

As you might noticed, I don't work often on this project but I'll keep this in mind when I've got something new to tinker with (I usually switch to this project when I got too bored working on PHP stuff with Nostr or have some new idea for a niche client feature(. Also please feel free to submit any PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants