nostr icon indicating copy to clipboard operation
nostr copied to clipboard

Improve Rust documentation

Open lolbinarycat opened this issue 1 year ago • 1 comments

Describe the enhancement

there is no explination for what data Client keeps track of or what it does exactly.

namely, the only hint that connect() must be called before relays are added is the example. Use case

misusing Client will often result in vauge timeout errors or simply empty lists being returned.

functions also don't specify the prerequisites needed before they can be called. Additional context

the documentation for most functions is just the name of the function without underscores.

it took several days to find out why my program wasn't working, because none of documentation suggests relays won't be automatically connected to as needed.

lolbinarycat avatar Oct 31 '23 17:10 lolbinarycat

Hi, thanks for testing nostr-sdk! The libraries are in alpha state so the docs aren't completed.

For now I specified in add_relay method docs that connection isn't started automatically. I hope to improve documentation soon (I started to write also the Rust Nostr Book, for both Rust and bindings).

Contributions are really appreciated!

yukibtc avatar Nov 01 '23 16:11 yukibtc