Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ tmp
.vscode
build
.cache

hardware-installer/
13 changes: 6 additions & 7 deletions INSTALLER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ LNPoS

## Free and open-source bitcoin point-of-sale


LNPoS includes:

- LNPoS (for online LN payments, original <a href="https://github.com/arcbtc/LNPoS">project</a>)
- LNURLPoS (for offline LN payments, original <a href="https://github.com/arcbtc/LNURLPoS">project</a> )
- OnChain (for onchain payments)
- LNURLATM (for making offline LN withdraw links).
- Online PoS (for online LN payments, just connects to LNbits wallet over wifi)
- Offline PoS (for offline LN payments, original <a href="https://github.com/lnbits/lnpos">project</a>)
- Onchain (for onchain payments, uses an bip39 xpub and also creates a mempool.space link for checking)
- Offline ATM (for making offline LN withdraw links, original <a href="https://github.com/lnbits/fossa">project</a>)
<br></br>

Original <a href="https://twitter.com/arcbtc/status/1484942260013838336">demo</a>
Video tutorial <a href="https://www.youtube.com/watch?v=IhwCEDwGg2E">tutorial</a>

Video tutorial <a href="https://twitter.com/arcbtc/status/1585605023337168896">https://twitter.com/arcbtc/status/1585605023337168896</a>
Born <a href="https://twitter.com/arcbtc/status/1484942260013838336">here</a>

Join our telegram group <a href="https://t.me/makerbits">MakerBits</a>
Empty file modified build.sh
100644 → 100755
Empty file.
72 changes: 43 additions & 29 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,63 +20,61 @@ export const addressesAndFiles = [
export const configPath = "elements.json";
export const elements = [
{
name: "config_lnurlpos",
value: "",
label: "LNURLPoS string from LNURLDevices extension",
type: "text",
type: "heading",
label: "Offline PoS",
},
{
name: "config_lnurlatm",
name: "config_offlinepos",
value: "",
label: "LNURL ATM",
label: "String from the LNPoS extension",
type: "text",
},
{
name: "config_password",
type: "heading",
label: "Offline ATM",
},
{
name: "config_offlineatm",
value: "",
label: "Device Password",
label: "String from the FOSSA extension",
type: "text",
},
{
type: "heading",
label: "Onchain addresses",
},
{
name: "config_masterkey",
value: "",
label: "Onchain Master Public Key",
label: "Onchain Extended Public Key",
type: "text",
},
{
name: "config_server",
value: "",
label: "LNbits Server",
name: "config_mempool",
value: "https://mempool.space",
label: "Mempool.space Server, for creating a checking link",
type: "text",
},
{
name: "config_invoice",
value: "",
label: "Wallet Invoice Key",
type: "text",
type: "heading",
label: "Online PoS",
},
{
name: "config_lncurrency",
value: "",
label: "PoS Currency. ie: EUR",
value: "USD",
label: "PoS Currency. ie: GBP, EUR",
type: "text",
},
{
name: "config_lnurlatmms",
value: "",
label: "Mempool.space Server",
name: "config_server",
value: "https://demo.lnbits.com",
label: "LNbits Server",
type: "text",
},
{
name: "config_lnurlatmpin",
name: "config_invoice",
value: "",
label: "LNURLATM pin String",
type: "text",
},
{
name: "config_decimalplaces",
value: 2,
label: "FIAT Decimal Places",
label: "Wallet Invoice Key",
type: "text",
},
{
Expand All @@ -91,4 +89,20 @@ export const elements = [
label: "WiFi Password",
type: "text",
},
{
type: "heading",
label: "Additional settings",
},
{
name: "config_securitypin",
value: "000000",
label: "Security pin for settings and ATM mode, 4-6 characters",
type: "text",
},
{
name: "config_fiatdecimalplaces",
value: 2,
label: "FIAT Decimal Places ie 2 for USD, 0 for YEN",
type: "text",
},
];
Empty file modified debug.sh
100644 → 100755
Empty file.
52 changes: 26 additions & 26 deletions lnpos/100_config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -125,27 +125,27 @@ void readFiles()
return;
}

lnurlPoS = getJsonValue(doc, "config_lnurlpos");
lnurlATM = getJsonValue(doc, "config_lnurlatm");
offlinePoS = getJsonValue(doc, "config_offlinepos");
offlineATM = getJsonValue(doc, "config_offlineatm");
masterKey = getJsonValue(doc, "config_masterkey");
lnbitsServer = getJsonValue(doc, "config_server");
invoice = getJsonValue(doc, "config_invoice");
lncurrency = getJsonValue(doc, "config_lncurrency");
lnurlATMMS = getJsonValue(doc, "config_lnurlatmms");
lnurlATMPin = getJsonValue(doc, "config_lnurlatmpin");
decimalplaces = getJsonValue(doc, "config_decimalplaces");
lnCurrency = getJsonValue(doc, "config_lncurrency");
mempool = getJsonValue(doc, "config_mempool");
securityPin = getJsonValue(doc, "config_securitypin");
fiatDecimalPlaces = getJsonValue(doc, "config_fiatdecimalplaces");
ssid = getJsonValue(doc, "config_wifi_ssid");
password = getJsonValue(doc, "config_wifi_password");
}

