2023-11-15 21:59:01 +00:00
|
|
|
import 'package:nanodart/nanodart.dart';
|
2024-05-23 00:37:06 +00:00
|
|
|
import 'bip39_currency.dart';
|
2023-11-15 21:59:01 +00:00
|
|
|
|
|
|
|
abstract class NanoCurrency extends Bip39Currency {
|
|
|
|
NanoCurrency(super.network);
|
|
|
|
|
|
|
|
String get defaultRepresentative;
|
|
|
|
|
|
|
|
int get nanoAccountType;
|
|
|
|
|
2024-05-15 21:20:45 +00:00
|
|
|
@override
|
|
|
|
bool get hasMnemonicPassphraseSupport => false;
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get targetBlockTimeSeconds => 1; // TODO: Verify this
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool get hasBuySupport => false;
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get defaultSeedPhraseLength => 24;
|
|
|
|
|
|
|
|
@override
|
|
|
|
List<int> get possibleMnemonicLengths => [defaultSeedPhraseLength, 12];
|
|
|
|
|
2023-11-15 21:59:01 +00:00
|
|
|
@override
|
|
|
|
bool validateAddress(String address) => NanoAccounts.isValid(
|
|
|
|
nanoAccountType,
|
|
|
|
address,
|
|
|
|
);
|
|
|
|
|
|
|
|
@override
|
|
|
|
String get genesisHash => throw UnimplementedError(
|
|
|
|
"Not used in nano based coins",
|
|
|
|
);
|
|
|
|
}
|