I'm writing a script in C that is mean to make the usage of my c-lightning wallet more convenient. And so I have to
specify a limit of characters (l
is a variable that stands for label):
puts("The label(a unique string or number)?");
char l[15];
fgets(l, 15, stdin);
l[strcspn(l, "\n")] = 0;
I arbitrarily decided on 15 not knowing whether lightning-cli invoice
would accept such long string. Although help invoice
gives some info about the label:
The label must be a unique string or number (which is treated as a string, so "01" is different from "1"); it is never revealed to other nodes on the lightning network, but it can be used to query the status of this invoice.
it does not specify it's length nor its character set? Are UTF-8 characters accepted within the label or should I use only ASCII character set? What is the maximum size / number of characters of the label?