From 5556bb8c9e6fada28add59666381b823e7035c58 Mon Sep 17 00:00:00 2001 From: LeoLox <58687994+leo-lox@users.noreply.github.com> Date: Sat, 18 Jan 2025 20:07:19 +0100 Subject: [PATCH] lists doc --- doc/usecases/lists.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/usecases/lists.md b/doc/usecases/lists.md index 5083c6e6..9aa0f908 100644 --- a/doc/usecases/lists.md +++ b/doc/usecases/lists.md @@ -1,3 +1,29 @@ --- icon: list-unordered ---- \ No newline at end of file +--- + +[!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.