Skip to content

Regtest doesn't work #9

@eNzyOfficial

Description

@eNzyOfficial

https://github.com/Jorijn/bitcoin-bolt11/blob/f339bfb531159583ea966f924c97de2f85402002/src/Encoder/PaymentRequestDecoder.php#L295

If you pass in a regtest invoice, it fails. If I add another the bcrt case, it seems to work fine:

switch ($bech32Prefix) {
    case 'bc':
    case 'bcrt':
        return new BitcoinMainnet();

    case 'tb':
        return new BitcoinTestnet();

    default:
        throw new UnknownNetworkVersionException('unknown network for invoice:' . $bech32Prefix);
}

Although there might be a need for a new BitcoinRegtest class, but that's way above my knowledge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions