Skip to content

Commit

Permalink
lists doc
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Jan 18, 2025
1 parent 025be89 commit 5556bb8
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion doc/usecases/lists.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
---
icon: list-unordered
---
---

[!badge variant="primary" text="high level"]

## Example

```dart
final myset = await ndk.lists.getSinglePublicNip51RelaySet(
name: "myset",
publicKey:
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
);
if (myset == null) {
print("set not found");
return;
}
print("recived a set with ${myset.elements.length} elements");
```

## How to use

We destinguish between public and private lists/sets. \
The methods are prefixed with public or private. \
Editing lists schould be done via the provided broadcast methods.

0 comments on commit 5556bb8

Please sign in to comment.