////////LNURL PoS string/////////
if (lnurlPoS != "null" || lnurlPoS != "")
if (offlinePoS != "null" || offlinePoS != "")
{
baseURLPoS = getValue(lnurlPoS, ',', 0);
secretPoS = getValue(lnurlPoS, ',', 1);
currencyPoS = getValue(lnurlPoS, ',', 2);
baseURLPoS = getValue(offlinePoS, ',', 0);
secretPoS = getValue(offlinePoS, ',', 1);
currencyPoS = getValue(offlinePoS, ',', 2);
Serial.println("");
Serial.println("lnurlPoS: " + lnurlPoS);
Serial.println("offlinePoS: " + offlinePoS);
Serial.println("baseURLPoS: " + baseURLPoS);
Serial.println("secretPoS: " + secretPoS);
Serial.println("currencyPoS: " + currencyPoS);
Expand All @@ -156,21 +156,21 @@ void readFiles()
}
else
{
Serial.println("lnurlPoS not set");
Serial.println("offlinePoS not set");
}

////////LNURL ATM string/////////
if (lnurlATM != "null" || lnurlATM != "")
if (offlineATM != "null" || offlineATM != "")
{
Serial.println("");
Serial.println("lnurlATM: " + lnurlATM);
baseURLATM = getValue(lnurlATM, ',', 0);
Serial.println("offlineATM: " + offlineATM);
baseURLATM = getValue(offlineATM, ',', 0);
// remove /api/v1.... and add /atm?lightning=
int apiPos = baseURLATM.indexOf("api");
baseUrlAtmPage = baseURLATM.substring(0, apiPos);
baseUrlAtmPage += "atm?lightning=";
secretATM = getValue(lnurlATM, ',', 1);
currencyATM = getValue(lnurlATM, ',', 2);
secretATM = getValue(offlineATM, ',', 1);
currencyATM = getValue(offlineATM, ',', 2);
Serial.println("baseUrlAtmPage: " + baseUrlAtmPage);
Serial.println("baseURLATM: " + baseURLATM);
Serial.println("secretATM: " + secretATM);
Expand Down Expand Up @@ -230,48 +230,48 @@ void readFiles()
}

/////////PoS Currency///////
if (lncurrency != "null" || lncurrency != "")
if (lnCurrency != "null" || lnCurrency != "")
{
Serial.println("");
Serial.println("PoS currency used from memory");
Serial.println("PoS currency: " + lncurrency);
Serial.println("PoS currency: " + lnCurrency);
}
else
{
Serial.println("Pos currency not set");
}

/////////mempool.space server///////
if (lnurlATMMS != "null" || lnurlATMMS != "")
if (mempool != "null" || mempool != "")
{
Serial.println("");
Serial.println("mempool.space server used from memory");
Serial.println("mempool.space server: " + lnurlATMMS);
Serial.println("mempool.space server: " + mempool);
}
else
{
Serial.println("mempool.space server not set");
}

/////////mATM/Settings pin///////
if (lnurlATMPin != "null" || lnurlATMPin != "")
if (securityPin != "null" || securityPin != "")
{
Serial.println("");
Serial.println("ATM/settings security pin used from memory");
Serial.println("ATM/settings security pin: " + lnurlATMPin);
Serial.println("ATM/settings security pin: " + securityPin);
}
else
{
lnurlATMPin = "878787";
securityPin = "878787";
Serial.println("ATM/Settings security pin not set using default");
}

/////////no. FIAT decimal places///////
if (decimalplaces != "null" || decimalplaces != "")
if (fiatDecimalPlaces != "null" || fiatDecimalPlaces != "")
{
Serial.println("");
Serial.println("no. fiat decimal places used from memory");
Serial.println("no. fiat decimal places: " + decimalplaces);
Serial.println("no. fiat decimal places: " + fiatDecimalPlaces);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion lnpos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
0.1.4
======
- Fix typo with logging 'lnurlATM' configuration to serial
- Fix typo with logging 'offlineATM' configuration to serial
- Remove unused WebServer to reduce build time, file size and installation time
- Show a little "arrow" in front of the selected menu item to avoid ambiguity when only 2 menu items are present (or when the user is color blind)
- Make "USB" indicator blue so it looks better and is easier to distinguish
Expand Down
Loading