nostr library
Support for doing something awesome.
More dartdocs go here.
Classes
- Channel
- channel info
- ChannelMessage
- messages in channel
- ChannelMessageHidden
- ChannelUserMuted
- Close
- Used to stop previous subscriptions.
- DNS
- EncryptedDirectMessage
- A special event with kind 4, meaning "encrypted direct message".
- Eose
- Indicates "end of stored events"
- ETag
- Event
- The only object type that exists is the event, which has the following format on the wire:
- Filter
- filter is a JSON object that determines what events will be sent in that subscription
- Keychain
- A keychain encapsulates a public key and a private key, which are used for tasks such as encrypting and decrypting messages, or creating and verifying digital signatures.
- Lists
- Message
- Nip10
- This NIP describes how to use "e" and "p" tags in text events, especially those that are replies to other text events. It helps clients thread the replies into a tree rooted at the original event.
- Nip19
- bech32-encoded entities
- Nip2
- Contact List and Petnames
- Nip20
- When submitting events to relays, clients currently have no way to know if an event was successfully committed to the database. This NIP introduces the concept of command results which are like NOTICE's except provide more information about if an event was accepted or rejected.
- Nip28
- Public Chat & Channel
- Nip5
- Mapping Nostr keys to DNS-based internet identifiers
- Nip51
- Lists
- People
- Profile
-
Each tag entry should contain the key for the profile, a relay URL where events from that key can be found
(can be set to an empty string if not needed), and a local name (or "petname") for that profile (can also be set to an empty string or not provided),
i.e.,
"p", "32-bytes hex key", "main relay URL", "petname"
. The content can be anything and should be ignored. - PTag
- Request
- Used to request events and subscribe to new updates.
- Thread
Enums
Functions
-
bech32Decode(
String bech32Data) → Map< String, String> -
bech32Encode(
String prefix, String hexData) → String - help functions
-
convertBits(
List< int> data, int fromBits, int toBits, bool pad) → List<int> -
currentUnixTimestampSeconds(
) → int - current unix timestamp in seconds
-
generate64RandomHexChars(
) → String - generates 32 random bytes converted in hex
-
generateRandomBytes(
int quantity) → List< int> - generates the requested quantity of random secure bytes