Nostrduino
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
nostr::Nip47 Class Reference

#include <Nip47.h>

Public Member Functions

 Nip47 ()
 
 Nip47 (Nip04 nip04, NostrString servicePubKey, NostrString userPrivKey)
 
void setEncryption (Nip47Encryption encryption, bool includeEncryptionTag=true)
 
Nip47Encryption getEncryption () const
 
SignedNostrEvent payInvoice (NostrString invoice, MilliSats amount=MILLISATS_UNSPECIFIED)
 
SignedNostrEvent multiPayInvoice (std::initializer_list< Invoice > invoices)
 
SignedNostrEvent multiPayInvoice (const std::vector< Invoice > &invoices)
 
SignedNostrEvent payKeySend (NostrString pubkey, MilliSats amount, NostrString preimage="", std::initializer_list< TLVRecords > tlv={})
 
SignedNostrEvent payKeySend (NostrString pubkey, MilliSats amount, NostrString preimage, const std::vector< TLVRecords > &tlv)
 
SignedNostrEvent multiPayKeySend (std::initializer_list< KeySend > keySends)
 
SignedNostrEvent multiPayKeySend (const std::vector< KeySend > &keySends)
 
SignedNostrEvent makeInvoice (MilliSats amount, NostrString description="", NostrString descriptionHash="", unsigned long expiry=0)
 
SignedNostrEvent lookUpPaymentHash (NostrString paymentHash)
 
SignedNostrEvent lookUpInvoice (NostrString invoice)
 
SignedNostrEvent listTransactions (unsigned long from=0, unsigned long until=0, int limit=0, int offset=0, bool unpaid=false, NostrString type="")
 
SignedNostrEvent getBalance ()
 
SignedNostrEvent getInfo ()
 
void parseResponse (SignedNostrEvent *response, Nip47Response< PayInvoiceResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< MultiPayInvoiceResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< PayKeySendResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< MultiPayKeySendResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< MakeInvoiceResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< LookUpInvoiceResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< ListTransactionsResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< GetBalanceResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< GetInfoResponse > &out)
 
void parseResponse (SignedNostrEvent *response, Nip47Response< NotificationResponse > &out)
 

Static Public Member Functions

static bool parseNWC (NostrString, NWCData &)
 

Constructor & Destructor Documentation

◆ Nip47() [1/2]

nostr::Nip47::Nip47 ( )
inline

◆ Nip47() [2/2]

nostr::Nip47::Nip47 ( Nip04  nip04,
NostrString  servicePubKey,
NostrString  userPrivKey 
)
inline

Member Function Documentation

◆ getBalance()

SignedNostrEvent Nip47::getBalance ( )

◆ getEncryption()

Nip47Encryption nostr::Nip47::getEncryption ( ) const
inline

◆ getInfo()

SignedNostrEvent Nip47::getInfo ( )

◆ listTransactions()

SignedNostrEvent Nip47::listTransactions ( unsigned long  from = 0,
unsigned long  until = 0,
int  limit = 0,
int  offset = 0,
bool  unpaid = false,
NostrString  type = "" 
)

◆ lookUpInvoice()

SignedNostrEvent Nip47::lookUpInvoice ( NostrString  invoice)

◆ lookUpPaymentHash()

SignedNostrEvent Nip47::lookUpPaymentHash ( NostrString  paymentHash)

◆ makeInvoice()

SignedNostrEvent Nip47::makeInvoice ( MilliSats  amount,
NostrString  description = "",
NostrString  descriptionHash = "",
unsigned long  expiry = 0 
)

◆ multiPayInvoice() [1/2]

SignedNostrEvent Nip47::multiPayInvoice ( const std::vector< Invoice > &  invoices)

◆ multiPayInvoice() [2/2]

SignedNostrEvent Nip47::multiPayInvoice ( std::initializer_list< Invoice invoices)

◆ multiPayKeySend() [1/2]

SignedNostrEvent Nip47::multiPayKeySend ( const std::vector< KeySend > &  keySends)

◆ multiPayKeySend() [2/2]

SignedNostrEvent Nip47::multiPayKeySend ( std::initializer_list< KeySend keySends)

◆ parseNWC()

bool Nip47::parseNWC ( NostrString  nwc,
NWCData data 
)
static

◆ parseResponse() [1/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< GetBalanceResponse > &  out 
)

◆ parseResponse() [2/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< GetInfoResponse > &  out 
)

◆ parseResponse() [3/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< ListTransactionsResponse > &  out 
)

◆ parseResponse() [4/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< LookUpInvoiceResponse > &  out 
)

◆ parseResponse() [5/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< MakeInvoiceResponse > &  out 
)

◆ parseResponse() [6/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< MultiPayInvoiceResponse > &  out 
)

◆ parseResponse() [7/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< MultiPayKeySendResponse > &  out 
)

◆ parseResponse() [8/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< NotificationResponse > &  out 
)

◆ parseResponse() [9/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< PayInvoiceResponse > &  out 
)

◆ parseResponse() [10/10]

void Nip47::parseResponse ( SignedNostrEvent response,
Nip47Response< PayKeySendResponse > &  out 
)

◆ payInvoice()

SignedNostrEvent Nip47::payInvoice ( NostrString  invoice,
MilliSats  amount = MILLISATS_UNSPECIFIED 
)

◆ payKeySend() [1/2]

SignedNostrEvent Nip47::payKeySend ( NostrString  pubkey,
MilliSats  amount,
NostrString  preimage,
const std::vector< TLVRecords > &  tlv 
)

◆ payKeySend() [2/2]

SignedNostrEvent Nip47::payKeySend ( NostrString  pubkey,
MilliSats  amount,
NostrString  preimage = "",
std::initializer_list< TLVRecords tlv = {} 
)

◆ setEncryption()

void Nip47::setEncryption ( Nip47Encryption  encryption,
bool  includeEncryptionTag = true 
)

The documentation for this class was generated from the following files: