Skip to content

Commit 4e436af

Browse files
authored
add support for testnet 4 (#503)
1 parent 2995cbc commit 4e436af

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

crates/bcr-ebill-api/src/external/bitcoin.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl BitcoinClient {
8585
format!("{}/regtest/api{path}", get_config().esplora_base_url)
8686
}
8787
_ => {
88+
// for testnet and testnet4
8889
format!("{}/testnet/api{path}", get_config().esplora_base_url)
8990
}
9091
}
@@ -99,6 +100,7 @@ impl BitcoinClient {
99100
format!("{}/regtest{path}", get_config().esplora_base_url)
100101
}
101102
_ => {
103+
// for testnet and testnet4
102104
format!("{}/testnet{path}", get_config().esplora_base_url)
103105
}
104106
}

crates/bcr-ebill-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl Config {
3636
match self.bitcoin_network.as_str() {
3737
"mainnet" => Network::Bitcoin,
3838
"testnet" => Network::Testnet,
39+
"testnet4" => Network::Testnet4,
3940
"regtest" => Network::Regtest,
4041
_ => Network::Testnet,
4142
}

docs/wasm_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct Config {
1616

1717
It contains the following options:
1818

19-
* `bitcoin_network` - bitcoin network to use, possible values: `mainnet`, `regtest` and `testnet`
19+
* `bitcoin_network` - bitcoin network to use, possible values: `mainnet`, `regtest`, `testnet4` and `testnet`
2020
* `esplora_base_url` - bitcoin explorer base url for payment checks
2121
* `nostr_relay` - nostr relay endpoint
2222
* `surreal_db_connection` - the surreal DB connection

docs/web_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following options are available:
88
* `HTTP_ADDRESS` / `--http-address` - the HTTP address (default: 127.0.0.1)
99
* `DATA_DIR` - the data directory root (default: ".")
1010
* `SURREAL_DB_CONNECTION` - the surreal DB connection (default: "ws://localhost:8800") - set to `rocksdb://data/surreal` for embedded mode
11-
* `BITCOIN_NETWORK` - bitcoin network to use (default: testnet), possible values: `mainnet`, `regtest` and `testnet`
11+
* `BITCOIN_NETWORK` - bitcoin network to use (default: testnet), possible values: `mainnet`, `regtest`, `testnet4` and `testnet`
1212
* `RUST_LOG` - the log level, e.g.: info, trace, debug, error (default: error)
1313
* `NOSTR_RELAY` - nostr relay endpoint (default: ws://localhost:8080)
1414
* `MINT_URL` - cashu mint endpoint (default: https://moksha.minibill.tech)

0 commit comments

Comments
 (0)