diff --git a/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.Liquid.cs b/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.Liquid.cs index d87f191af..cacea5c59 100644 --- a/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.Liquid.cs +++ b/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.Liquid.cs @@ -31,21 +31,7 @@ namespace BTCPayServer CryptoImagePath = "imlegacy/liquid.png", DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"), - SupportRBF = true, - //https://github.com/spesmilo/electrum/blob/11733d6bc271646a00b69ff07657119598874da4/electrum/constants.py - ElectrumMapping = NetworkType == NetworkType.Mainnet - ? new Dictionary() - { - {0x0488b21eU, DerivationType.Legacy }, // xpub - {0x049d7cb2U, DerivationType.SegwitP2SH }, // ypub - {0x4b24746U, DerivationType.Segwit }, //zpub - } - : new Dictionary() - { - {0x043587cfU, DerivationType.Legacy}, - {0x044a5262U, DerivationType.SegwitP2SH}, - {0x045f1cf6U, DerivationType.Segwit} - }, + SupportRBF = true }); } } diff --git a/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.LiquidAssets.cs b/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.LiquidAssets.cs index 4b9d14ca5..231af2278 100644 --- a/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.LiquidAssets.cs +++ b/BTCPayServer.Common/Altcoins/Liquid/BTCPayNetworkProvider.LiquidAssets.cs @@ -30,21 +30,29 @@ namespace BTCPayServer CryptoImagePath = "imlegacy/liquid-tether.svg", DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"), - SupportRBF = true, - //https://github.com/spesmilo/electrum/blob/11733d6bc271646a00b69ff07657119598874da4/electrum/constants.py - ElectrumMapping = NetworkType == NetworkType.Mainnet - ? new Dictionary() - { - {0x0488b21eU, DerivationType.Legacy }, // xpub - {0x049d7cb2U, DerivationType.SegwitP2SH }, // ypub - {0x4b24746U, DerivationType.Segwit }, //zpub - } - : new Dictionary() - { - {0x043587cfU, DerivationType.Legacy}, - {0x044a5262U, DerivationType.SegwitP2SH}, - {0x045f1cf6U, DerivationType.Segwit} - } + SupportRBF = true + }); + + Add(new ElementsBTCPayNetwork() + { + CryptoCode = "ETB", + NetworkCryptoCode = "LBTC", + DefaultRateRules = new[] + { + + "ETB_X = ETB_BTC * BTC_X", + "ETB_BTC = bitpay(ETB_BTC)" + }, + Divisibility = 2, + AssetId = new uint256("ce091c998b83c78bb71a632313ba3760f1763d9cfcffae02258ffa9865a37bd2"), + DisplayName = "Ethiopian Birr", + BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://blockstream.info/liquid/tx/{0}" : "https://blockstream.info/testnet/liquid/tx/{0}", + NBXplorerNetwork = nbxplorerNetwork, + UriScheme = "liquidnetwork", + CryptoImagePath = "imlegacy/etb.png", + DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), + CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"), + SupportRBF = true }); } } diff --git a/BTCPayServer/wwwroot/imlegacy/etb.png b/BTCPayServer/wwwroot/imlegacy/etb.png new file mode 100644 index 000000000..363cff51c Binary files /dev/null and b/BTCPayServer/wwwroot/imlegacy/etb.png differ