2023-07-28 16:48:52 +00:00
|
|
|
/*
|
2023-05-26 21:21:16 +00:00
|
|
|
* This file is part of Stack Wallet.
|
2023-07-28 16:48:52 +00:00
|
|
|
*
|
2023-05-26 21:21:16 +00:00
|
|
|
* Copyright (c) 2023 Cypher Stack
|
|
|
|
* All Rights Reserved.
|
|
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
import 'package:stackwallet/models/node_model.dart';
|
|
|
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
|
|
|
|
|
|
|
abstract class DefaultNodes {
|
2022-11-25 19:50:13 +00:00
|
|
|
static const String defaultNodeIdPrefix = "default_";
|
2023-11-17 01:44:17 +00:00
|
|
|
static String buildId(Coin coin) => "$defaultNodeIdPrefix${coin.name}";
|
2022-08-26 08:11:35 +00:00
|
|
|
static const String defaultName = "Stack Default";
|
|
|
|
|
2023-11-17 01:44:17 +00:00
|
|
|
@Deprecated("old and decrepit")
|
2022-08-26 08:11:35 +00:00
|
|
|
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,
|
2023-04-17 13:53:39 +00:00
|
|
|
eCash,
|
2022-08-26 08:11:35 +00:00
|
|
|
epicCash,
|
2023-03-01 21:21:09 +00:00
|
|
|
ethereum,
|
2022-09-26 20:44:07 +00:00
|
|
|
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,
|
2023-11-17 01:15:20 +00:00
|
|
|
stellar,
|
|
|
|
nano,
|
|
|
|
banano,
|
|
|
|
tezos,
|
2022-08-26 08:11:35 +00:00
|
|
|
bitcoinTestnet,
|
2022-10-28 18:03:52 +00:00
|
|
|
litecoinTestNet,
|
2022-09-26 20:44:07 +00:00
|
|
|
bitcoincashTestnet,
|
2022-08-26 08:11:35 +00:00
|
|
|
dogecoinTestnet,
|
|
|
|
firoTestnet,
|
2023-07-27 11:09:56 +00:00
|
|
|
stellarTestnet,
|
2022-08-26 08:11:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
static NodeModel get bitcoin => NodeModel(
|
|
|
|
host: "bitcoin.stackwallet.com",
|
|
|
|
port: 50002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.bitcoin),
|
2022-08-26 08:11:35 +00:00
|
|
|
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,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.litecoin),
|
2022-10-28 18:03:52 +00:00
|
|
|
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,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.litecoinTestNet),
|
2022-10-28 18:03:52 +00:00
|
|
|
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,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.bitcoincash),
|
2022-09-26 20:32:53 +00:00
|
|
|
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,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.dogecoin),
|
2022-08-26 08:11:35 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.dogecoin.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
|
|
|
static NodeModel get firo => NodeModel(
|
|
|
|
host: "firo.stackwallet.com",
|
|
|
|
port: 50002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.firo),
|
2022-08-26 08:11:35 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.firo.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
|
|
|
static NodeModel get monero => NodeModel(
|
2022-10-20 16:22:01 +00:00
|
|
|
host: "https://monero.stackwallet.com",
|
2022-08-26 08:11:35 +00:00
|
|
|
port: 18081,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.monero),
|
2022-10-20 16:22:01 +00:00
|
|
|
useSSL: true,
|
2022-08-26 08:11:35 +00:00
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.monero.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
2023-01-06 23:10:05 +00:00
|
|
|
trusted: true,
|
2022-08-26 08:11:35 +00:00
|
|
|
);
|
|
|
|
|
2022-09-27 08:09:31 +00:00
|
|
|
static NodeModel get wownero => NodeModel(
|
2022-10-20 16:22:01 +00:00
|
|
|
host: "https://wownero.stackwallet.com",
|
2022-09-27 08:09:31 +00:00
|
|
|
port: 34568,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.wownero),
|
2022-10-20 16:22:01 +00:00
|
|
|
useSSL: true,
|
2022-09-27 08:09:31 +00:00
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.wownero.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
2023-01-06 23:10:05 +00:00
|
|
|
trusted: true,
|
2022-09-27 08:09:31 +00:00
|
|
|
);
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
static NodeModel get epicCash => NodeModel(
|
|
|
|
host: "http://epiccash.stackwallet.com",
|
|
|
|
port: 3413,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.epicCash),
|
2022-08-26 08:11:35 +00:00
|
|
|
useSSL: false,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.epicCash.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
2022-12-13 17:39:19 +00:00
|
|
|
static NodeModel get ethereum => NodeModel(
|
2023-03-01 21:20:40 +00:00
|
|
|
host: "https://eth.stackwallet.com",
|
|
|
|
port: 443,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.ethereum),
|
2022-12-13 17:39:19 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.ethereum.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
2022-09-23 21:02:53 +00:00
|
|
|
static NodeModel get namecoin => NodeModel(
|
|
|
|
host: "namecoin.stackwallet.com",
|
|
|
|
port: 57002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.namecoin),
|
2022-09-23 21:02:53 +00:00
|
|
|
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(
|
2023-11-17 01:44:17 +00:00
|
|
|
host: "particl.stackwallet.com",
|
|
|
|
port: 58002,
|
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.particl),
|
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.particl.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2023-06-12 19:03:32 +00:00
|
|
|
|
2023-07-19 17:08:46 +00:00
|
|
|
static NodeModel get stellar => NodeModel(
|
2023-11-17 01:44:17 +00:00
|
|
|
host: "https://horizon.stellar.org",
|
|
|
|
port: 443,
|
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.stellar),
|
|
|
|
useSSL: false,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.stellar.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2023-07-19 17:08:46 +00:00
|
|
|
|
2023-07-28 16:32:50 +00:00
|
|
|
static NodeModel get tezos => NodeModel(
|
2023-11-17 01:44:17 +00:00
|
|
|
// TODO: Change this to stack wallet one
|
|
|
|
host: "https://mainnet.api.tez.ie",
|
|
|
|
port: 443,
|
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.tezos),
|
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.tezos.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2022-11-29 19:11:30 +00:00
|
|
|
|
2023-05-19 10:20:16 +00:00
|
|
|
static NodeModel get nano => NodeModel(
|
2023-11-17 01:44:17 +00:00
|
|
|
host: "https://rainstorm.city/api",
|
|
|
|
port: 443,
|
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.nano),
|
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.nano.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2023-05-19 10:20:16 +00:00
|
|
|
|
2023-05-30 23:19:31 +00:00
|
|
|
static NodeModel get banano => NodeModel(
|
2023-11-17 01:44:17 +00:00
|
|
|
host: "https://kaliumapi.appditto.com/api",
|
|
|
|
port: 443,
|
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.banano),
|
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.banano.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2023-05-19 10:20:16 +00:00
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
static NodeModel get bitcoinTestnet => NodeModel(
|
2023-01-13 22:35:14 +00:00
|
|
|
host: "bitcoin-testnet.stackwallet.com",
|
2022-08-26 08:11:35 +00:00
|
|
|
port: 51002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.bitcoinTestNet),
|
2022-08-26 08:11:35 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.bitcoinTestNet.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
2023-11-16 20:49:35 +00:00
|
|
|
// static NodeModel get firoTestnet => NodeModel(
|
|
|
|
// host: "firo-testnet.stackwallet.com",
|
|
|
|
// port: 50002,
|
2023-11-17 01:44:17 +00:00
|
|
|
// name: DefaultNodes.defaultName,
|
2023-11-16 20:49:35 +00:00
|
|
|
// id: _nodeId(Coin.firoTestNet),
|
|
|
|
// useSSL: true,
|
|
|
|
// enabled: true,
|
|
|
|
// coinName: Coin.firoTestNet.name,
|
|
|
|
// isFailover: true,
|
|
|
|
// isDown: false,
|
|
|
|
// );
|
|
|
|
|
|
|
|
// TODO revert to above eventually
|
2022-08-26 08:11:35 +00:00
|
|
|
static NodeModel get firoTestnet => NodeModel(
|
2023-11-16 20:49:35 +00:00
|
|
|
host: "95.179.164.13",
|
|
|
|
port: 51002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.firoTestNet),
|
2022-08-26 08:11:35 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.firoTestNet.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
|
|
|
static NodeModel get dogecoinTestnet => NodeModel(
|
|
|
|
host: "dogecoin-testnet.stackwallet.com",
|
|
|
|
port: 50022,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.dogecoinTestNet),
|
2022-08-26 08:11:35 +00:00
|
|
|
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(
|
2022-10-18 14:58:42 +00:00
|
|
|
host: "bitcoincash-testnet.stackwallet.com",
|
|
|
|
port: 60002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(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-09-16 11:13:30 +00:00
|
|
|
|
2023-04-17 13:53:39 +00:00
|
|
|
static NodeModel get eCash => NodeModel(
|
|
|
|
host: "electrum.bitcoinabc.org",
|
|
|
|
port: 50002,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.eCash),
|
2023-04-17 13:53:39 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.eCash.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
|
|
|
|
2023-07-27 11:09:56 +00:00
|
|
|
static NodeModel get stellarTestnet => NodeModel(
|
2023-08-23 17:29:10 +00:00
|
|
|
host: "https://horizon-testnet.stellar.org/",
|
|
|
|
port: 50022,
|
2023-11-17 01:44:17 +00:00
|
|
|
name: DefaultNodes.defaultName,
|
|
|
|
id: DefaultNodes.buildId(Coin.stellarTestnet),
|
2023-08-23 17:29:10 +00:00
|
|
|
useSSL: true,
|
|
|
|
enabled: true,
|
|
|
|
coinName: Coin.stellarTestnet.name,
|
|
|
|
isFailover: true,
|
|
|
|
isDown: false,
|
|
|
|
);
|
2023-07-27 11:09:56 +00:00
|
|
|
|
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;
|
|
|
|
|
2023-04-17 13:53:39 +00:00
|
|
|
case Coin.eCash:
|
|
|
|
return eCash;
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
case Coin.epicCash:
|
|
|
|
return epicCash;
|
|
|
|
|
2022-12-13 17:39:19 +00:00
|
|
|
case Coin.ethereum:
|
|
|
|
return ethereum;
|
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
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
|
|
|
|
2023-07-19 17:08:46 +00:00
|
|
|
case Coin.stellar:
|
|
|
|
return stellar;
|
|
|
|
|
2023-05-19 10:20:16 +00:00
|
|
|
case Coin.nano:
|
|
|
|
return nano;
|
|
|
|
|
2023-05-30 23:29:33 +00:00
|
|
|
case Coin.banano:
|
|
|
|
return banano;
|
2023-07-28 16:32:50 +00:00
|
|
|
|
2023-06-12 19:03:32 +00:00
|
|
|
case Coin.tezos:
|
|
|
|
return tezos;
|
2023-05-30 23:29:33 +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-09-16 11:13:30 +00:00
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
case Coin.firoTestNet:
|
|
|
|
return firoTestnet;
|
|
|
|
|
|
|
|
case Coin.dogecoinTestNet:
|
|
|
|
return dogecoinTestnet;
|
2023-07-27 11:09:56 +00:00
|
|
|
|
2023-08-23 17:29:10 +00:00
|
|
|
case Coin.stellarTestnet:
|
2023-07-27 11:09:56 +00:00
|
|
|
return stellarTestnet;
|
2022-08-26 08:11:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|