|
Nostrduino
|
Namespaces | |
| namespace | crypto |
| namespace | detail |
Data Structures | |
| class | Connection |
| class | Nip04 |
| class | Nip44 |
| class | Nip47 |
| class | Nip47Response |
| class | NostrEvent |
| class | NostrEventTags |
| struct | NostrLimits |
| class | NostrPool |
| class | NostrRelay |
| struct | NostrRelaySubscriptionState |
| class | NostrSubscription |
| class | NWC |
| class | NWCResponseCallback |
| class | NWCResponseCallbackBase |
| struct | ParsedUrl |
| struct | s_EventStatusCallbackEntry |
| struct | s_GetBalanceResponse |
| struct | s_GetInfoResponse |
| struct | s_Invoice |
| struct | s_KeySend |
| struct | s_ListTransactionsResponse |
| struct | s_LookUpInvoiceResponse |
| struct | s_MakeInvoiceResponse |
| struct | s_MultiPayInvoiceResponse |
| struct | s_MultiPayKeySendResponse |
| struct | s_Nip47Notification |
| struct | s_NostrEventTag |
| struct | s_NotificationResponse |
| struct | s_NWCData |
| struct | s_PayInvoiceResponse |
| struct | s_PayKeySendResponse |
| struct | s_TLVRecords |
| struct | s_Transaction |
| class | SignedNostrEvent |
| class | Transport |
| class | UnsignedNostrEvent |
| class | Utils |
Enumerations | |
| enum class | Nip47Encryption { Nip04 , Nip44V2 } |
| enum class | ConnectionStatus { CONNECTED , DISCONNECTED , ERROR } |
| enum class | NWCEncryptionPolicy { RequireNip44 , AllowLegacyNip04 } |
Functions | |
| bool | amountWithinConfiguredMaximum (MilliSats amount) |
| bool | isRequiredMilliSatsValid (MilliSats amount) |
| bool | isOptionalMilliSatsValid (MilliSats amount) |
| bool | validateBolt11Invoice (const NostrString &invoice, MilliSats expectedAmount, const NostrString &expectedCurrency="", unsigned long long nowSeconds=0) |
| bool | decodeHexExact (const NostrString &input, uint8_t *output, size_t expectedBytes) |
| bool | validateBase64Encoding (const char *encoded, size_t encodedSize, bool noPadding, bool urlSafe, size_t &decodedSize) |
| bool | decodeHexExact (const NostrString &input, uint8_t *output, size_t outputCapacity, size_t expectedBytes) |
| bool | parseWebSocketUrl (const NostrString &url, ParsedUrl &parsed) |
| bool | parseHttpsUrl (const NostrString &url, ParsedUrl &parsed) |
Millisatoshi amounts use the signed 64-bit MilliSats type. MILLISATS_UNSPECIFIED (-1) is the only omission sentinel for optional amounts; zero also omits the optional pay_invoice amount. Required amounts must be positive. Amount guards are enabled by default and cap outgoing values at 1000 BTC (100000000000000 msat). Builds may override NOSTRDUINO_MAX_AMOUNT_MSATS or set NOSTRDUINO_ENABLE_AMOUNT_GUARDS=0.
| using nostr::NostrCloseCallback = typedef std::function<void(const NostrString &, const NostrString &)> |
| using nostr::NostrEOSECallback = typedef std::function<void(const NostrString &)> |
| using nostr::NostrEventCallback = typedef std::function<void(const NostrString &, SignedNostrEvent *event)> |
The SignedNostrEvent pointer passed to this callback is borrowed and is valid only for the duration of the callback. Copy any data that must outlive the callback.
| using nostr::NostrEventStatusCallback = typedef std::function<void(const NostrString &, bool, const NostrString& )> |
| using nostr::NostrNoticeCallback = typedef std::function<void(NostrRelay *, const NostrString &)> |
| using nostr::NostrSeenCallback = typedef std::function<bool(const SignedNostrEvent &)> |
|
strong |
|
strong |
|
strong |
Selects the encryption modes that the managed NWC service may use after reading verified NIP-47 info events. Requests queued before discovery are sent only after an encryption mode has been selected.
RequireNip44 is the default and requires nip44_v2; it does not downgrade when an older signed info event is replayed. AllowLegacyNip04 explicitly enables legacy NIP-04 when the wallet does not advertise NIP-44.
Legacy NIP-04 preserves NIP-04 wire compatibility and therefore does not add a MAC that the specification does not define. Use it only when this protocol limitation is acceptable.
| Enumerator | |
|---|---|
| RequireNip44 | |
| AllowLegacyNip04 | |
| bool nostr::decodeHexExact | ( | const NostrString & | input, |
| uint8_t * | output, | ||
| size_t | expectedBytes | ||
| ) |
| bool nostr::decodeHexExact | ( | const NostrString & | input, |
| uint8_t * | output, | ||
| size_t | outputCapacity, | ||
| size_t | expectedBytes | ||
| ) |
| bool nostr::parseHttpsUrl | ( | const NostrString & | url, |
| ParsedUrl & | parsed | ||
| ) |
| bool nostr::parseWebSocketUrl | ( | const NostrString & | url, |
| ParsedUrl & | parsed | ||
| ) |
| bool nostr::validateBase64Encoding | ( | const char * | encoded, |
| size_t | encodedSize, | ||
| bool | noPadding, | ||
| bool | urlSafe, | ||
| size_t & | decodedSize | ||
| ) |
| bool nostr::validateBolt11Invoice | ( | const NostrString & | invoice, |
| MilliSats | expectedAmount, | ||
| const NostrString & | expectedCurrency = "", |
||
| unsigned long long | nowSeconds = 0 |
||
| ) |