mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-03 09:19:22 +00:00
Merge branch 'implement-name-coin' into testing
This commit is contained in:
commit
cd80e9f4d2
28 changed files with 16180 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -37,6 +37,8 @@ lib/generated_plugin_registrant.dart
|
||||||
test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart
|
test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart
|
||||||
test/services/coins/firo/firo_wallet_test_parameters.dart
|
test/services/coins/firo/firo_wallet_test_parameters.dart
|
||||||
test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart
|
test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart
|
||||||
|
test/services/coins/namecoin/namecoin_wallet_test_parameters.dart
|
||||||
|
test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart
|
||||||
/integration_test/private.dart
|
/integration_test/private.dart
|
||||||
|
|
||||||
# Exceptions to above rules.
|
# Exceptions to above rules.
|
||||||
|
|
BIN
assets/images/bitcoincash.png
Normal file
BIN
assets/images/bitcoincash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 354 KiB |
1
assets/svg/coin_icons/Bitcoincash.svg
Normal file
1
assets/svg/coin_icons/Bitcoincash.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 511.76 511.76"><title>bitcoin-cash-bch</title><circle style="fill:#0ac18e;" cx="255.88" cy="255.88" r="255.88"/><path id="symbol" style="fill:#fff;" d="M335.94,170.3c-12.86-29.16-42.41-35.4-78.59-29.36L245.73,95.87,218.32,103l11.43,44.94c-7.21,1.82-14.61,3.38-21.95,5.46l-11.43-44.68L169,115.75l11.63,45.07c-5.91,1.69-55.33,14.35-55.33,14.35l7.53,29.35s20.13-5.65,19.94-5.19c11.17-2.92,16.43,2.66,18.9,7.92l32,123.53c.39,3.57-.26,9.67-7.92,11.75.45.26-19.94,5.13-19.94,5.13l3,34.23s49-12.54,55.4-14.16l11.76,45.59,27.4-7.08-11.75-45.91q11.3-2.64,22-5.46l11.69,45.66,27.4-7.08-11.75-45.53c42.21-10.26,72-36.89,65.92-77.61-3.9-24.55-30.72-44.68-53-46.95,13.7-12.15,20.65-29.88,12.15-53.06ZM322.75,277.78c5.46,40.33-50.59,45.27-69.1,50.14l-16.11-60.33C256.12,262.71,313.53,242.26,322.75,277.78ZM289,195.63c5.78,35.85-42.15,40-57.61,44L216.7,184.85C232.22,181,277.23,162.44,289,195.63Z" transform="translate(-0.24 -0.34)"/></svg>
|
After Width: | Height: | Size: 978 B |
1
assets/svg/coin_icons/Namecoin.svg
Normal file
1
assets/svg/coin_icons/Namecoin.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><g fill="none" fill-rule="evenodd"><circle cx="16" cy="16" r="16" fill="#186C9D"/><path fill="#FFF" fill-rule="nonzero" d="M19.261 23.5l.001-.002a1.8 1.8 0 0 0 .458-.05c.876-.205 1.617-.97 1.793-1.796L25 8.556l-2.772-.014-2.286 8.568-6.18-8.597-.004.004.003-.01L12.74 8.5v.001a1.9 1.9 0 0 0-.459.049c-.875.206-1.616.971-1.793 1.796L7 23.445l2.773.012 2.285-8.568 6.18 8.598h.003l1.02.013zm-6.593-10.894l.483-1.81 6.181 8.599-.483 1.81-6.18-8.6z"/></g></svg>
|
After Width: | Height: | Size: 520 B |
|
@ -113,8 +113,10 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
|
case Coin.bitcoincash:
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
|
case Coin.namecoin:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
@ -527,6 +529,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
|
case Coin.namecoin:
|
||||||
|
case Coin.bitcoincash:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
|
|
@ -2250,7 +2250,7 @@ class BitcoinWallet extends CoinServiceAPI {
|
||||||
batches[batchNumber] = {};
|
batches[batchNumber] = {};
|
||||||
}
|
}
|
||||||
final scripthash = _convertToScriptHash(allAddresses[i], _network);
|
final scripthash = _convertToScriptHash(allAddresses[i], _network);
|
||||||
final id = const Uuid().v1();
|
final id = Logger.isTestEnv ? "$i" : const Uuid().v1();
|
||||||
requestIdToAddressMap[id] = allAddresses[i];
|
requestIdToAddressMap[id] = allAddresses[i];
|
||||||
batches[batchNumber]!.addAll({
|
batches[batchNumber]!.addAll({
|
||||||
id: [scripthash]
|
id: [scripthash]
|
||||||
|
|
3111
lib/services/coins/bitcoincash/bitcoincash_wallet.dart
Normal file
3111
lib/services/coins/bitcoincash/bitcoincash_wallet.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -8,6 +8,8 @@ import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
|
||||||
import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart';
|
import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart';
|
||||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||||
import 'package:stackwallet/services/coins/monero/monero_wallet.dart';
|
import 'package:stackwallet/services/coins/monero/monero_wallet.dart';
|
||||||
|
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart';
|
||||||
|
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||||
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/prefs.dart';
|
import 'package:stackwallet/utilities/prefs.dart';
|
||||||
|
@ -97,6 +99,26 @@ abstract class CoinServiceAPI {
|
||||||
tracker: tracker,
|
tracker: tracker,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return BitcoinCashWallet(
|
||||||
|
walletId: walletId,
|
||||||
|
walletName: walletName,
|
||||||
|
coin: coin,
|
||||||
|
client: client,
|
||||||
|
cachedClient: cachedClient,
|
||||||
|
tracker: tracker,
|
||||||
|
);
|
||||||
|
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return BitcoinCashWallet(
|
||||||
|
walletId: walletId,
|
||||||
|
walletName: walletName,
|
||||||
|
coin: coin,
|
||||||
|
client: client,
|
||||||
|
cachedClient: cachedClient,
|
||||||
|
tracker: tracker,
|
||||||
|
);
|
||||||
|
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return DogecoinWallet(
|
return DogecoinWallet(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
|
@ -123,6 +145,16 @@ abstract class CoinServiceAPI {
|
||||||
// tracker: tracker,
|
// tracker: tracker,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
case Coin.namecoin:
|
||||||
|
return NamecoinWallet(
|
||||||
|
walletId: walletId,
|
||||||
|
walletName: walletName,
|
||||||
|
coin: coin,
|
||||||
|
tracker: tracker,
|
||||||
|
cachedClient: cachedClient,
|
||||||
|
client: client,
|
||||||
|
);
|
||||||
|
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
return DogecoinWallet(
|
return DogecoinWallet(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
|
|
3809
lib/services/coins/namecoin/namecoin_wallet.dart
Normal file
3809
lib/services/coins/namecoin/namecoin_wallet.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -79,7 +79,7 @@ class PriceAPI {
|
||||||
Map<Coin, Tuple2<Decimal, double>> result = {};
|
Map<Coin, Tuple2<Decimal, double>> result = {};
|
||||||
try {
|
try {
|
||||||
final uri = Uri.parse(
|
final uri = Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
||||||
// final uri = Uri.parse(
|
// final uri = Uri.parse(
|
||||||
// "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero%2Cbitcoin%2Cepic-cash%2Czcoin%2Cdogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
// "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero%2Cbitcoin%2Cepic-cash%2Czcoin%2Cdogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ import 'package:crypto/crypto.dart';
|
||||||
import 'package:flutter_libepiccash/epic_cash.dart';
|
import 'package:flutter_libepiccash/epic_cash.dart';
|
||||||
import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
|
import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
|
||||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||||
|
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart';
|
||||||
|
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/logger.dart';
|
import 'package:stackwallet/utilities/logger.dart';
|
||||||
|
|
||||||
|
@ -40,6 +42,8 @@ class AddressUtils {
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return Address.validateAddress(address, bitcoin);
|
return Address.validateAddress(address, bitcoin);
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return Address.validateAddress(address, bitcoincash);
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return Address.validateAddress(address, dogecoin);
|
return Address.validateAddress(address, dogecoin);
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
@ -49,8 +53,12 @@ class AddressUtils {
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
|
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
|
||||||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
|
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
|
||||||
|
case Coin.namecoin:
|
||||||
|
return Address.validateAddress(address, namecoin);
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return Address.validateAddress(address, testnet);
|
return Address.validateAddress(address, testnet);
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return Address.validateAddress(address, bitcoincashtestnet);
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return Address.validateAddress(address, firoTestNetwork);
|
return Address.validateAddress(address, firoTestNetwork);
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
|
||||||
abstract class Assets {
|
abstract class Assets {
|
||||||
|
@ -105,13 +106,16 @@ class _SVG {
|
||||||
String get txExchangeFailed => "assets/svg/tx-exchange-icon-failed.svg";
|
String get txExchangeFailed => "assets/svg/tx-exchange-icon-failed.svg";
|
||||||
|
|
||||||
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
|
String get bitcoin => "assets/svg/coin_icons/Bitcoin.svg";
|
||||||
|
String get bitcoincash => "assets/svg/coin_icons/Bitcoincash.svg";
|
||||||
String get dogecoin => "assets/svg/coin_icons/Dogecoin.svg";
|
String get dogecoin => "assets/svg/coin_icons/Dogecoin.svg";
|
||||||
String get epicCash => "assets/svg/coin_icons/EpicCash.svg";
|
String get epicCash => "assets/svg/coin_icons/EpicCash.svg";
|
||||||
String get firo => "assets/svg/coin_icons/Firo.svg";
|
String get firo => "assets/svg/coin_icons/Firo.svg";
|
||||||
String get monero => "assets/svg/coin_icons/Monero.svg";
|
String get monero => "assets/svg/coin_icons/Monero.svg";
|
||||||
|
String get namecoin => "assets/svg/coin_icons/Namecoin.svg";
|
||||||
|
|
||||||
// TODO provide proper assets
|
// TODO provide proper assets
|
||||||
String get bitcoinTestnet => "assets/svg/coin_icons/Bitcoin.svg";
|
String get bitcoinTestnet => "assets/svg/coin_icons/Bitcoin.svg";
|
||||||
|
String get bitcoincashTestnet => "assets/svg/coin_icons/Bitcoincash.svg";
|
||||||
String get firoTestnet => "assets/svg/coin_icons/Firo.svg";
|
String get firoTestnet => "assets/svg/coin_icons/Firo.svg";
|
||||||
String get dogecoinTestnet => "assets/svg/coin_icons/Dogecoin.svg";
|
String get dogecoinTestnet => "assets/svg/coin_icons/Dogecoin.svg";
|
||||||
|
|
||||||
|
@ -119,6 +123,8 @@ class _SVG {
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return bitcoin;
|
return bitcoin;
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return bitcoincash;
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return dogecoin;
|
return dogecoin;
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
@ -127,8 +133,12 @@ class _SVG {
|
||||||
return firo;
|
return firo;
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return monero;
|
return monero;
|
||||||
|
case Coin.namecoin:
|
||||||
|
return namecoin;
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return bitcoinTestnet;
|
return bitcoinTestnet;
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return bitcoinTestnet;
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return firoTestnet;
|
return firoTestnet;
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
@ -148,22 +158,30 @@ class _PNG {
|
||||||
String get dogecoin => "assets/images/doge.png";
|
String get dogecoin => "assets/images/doge.png";
|
||||||
String get bitcoin => "assets/images/bitcoin.png";
|
String get bitcoin => "assets/images/bitcoin.png";
|
||||||
String get epicCash => "assets/images/epic-cash.png";
|
String get epicCash => "assets/images/epic-cash.png";
|
||||||
|
String get bitcoincash => "assets/images/bitcoincash.png";
|
||||||
|
String get namecoin => "assets/images/namecoin.png";
|
||||||
|
|
||||||
String imageFor({required Coin coin}) {
|
String imageFor({required Coin coin}) {
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return bitcoin;
|
return bitcoin;
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return bitcoincash;
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
return dogecoin;
|
return dogecoin;
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
return epicCash;
|
return epicCash;
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
|
return firo;
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return firo;
|
return firo;
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return monero;
|
return monero;
|
||||||
|
case Coin.namecoin:
|
||||||
|
return namecoin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,9 @@ Uri getBlockExplorerTransactionUrlFor({
|
||||||
return Uri.parse("https://explorer.firo.org/tx/$txid");
|
return Uri.parse("https://explorer.firo.org/tx/$txid");
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return Uri.parse("https://testexplorer.firo.org/tx/$txid");
|
return Uri.parse("https://testexplorer.firo.org/tx/$txid");
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return Uri.parse("https://blockchair.com/bitcoin-cash/transaction/$txid");
|
||||||
|
case Coin.namecoin:
|
||||||
|
return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,16 +6,21 @@ class _CoinThemeColor {
|
||||||
const _CoinThemeColor();
|
const _CoinThemeColor();
|
||||||
|
|
||||||
Color get bitcoin => const Color(0xFFFCC17B);
|
Color get bitcoin => const Color(0xFFFCC17B);
|
||||||
|
Color get bitcoincash => const Color(0xFFFCC17B);
|
||||||
Color get firo => const Color(0xFFFF897A);
|
Color get firo => const Color(0xFFFF897A);
|
||||||
Color get dogecoin => const Color(0xFFFFE079);
|
Color get dogecoin => const Color(0xFFFFE079);
|
||||||
Color get epicCash => const Color(0xFFC5C7CB);
|
Color get epicCash => const Color(0xFFC5C7CB);
|
||||||
Color get monero => const Color(0xFFFF9E6B);
|
Color get monero => const Color(0xFFFF9E6B);
|
||||||
|
Color get namecoin => const Color(0xFFFCC17B);
|
||||||
|
|
||||||
Color forCoin(Coin coin) {
|
Color forCoin(Coin coin) {
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return bitcoin;
|
return bitcoin;
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return bitcoincash;
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
return dogecoin;
|
return dogecoin;
|
||||||
|
@ -26,6 +31,8 @@ class _CoinThemeColor {
|
||||||
return firo;
|
return firo;
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return monero;
|
return monero;
|
||||||
|
case Coin.namecoin:
|
||||||
|
return namecoin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,14 @@ abstract class Constants {
|
||||||
final List<int> values = [];
|
final List<int> values = [];
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
|
case Coin.bitcoincash:
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
case Coin.namecoin:
|
||||||
values.addAll([24, 21, 18, 15, 12]);
|
values.addAll([24, 21, 18, 15, 12]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -62,6 +64,10 @@ abstract class Constants {
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return 600;
|
return 600;
|
||||||
|
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return 600;
|
||||||
|
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
return 60;
|
return 60;
|
||||||
|
@ -75,6 +81,9 @@ abstract class Constants {
|
||||||
|
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return 120;
|
return 120;
|
||||||
|
|
||||||
|
case Coin.namecoin:
|
||||||
|
return 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:stackwallet/models/node_model.dart';
|
import 'package:stackwallet/models/node_model.dart';
|
||||||
|
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
|
||||||
abstract class DefaultNodes {
|
abstract class DefaultNodes {
|
||||||
|
@ -13,6 +14,8 @@ abstract class DefaultNodes {
|
||||||
firo,
|
firo,
|
||||||
monero,
|
monero,
|
||||||
epicCash,
|
epicCash,
|
||||||
|
bitcoincash,
|
||||||
|
namecoin,
|
||||||
bitcoinTestnet,
|
bitcoinTestnet,
|
||||||
dogecoinTestnet,
|
dogecoinTestnet,
|
||||||
firoTestnet,
|
firoTestnet,
|
||||||
|
@ -30,6 +33,18 @@ abstract class DefaultNodes {
|
||||||
isDown: false,
|
isDown: false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static NodeModel get bitcoincash => NodeModel(
|
||||||
|
host: "electrum1.cipig.net",
|
||||||
|
port: 20055,
|
||||||
|
name: defaultName,
|
||||||
|
id: _nodeId(Coin.bitcoincash),
|
||||||
|
useSSL: true,
|
||||||
|
enabled: true,
|
||||||
|
coinName: Coin.bitcoincash.name,
|
||||||
|
isFailover: true,
|
||||||
|
isDown: false,
|
||||||
|
);
|
||||||
|
|
||||||
static NodeModel get dogecoin => NodeModel(
|
static NodeModel get dogecoin => NodeModel(
|
||||||
host: "dogecoin.stackwallet.com",
|
host: "dogecoin.stackwallet.com",
|
||||||
port: 50022,
|
port: 50022,
|
||||||
|
@ -80,6 +95,18 @@ abstract class DefaultNodes {
|
||||||
isDown: false,
|
isDown: false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static NodeModel get namecoin => NodeModel(
|
||||||
|
host: "46.229.238.187",
|
||||||
|
port: 57002,
|
||||||
|
name: defaultName,
|
||||||
|
id: _nodeId(Coin.namecoin),
|
||||||
|
useSSL: true,
|
||||||
|
enabled: true,
|
||||||
|
coinName: Coin.namecoin.name,
|
||||||
|
isFailover: true,
|
||||||
|
isDown: false,
|
||||||
|
);
|
||||||
|
|
||||||
static NodeModel get bitcoinTestnet => NodeModel(
|
static NodeModel get bitcoinTestnet => NodeModel(
|
||||||
host: "electrumx-testnet.cypherstack.com",
|
host: "electrumx-testnet.cypherstack.com",
|
||||||
port: 51002,
|
port: 51002,
|
||||||
|
@ -116,11 +143,26 @@ abstract class DefaultNodes {
|
||||||
isDown: false,
|
isDown: false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static NodeModel get bitcoincashTestnet => NodeModel(
|
||||||
|
host: "testnet.hsmiths.com",
|
||||||
|
port: 53012,
|
||||||
|
name: defaultName,
|
||||||
|
id: _nodeId(Coin.bitcoincash),
|
||||||
|
useSSL: true,
|
||||||
|
enabled: true,
|
||||||
|
coinName: Coin.bitcoincash.name,
|
||||||
|
isFailover: true,
|
||||||
|
isDown: false,
|
||||||
|
);
|
||||||
|
|
||||||
static NodeModel getNodeFor(Coin coin) {
|
static NodeModel getNodeFor(Coin coin) {
|
||||||
switch (coin) {
|
switch (coin) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return bitcoin;
|
return bitcoin;
|
||||||
|
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return bitcoincash;
|
||||||
|
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return dogecoin;
|
return dogecoin;
|
||||||
|
|
||||||
|
@ -133,9 +175,15 @@ abstract class DefaultNodes {
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return monero;
|
return monero;
|
||||||
|
|
||||||
|
case Coin.namecoin:
|
||||||
|
return namecoin;
|
||||||
|
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return bitcoinTestnet;
|
return bitcoinTestnet;
|
||||||
|
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return bitcoincashTestnet;
|
||||||
|
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return firoTestnet;
|
return firoTestnet;
|
||||||
|
|
||||||
|
|
|
@ -5,19 +5,26 @@ import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'
|
||||||
as epic;
|
as epic;
|
||||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as firo;
|
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as firo;
|
||||||
import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
|
import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
|
||||||
|
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart'
|
||||||
|
as bch;
|
||||||
|
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart'
|
||||||
|
as nmc;
|
||||||
|
|
||||||
enum Coin {
|
enum Coin {
|
||||||
bitcoin,
|
bitcoin,
|
||||||
|
bitcoincash,
|
||||||
dogecoin,
|
dogecoin,
|
||||||
epicCash,
|
epicCash,
|
||||||
firo,
|
firo,
|
||||||
monero,
|
monero,
|
||||||
|
namecoin,
|
||||||
|
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
|
|
||||||
bitcoinTestNet,
|
bitcoinTestNet,
|
||||||
|
bitcoincashTestnet,
|
||||||
dogecoinTestNet,
|
dogecoinTestNet,
|
||||||
firoTestNet,
|
firoTestNet,
|
||||||
}
|
}
|
||||||
|
@ -30,6 +37,8 @@ extension CoinExt on Coin {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return "Bitcoin";
|
return "Bitcoin";
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return "Bitcoin Cash";
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return "Dogecoin";
|
return "Dogecoin";
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
@ -38,8 +47,12 @@ extension CoinExt on Coin {
|
||||||
return "Firo";
|
return "Firo";
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return "Monero";
|
return "Monero";
|
||||||
|
case Coin.namecoin:
|
||||||
|
return "Namecoin";
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return "tBitcoin";
|
return "tBitcoin";
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return "tBitcoincash";
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return "tFiro";
|
return "tFiro";
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
@ -51,6 +64,8 @@ extension CoinExt on Coin {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return "BTC";
|
return "BTC";
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return "BCH";
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return "DOGE";
|
return "DOGE";
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
@ -59,8 +74,12 @@ extension CoinExt on Coin {
|
||||||
return "FIRO";
|
return "FIRO";
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return "XMR";
|
return "XMR";
|
||||||
|
case Coin.namecoin:
|
||||||
|
return "NMC";
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return "tBTC";
|
return "tBTC";
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return "tBCH";
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return "tFIRO";
|
return "tFIRO";
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
@ -72,6 +91,8 @@ extension CoinExt on Coin {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
return "bitcoin";
|
return "bitcoin";
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
return "bitcoincash";
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
return "dogecoin";
|
return "dogecoin";
|
||||||
case Coin.epicCash:
|
case Coin.epicCash:
|
||||||
|
@ -81,8 +102,12 @@ extension CoinExt on Coin {
|
||||||
return "firo";
|
return "firo";
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return "monero";
|
return "monero";
|
||||||
|
case Coin.namecoin:
|
||||||
|
return "namecoin";
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return "bitcoin";
|
return "bitcoin";
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return "bitcoincash";
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return "firo";
|
return "firo";
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
@ -93,9 +118,12 @@ extension CoinExt on Coin {
|
||||||
bool get isElectrumXCoin {
|
bool get isElectrumXCoin {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case Coin.bitcoin:
|
case Coin.bitcoin:
|
||||||
|
case Coin.bitcoincash:
|
||||||
case Coin.dogecoin:
|
case Coin.dogecoin:
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
|
case Coin.namecoin:
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
return true;
|
return true;
|
||||||
|
@ -112,6 +140,10 @@ extension CoinExt on Coin {
|
||||||
case Coin.bitcoinTestNet:
|
case Coin.bitcoinTestNet:
|
||||||
return btc.MINIMUM_CONFIRMATIONS;
|
return btc.MINIMUM_CONFIRMATIONS;
|
||||||
|
|
||||||
|
case Coin.bitcoincash:
|
||||||
|
case Coin.bitcoincashTestnet:
|
||||||
|
return bch.MINIMUM_CONFIRMATIONS;
|
||||||
|
|
||||||
case Coin.firo:
|
case Coin.firo:
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return firo.MINIMUM_CONFIRMATIONS;
|
return firo.MINIMUM_CONFIRMATIONS;
|
||||||
|
@ -125,6 +157,8 @@ extension CoinExt on Coin {
|
||||||
|
|
||||||
case Coin.monero:
|
case Coin.monero:
|
||||||
return xmr.MINIMUM_CONFIRMATIONS;
|
return xmr.MINIMUM_CONFIRMATIONS;
|
||||||
|
case Coin.namecoin:
|
||||||
|
return nmc.MINIMUM_CONFIRMATIONS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,6 +168,10 @@ Coin coinFromPrettyName(String name) {
|
||||||
case "Bitcoin":
|
case "Bitcoin":
|
||||||
case "bitcoin":
|
case "bitcoin":
|
||||||
return Coin.bitcoin;
|
return Coin.bitcoin;
|
||||||
|
case "Bitcoincash":
|
||||||
|
case "bitcoincash":
|
||||||
|
case "Bitcoin Cash":
|
||||||
|
return Coin.bitcoincash;
|
||||||
case "Dogecoin":
|
case "Dogecoin":
|
||||||
case "dogecoin":
|
case "dogecoin":
|
||||||
return Coin.dogecoin;
|
return Coin.dogecoin;
|
||||||
|
@ -146,10 +184,18 @@ Coin coinFromPrettyName(String name) {
|
||||||
case "Monero":
|
case "Monero":
|
||||||
case "monero":
|
case "monero":
|
||||||
return Coin.monero;
|
return Coin.monero;
|
||||||
|
case "Namecoin":
|
||||||
|
case "namecoin":
|
||||||
|
return Coin.namecoin;
|
||||||
case "Bitcoin Testnet":
|
case "Bitcoin Testnet":
|
||||||
case "tBitcoin":
|
case "tBitcoin":
|
||||||
case "bitcoinTestNet":
|
case "bitcoinTestNet":
|
||||||
return Coin.bitcoinTestNet;
|
return Coin.bitcoinTestNet;
|
||||||
|
|
||||||
|
case "Bitcoincash Testnet":
|
||||||
|
case "tBitcoincash":
|
||||||
|
case "Bitcoin Cash Testnet":
|
||||||
|
return Coin.bitcoincashTestnet;
|
||||||
case "Firo Testnet":
|
case "Firo Testnet":
|
||||||
case "tFiro":
|
case "tFiro":
|
||||||
case "firoTestNet":
|
case "firoTestNet":
|
||||||
|
@ -168,6 +214,8 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
|
||||||
switch (ticker.toLowerCase()) {
|
switch (ticker.toLowerCase()) {
|
||||||
case "btc":
|
case "btc":
|
||||||
return Coin.bitcoin;
|
return Coin.bitcoin;
|
||||||
|
case "bch":
|
||||||
|
return Coin.bitcoincash;
|
||||||
case "doge":
|
case "doge":
|
||||||
return Coin.dogecoin;
|
return Coin.dogecoin;
|
||||||
case "epic":
|
case "epic":
|
||||||
|
@ -176,8 +224,12 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
|
||||||
return Coin.firo;
|
return Coin.firo;
|
||||||
case "xmr":
|
case "xmr":
|
||||||
return Coin.monero;
|
return Coin.monero;
|
||||||
|
case "nmc":
|
||||||
|
return Coin.namecoin;
|
||||||
case "tbtc":
|
case "tbtc":
|
||||||
return Coin.bitcoinTestNet;
|
return Coin.bitcoinTestNet;
|
||||||
|
case "tbch":
|
||||||
|
return Coin.bitcoincashTestnet;
|
||||||
case "tfiro":
|
case "tfiro":
|
||||||
return Coin.firoTestNet;
|
return Coin.firoTestNet;
|
||||||
case "tdoge":
|
case "tdoge":
|
||||||
|
|
15
pubspec.yaml
15
pubspec.yaml
|
@ -46,7 +46,7 @@ dependencies:
|
||||||
bitcoindart:
|
bitcoindart:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/cypherstack/bitcoindart.git
|
url: https://github.com/cypherstack/bitcoindart.git
|
||||||
ref: a35968c2d2d900e77baa9f8b28c89b722c074039
|
ref: 65eb920719c8f7895c5402a07497647e7fc4b346
|
||||||
|
|
||||||
stack_wallet_backup:
|
stack_wallet_backup:
|
||||||
git:
|
git:
|
||||||
|
@ -69,8 +69,15 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/cypherstack/stack-bip39.git
|
url: https://github.com/cypherstack/stack-bip39.git
|
||||||
ref: 3bef5acc21340f3cc78df0ad1dce5868a3ed68a5
|
ref: 3bef5acc21340f3cc78df0ad1dce5868a3ed68a5
|
||||||
|
bitbox:
|
||||||
|
git:
|
||||||
|
url: https://github.com/Quppy/bitbox-flutter.git
|
||||||
|
ref: ea65073efbaf395a5557e8cd7bd72f195cd7eb11
|
||||||
bip32: ^2.0.0
|
bip32: ^2.0.0
|
||||||
bech32: ^0.2.1
|
bech32:
|
||||||
|
git:
|
||||||
|
url: https://github.com/cypherstack/bech32.git
|
||||||
|
ref: 22279d4bb24ed541b431acd269a1bc50af0f36a0
|
||||||
bs58check: ^1.0.2
|
bs58check: ^1.0.2
|
||||||
|
|
||||||
# Storage plugins
|
# Storage plugins
|
||||||
|
@ -181,6 +188,8 @@ flutter:
|
||||||
- assets/images/doge.png
|
- assets/images/doge.png
|
||||||
- assets/images/bitcoin.png
|
- assets/images/bitcoin.png
|
||||||
- assets/images/epic-cash.png
|
- assets/images/epic-cash.png
|
||||||
|
- assets/images/bitcoincash.png
|
||||||
|
- assets/images/namecoin.png
|
||||||
- assets/svg/plus.svg
|
- assets/svg/plus.svg
|
||||||
- assets/svg/gear.svg
|
- assets/svg/gear.svg
|
||||||
- assets/svg/bell.svg
|
- assets/svg/bell.svg
|
||||||
|
@ -261,10 +270,12 @@ flutter:
|
||||||
- assets/svg/tx-icon-anonymize-failed.svg
|
- assets/svg/tx-icon-anonymize-failed.svg
|
||||||
# coin icons
|
# coin icons
|
||||||
- assets/svg/coin_icons/Bitcoin.svg
|
- assets/svg/coin_icons/Bitcoin.svg
|
||||||
|
- assets/svg/coin_icons/Bitcoincash.svg
|
||||||
- assets/svg/coin_icons/Dogecoin.svg
|
- assets/svg/coin_icons/Dogecoin.svg
|
||||||
- assets/svg/coin_icons/EpicCash.svg
|
- assets/svg/coin_icons/EpicCash.svg
|
||||||
- assets/svg/coin_icons/Firo.svg
|
- assets/svg/coin_icons/Firo.svg
|
||||||
- assets/svg/coin_icons/Monero.svg
|
- assets/svg/coin_icons/Monero.svg
|
||||||
|
- assets/svg/coin_icons/Namecoin.svg
|
||||||
# lottie animations
|
# lottie animations
|
||||||
- assets/lottie/test.json
|
- assets/lottie/test.json
|
||||||
- assets/lottie/test2.json
|
- assets/lottie/test2.json
|
||||||
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
final Map<String, List<dynamic>> historyBatchArgs0 = {
|
||||||
|
"k_0_0": ["4061323fc54ad0fd2fb6d3fd3af583068d7a733f562242a71e00ea7a82fb482b"],
|
||||||
|
"k_0_1": ["04818da846fe5e03ac993d2e0c1ccc3848ff6073c3aba6a572df4efc5432ae8b"],
|
||||||
|
"k_0_2": ["a0345933dd4146905a279f9aa35c867599fec2c52993a8f5da3a477acd0ebcfc"],
|
||||||
|
"k_0_3": ["607bc74daf946bfd9d593606f4393e44555a3dd0b529ddd08a0422be7955912e"],
|
||||||
|
"k_0_4": ["449dfb82e6f09f7e190f21fe63aaad5ccb854ba1f44f0a6622f6d71fff19fc63"],
|
||||||
|
"k_0_5": ["3643e3fe26e0b08dcbc89c47efce3b3264f361160341e3c2a6c73681dde12d39"],
|
||||||
|
"k_0_6": ["6daca5039b35adcbe62441b68eaaa48e9b0a806ab5a34314bd394b9b5c9289e5"],
|
||||||
|
"k_0_7": ["113f3d214f202795fdc3dccc6942395812270e787abb88fe4ddfa14f33d62d6f"],
|
||||||
|
"k_0_8": ["5dea575b85959647509d2ab3c92cda3776a4deba444486a7925ae3b71306e7e3"],
|
||||||
|
"k_0_9": ["5e2e6d3b43dfa29fabf66879d9ba67e4bb2f9f7ed10cfbb75e0b445eb4b84287"],
|
||||||
|
"k_0_10": [
|
||||||
|
"1bfe42869b6b1e5efa1e1b47f382615e3d27e3e66e9cc8ae46b71ece067b4d37"
|
||||||
|
],
|
||||||
|
"k_0_11": ["e0b38e944c5343e67c807a334fcf4b6563a6311447c99a105a0cf2cc3594ad11"]
|
||||||
|
};
|
||||||
|
|
||||||
|
final Map<String, List<dynamic>> historyBatchArgs1 = {
|
||||||
|
"k_0_0": ["50550ac9d45b7484b41e32751326127f3e121354e3bceead3e5fd020c94c4fe1"],
|
||||||
|
"k_0_1": ["f0c86f888f2aca0efaf1705247dbd1ebc02347c183e197310c9062ea2c9d2e34"],
|
||||||
|
"k_0_2": ["f729a8b3d47b265bf78ee78216174f3f5ef44aedfebf2d3224f1afadcfd6b52b"],
|
||||||
|
"k_0_3": ["82f5da8c4d26af2898dbb947c6afb83b5ad92e609345f1b89819293dd7714c75"],
|
||||||
|
"k_0_4": ["b4d6bf5639a8cd368772c26da95173940510618023e8952eb8db70aeb1d59cd2"],
|
||||||
|
"k_0_5": ["12e0f3cb2bf44b80f3c34cfd3fadc2a39de2f4776bc2be5b7100126db1238983"],
|
||||||
|
"k_0_6": ["ed5351a1e390d6635fa1ccf594998eb82fa627caf93541f3d5f1021b90e75ec7"],
|
||||||
|
"k_0_7": ["97917c094ec3afcd1b41338e7c06774b2f76c7a430e486c0080a86a141f39723"],
|
||||||
|
"k_0_8": ["58f96c6274cd3b74d362a30778497cef65f0c657ce94bb8b274b802e47876e3c"],
|
||||||
|
"k_0_9": ["99fb86f164906c621a42ee2b224972b3ea8ce10dbc1bccecbbdb1a7582e2954a"],
|
||||||
|
"k_0_10": [
|
||||||
|
"555b8d6a03d2b93c381d2cda19fac11034bf5128ccbcbe5ff46b87f17969b4cb"
|
||||||
|
],
|
||||||
|
"k_0_11": ["9d0163f011c1259568c188c4770606b25c823f8b76bbd262c1c7f3095ed24620"]
|
||||||
|
};
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> historyBatchResponse = {
|
||||||
|
"k_0_0": [],
|
||||||
|
"s_0_0": [{}, {}],
|
||||||
|
"w_0_0": [],
|
||||||
|
"k_0_1": [{}],
|
||||||
|
"s_0_1": [],
|
||||||
|
"w_0_1": [{}, {}, {}],
|
||||||
|
"k_0_2": [],
|
||||||
|
"s_0_2": [],
|
||||||
|
"w_0_2": [],
|
||||||
|
"k_0_3": [],
|
||||||
|
"s_0_3": [],
|
||||||
|
"w_0_3": [],
|
||||||
|
"k_0_4": [],
|
||||||
|
"s_0_4": [],
|
||||||
|
"w_0_4": [],
|
||||||
|
"k_0_5": [],
|
||||||
|
"s_0_5": [],
|
||||||
|
"w_0_5": [],
|
||||||
|
"k_0_6": [],
|
||||||
|
"s_0_6": [],
|
||||||
|
"w_0_6": [],
|
||||||
|
"k_0_7": [],
|
||||||
|
"s_0_7": [],
|
||||||
|
"w_0_7": [],
|
||||||
|
"k_0_8": [],
|
||||||
|
"s_0_8": [],
|
||||||
|
"w_0_8": [],
|
||||||
|
"k_0_9": [],
|
||||||
|
"s_0_9": [],
|
||||||
|
"w_0_9": [],
|
||||||
|
"k_0_10": [],
|
||||||
|
"s_0_10": [],
|
||||||
|
"w_0_10": [],
|
||||||
|
"k_0_11": [],
|
||||||
|
"s_0_11": [],
|
||||||
|
"w_0_11": []
|
||||||
|
};
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> emptyHistoryBatchResponse = {
|
||||||
|
"k_0_0": [],
|
||||||
|
"s_0_0": [],
|
||||||
|
"w_0_0": [],
|
||||||
|
"k_0_1": [],
|
||||||
|
"s_0_1": [],
|
||||||
|
"w_0_1": [],
|
||||||
|
"k_0_2": [],
|
||||||
|
"s_0_2": [],
|
||||||
|
"w_0_2": [],
|
||||||
|
"k_0_3": [],
|
||||||
|
"s_0_3": [],
|
||||||
|
"w_0_3": [],
|
||||||
|
"k_0_4": [],
|
||||||
|
"s_0_4": [],
|
||||||
|
"w_0_4": [],
|
||||||
|
"k_0_5": [],
|
||||||
|
"s_0_5": [],
|
||||||
|
"w_0_5": [],
|
||||||
|
"k_0_6": [],
|
||||||
|
"s_0_6": [],
|
||||||
|
"w_0_6": [],
|
||||||
|
"k_0_7": [],
|
||||||
|
"s_0_7": [],
|
||||||
|
"w_0_7": [],
|
||||||
|
"k_0_8": [],
|
||||||
|
"s_0_8": [],
|
||||||
|
"w_0_8": [],
|
||||||
|
"k_0_9": [],
|
||||||
|
"s_0_9": [],
|
||||||
|
"w_0_9": [],
|
||||||
|
"k_0_10": [],
|
||||||
|
"s_0_10": [],
|
||||||
|
"w_0_10": [],
|
||||||
|
"k_0_11": [],
|
||||||
|
"s_0_11": [],
|
||||||
|
"w_0_11": []
|
||||||
|
};
|
||||||
|
|
||||||
|
final List<String> activeScriptHashes = [
|
||||||
|
"11663d093cb17dfbed4a96d148b22d3e094b31d23c639c2814beb79f2ab0ca75",
|
||||||
|
"06593b2d896751e8dda288bb6587b6bb6a1dee71d82a85457f5654f781e37b12",
|
||||||
|
"a328ae88ebce63c0010709ae900c199df2b585cdebce53a6291886dfdcc28c63",
|
||||||
|
"26f92666caebb9a17b14f5b573b385348cdc80065472b8961091f3226d2f650f",
|
||||||
|
"2f18558e5d3015cb6578aee1c3e4b645725fa4e1d26ce22cb31c9949f3b4957c",
|
||||||
|
"bf5a6c56814e80eed11e1e459801515f8c2b83da812568aa9dc26e6356f6965b",
|
||||||
|
];
|
|
@ -0,0 +1,375 @@
|
||||||
|
import 'package:stackwallet/models/paymint/transactions_model.dart';
|
||||||
|
|
||||||
|
final transactionData = TransactionData.fromMap({
|
||||||
|
"61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c": tx1,
|
||||||
|
"9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba": tx2,
|
||||||
|
"070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a": tx3,
|
||||||
|
"84aecde036ebe013aa3bd2fcb4741db504c7c040d34f7c33732c967646991855": tx4,
|
||||||
|
});
|
||||||
|
|
||||||
|
final tx1 = Transaction(
|
||||||
|
txid: "61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 187,
|
||||||
|
txType: "Received",
|
||||||
|
amount: 7000000,
|
||||||
|
fees: 742,
|
||||||
|
height: 756720,
|
||||||
|
address: "12QZH44735UHWAXFgb4hfdq756GjzXtZG7",
|
||||||
|
timestamp: 1662544771,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 2,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "f716d010786225004b41e35dd5eebfb11a4e5ea116e1a48235e5d3a591650732",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "12QZH44735UHWAXFgb4hfdq756GjzXtZG7",
|
||||||
|
value: 7000000,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "3E1n17NnhVmWTGNbvH6ffKVNFjYT4Jke7G",
|
||||||
|
value: 71445709,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx2 = Transaction(
|
||||||
|
txid: "9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 175,
|
||||||
|
txType: "Sent",
|
||||||
|
amount: 3000000,
|
||||||
|
fees: 227000,
|
||||||
|
height: 756732,
|
||||||
|
address: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
timestamp: 1662553616,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.0",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 2,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
value: 3000000,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "16GbR1Xau2hKFTr1STgB39NbP8CEkGZjYG",
|
||||||
|
value: 3773000,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx3 = Transaction(
|
||||||
|
txid: "070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 177,
|
||||||
|
txType: "Received",
|
||||||
|
amount: 2000000,
|
||||||
|
fees: 227,
|
||||||
|
height: 756738,
|
||||||
|
address: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
timestamp: 1662555788,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.0",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 2,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
value: 2000000,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "16GbR1Xau2hKFTr1STgB39NbP8CEkGZjYG",
|
||||||
|
value: 1772773,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx4 = Transaction(
|
||||||
|
txid: "84aecde036ebe013aa3bd2fcb4741db504c7c040d34f7c33732c967646991855",
|
||||||
|
confirmedStatus: false,
|
||||||
|
confirmations: 0,
|
||||||
|
txType: "Received",
|
||||||
|
amount: 4000000,
|
||||||
|
fees: 400,
|
||||||
|
height: 757303,
|
||||||
|
address: "1PQaBto5KmiW3R2YeexYYoDWksMpEvhYZE",
|
||||||
|
timestamp: 1662893734,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 2,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
Input(
|
||||||
|
txid: "9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "1JHcZyhgctuDCznjkxR51pQzKEJUujuc2j",
|
||||||
|
value: 999600,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "1PQaBto5KmiW3R2YeexYYoDWksMpEvhYZE",
|
||||||
|
value: 4000000,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx1Raw = {
|
||||||
|
"in_mempool": false,
|
||||||
|
"in_orphanpool": false,
|
||||||
|
"txid": "61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c",
|
||||||
|
"size": 372,
|
||||||
|
"version": 1,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"f716d010786225004b41e35dd5eebfb11a4e5ea116e1a48235e5d3a591650732",
|
||||||
|
"vout": 1,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm":
|
||||||
|
"0 3045022100d80e1d056e8787d7fac8e59ce14d56a2dbb2aceb43da1fee47e687e318049abd02204bb06be6e8af85250b93e0f5377da535557176557563a4d0121b607ffbf3e7c1[ALL|FORKID] 304402200c528edd5f1c0aa169178f5a4c1ec5044559326f1608db6987398bdc0761aaae02205a94bb7f8dac69400823a0093e0303eaa2905b9fadbb8bbb111c3fef0a452ef0[ALL|FORKID] 522103ff1450283f08568acdb4d5f569f32e4cd4d8c1960ea049a205436f69f9916df8210230ee6aec65bc0db7e9cf507b33067f681047e180e91906e1fde1bb549f233b24210366058482ecccb47075be9d1d3edb46df331c04fa5126cd6fd9dc6cee071237b453ae",
|
||||||
|
"hex":
|
||||||
|
"00483045022100d80e1d056e8787d7fac8e59ce14d56a2dbb2aceb43da1fee47e687e318049abd02204bb06be6e8af85250b93e0f5377da535557176557563a4d0121b607ffbf3e7c14147304402200c528edd5f1c0aa169178f5a4c1ec5044559326f1608db6987398bdc0761aaae02205a94bb7f8dac69400823a0093e0303eaa2905b9fadbb8bbb111c3fef0a452ef0414c69522103ff1450283f08568acdb4d5f569f32e4cd4d8c1960ea049a205436f69f9916df8210230ee6aec65bc0db7e9cf507b33067f681047e180e91906e1fde1bb549f233b24210366058482ecccb47075be9d1d3edb46df331c04fa5126cd6fd9dc6cee071237b453ae"
|
||||||
|
},
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.07,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 0f6ca2ddb50a473f809440f77d3d931335ac2940 OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a9140f6ca2ddb50a473f809440f77d3d931335ac294088ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["12QZH44735UHWAXFgb4hfdq756GjzXtZG7"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.71445709,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "OP_HASH160 872dcab340b7a8500b2585781e51e9217f11dced OP_EQUAL",
|
||||||
|
"hex": "a914872dcab340b7a8500b2585781e51e9217f11dced87",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "scripthash",
|
||||||
|
"addresses": ["3E1n17NnhVmWTGNbvH6ffKVNFjYT4Jke7G"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"blockhash":
|
||||||
|
"00000000000000000529d5816d2f9c97cfbe8c06bb87e9a15d9e778281ff9225",
|
||||||
|
"confirmations": 187,
|
||||||
|
"time": 1662544771,
|
||||||
|
"blocktime": 1662544771,
|
||||||
|
"hex":
|
||||||
|
"010000000132076591a5d3e53582a4e116a15e4e1ab1bfeed55de3414b0025627810d016f701000000fdfd0000483045022100d80e1d056e8787d7fac8e59ce14d56a2dbb2aceb43da1fee47e687e318049abd02204bb06be6e8af85250b93e0f5377da535557176557563a4d0121b607ffbf3e7c14147304402200c528edd5f1c0aa169178f5a4c1ec5044559326f1608db6987398bdc0761aaae02205a94bb7f8dac69400823a0093e0303eaa2905b9fadbb8bbb111c3fef0a452ef0414c69522103ff1450283f08568acdb4d5f569f32e4cd4d8c1960ea049a205436f69f9916df8210230ee6aec65bc0db7e9cf507b33067f681047e180e91906e1fde1bb549f233b24210366058482ecccb47075be9d1d3edb46df331c04fa5126cd6fd9dc6cee071237b453aeffffffff02c0cf6a00000000001976a9140f6ca2ddb50a473f809440f77d3d931335ac294088accd2c42040000000017a914872dcab340b7a8500b2585781e51e9217f11dced8700000000"
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx2Raw = {
|
||||||
|
"in_mempool": false,
|
||||||
|
"in_orphanpool": false,
|
||||||
|
"txid": "9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
"size": 225,
|
||||||
|
"version": 2,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm":
|
||||||
|
"304402207b3301ec0ab0c7dbba32690b71e369a6872ff2d0c0cacaddc831bb04d22cef7102206e0bb6d039c408e301d49978aa34597f57d075b9a69e1a9f120e08af159b167a[ALL|FORKID] 02cb6cdf3e5758112206b4b02f21838b3d8a26c601a88030f3c5705e357d8e4ea8",
|
||||||
|
"hex":
|
||||||
|
"47304402207b3301ec0ab0c7dbba32690b71e369a6872ff2d0c0cacaddc831bb04d22cef7102206e0bb6d039c408e301d49978aa34597f57d075b9a69e1a9f120e08af159b167a412102cb6cdf3e5758112206b4b02f21838b3d8a26c601a88030f3c5705e357d8e4ea8"
|
||||||
|
},
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.03,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 87f3c240183ef0f3efe4b056029dd16d3e3d5d4f OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a91487f3c240183ef0f3efe4b056029dd16d3e3d5d4f88ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.03773,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 7fa80c90c0f8aa021074702c06b3300c0b247244 OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a9147fa80c90c0f8aa021074702c06b3300c0b24724488ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["1Cdz8cpH3ZRuZViuah32YaTkNGryCS3DZj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"blockhash":
|
||||||
|
"000000000000000005d25c8d3722e4486c486bbf864f9261631993afab557832",
|
||||||
|
"confirmations": 175,
|
||||||
|
"time": 1662553616,
|
||||||
|
"blocktime": 1662553616,
|
||||||
|
"hex":
|
||||||
|
"02000000017c24830a6a1f67fd10bf60d8557d170dcb59ab85171952287d9194b93cdbfe61000000006a47304402207b3301ec0ab0c7dbba32690b71e369a6872ff2d0c0cacaddc831bb04d22cef7102206e0bb6d039c408e301d49978aa34597f57d075b9a69e1a9f120e08af159b167a412102cb6cdf3e5758112206b4b02f21838b3d8a26c601a88030f3c5705e357d8e4ea8ffffffff02c0c62d00000000001976a91487f3c240183ef0f3efe4b056029dd16d3e3d5d4f88ac48923900000000001976a9147fa80c90c0f8aa021074702c06b3300c0b24724488ac00000000"
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx3Raw = {
|
||||||
|
"in_mempool": false,
|
||||||
|
"in_orphanpool": false,
|
||||||
|
"txid": "070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
"size": 226,
|
||||||
|
"version": 2,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
"vout": 1,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm":
|
||||||
|
"3045022100ed38dc64e40a5cfe137d38fbe9b7c4fe8a09ef923d7f999f35c65b029aa233ac02206f119c8d881a1b475697ec1eef815cde2e0e456ce4e234c5762fc7ddbe04ac27[ALL|FORKID] 029845663b31ebf3136039db97b3413b939b61c5bef45e4ee23544165a28ed452b",
|
||||||
|
"hex":
|
||||||
|
"483045022100ed38dc64e40a5cfe137d38fbe9b7c4fe8a09ef923d7f999f35c65b029aa233ac02206f119c8d881a1b475697ec1eef815cde2e0e456ce4e234c5762fc7ddbe04ac274121029845663b31ebf3136039db97b3413b939b61c5bef45e4ee23544165a28ed452b"
|
||||||
|
},
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.02,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 87f3c240183ef0f3efe4b056029dd16d3e3d5d4f OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a91487f3c240183ef0f3efe4b056029dd16d3e3d5d4f88ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.01772773,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 39cb987d75cbe99ec577de2f1918ff2b3539491a OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a91439cb987d75cbe99ec577de2f1918ff2b3539491a88ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["16GbR1Xau2hKFTr1STgB39NbP8CEkGZjYG"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"blockhash":
|
||||||
|
"00000000000000000227adf51d47ac640c7353e873a398901ecf9becbf5988d7",
|
||||||
|
"confirmations": 179,
|
||||||
|
"time": 1662555788,
|
||||||
|
"blocktime": 1662555788,
|
||||||
|
"hex":
|
||||||
|
"0200000001ba348354bc44422c189ad10ea05821cfe43d04aee686ecb5dfff42fa2ecc6597010000006b483045022100ed38dc64e40a5cfe137d38fbe9b7c4fe8a09ef923d7f999f35c65b029aa233ac02206f119c8d881a1b475697ec1eef815cde2e0e456ce4e234c5762fc7ddbe04ac274121029845663b31ebf3136039db97b3413b939b61c5bef45e4ee23544165a28ed452bffffffff0280841e00000000001976a91487f3c240183ef0f3efe4b056029dd16d3e3d5d4f88ace50c1b00000000001976a91439cb987d75cbe99ec577de2f1918ff2b3539491a88ac00000000"
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx4Raw = {
|
||||||
|
"in_mempool": false,
|
||||||
|
"in_orphanpool": false,
|
||||||
|
"txid": "84aecde036ebe013aa3bd2fcb4741db504c7c040d34f7c33732c967646991855",
|
||||||
|
"size": 360,
|
||||||
|
"version": 1,
|
||||||
|
"locktime": 757301,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm":
|
||||||
|
"95a4d53e9059dc478b2f79dc486b4dd1ea2f34f3f2f870ba26a9c16530305ddc3e25b1d1d5adc42df75b4666b9fe6ec5b41813c0e82a579ce2167f6f7ed1b305[ALL|FORKID] 02d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fd",
|
||||||
|
"hex":
|
||||||
|
"4195a4d53e9059dc478b2f79dc486b4dd1ea2f34f3f2f870ba26a9c16530305ddc3e25b1d1d5adc42df75b4666b9fe6ec5b41813c0e82a579ce2167f6f7ed1b305412102d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fd"
|
||||||
|
},
|
||||||
|
"sequence": 4294967294
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm":
|
||||||
|
"f2557ee7ae3eaf6488cc24972c73578ffc6ea2db047ffc4ff0b220f5d4efe491de01e1024ee77dc88d2cfa2f44b686bf394bd2a7114aac4fac48007547e2d313[ALL|FORKID] 02d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fd",
|
||||||
|
"hex":
|
||||||
|
"41f2557ee7ae3eaf6488cc24972c73578ffc6ea2db047ffc4ff0b220f5d4efe491de01e1024ee77dc88d2cfa2f44b686bf394bd2a7114aac4fac48007547e2d313412102d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fd"
|
||||||
|
},
|
||||||
|
"sequence": 4294967294
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.009996,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 bd9e7c204b6d0d90ba018250fafa398d5ec1b39d OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a914bd9e7c204b6d0d90ba018250fafa398d5ec1b39d88ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["1JHcZyhgctuDCznjkxR51pQzKEJUujuc2j"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.04,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm":
|
||||||
|
"OP_DUP OP_HASH160 f5c809c469d24bc0bf4f6a17a9218df1a79cd247 OP_EQUALVERIFY OP_CHECKSIG",
|
||||||
|
"hex": "76a914f5c809c469d24bc0bf4f6a17a9218df1a79cd24788ac",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "pubkeyhash",
|
||||||
|
"addresses": ["1PQaBto5KmiW3R2YeexYYoDWksMpEvhYZE"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"blockhash":
|
||||||
|
"000000000000000005aa6b3094801ec56f36f74d4b25cad38b22dc3d24cd3e43",
|
||||||
|
"confirmations": 1,
|
||||||
|
"time": 1662893734,
|
||||||
|
"blocktime": 1662893734,
|
||||||
|
"hex":
|
||||||
|
"01000000028a2832369a6a7ab35900cb00aa9ac148f5f5c5e8cccca056583b2401d9450b0700000000644195a4d53e9059dc478b2f79dc486b4dd1ea2f34f3f2f870ba26a9c16530305ddc3e25b1d1d5adc42df75b4666b9fe6ec5b41813c0e82a579ce2167f6f7ed1b305412102d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fdfeffffffba348354bc44422c189ad10ea05821cfe43d04aee686ecb5dfff42fa2ecc6597000000006441f2557ee7ae3eaf6488cc24972c73578ffc6ea2db047ffc4ff0b220f5d4efe491de01e1024ee77dc88d2cfa2f44b686bf394bd2a7114aac4fac48007547e2d313412102d0825e4d527c9c24e0d423187055904f91218c82652b3fe575a212fef15531fdfeffffff02b0400f00000000001976a914bd9e7c204b6d0d90ba018250fafa398d5ec1b39d88ac00093d00000000001976a914f5c809c469d24bc0bf4f6a17a9218df1a79cd24788ac358e0b00"
|
||||||
|
};
|
|
@ -0,0 +1,84 @@
|
||||||
|
import 'package:stackwallet/models/paymint/utxo_model.dart';
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> batchGetUTXOResponse0 = {
|
||||||
|
"some id 0": [
|
||||||
|
{
|
||||||
|
"tx_pos": 0,
|
||||||
|
"value": 7000000,
|
||||||
|
"tx_hash":
|
||||||
|
"61fedb3cb994917d2852191785ab59cb0d177d55d860bf10fd671f6a0a83247c",
|
||||||
|
"height": 756720
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tx_pos": 0,
|
||||||
|
"value": 3000000,
|
||||||
|
"tx_hash":
|
||||||
|
"9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
"height": 756732
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"some id 1": [
|
||||||
|
{
|
||||||
|
"tx_pos": 1,
|
||||||
|
"value": 2000000,
|
||||||
|
"tx_hash":
|
||||||
|
"070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
"height": 756738
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"some id 2": [],
|
||||||
|
};
|
||||||
|
|
||||||
|
final utxoList = [
|
||||||
|
UtxoObject(
|
||||||
|
txid: "9765cc2efa42ffdfb5ec86e6ae043de4cf2158a00ed19a182c4244bc548334ba",
|
||||||
|
vout: 0,
|
||||||
|
status: Status(
|
||||||
|
confirmed: true,
|
||||||
|
confirmations: 175,
|
||||||
|
blockHeight: 756732,
|
||||||
|
blockTime: 1662553616,
|
||||||
|
blockHash:
|
||||||
|
"000000000000000005d25c8d3722e4486c486bbf864f9261631993afab557832",
|
||||||
|
),
|
||||||
|
value: 3000000,
|
||||||
|
fiatWorth: "\$0",
|
||||||
|
txName: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
blocked: false,
|
||||||
|
isCoinbase: false,
|
||||||
|
),
|
||||||
|
UtxoObject(
|
||||||
|
txid: "f716d010786225004b41e35dd5eebfb11a4e5ea116e1a48235e5d3a591650732",
|
||||||
|
vout: 1,
|
||||||
|
status: Status(
|
||||||
|
confirmed: true,
|
||||||
|
confirmations: 11867,
|
||||||
|
blockHeight: 745443,
|
||||||
|
blockTime: 1655792385,
|
||||||
|
blockHash:
|
||||||
|
"000000000000000000065c982f4d86a402e7182d0c6a49fa6cfbdaf67a57f566",
|
||||||
|
),
|
||||||
|
value: 78446451,
|
||||||
|
fiatWorth: "\$0",
|
||||||
|
txName: "3E1n17NnhVmWTGNbvH6ffKVNFjYT4Jke7G",
|
||||||
|
blocked: false,
|
||||||
|
isCoinbase: false,
|
||||||
|
),
|
||||||
|
UtxoObject(
|
||||||
|
txid: "070b45d901243b5856a0cccce8c5f5f548c19aaa00cb0059b37a6a9a3632288a",
|
||||||
|
vout: 0,
|
||||||
|
status: Status(
|
||||||
|
confirmed: true,
|
||||||
|
confirmations: 572,
|
||||||
|
blockHeight: 756738,
|
||||||
|
blockTime: 1662555788,
|
||||||
|
blockHash:
|
||||||
|
"00000000000000000227adf51d47ac640c7353e873a398901ecf9becbf5988d7",
|
||||||
|
),
|
||||||
|
value: 2000000,
|
||||||
|
fiatWorth: "\$0",
|
||||||
|
txName: "1DPrEZBKKVG1Pf4HXeuCkw2Xk65EunR7CM",
|
||||||
|
blocked: false,
|
||||||
|
isCoinbase: false,
|
||||||
|
),
|
||||||
|
];
|
2824
test/services/coins/bitcoincash/bitcoincash_wallet_test.dart
Normal file
2824
test/services/coins/bitcoincash/bitcoincash_wallet_test.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,348 @@
|
||||||
|
// Mocks generated by Mockito 5.2.0 from annotations
|
||||||
|
// in stackwallet/test/services/coins/bitcoincash/bitcoincash_wallet_test.dart.
|
||||||
|
// Do not manually edit this file.
|
||||||
|
|
||||||
|
import 'dart:async' as _i7;
|
||||||
|
|
||||||
|
import 'package:decimal/decimal.dart' as _i4;
|
||||||
|
import 'package:http/http.dart' as _i3;
|
||||||
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
|
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
||||||
|
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i6;
|
||||||
|
import 'package:stackwallet/services/price.dart' as _i9;
|
||||||
|
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||||
|
as _i11;
|
||||||
|
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
|
||||||
|
import 'package:stackwallet/utilities/prefs.dart' as _i2;
|
||||||
|
import 'package:tuple/tuple.dart' as _i10;
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
// ignore_for_file: avoid_setters_without_getters
|
||||||
|
// ignore_for_file: comment_references
|
||||||
|
// ignore_for_file: implementation_imports
|
||||||
|
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||||
|
// ignore_for_file: prefer_const_constructors
|
||||||
|
// ignore_for_file: unnecessary_parenthesis
|
||||||
|
// ignore_for_file: camel_case_types
|
||||||
|
|
||||||
|
class _FakePrefs_0 extends _i1.Fake implements _i2.Prefs {}
|
||||||
|
|
||||||
|
class _FakeClient_1 extends _i1.Fake implements _i3.Client {}
|
||||||
|
|
||||||
|
class _FakeDecimal_2 extends _i1.Fake implements _i4.Decimal {}
|
||||||
|
|
||||||
|
/// A class which mocks [CachedElectrumX].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockCachedElectrumX extends _i1.Mock implements _i5.CachedElectrumX {
|
||||||
|
MockCachedElectrumX() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get server =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#server), returnValue: '')
|
||||||
|
as String);
|
||||||
|
@override
|
||||||
|
int get port =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
bool get useSSL =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
|
||||||
|
as bool);
|
||||||
|
@override
|
||||||
|
_i2.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs),
|
||||||
|
returnValue: _FakePrefs_0()) as _i2.Prefs);
|
||||||
|
@override
|
||||||
|
List<_i6.ElectrumXNode> get failovers =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#failovers),
|
||||||
|
returnValue: <_i6.ElectrumXNode>[]) as List<_i6.ElectrumXNode>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getAnonymitySet(
|
||||||
|
{String? groupId, String? blockhash = r'', _i8.Coin? coin}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getAnonymitySet, [],
|
||||||
|
{#groupId: groupId, #blockhash: blockhash, #coin: coin}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getTransaction(
|
||||||
|
{String? txHash, _i8.Coin? coin, bool? verbose = true}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getTransaction, [],
|
||||||
|
{#txHash: txHash, #coin: coin, #verbose: verbose}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<List<dynamic>> getUsedCoinSerials(
|
||||||
|
{_i8.Coin? coin, int? startNumber = 0}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getUsedCoinSerials, [],
|
||||||
|
{#coin: coin, #startNumber: startNumber}),
|
||||||
|
returnValue: Future<List<dynamic>>.value(<dynamic>[]))
|
||||||
|
as _i7.Future<List<dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<void> clearSharedTransactionCache({_i8.Coin? coin}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i7.Future<void>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [PriceAPI].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI {
|
||||||
|
MockPriceAPI() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i3.Client get client => (super.noSuchMethod(Invocation.getter(#client),
|
||||||
|
returnValue: _FakeClient_1()) as _i3.Client);
|
||||||
|
@override
|
||||||
|
void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod(
|
||||||
|
Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<_i8.Coin, _i10.Tuple2<_i4.Decimal, double>>>
|
||||||
|
getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<_i8.Coin, _i10.Tuple2<_i4.Decimal, double>>>.value(
|
||||||
|
<_i8.Coin, _i10.Tuple2<_i4.Decimal, double>>{}))
|
||||||
|
as _i7.Future<Map<_i8.Coin, _i10.Tuple2<_i4.Decimal, double>>>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [TransactionNotificationTracker].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockTransactionNotificationTracker extends _i1.Mock
|
||||||
|
implements _i11.TransactionNotificationTracker {
|
||||||
|
MockTransactionNotificationTracker() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get walletId =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#walletId), returnValue: '')
|
||||||
|
as String);
|
||||||
|
@override
|
||||||
|
List<String> get pendings =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#pendings), returnValue: <String>[])
|
||||||
|
as List<String>);
|
||||||
|
@override
|
||||||
|
List<String> get confirmeds => (super
|
||||||
|
.noSuchMethod(Invocation.getter(#confirmeds), returnValue: <String>[])
|
||||||
|
as List<String>);
|
||||||
|
@override
|
||||||
|
bool wasNotifiedPending(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]),
|
||||||
|
returnValue: false) as bool);
|
||||||
|
@override
|
||||||
|
_i7.Future<void> addNotifiedPending(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i7.Future<void>);
|
||||||
|
@override
|
||||||
|
bool wasNotifiedConfirmed(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]),
|
||||||
|
returnValue: false) as bool);
|
||||||
|
@override
|
||||||
|
_i7.Future<void> addNotifiedConfirmed(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i7.Future<void>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [ElectrumX].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockElectrumX extends _i1.Mock implements _i6.ElectrumX {
|
||||||
|
@override
|
||||||
|
set failovers(List<_i6.ElectrumXNode>? _failovers) =>
|
||||||
|
super.noSuchMethod(Invocation.setter(#failovers, _failovers),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
int get currentFailoverIndex =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#currentFailoverIndex),
|
||||||
|
returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod(
|
||||||
|
Invocation.setter(#currentFailoverIndex, _currentFailoverIndex),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
String get host =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String);
|
||||||
|
@override
|
||||||
|
int get port =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
bool get useSSL =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
|
||||||
|
as bool);
|
||||||
|
@override
|
||||||
|
_i7.Future<dynamic> request(
|
||||||
|
{String? command,
|
||||||
|
List<dynamic>? args = const [],
|
||||||
|
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||||
|
String? requestID,
|
||||||
|
int? retries = 2}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#request, [], {
|
||||||
|
#command: command,
|
||||||
|
#args: args,
|
||||||
|
#connectionTimeout: connectionTimeout,
|
||||||
|
#requestID: requestID,
|
||||||
|
#retries: retries
|
||||||
|
}),
|
||||||
|
returnValue: Future<dynamic>.value()) as _i7.Future<dynamic>);
|
||||||
|
@override
|
||||||
|
_i7.Future<List<Map<String, dynamic>>> batchRequest(
|
||||||
|
{String? command,
|
||||||
|
Map<String, List<dynamic>>? args,
|
||||||
|
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||||
|
int? retries = 2}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#batchRequest, [], {
|
||||||
|
#command: command,
|
||||||
|
#args: args,
|
||||||
|
#connectionTimeout: connectionTimeout,
|
||||||
|
#retries: retries
|
||||||
|
}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[]))
|
||||||
|
as _i7.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<bool> ping({String? requestID, int? retryCount = 1}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#ping, [], {#requestID: requestID, #retryCount: retryCount}),
|
||||||
|
returnValue: Future<bool>.value(false)) as _i7.Future<bool>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getServerFeatures, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i7
|
||||||
|
.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<String> broadcastTransaction({String? rawTx, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#broadcastTransaction, [],
|
||||||
|
{#rawTx: rawTx, #requestID: requestID}),
|
||||||
|
returnValue: Future<String>.value('')) as _i7.Future<String>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getBalance(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBalance, [],
|
||||||
|
{#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<List<Map<String, dynamic>>> getHistory(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getHistory, [],
|
||||||
|
{#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[]))
|
||||||
|
as _i7.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
|
||||||
|
{Map<String, List<dynamic>>? args}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBatchHistory, [], {#args: args}),
|
||||||
|
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||||
|
<String, List<Map<String, dynamic>>>{})) as _i7
|
||||||
|
.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<List<Map<String, dynamic>>> getUTXOs(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[])) as _i7
|
||||||
|
.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
|
||||||
|
{Map<String, List<dynamic>>? args}) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}),
|
||||||
|
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||||
|
<String, List<Map<String, dynamic>>>{})) as _i7
|
||||||
|
.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getTransaction(
|
||||||
|
{String? txHash, bool? verbose = true, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getTransaction, [],
|
||||||
|
{#txHash: txHash, #verbose: verbose, #requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getAnonymitySet(
|
||||||
|
{String? groupId = r'1',
|
||||||
|
String? blockhash = r'',
|
||||||
|
String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getAnonymitySet, [], {
|
||||||
|
#groupId: groupId,
|
||||||
|
#blockhash: blockhash,
|
||||||
|
#requestID: requestID
|
||||||
|
}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<dynamic> getMintData({dynamic mints, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getMintData, [], {#mints: mints, #requestID: requestID}),
|
||||||
|
returnValue: Future<dynamic>.value()) as _i7.Future<dynamic>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getUsedCoinSerials(
|
||||||
|
{String? requestID, int? startNumber}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getUsedCoinSerials, [],
|
||||||
|
{#requestID: requestID, #startNumber: startNumber}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i7.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(#getLatestCoinId, [], {#requestID: requestID}),
|
||||||
|
returnValue: Future<int>.value(0)) as _i7.Future<int>);
|
||||||
|
@override
|
||||||
|
_i7.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => (super
|
||||||
|
.noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i7
|
||||||
|
.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i7.Future<_i4.Decimal> estimateFee({String? requestID, int? blocks}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#estimateFee, [], {#requestID: requestID, #blocks: blocks}),
|
||||||
|
returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2()))
|
||||||
|
as _i7.Future<_i4.Decimal>);
|
||||||
|
@override
|
||||||
|
_i7.Future<_i4.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(#relayFee, [], {#requestID: requestID}),
|
||||||
|
returnValue: Future<_i4.Decimal>.value(_FakeDecimal_2()))
|
||||||
|
as _i7.Future<_i4.Decimal>);
|
||||||
|
}
|
|
@ -0,0 +1,95 @@
|
||||||
|
final Map<String, List<dynamic>> historyBatchArgs0 = {
|
||||||
|
"k_0_0": ["bd84ae7e09414b0ccf5dcbf70a1f89f2fd42119a98af35dd4ecc80210fed0487"],
|
||||||
|
"k_0_1": ["3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6"]
|
||||||
|
};
|
||||||
|
final Map<String, List<dynamic>> historyBatchArgs1 = {
|
||||||
|
"k_0_0": ["dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7"],
|
||||||
|
"k_0_1": ["71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d"]
|
||||||
|
};
|
||||||
|
final Map<String, List<dynamic>> historyBatchArgs2 = {
|
||||||
|
"k_0_0": ["c7e700f7e23a85bbdd9de86d502322a933607ee7ea7e16adaf02e477cdd849b9"]
|
||||||
|
};
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> historyBatchResponse = {
|
||||||
|
"k_0_0": [],
|
||||||
|
"s_0_0": [{}, {}],
|
||||||
|
"w_0_0": [],
|
||||||
|
"k_0_1": [{}],
|
||||||
|
"s_0_1": [],
|
||||||
|
"w_0_1": [{}, {}, {}],
|
||||||
|
"k_0_2": [],
|
||||||
|
"s_0_2": [],
|
||||||
|
"w_0_2": [],
|
||||||
|
"k_0_3": [],
|
||||||
|
"s_0_3": [],
|
||||||
|
"w_0_3": [],
|
||||||
|
"k_0_4": [],
|
||||||
|
"s_0_4": [],
|
||||||
|
"w_0_4": [],
|
||||||
|
"k_0_5": [],
|
||||||
|
"s_0_5": [],
|
||||||
|
"w_0_5": [],
|
||||||
|
"k_0_6": [],
|
||||||
|
"s_0_6": [],
|
||||||
|
"w_0_6": [],
|
||||||
|
"k_0_7": [],
|
||||||
|
"s_0_7": [],
|
||||||
|
"w_0_7": [],
|
||||||
|
"k_0_8": [],
|
||||||
|
"s_0_8": [],
|
||||||
|
"w_0_8": [],
|
||||||
|
"k_0_9": [],
|
||||||
|
"s_0_9": [],
|
||||||
|
"w_0_9": [],
|
||||||
|
"k_0_10": [],
|
||||||
|
"s_0_10": [],
|
||||||
|
"w_0_10": [],
|
||||||
|
"k_0_11": [],
|
||||||
|
"s_0_11": [],
|
||||||
|
"w_0_11": []
|
||||||
|
};
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> emptyHistoryBatchResponse = {
|
||||||
|
"k_0_0": [],
|
||||||
|
"s_0_0": [],
|
||||||
|
"w_0_0": [],
|
||||||
|
"k_0_1": [],
|
||||||
|
"s_0_1": [],
|
||||||
|
"w_0_1": [],
|
||||||
|
"k_0_2": [],
|
||||||
|
"s_0_2": [],
|
||||||
|
"w_0_2": [],
|
||||||
|
"k_0_3": [],
|
||||||
|
"s_0_3": [],
|
||||||
|
"w_0_3": [],
|
||||||
|
"k_0_4": [],
|
||||||
|
"s_0_4": [],
|
||||||
|
"w_0_4": [],
|
||||||
|
"k_0_5": [],
|
||||||
|
"s_0_5": [],
|
||||||
|
"w_0_5": [],
|
||||||
|
"k_0_6": [],
|
||||||
|
"s_0_6": [],
|
||||||
|
"w_0_6": [],
|
||||||
|
"k_0_7": [],
|
||||||
|
"s_0_7": [],
|
||||||
|
"w_0_7": [],
|
||||||
|
"k_0_8": [],
|
||||||
|
"s_0_8": [],
|
||||||
|
"w_0_8": [],
|
||||||
|
"k_0_9": [],
|
||||||
|
"s_0_9": [],
|
||||||
|
"w_0_9": [],
|
||||||
|
"k_0_10": [],
|
||||||
|
"s_0_10": [],
|
||||||
|
"w_0_10": [],
|
||||||
|
"k_0_11": [],
|
||||||
|
"s_0_11": [],
|
||||||
|
"w_0_11": []
|
||||||
|
};
|
||||||
|
|
||||||
|
final List<String> activeScriptHashes = [
|
||||||
|
"83b744ccb88827d544081c1a03ea782a7d00d6224ff9fddb7d0fbad399e1cae7",
|
||||||
|
"86906979fc9107d06d560275d7de8305b69d7189c3206ac9070ad76e6abff874",
|
||||||
|
"5baba32b1899d5e740838559ef39b7d8e9ba302bd24b732eeedd4c0e6ec65b51",
|
||||||
|
];
|
|
@ -0,0 +1,355 @@
|
||||||
|
import 'package:stackwallet/models/paymint/transactions_model.dart';
|
||||||
|
|
||||||
|
final transactionData = TransactionData.fromMap({
|
||||||
|
"3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6": tx1,
|
||||||
|
"dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7": tx2,
|
||||||
|
"71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d": tx3,
|
||||||
|
"c7e700f7e23a85bbdd9de86d502322a933607ee7ea7e16adaf02e477cdd849b9": tx4,
|
||||||
|
});
|
||||||
|
|
||||||
|
final tx1 = Transaction(
|
||||||
|
txid: "3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 212,
|
||||||
|
txType: "Received",
|
||||||
|
amount: 1000000,
|
||||||
|
fees: 23896,
|
||||||
|
height: 629633,
|
||||||
|
address: "nc1qwfda4s9qmdqpnykgpjf85n09ath983srtuxcqx",
|
||||||
|
timestamp: 1663093275,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 2,
|
||||||
|
outputSize: 2,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "290904699ccbebd0921c4acc4f7a10f41141ee6a07bc64ebca5674c1e5ee8dfa",
|
||||||
|
vout: 1,
|
||||||
|
),
|
||||||
|
Input(
|
||||||
|
txid: "bd84ae7e09414b0ccf5dcbf70a1f89f2fd42119a98af35dd4ecc80210fed0487",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qwfda4s9qmdqpnykgpjf85n09ath983srtuxcqx",
|
||||||
|
value: 1000000,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qp7h7fxcnkqcpul202z6nh8yjy8jpt39jcpeapj",
|
||||||
|
value: 29853562,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx2 = Transaction(
|
||||||
|
txid: "dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 150,
|
||||||
|
txType: "Sent",
|
||||||
|
amount: 988567,
|
||||||
|
fees: 11433,
|
||||||
|
height: 629695,
|
||||||
|
address: "nc1qraffwaq3cxngwp609e03ynwsx8ykgjnjve9f3y",
|
||||||
|
timestamp: 1663142110,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 1,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qraffwaq3cxngwp609e03ynwsx8ykgjnjve9f3y",
|
||||||
|
value: 988567,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx3 = Transaction(
|
||||||
|
txid: "71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 147,
|
||||||
|
txType: "Received",
|
||||||
|
amount: 988567,
|
||||||
|
fees: 11433,
|
||||||
|
height: 629699,
|
||||||
|
address: "nc1qw4srwqq2semrxje4x6zcrg53g07q0pr3yqv5kr",
|
||||||
|
timestamp: 1663145287,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 2,
|
||||||
|
outputSize: 1,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
Input(
|
||||||
|
txid: "80f8c6de5be2243013348219bbb7043a6d8d00ddc716baf6a69eab517f9a6fc1",
|
||||||
|
vout: 1,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qw4srwqq2semrxje4x6zcrg53g07q0pr3yqv5kr",
|
||||||
|
value: 1000000,
|
||||||
|
),
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qsgr7u4hd22rc64r9vlef69en9wzlvmjt8dzyrm",
|
||||||
|
value: 28805770,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx4 = Transaction(
|
||||||
|
txid: "c7e700f7e23a85bbdd9de86d502322a933607ee7ea7e16adaf02e477cdd849b9",
|
||||||
|
confirmedStatus: true,
|
||||||
|
confirmations: 130,
|
||||||
|
txType: "Sent",
|
||||||
|
amount: 988567,
|
||||||
|
fees: 11433,
|
||||||
|
height: 629717,
|
||||||
|
address: "nc1qmdt0fxhpwx7x5ymmm9gvh229adu0kmtukfcsjk",
|
||||||
|
timestamp: 1663155739,
|
||||||
|
worthNow: "0.00",
|
||||||
|
worthAtBlockTimestamp: "0.00",
|
||||||
|
inputSize: 1,
|
||||||
|
outputSize: 1,
|
||||||
|
inputs: [
|
||||||
|
Input(
|
||||||
|
txid: "71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d",
|
||||||
|
vout: 0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
outputs: [
|
||||||
|
Output(
|
||||||
|
scriptpubkeyAddress: "nc1qmdt0fxhpwx7x5ymmm9gvh229adu0kmtukfcsjk",
|
||||||
|
value: 988567,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
final tx1Raw = {
|
||||||
|
"txid": "3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6",
|
||||||
|
"hash": "40c8dd876cf111dc00d3aa2fedc93a77c18b391931939d4f99a760226cbff675",
|
||||||
|
"version": 2,
|
||||||
|
"size": 394,
|
||||||
|
"vsize": 232,
|
||||||
|
"weight": 925,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"290904699ccbebd0921c4acc4f7a10f41141ee6a07bc64ebca5674c1e5ee8dfa",
|
||||||
|
"vout": 1,
|
||||||
|
"scriptSig": {
|
||||||
|
"asm": "001466d2173325f3d379c6beb0a4949e937308edb152",
|
||||||
|
"hex": "16001466d2173325f3d379c6beb0a4949e937308edb152"
|
||||||
|
},
|
||||||
|
"txinwitness": [
|
||||||
|
"3044022062d0f32dc051ed1e91889a96070121c77d895f69d2ed5a307d8b320e0352186702206a0c2613e708e5ef8a935aba61b8fa14ddd6ca4e9a80a8b4ded126a879217dd101",
|
||||||
|
"0303cd92ed121ef22398826af055f3006769210e019f8fb43bd2f5556282d84997"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"bd84ae7e09414b0ccf5dcbf70a1f89f2fd42119a98af35dd4ecc80210fed0487",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {"asm": "", "hex": ""},
|
||||||
|
"txinwitness": [
|
||||||
|
"3045022100e8814706766a2d7588908c51209c3b7095241bbc681febdd6b317b7e9b6ea97502205c33c63e4d8a675c19122bfe0057afce2159e6bd86f2c9aced214de77099dc8b01",
|
||||||
|
"03c35212e3a4c0734735eccae9219987dc78d9cf6245ab247942d430d0a01d61be"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.01,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 725bdac0a0db401992c80c927a4de5eaee53c603",
|
||||||
|
"hex": "0014725bdac0a0db401992c80c927a4de5eaee53c603",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qwfda4s9qmdqpnykgpjf85n09ath983srtuxcqx"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.29853562,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 0fafe49b13b0301e7d4f50b53b9c9221e415c4b2",
|
||||||
|
"hex": "00140fafe49b13b0301e7d4f50b53b9c9221e415c4b2",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qp7h7fxcnkqcpul202z6nh8yjy8jpt39jcpeapj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hex":
|
||||||
|
"02000000000102fa8deee5c17456caeb64bc076aee4111f4107a4fcc4a1c92d0ebcb9c69040929010000001716001466d2173325f3d379c6beb0a4949e937308edb152ffffffff8704ed0f2180cc4edd35af989a1142fdf2891f0af7cb5dcf0c4b41097eae84bd0000000000ffffffff0240420f0000000000160014725bdac0a0db401992c80c927a4de5eaee53c6037a87c701000000001600140fafe49b13b0301e7d4f50b53b9c9221e415c4b202473044022062d0f32dc051ed1e91889a96070121c77d895f69d2ed5a307d8b320e0352186702206a0c2613e708e5ef8a935aba61b8fa14ddd6ca4e9a80a8b4ded126a879217dd101210303cd92ed121ef22398826af055f3006769210e019f8fb43bd2f5556282d8499702483045022100e8814706766a2d7588908c51209c3b7095241bbc681febdd6b317b7e9b6ea97502205c33c63e4d8a675c19122bfe0057afce2159e6bd86f2c9aced214de77099dc8b012103c35212e3a4c0734735eccae9219987dc78d9cf6245ab247942d430d0a01d61be00000000",
|
||||||
|
"blockhash":
|
||||||
|
"c9f53cc7cbf654cbcc400e17b33e03a32706d6e6647ad7085c688540f980a378",
|
||||||
|
"confirmations": 212,
|
||||||
|
"time": 1663093275,
|
||||||
|
"blocktime": 1663093275
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx2Raw = {
|
||||||
|
"txid": "dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||||
|
"hash": "32dbc0d21327e0cb94ec6069a8d235affd99689ffc5f68959bfb720bafc04bcf",
|
||||||
|
"version": 2,
|
||||||
|
"size": 192,
|
||||||
|
"vsize": 110,
|
||||||
|
"weight": 438,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {"asm": "", "hex": ""},
|
||||||
|
"txinwitness": [
|
||||||
|
"30450221009d58ebfaab8eae297910bca93a7fd48f94ce52a1731cf27fb4c043368fa10e8d02207e88f5d868113d9567999793be0a5b752ad704d04224046839763cefe46463a501",
|
||||||
|
"02f6ca5274b59dfb014f6a0d690671964290dac7f97fe825f723204e6cb8daf086"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.00988567,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 1f52977411c1a687074f2e5f124dd031c9644a72",
|
||||||
|
"hex": "00141f52977411c1a687074f2e5f124dd031c9644a72",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qraffwaq3cxngwp609e03ynwsx8ykgjnjve9f3y"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hex":
|
||||||
|
"02000000000101c6ccf4ddc2a21434ed634636378923d01014b2d3b2f124999f3e7c88d043f53e0000000000ffffffff0197150f00000000001600141f52977411c1a687074f2e5f124dd031c9644a72024830450221009d58ebfaab8eae297910bca93a7fd48f94ce52a1731cf27fb4c043368fa10e8d02207e88f5d868113d9567999793be0a5b752ad704d04224046839763cefe46463a5012102f6ca5274b59dfb014f6a0d690671964290dac7f97fe825f723204e6cb8daf08600000000",
|
||||||
|
"blockhash":
|
||||||
|
"ae1129ee834853c45b9edbb7228497c7fa423d7d1bdec8fd155f9e3c429c84d3",
|
||||||
|
"confirmations": 150,
|
||||||
|
"time": 1663142110,
|
||||||
|
"blocktime": 1663142110
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx3Raw = {
|
||||||
|
"txid": "71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d",
|
||||||
|
"hash": "bb25567e1ffb2fd6ec9aa3925a7a8dd3055a29521f7811b2b2bc01ce7d8a216e",
|
||||||
|
"version": 2,
|
||||||
|
"size": 370,
|
||||||
|
"vsize": 208,
|
||||||
|
"weight": 832,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {"asm": "", "hex": ""},
|
||||||
|
"txinwitness": [
|
||||||
|
"304402203535cf570aca7c1acfa6e8d2f43e0b188b76d0b7a75ffca448e6af953ffe8b6302202ea52b312aaaf6d615d722bd92535d1e8b25fa9584a8dbe34dfa1ea9c18105ca01",
|
||||||
|
"038b68078a95f73f8710e8464dec52c61f9e21675ddf69d4f61b93cc417cf73d74"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"80f8c6de5be2243013348219bbb7043a6d8d00ddc716baf6a69eab517f9a6fc1",
|
||||||
|
"vout": 1,
|
||||||
|
"scriptSig": {"asm": "", "hex": ""},
|
||||||
|
"txinwitness": [
|
||||||
|
"3044022045268613674326251c46caeaf435081ca753e4ee2018d79480c4930ad7d5e19f022050090a9add82e7272b8206b9d369675e7e9a5f1396fc93490143f0053666102901",
|
||||||
|
"028e2ede901e69887cb80603c8e207839f61a477d59beff17705162a2045dd974e"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.01,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 756037000a8676334b35368581a29143fc078471",
|
||||||
|
"hex": "0014756037000a8676334b35368581a29143fc078471",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qw4srwqq2semrxje4x6zcrg53g07q0pr3yqv5kr"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": 0.2880577,
|
||||||
|
"n": 1,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 8207ee56ed52878d546567f29d17332b85f66e4b",
|
||||||
|
"hex": "00148207ee56ed52878d546567f29d17332b85f66e4b",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qsgr7u4hd22rc64r9vlef69en9wzlvmjt8dzyrm"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hex":
|
||||||
|
"02000000000102d7609f2ebf00afdc6b8cda9a5e92b4b9a0b8aaafadf890fbf99721854395fadf0000000000ffffffffc16f9a7f51ab9ea6f6ba16c7dd008d6d3a04b7bb198234133024e25bdec6f8800100000000ffffffff0240420f0000000000160014756037000a8676334b35368581a29143fc0784718a8ab701000000001600148207ee56ed52878d546567f29d17332b85f66e4b0247304402203535cf570aca7c1acfa6e8d2f43e0b188b76d0b7a75ffca448e6af953ffe8b6302202ea52b312aaaf6d615d722bd92535d1e8b25fa9584a8dbe34dfa1ea9c18105ca0121038b68078a95f73f8710e8464dec52c61f9e21675ddf69d4f61b93cc417cf73d7402473044022045268613674326251c46caeaf435081ca753e4ee2018d79480c4930ad7d5e19f022050090a9add82e7272b8206b9d369675e7e9a5f1396fc93490143f005366610290121028e2ede901e69887cb80603c8e207839f61a477d59beff17705162a2045dd974e00000000",
|
||||||
|
"blockhash":
|
||||||
|
"98f388ba99e3b6fc421c23edf3c699ada082b01e5a5d130af7550b7fa6184f2f",
|
||||||
|
"confirmations": 147,
|
||||||
|
"time": 1663145287,
|
||||||
|
"blocktime": 1663145287
|
||||||
|
};
|
||||||
|
|
||||||
|
final tx4Raw = {
|
||||||
|
"txid": "c7e700f7e23a85bbdd9de86d502322a933607ee7ea7e16adaf02e477cdd849b9",
|
||||||
|
"hash": "c6b544ddd7d901fcc7218208a6cfc8e1819c403a22cc8a1f1a7029aafa427925",
|
||||||
|
"version": 2,
|
||||||
|
"size": 192,
|
||||||
|
"vsize": 110,
|
||||||
|
"weight": 438,
|
||||||
|
"locktime": 0,
|
||||||
|
"vin": [
|
||||||
|
{
|
||||||
|
"txid":
|
||||||
|
"71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d",
|
||||||
|
"vout": 0,
|
||||||
|
"scriptSig": {"asm": "", "hex": ""},
|
||||||
|
"txinwitness": [
|
||||||
|
"3045022100c664c6ad206999e019954c5206a26c2eca1ae2572288c0f78074c279a4a210ce022017456fdf85f744d694fa2e4638acee782d809268ea4808c04d91da3ac4fe7fd401",
|
||||||
|
"035456b63e86c0a6235cb3debfb9654966a4c2362ec678ae3b9beec53d31a25eba"
|
||||||
|
],
|
||||||
|
"sequence": 4294967295
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"vout": [
|
||||||
|
{
|
||||||
|
"value": 0.00988567,
|
||||||
|
"n": 0,
|
||||||
|
"scriptPubKey": {
|
||||||
|
"asm": "0 db56f49ae171bc6a137bd950cba945eb78fb6d7c",
|
||||||
|
"hex": "0014db56f49ae171bc6a137bd950cba945eb78fb6d7c",
|
||||||
|
"reqSigs": 1,
|
||||||
|
"type": "witness_v0_keyhash",
|
||||||
|
"addresses": ["nc1qmdt0fxhpwx7x5ymmm9gvh229adu0kmtukfcsjk"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"hex":
|
||||||
|
"020000000001014da0dde1ee465c062356dd3e2f9d04430753148b0f0dc3d81b32e7e93265b5710000000000ffffffff0197150f0000000000160014db56f49ae171bc6a137bd950cba945eb78fb6d7c02483045022100c664c6ad206999e019954c5206a26c2eca1ae2572288c0f78074c279a4a210ce022017456fdf85f744d694fa2e4638acee782d809268ea4808c04d91da3ac4fe7fd40121035456b63e86c0a6235cb3debfb9654966a4c2362ec678ae3b9beec53d31a25eba00000000",
|
||||||
|
"blockhash":
|
||||||
|
"6f60029ff3a32ca2d7e7e23c02b9cb35f61e7f9481992f9c3ded2c60c7b1de9b",
|
||||||
|
"confirmations": 130,
|
||||||
|
"time": 1663155739,
|
||||||
|
"blocktime": 1663155739
|
||||||
|
};
|
58
test/services/coins/namecoin/namecoin_utxo_sample_data.dart
Normal file
58
test/services/coins/namecoin/namecoin_utxo_sample_data.dart
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
import 'package:stackwallet/models/paymint/utxo_model.dart';
|
||||||
|
|
||||||
|
final Map<String, List<Map<String, dynamic>>> batchGetUTXOResponse0 = {
|
||||||
|
"some id 0": [
|
||||||
|
{
|
||||||
|
"tx_pos": 0,
|
||||||
|
"value": 988567,
|
||||||
|
"tx_hash":
|
||||||
|
"32dbc0d21327e0cb94ec6069a8d235affd99689ffc5f68959bfb720bafc04bcf",
|
||||||
|
"height": 629695
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tx_pos": 0,
|
||||||
|
"value": 1000000,
|
||||||
|
"tx_hash":
|
||||||
|
"40c8dd876cf111dc00d3aa2fedc93a77c18b391931939d4f99a760226cbff675",
|
||||||
|
"height": 629633
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"some id 1": [],
|
||||||
|
};
|
||||||
|
|
||||||
|
final utxoList = [
|
||||||
|
UtxoObject(
|
||||||
|
txid: "dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||||
|
vout: 0,
|
||||||
|
status: Status(
|
||||||
|
confirmed: true,
|
||||||
|
confirmations: 150,
|
||||||
|
blockHeight: 629695,
|
||||||
|
blockTime: 1663142110,
|
||||||
|
blockHash:
|
||||||
|
"32dbc0d21327e0cb94ec6069a8d235affd99689ffc5f68959bfb720bafc04bcf",
|
||||||
|
),
|
||||||
|
value: 988567,
|
||||||
|
fiatWorth: "\$0",
|
||||||
|
txName: "nc1qraffwaq3cxngwp609e03ynwsx8ykgjnjve9f3y",
|
||||||
|
blocked: false,
|
||||||
|
isCoinbase: false,
|
||||||
|
),
|
||||||
|
UtxoObject(
|
||||||
|
txid: "3ef543d0887c3e9f9924f1b2d3b21410d0238937364663ed3414a2c2ddf4ccc6",
|
||||||
|
vout: 0,
|
||||||
|
status: Status(
|
||||||
|
confirmed: true,
|
||||||
|
confirmations: 212,
|
||||||
|
blockHeight: 629633,
|
||||||
|
blockTime: 1663093275,
|
||||||
|
blockHash:
|
||||||
|
"40c8dd876cf111dc00d3aa2fedc93a77c18b391931939d4f99a760226cbff675",
|
||||||
|
),
|
||||||
|
value: 1000000,
|
||||||
|
fiatWorth: "\$0",
|
||||||
|
txName: "nc1qwfda4s9qmdqpnykgpjf85n09ath983srtuxcqx",
|
||||||
|
blocked: false,
|
||||||
|
isCoinbase: false,
|
||||||
|
),
|
||||||
|
];
|
4448
test/services/coins/namecoin/namecoin_wallet_test.dart
Normal file
4448
test/services/coins/namecoin/namecoin_wallet_test.dart
Normal file
File diff suppressed because it is too large
Load diff
352
test/services/coins/namecoin/namecoin_wallet_test.mocks.dart
Normal file
352
test/services/coins/namecoin/namecoin_wallet_test.mocks.dart
Normal file
|
@ -0,0 +1,352 @@
|
||||||
|
// Mocks generated by Mockito 5.2.0 from annotations
|
||||||
|
// in stackwallet/test/services/coins/namecoin/namecoin_wallet_test.dart.
|
||||||
|
// Do not manually edit this file.
|
||||||
|
|
||||||
|
import 'dart:async' as _i6;
|
||||||
|
|
||||||
|
import 'package:decimal/decimal.dart' as _i2;
|
||||||
|
import 'package:http/http.dart' as _i4;
|
||||||
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
|
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7;
|
||||||
|
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i5;
|
||||||
|
import 'package:stackwallet/services/price.dart' as _i9;
|
||||||
|
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||||
|
as _i11;
|
||||||
|
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
|
||||||
|
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||||
|
import 'package:tuple/tuple.dart' as _i10;
|
||||||
|
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
// ignore_for_file: avoid_setters_without_getters
|
||||||
|
// ignore_for_file: comment_references
|
||||||
|
// ignore_for_file: implementation_imports
|
||||||
|
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||||
|
// ignore_for_file: prefer_const_constructors
|
||||||
|
// ignore_for_file: unnecessary_parenthesis
|
||||||
|
// ignore_for_file: camel_case_types
|
||||||
|
|
||||||
|
class _FakeDecimal_0 extends _i1.Fake implements _i2.Decimal {}
|
||||||
|
|
||||||
|
class _FakePrefs_1 extends _i1.Fake implements _i3.Prefs {}
|
||||||
|
|
||||||
|
class _FakeClient_2 extends _i1.Fake implements _i4.Client {}
|
||||||
|
|
||||||
|
/// A class which mocks [ElectrumX].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockElectrumX extends _i1.Mock implements _i5.ElectrumX {
|
||||||
|
MockElectrumX() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
set failovers(List<_i5.ElectrumXNode>? _failovers) =>
|
||||||
|
super.noSuchMethod(Invocation.setter(#failovers, _failovers),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
int get currentFailoverIndex =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#currentFailoverIndex),
|
||||||
|
returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod(
|
||||||
|
Invocation.setter(#currentFailoverIndex, _currentFailoverIndex),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
String get host =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#host), returnValue: '') as String);
|
||||||
|
@override
|
||||||
|
int get port =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
bool get useSSL =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
|
||||||
|
as bool);
|
||||||
|
@override
|
||||||
|
_i6.Future<dynamic> request(
|
||||||
|
{String? command,
|
||||||
|
List<dynamic>? args = const [],
|
||||||
|
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||||
|
String? requestID,
|
||||||
|
int? retries = 2}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#request, [], {
|
||||||
|
#command: command,
|
||||||
|
#args: args,
|
||||||
|
#connectionTimeout: connectionTimeout,
|
||||||
|
#requestID: requestID,
|
||||||
|
#retries: retries
|
||||||
|
}),
|
||||||
|
returnValue: Future<dynamic>.value()) as _i6.Future<dynamic>);
|
||||||
|
@override
|
||||||
|
_i6.Future<List<Map<String, dynamic>>> batchRequest(
|
||||||
|
{String? command,
|
||||||
|
Map<String, List<dynamic>>? args,
|
||||||
|
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||||
|
int? retries = 2}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#batchRequest, [], {
|
||||||
|
#command: command,
|
||||||
|
#args: args,
|
||||||
|
#connectionTimeout: connectionTimeout,
|
||||||
|
#retries: retries
|
||||||
|
}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[]))
|
||||||
|
as _i6.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<bool> ping({String? requestID, int? retryCount = 1}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#ping, [], {#requestID: requestID, #retryCount: retryCount}),
|
||||||
|
returnValue: Future<bool>.value(false)) as _i6.Future<bool>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBlockHeadTip, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getServerFeatures, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i6
|
||||||
|
.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<String> broadcastTransaction({String? rawTx, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#broadcastTransaction, [],
|
||||||
|
{#rawTx: rawTx, #requestID: requestID}),
|
||||||
|
returnValue: Future<String>.value('')) as _i6.Future<String>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getBalance(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBalance, [],
|
||||||
|
{#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<List<Map<String, dynamic>>> getHistory(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getHistory, [],
|
||||||
|
{#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[]))
|
||||||
|
as _i6.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
|
||||||
|
{Map<String, List<dynamic>>? args}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getBatchHistory, [], {#args: args}),
|
||||||
|
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||||
|
<String, List<Map<String, dynamic>>>{})) as _i6
|
||||||
|
.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<List<Map<String, dynamic>>> getUTXOs(
|
||||||
|
{String? scripthash, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getUTXOs, [], {#scripthash: scripthash, #requestID: requestID}),
|
||||||
|
returnValue: Future<List<Map<String, dynamic>>>.value(
|
||||||
|
<Map<String, dynamic>>[])) as _i6
|
||||||
|
.Future<List<Map<String, dynamic>>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
|
||||||
|
{Map<String, List<dynamic>>? args}) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#getBatchUTXOs, [], {#args: args}),
|
||||||
|
returnValue: Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||||
|
<String, List<Map<String, dynamic>>>{})) as _i6
|
||||||
|
.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getTransaction(
|
||||||
|
{String? txHash, bool? verbose = true, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getTransaction, [],
|
||||||
|
{#txHash: txHash, #verbose: verbose, #requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getAnonymitySet(
|
||||||
|
{String? groupId = r'1',
|
||||||
|
String? blockhash = r'',
|
||||||
|
String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getAnonymitySet, [], {
|
||||||
|
#groupId: groupId,
|
||||||
|
#blockhash: blockhash,
|
||||||
|
#requestID: requestID
|
||||||
|
}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<dynamic> getMintData({dynamic mints, String? requestID}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getMintData, [], {#mints: mints, #requestID: requestID}),
|
||||||
|
returnValue: Future<dynamic>.value()) as _i6.Future<dynamic>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getUsedCoinSerials(
|
||||||
|
{String? requestID, int? startNumber}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getUsedCoinSerials, [],
|
||||||
|
{#requestID: requestID, #startNumber: startNumber}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(#getLatestCoinId, [], {#requestID: requestID}),
|
||||||
|
returnValue: Future<int>.value(0)) as _i6.Future<int>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getFeeRate({String? requestID}) => (super
|
||||||
|
.noSuchMethod(Invocation.method(#getFeeRate, [], {#requestID: requestID}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{})) as _i6
|
||||||
|
.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<_i2.Decimal> estimateFee({String? requestID, int? blocks}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#estimateFee, [], {#requestID: requestID, #blocks: blocks}),
|
||||||
|
returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0()))
|
||||||
|
as _i6.Future<_i2.Decimal>);
|
||||||
|
@override
|
||||||
|
_i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(#relayFee, [], {#requestID: requestID}),
|
||||||
|
returnValue: Future<_i2.Decimal>.value(_FakeDecimal_0()))
|
||||||
|
as _i6.Future<_i2.Decimal>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [CachedElectrumX].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
||||||
|
MockCachedElectrumX() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get server =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#server), returnValue: '')
|
||||||
|
as String);
|
||||||
|
@override
|
||||||
|
int get port =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#port), returnValue: 0) as int);
|
||||||
|
@override
|
||||||
|
bool get useSSL =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#useSSL), returnValue: false)
|
||||||
|
as bool);
|
||||||
|
@override
|
||||||
|
_i3.Prefs get prefs => (super.noSuchMethod(Invocation.getter(#prefs),
|
||||||
|
returnValue: _FakePrefs_1()) as _i3.Prefs);
|
||||||
|
@override
|
||||||
|
List<_i5.ElectrumXNode> get failovers =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#failovers),
|
||||||
|
returnValue: <_i5.ElectrumXNode>[]) as List<_i5.ElectrumXNode>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getAnonymitySet(
|
||||||
|
{String? groupId, String? blockhash = r'', _i8.Coin? coin}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getAnonymitySet, [],
|
||||||
|
{#groupId: groupId, #blockhash: blockhash, #coin: coin}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<String, dynamic>> getTransaction(
|
||||||
|
{String? txHash, _i8.Coin? coin, bool? verbose = true}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getTransaction, [],
|
||||||
|
{#txHash: txHash, #coin: coin, #verbose: verbose}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<String, dynamic>>.value(<String, dynamic>{}))
|
||||||
|
as _i6.Future<Map<String, dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<List<dynamic>> getUsedCoinSerials(
|
||||||
|
{_i8.Coin? coin, int? startNumber = 0}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#getUsedCoinSerials, [],
|
||||||
|
{#coin: coin, #startNumber: startNumber}),
|
||||||
|
returnValue: Future<List<dynamic>>.value(<dynamic>[]))
|
||||||
|
as _i6.Future<List<dynamic>>);
|
||||||
|
@override
|
||||||
|
_i6.Future<void> clearSharedTransactionCache({_i8.Coin? coin}) =>
|
||||||
|
(super.noSuchMethod(
|
||||||
|
Invocation.method(#clearSharedTransactionCache, [], {#coin: coin}),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i6.Future<void>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [PriceAPI].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI {
|
||||||
|
MockPriceAPI() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
_i4.Client get client => (super.noSuchMethod(Invocation.getter(#client),
|
||||||
|
returnValue: _FakeClient_2()) as _i4.Client);
|
||||||
|
@override
|
||||||
|
void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod(
|
||||||
|
Invocation.method(#resetLastCalledToForceNextCallToUpdateCache, []),
|
||||||
|
returnValueForMissingStub: null);
|
||||||
|
@override
|
||||||
|
_i6.Future<Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>>
|
||||||
|
getPricesAnd24hChange({String? baseCurrency}) => (super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#getPricesAnd24hChange, [], {#baseCurrency: baseCurrency}),
|
||||||
|
returnValue:
|
||||||
|
Future<Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>>.value(
|
||||||
|
<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}))
|
||||||
|
as _i6.Future<Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>>);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A class which mocks [TransactionNotificationTracker].
|
||||||
|
///
|
||||||
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
|
class MockTransactionNotificationTracker extends _i1.Mock
|
||||||
|
implements _i11.TransactionNotificationTracker {
|
||||||
|
MockTransactionNotificationTracker() {
|
||||||
|
_i1.throwOnMissingStub(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get walletId =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#walletId), returnValue: '')
|
||||||
|
as String);
|
||||||
|
@override
|
||||||
|
List<String> get pendings =>
|
||||||
|
(super.noSuchMethod(Invocation.getter(#pendings), returnValue: <String>[])
|
||||||
|
as List<String>);
|
||||||
|
@override
|
||||||
|
List<String> get confirmeds => (super
|
||||||
|
.noSuchMethod(Invocation.getter(#confirmeds), returnValue: <String>[])
|
||||||
|
as List<String>);
|
||||||
|
@override
|
||||||
|
bool wasNotifiedPending(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#wasNotifiedPending, [txid]),
|
||||||
|
returnValue: false) as bool);
|
||||||
|
@override
|
||||||
|
_i6.Future<void> addNotifiedPending(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#addNotifiedPending, [txid]),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i6.Future<void>);
|
||||||
|
@override
|
||||||
|
bool wasNotifiedConfirmed(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#wasNotifiedConfirmed, [txid]),
|
||||||
|
returnValue: false) as bool);
|
||||||
|
@override
|
||||||
|
_i6.Future<void> addNotifiedConfirmed(String? txid) =>
|
||||||
|
(super.noSuchMethod(Invocation.method(#addNotifiedConfirmed, [txid]),
|
||||||
|
returnValue: Future<void>.value(),
|
||||||
|
returnValueForMissingStub: Future<void>.value()) as _i6.Future<void>);
|
||||||
|
}
|
Loading…
Reference in a new issue