stack_wallet/lib/utilities/default_nodes.dart

262 lines
6.4 KiB
Dart
Raw Normal View History

2022-08-26 08:11:35 +00:00
import 'dart:convert';
import 'package:stackwallet/models/node_model.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
abstract class DefaultNodes {
static const String defaultNodeIdPrefix = "default_";
static String _nodeId(Coin coin) => "$defaultNodeIdPrefix${coin.name}";
2022-08-26 08:11:35 +00:00
static const String defaultName = "Stack Default";
static List<NodeModel> get all => [
bitcoin,
2022-10-28 18:03:52 +00:00
litecoin,
2022-08-26 08:11:35 +00:00
dogecoin,
firo,
monero,
epicCash,
bitcoincash,
2022-09-23 21:02:53 +00:00
namecoin,
2022-09-28 15:17:16 +00:00
wownero,
2022-12-07 20:47:22 +00:00
particl,
2022-08-26 08:11:35 +00:00
bitcoinTestnet,
2022-10-28 18:03:52 +00:00
litecoinTestNet,
bitcoincashTestnet,
2022-08-26 08:11:35 +00:00
dogecoinTestnet,
firoTestnet,
];
static NodeModel get bitcoin => NodeModel(
host: "bitcoin.stackwallet.com",
port: 50002,
name: defaultName,
id: _nodeId(Coin.bitcoin),
useSSL: true,
enabled: true,
coinName: Coin.bitcoin.name,
isFailover: true,
isDown: false,
);
2022-10-28 18:03:52 +00:00
static NodeModel get litecoin => NodeModel(
2022-10-28 19:17:35 +00:00
host: "litecoin.stackwallet.com",
2022-10-28 18:03:52 +00:00
port: 20063,
name: defaultName,
id: _nodeId(Coin.litecoin),
useSSL: true,
enabled: true,
coinName: Coin.litecoin.name,
isFailover: true,
isDown: false,
);
static NodeModel get litecoinTestNet => NodeModel(
2022-10-28 19:17:35 +00:00
host: "litecoin.stackwallet.com",
2022-10-28 18:03:52 +00:00
port: 51002,
name: defaultName,
id: _nodeId(Coin.litecoinTestNet),
useSSL: true,
enabled: true,
coinName: Coin.litecoinTestNet.name,
isFailover: true,
isDown: false,
);
2022-09-26 20:32:53 +00:00
static NodeModel get bitcoincash => NodeModel(
host: "bitcoincash.stackwallet.com",
port: 50002,
name: defaultName,
id: _nodeId(Coin.bitcoincash),
useSSL: true,
enabled: true,
coinName: Coin.bitcoincash.name,
isFailover: true,
isDown: false,
);
2022-09-09 10:59:40 +00:00
2022-08-26 08:11:35 +00:00
static NodeModel get dogecoin => NodeModel(
host: "dogecoin.stackwallet.com",
port: 50022,
name: defaultName,
id: _nodeId(Coin.dogecoin),
useSSL: true,
enabled: true,
coinName: Coin.dogecoin.name,
isFailover: true,
isDown: false,
);
static NodeModel get firo => NodeModel(
host: "firo.stackwallet.com",
port: 50002,
name: defaultName,
id: _nodeId(Coin.firo),
useSSL: true,
enabled: true,
coinName: Coin.firo.name,
isFailover: true,
isDown: false,
);
static NodeModel get monero => NodeModel(
host: "https://monero.stackwallet.com",
2022-08-26 08:11:35 +00:00
port: 18081,
name: defaultName,
id: _nodeId(Coin.monero),
useSSL: true,
2022-08-26 08:11:35 +00:00
enabled: true,
coinName: Coin.monero.name,
isFailover: true,
isDown: false,
);
2022-09-27 08:09:31 +00:00
static NodeModel get wownero => NodeModel(
host: "https://wownero.stackwallet.com",
2022-09-27 08:09:31 +00:00
port: 34568,
name: defaultName,
id: _nodeId(Coin.wownero),
useSSL: true,
2022-09-27 08:09:31 +00:00
enabled: true,
coinName: Coin.wownero.name,
isFailover: true,
isDown: false,
);
2022-08-26 08:11:35 +00:00
static NodeModel get epicCash => NodeModel(
host: "http://epiccash.stackwallet.com",
port: 3413,
name: defaultName,
id: _nodeId(Coin.epicCash),
useSSL: false,
enabled: true,
coinName: Coin.epicCash.name,
isFailover: true,
isDown: false,
);
2022-09-23 21:02:53 +00:00
static NodeModel get namecoin => NodeModel(
host: "namecoin.stackwallet.com",
port: 57002,
name: defaultName,
id: _nodeId(Coin.namecoin),
useSSL: true,
enabled: true,
coinName: Coin.namecoin.name,
isFailover: true,
isDown: false,
);
2022-09-12 12:01:42 +00:00
2022-11-29 19:11:30 +00:00
static NodeModel get particl => NodeModel(
2022-12-09 18:58:35 +00:00
host: "particl.stackwallet.com",
port: 58002,
2022-11-29 19:11:30 +00:00
name: defaultName,
id: _nodeId(Coin.particl),
useSSL: true,
enabled: true,
coinName: Coin.particl.name,
isFailover: true,
2022-12-09 18:58:35 +00:00
isDown: false);
2022-11-29 19:11:30 +00:00
2022-08-26 08:11:35 +00:00
static NodeModel get bitcoinTestnet => NodeModel(
host: "electrumx-testnet.cypherstack.com",
port: 51002,
name: defaultName,
id: _nodeId(Coin.bitcoinTestNet),
useSSL: true,
enabled: true,
coinName: Coin.bitcoinTestNet.name,
isFailover: true,
isDown: false,
);
static NodeModel get firoTestnet => NodeModel(
host: "firo-testnet.stackwallet.com",
port: 50002,
name: defaultName,
id: _nodeId(Coin.firoTestNet),
useSSL: true,
enabled: true,
coinName: Coin.firoTestNet.name,
isFailover: true,
isDown: false,
);
static NodeModel get dogecoinTestnet => NodeModel(
host: "dogecoin-testnet.stackwallet.com",
port: 50022,
name: defaultName,
id: _nodeId(Coin.dogecoinTestNet),
useSSL: true,
enabled: true,
coinName: Coin.dogecoinTestNet.name,
isFailover: true,
isDown: false,
);
2022-09-26 20:32:53 +00:00
static NodeModel get bitcoincashTestnet => NodeModel(
host: "bitcoincash-testnet.stackwallet.com",
port: 60002,
2022-09-26 20:32:53 +00:00
name: defaultName,
2022-09-26 21:36:01 +00:00
id: _nodeId(Coin.bitcoincashTestnet),
2022-09-26 20:32:53 +00:00
useSSL: true,
enabled: true,
2022-09-26 21:36:01 +00:00
coinName: Coin.bitcoincashTestnet.name,
2022-09-26 20:32:53 +00:00
isFailover: true,
isDown: false,
);
2022-08-26 08:11:35 +00:00
static NodeModel getNodeFor(Coin coin) {
switch (coin) {
case Coin.bitcoin:
return bitcoin;
2022-10-28 18:03:52 +00:00
case Coin.litecoin:
return litecoin;
2022-09-26 20:32:53 +00:00
case Coin.bitcoincash:
return bitcoincash;
2022-09-09 10:59:40 +00:00
2022-08-26 08:11:35 +00:00
case Coin.dogecoin:
return dogecoin;
case Coin.epicCash:
return epicCash;
case Coin.firo:
return firo;
case Coin.monero:
return monero;
2022-09-27 08:09:31 +00:00
case Coin.wownero:
return wownero;
2022-09-23 21:02:53 +00:00
case Coin.namecoin:
return namecoin;
2022-09-12 12:01:42 +00:00
2022-11-29 19:11:30 +00:00
case Coin.particl:
2022-10-25 15:43:58 +00:00
return particl;
2022-11-29 19:11:30 +00:00
2022-08-26 08:11:35 +00:00
case Coin.bitcoinTestNet:
return bitcoinTestnet;
2022-10-28 18:03:52 +00:00
case Coin.litecoinTestNet:
return litecoinTestNet;
2022-09-26 20:32:53 +00:00
case Coin.bitcoincashTestnet:
return bitcoincashTestnet;
2022-08-26 08:11:35 +00:00
case Coin.firoTestNet:
return firoTestnet;
case Coin.dogecoinTestNet:
return dogecoinTestnet;
}
}
static final String defaultEpicBoxConfig = jsonEncode({
"domain": "209.127.179.199",
"port": 13420,
});
}