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

Add support to get community defitions via kind 34550 #275

Open
gustavonmartins opened this issue Oct 5, 2024 · 1 comment
Open

Add support to get community defitions via kind 34550 #275

gustavonmartins opened this issue Oct 5, 2024 · 1 comment

Comments

@gustavonmartins
Copy link

gustavonmartins commented Oct 5, 2024

I was trying to get a list of communities, so I tried:

const sub = ndk.subscribe({ kinds: [34550] });

I have got the following complaint:
Type '34550' is not assignable to type 'NDKKind'.ts(2322)

I would like to request that the kind to get communities definitions is implemented, namely kind 34550 according to https://nostr-nips.com/nip-72

@Anderson-Juhasc
Copy link

Anderson-Juhasc commented Oct 7, 2024

@gustavonmartins to get all the communities from a pubkey you need to use kinds: [10004] than you use kinds: [34550] to get metadata of the community:

const filter = { kinds: [10004], authors: [pubkey] }
and
const filter = { kinds: [34550], authors: [communityPubkey], "#d": [commnunityName] }

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