Nostrduino
Loading...
Searching...
No Matches
Namespaces | Data Structures | Typedefs | Enumerations | Functions
nostr Namespace Reference

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
 

Typedefs

typedef struct nostr::s_Invoice Invoice
 
typedef struct nostr::s_TLVRecords TLVRecords
 
typedef struct nostr::s_KeySend KeySend
 
typedef struct nostr::s_PayInvoiceResponse PayInvoiceResponse
 
typedef struct nostr::s_MultiPayInvoiceResponse MultiPayInvoiceResponse
 
typedef struct nostr::s_PayKeySendResponse PayKeySendResponse
 
typedef struct nostr::s_MultiPayKeySendResponse MultiPayKeySendResponse
 
typedef struct nostr::s_MakeInvoiceResponse MakeInvoiceResponse
 
typedef struct nostr::s_LookUpInvoiceResponse LookUpInvoiceResponse
 
typedef struct nostr::s_Transaction Transaction
 
typedef struct nostr::s_ListTransactionsResponse ListTransactionsResponse
 
typedef struct nostr::s_GetBalanceResponse GetBalanceResponse
 
typedef struct nostr::s_GetInfoResponse GetInfoResponse
 
typedef struct nostr::s_NWCData NWCData
 
typedef struct nostr::s_Nip47Notification Nip47Notification
 
typedef struct nostr::s_NotificationResponse NotificationResponse
 
using MilliSats = int64_t
 
using EventSubmissionFailureCallback = std::function< void(const String &)>
 
typedef struct nostr::s_NostrEventTag NostrEventTag
 
using NostrCloseCallback = std::function< void(const NostrString &, const NostrString &)>
 
using NostrNoticeCallback = std::function< void(NostrRelay *, const NostrString &)>
 
using NostrEOSECallback = std::function< void(const NostrString &)>
 
using NostrEventCallback = std::function< void(const NostrString &, SignedNostrEvent *event)>
 
using NostrEventStatusCallback = std::function< void(const NostrString &, bool, const NostrString &)>
 
using NostrSeenCallback = std::function< bool(const SignedNostrEvent &)>
 
typedef struct nostr::s_EventStatusCallbackEntry EventStatusCallbackEntry
 

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)
 

Typedef Documentation

◆ EventStatusCallbackEntry

◆ EventSubmissionFailureCallback

◆ GetBalanceResponse

◆ GetInfoResponse

◆ Invoice

◆ KeySend

◆ ListTransactionsResponse

◆ LookUpInvoiceResponse

◆ MakeInvoiceResponse

◆ MilliSats

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.

◆ MultiPayInvoiceResponse

◆ MultiPayKeySendResponse

◆ Nip47Notification

◆ NostrCloseCallback

◆ NostrEOSECallback

◆ NostrEventCallback

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.

◆ NostrEventStatusCallback

◆ NostrEventTag

◆ NostrNoticeCallback

◆ NostrSeenCallback

◆ NotificationResponse

◆ NWCData

◆ PayInvoiceResponse

◆ PayKeySendResponse

◆ TLVRecords

◆ Transaction

Enumeration Type Documentation

◆ ConnectionStatus

Enumerator
CONNECTED 
DISCONNECTED 
ERROR 

◆ Nip47Encryption

Enumerator
Nip04 
Nip44V2 

◆ NWCEncryptionPolicy

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 

Function Documentation

◆ amountWithinConfiguredMaximum()

bool nostr::amountWithinConfiguredMaximum ( MilliSats  amount)
inline

◆ decodeHexExact() [1/2]

bool nostr::decodeHexExact ( const NostrString input,
uint8_t output,
size_t  expectedBytes 
)

◆ decodeHexExact() [2/2]

bool nostr::decodeHexExact ( const NostrString input,
uint8_t output,
size_t  outputCapacity,
size_t  expectedBytes 
)

◆ isOptionalMilliSatsValid()

bool nostr::isOptionalMilliSatsValid ( MilliSats  amount)
inline

◆ isRequiredMilliSatsValid()

bool nostr::isRequiredMilliSatsValid ( MilliSats  amount)
inline

◆ parseHttpsUrl()

bool nostr::parseHttpsUrl ( const NostrString url,
ParsedUrl parsed 
)

◆ parseWebSocketUrl()

bool nostr::parseWebSocketUrl ( const NostrString url,
ParsedUrl parsed 
)

◆ validateBase64Encoding()

bool nostr::validateBase64Encoding ( const char encoded,
size_t  encodedSize,
bool  noPadding,
bool  urlSafe,
size_t decodedSize 
)

◆ validateBolt11Invoice()

bool nostr::validateBolt11Invoice ( const NostrString invoice,
MilliSats  expectedAmount,
const NostrString expectedCurrency = "",
unsigned long long  nowSeconds = 0 
)