Index
Modules:
nmostr
,
nmostr/bech32
,
nmostr/common
,
nmostr/events
,
nmostr/filters
,
nmostr/hexobjs
,
nmostr/keys
,
nmostr/messages
.
API symbols
`$`:
hexobjs: template `$`(v: PublicKey | EventID | SchnorrSignature): string
keys: proc `$`(v: SecretKey): string
article:
events: proc article(keypair: Keypair; content, d: string; tags: sink seq[seq[string]] = default(Event.tags); created_at = getUnixTime()): Event
Bech32Entity:
bech32: object Bech32Entity
bytes:
hexobjs: template bytes(v: EventID | SchnorrSignature): auto
hexobjs: template bytes(v: PublicKey): auto
keys: template bytes(v: SecretKey): array[32, byte]
bytesLen:
hexobjs: template bytesLen(T: typedesc[EventID | SchnorrSignature]): Positive
hexobjs: template bytesLen(T: typedesc[PublicKey]): Positive
keys: template bytesLen(T: typedesc[SecretKey]): Positive
Charset:
bech32: const Charset
CharsetSet:
bech32: const CharsetSet
ClientMessage:
messages: type ClientMessage
CMAuth:
messages: object CMAuth
CMClose:
messages: object CMClose
CMCount:
messages: object CMCount
CMEvent:
messages: object CMEvent
CMRequest:
messages: object CMRequest
decode:
bech32: proc decode(address: string; verify = true): Bech32Entity
bech32: proc decode(hrp: string; address: string; verify = true): seq[byte]
dumpHook:
events: proc dumpHook(s: var string; v: EventID)
events: proc dumpHook(s: var string; v: Time)
filters: proc dumpHook(s: var string; v: Filter)
hexobjs: proc dumpHook(s: var string; v: PublicKey | EventID | SchnorrSignature)
hexobjs: proc dumpHook(s: var string; v: StackString)
messages: proc dumpHook(s: var string; v: union(Message))
messages: proc dumpHook(s: var string; v: CMAuth)
messages: proc dumpHook(s: var string; v: CMClose)
messages: proc dumpHook(s: var string; v: CMCount)
messages: proc dumpHook(s: var string; v: CMEvent)
messages: proc dumpHook(s: var string; v: CMRequest)
messages: proc dumpHook(s: var string; v: SMAuth)
messages: proc dumpHook(s: var string; v: SMCount)
messages: proc dumpHook(s: var string; v: SMEose)
messages: proc dumpHook(s: var string; v: SMEvent)
messages: proc dumpHook(s: var string; v: SMNotice)
messages: proc dumpHook(s: var string; v: SMOk)
dumpObjectAsArray:
messages: proc dumpObjectAsArray[T](s: var string; v: T; flag: string)
encode:
bech32: proc encode(hrp: string; witprog: openArray[byte]): string
bech32: proc encode(hrp, witprog: string): string
Event:
events: object Event
EventID:
hexobjs: object EventID
Filter:
filters: object Filter
fromBech32:
bech32: proc fromBech32(T: type NAddr; address: string): T:type
bech32: proc fromBech32(T: type NEvent; address: string): T:type
bech32: proc fromBech32(T: type NNote; address: string): T:type
bech32: proc fromBech32(T: type NProfile; address: string): T:type
bech32: proc fromBech32(T: type NRelay; address: string): T:type
bech32: proc fromBech32(T: type PublicKey; address: string): T:type
bech32: proc fromBech32(T: type SecretKey; address: string): T:type
fromBytes:
bech32: proc fromBytes(T: type NAddr; address: openArray[byte]): T:type
bech32: proc fromBytes(T: type NEvent; address: openArray[byte]): T:type
bech32: proc fromBytes(T: type NNote; address: openArray[byte]): T:type
bech32: proc fromBytes(T: type NProfile; address: openArray[byte]): T:type
bech32: proc fromBytes(T: type NRelay; address: openArray[byte]): T:type
hexobjs: proc fromBytes(T: typedesc[PublicKey]; bytes: openArray[byte]): T:type
hexobjs: template fromBytes(T: typedesc[EventID | SchnorrSignature]; bytes: openArray[byte]): T:type
keys: template fromBytes(T: typedesc[SecretKey]; bytes: openArray[byte]): SecretKey
fromHex:
hexobjs: proc fromHex(T: typedesc[PublicKey | EventID | SchnorrSignature]; hex: auto): T:type
hexobjs: proc fromHex[N, N2](T: typedesc[array[N, byte]]; hex: array[N2, char]): T:type
hexobjs: proc fromHex[N](T: typedesc[array[N, byte]]; hex: openArray[char]): T:type
hexobjs: proc fromHex[N](T: typedesc[array[N, byte]]; hex: StackString): T:type
hexobjs: proc fromHex(T: typedesc[seq[byte]]; hex: auto): T:type
keys: proc fromHex(T: typedesc[SecretKey]; hex: auto): SecretKey
fromMessage:
messages: proc fromMessage(s: string): union(Message)
fromNostrBech32:
bech32: proc fromNostrBech32(address: string): union(NostrTLV)
fromWords:
bech32: proc fromWords(data: openArray[uint5]): seq[byte]
getParameterizedID:
events: proc getParameterizedID(tags: openArray[seq[string]]): Option[string]
events: template getParameterizedID(event: Event): Option[string]
hexToRaw:
hexobjs: proc hexToRaw(v: EventID | SchnorrSignature): auto
hexobjs: proc hexToRaw(v: PublicKey): array[64, byte]
init:
events: proc init(T: typedesc[Event]; kind: int; keypair: Keypair; content: string; tags = default(seq[seq[string]]); created_at = getUnixTime()): Event
hexobjs: proc init(T: typedesc[EventID]; raw: sink array[32, byte]): T:type
hexobjs: proc init(T: typedesc[PublicKey]; raw: sink array[64, byte]): T:type
hexobjs: proc init(T: typedesc[SchnorrSignature]; raw: sink array[64, byte]): T:type
keys: proc init(T: typedesc[SecretKey]; raw: sink array[32, byte]): T:type
Keypair:
keys: object Keypair
matches:
filters: proc matches(event: Event; filter: Filter): bool
Message:
messages: type Message
Metadata:
events: object Metadata
metadata:
events: proc metadata(keypair: Keypair; name, about, picture: string; tags = default(Event.tags); created_at = getUnixTime()): Event
NAddr:
bech32: object NAddr
NEvent:
bech32: object NEvent
NNote:
bech32: object NNote
NostrTLV:
bech32: type NostrTLV
note:
events: proc note(keypair: Keypair; content: string; tags = default(Event.tags); created_at = getUnixTime()): Event
NProfile:
bech32: object NProfile
NRelay:
bech32: object NRelay
parseArrayAsObject:
messages: proc parseArrayAsObject[T](s: string; i: var int; v: var T)
parseHook:
events: proc parseHook(s: string; i: var int; v: var EventID)
events: proc parseHook(s: string; i: var int; v: var Time)
filters: proc parseHook(s: string; i: var int; v: var Filter)
hexobjs: proc parseHook(s: string; i: var int; v: var (PublicKey | EventID | SchnorrSignature))
hexobjs: proc parseHook(s: string; i: var int; v: var StackString)
messages: proc parseHook(s: string; i: var int; v: var union(Message))
messages: proc parseHook(s: string; i: var int; v: var CMAuth)
messages: proc parseHook(s: string; i: var int; v: var CMClose)
messages: proc parseHook(s: string; i: var int; v: var CMCount)
messages: proc parseHook(s: string; i: var int; v: var CMEvent)
messages: proc parseHook(s: string; i: var int; v: var CMRequest)
messages: proc parseHook(s: string; i: var int; v: var SMAuth)
messages: proc parseHook(s: string; i: var int; v: var SMCount)
messages: proc parseHook(s: string; i: var int; v: var SMEose)
messages: proc parseHook(s: string; i: var int; v: var SMEvent)
messages: proc parseHook(s: string; i: var int; v: var SMNotice)
messages: proc parseHook(s: string; i: var int; v: var SMOk)
populate:
hexobjs: proc populate(v: var (PublicKey | EventID | SchnorrSignature))
populateHex:
hexobjs: proc populateHex(v: var (PublicKey | EventID | SchnorrSignature))
populateRaw:
hexobjs: proc populateRaw(v: var (PublicKey | EventID | SchnorrSignature))
PublicKey:
hexobjs: object PublicKey
random:
keys: proc random(T: typedesc[Keypair]; rng: Rng = sysRng): Keypair
keys: proc random(T: typedesc[SecretKey]; rng: Rng = sysRng): SecretKey
randomID:
messages: proc randomID(): string
rawToHex:
hexobjs: template rawToHex(v: PublicKey | EventID | SchnorrSignature): auto
keys: template rawToHex(v: SecretKey): StackString[64]
readHexChar:
hexobjs: proc readHexChar(c: char): byte
SchnorrSignature:
hexobjs: object SchnorrSignature
SecretKey:
keys: object SecretKey
serialize:
events: proc serialize(e: Event): string
ServerMessage:
messages: type ServerMessage
sign:
events: proc sign(event: var Event; key: SecretKey; rng: Rng = sysRng)
events: template sign(event: var Event; keypair: Keypair; rng: Rng = sysRng)
signSchnorr:
keys: proc signSchnorr(key: SecretKey; msg: openArray[byte]; randbytes: Option[array[32, byte]]): SchnorrSignature
keys: proc signSchnorr(key: SecretKey; msg: openArray[byte]; rng: Rng = sysRng): SchnorrSignature
SMAuth:
messages: object SMAuth
SMCount:
messages: object SMCount
SMEose:
messages: object SMEose
SMEvent:
messages: object SMEvent
SMNotice:
messages: object SMNotice
SMOk:
messages: object SMOk
stamp:
events: proc stamp(event: var Event; keypair: Keypair; rng: Rng = sysRng)
sysRng:
keys: proc sysRng(data: var openArray[byte]): bool
toArray:
common: proc toArray[T](N: static int; data: openArray[T]): array[N, T]
common: template toArray[T](N: static int; data: array[N, T]): auto
toBech32:
bech32: proc toBech32(event: Event; relays: seq[string] = @[]): string
bech32: proc toBech32(eventID: EventID): string
bech32: proc toBech32(naddr: NAddr): string
bech32: proc toBech32(nevent: NEvent): string
bech32: proc toBech32(note: NNote): string
bech32: proc toBech32(nprofile: NProfile): string
bech32: proc toBech32(nrelay: NRelay): string
bech32: proc toBech32(pubkey: PublicKey): string
bech32: proc toBech32(seckey: SecretKey): string
toBytes:
hexobjs: proc toBytes(v: PublicKey): array[32, byte]
hexobjs: template toBytes(v: EventID | SchnorrSignature): auto
keys: template toBytes(v: SecretKey): array[32, byte]
toFilter:
bech32: proc toFilter(union: union(NostrTLV)): Filter
bech32: proc toFilter(naddr: NAddr): Filter
bech32: proc toFilter(nevent: NEvent): Filter
bech32: proc toFilter(nnote: NNote): Filter
bech32: proc toFilter(nprofile: NProfile): Filter
bech32: proc toFilter(pubkey: PublicKey): Filter
bech32: proc toFilter(seckey: SecretKey): Filter
toHex:
hexobjs: proc toHex[N](bytes: array[N, byte]): auto
hexobjs: proc toHex(bytes: openArray[byte]): string
hexobjs: template toHex(v: PublicKey | EventID | SchnorrSignature): auto
keys: proc toHex(v: SecretKey): StackString[64]
toKeypair:
keys: proc toKeypair(seckey: sink SecretKey): Keypair
toPublicKey:
keys: proc toPublicKey(key: SecretKey): PublicKey
toSecretKey:
keys: converter toSecretKey(kp: Keypair): lent SecretKey
toString:
bech32: proc toString(entity: Bech32Entity): string
hexobjs: proc toString(v: PublicKey | EventID | SchnorrSignature): string
keys: proc toString(v: SecretKey): string
toWords:
bech32: proc toWords(data: openArray[byte]): seq[uint5]
uint5:
bech32: type uint5
UnknownMessageError:
messages: object UnknownMessageError
updateID:
events: proc updateID(event: var Event)
verify:
events: proc verify(event: Event): bool
keys: proc verify(sig: SchnorrSignature; msg: openArray[byte]; pubkey: PublicKey): bool
verifyChecksum:
bech32: proc verifyChecksum(hrp: string; data: seq[uint5]): bool