mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-06-06 04:59:45 +02:00
printed lnurl if it exists as qr code
This commit is contained in:
parent
27ce32bd1b
commit
a64fd45409
@ -307,6 +307,14 @@ void printProfile(Store node, String profilePubkey) {
|
|||||||
pronoun = "They";
|
pronoun = "They";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String about = gKindONames[profilePubkey]?.about??"";
|
||||||
|
String picture = gKindONames[profilePubkey]?.picture??"";
|
||||||
|
String lud16 = gKindONames[profilePubkey]?.lud16??"";
|
||||||
|
int dateLastUpdated = gKindONames[profilePubkey]?.createdAt??0;
|
||||||
|
bool verified = gKindONames[profilePubkey]?.nip05Verified??false;
|
||||||
|
String nip05Id = gKindONames[profilePubkey]?.nip05Id??"";
|
||||||
|
|
||||||
|
|
||||||
// print QR code
|
// print QR code
|
||||||
print("The QR code for public key:\n\n");
|
print("The QR code for public key:\n\n");
|
||||||
try {
|
try {
|
||||||
@ -315,13 +323,19 @@ void printProfile(Store node, String profilePubkey) {
|
|||||||
print("Could not generate qr code. \n");
|
print("Could not generate qr code. \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
print("");
|
// print LNRUL if it exists
|
||||||
String about = gKindONames[profilePubkey]?.about??"";
|
if( lud16.length > gMinLud16AddressLength) {
|
||||||
String picture = gKindONames[profilePubkey]?.picture??"";
|
try {
|
||||||
String lud16 = gKindONames[profilePubkey]?.lud16??"";
|
List<int>? typesAndModule = getTypeAndModule(lud16);
|
||||||
int dateLastUpdated = gKindONames[profilePubkey]?.createdAt??0;
|
if( typesAndModule != null) {
|
||||||
bool verified = gKindONames[profilePubkey]?.nip05Verified??false;
|
print("The LNRUL in lud16 as QR:\n\n");
|
||||||
String nip05Id = gKindONames[profilePubkey]?.nip05Id??"";
|
print(getPubkeyAsQrString(lud16, typesAndModule[0], typesAndModule[1]));
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
print("Could not generate qr code for the lnurl given. \n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print("\nName : $authorName ( ${profilePubkey} ).");
|
print("\nName : $authorName ( ${profilePubkey} ).");
|
||||||
print("About : $about");
|
print("About : $about");
|
||||||
print("Picture : $picture");
|
print("Picture : $picture");
|
||||||
|
@ -191,6 +191,9 @@ const int gMinEventIdLenInSearch = gEventLenPrinted;
|
|||||||
int gInvalidInputCount = 0;
|
int gInvalidInputCount = 0;
|
||||||
const int gMaxInValidInputAccepted = 40;
|
const int gMaxInValidInputAccepted = 40;
|
||||||
|
|
||||||
|
// LN settings
|
||||||
|
const int gMinLud16AddressLength = 10; // used in printProfile
|
||||||
|
|
||||||
// https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors
|
// https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors
|
||||||
// Color related settings
|
// Color related settings
|
||||||
const String defaultTextColor = "green";
|
const String defaultTextColor = "green";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user