Skip to content
Open
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
11 changes: 10 additions & 1 deletion payreq.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ const REGTESTNETWORK = {
scriptHash: 0xc4,
validWitnessVersions: [0, 1]
}
const SIGNETNETWORK = {
// On-chain bitcoin has the bech32 match testnet, for lightning an "s" is added
bech32: "tbs",
pubKeyHash: 0x3f,
scriptHash: 0x7b,
validWitnessVersions: [0, 1]
}
const SIMNETWORK = {
bech32: 'sb',
pubKeyHash: 0x3f,
Expand Down Expand Up @@ -909,7 +916,9 @@ function decode (paymentRequest, network) {
break
case SIMNETWORK.bech32:
coinNetwork = SIMNETWORK
break
case SIGNETNETWORK.bech32:
coinNetwork = SIGNETNETWORK;
break;
}
} else {
if (
Expand Down