deriveAddresses function
List<Map<String, Object?>>
deriveAddresses({ - required Map<String, Object?> source,
- String chain = 'bitcoin',
- int account = 0,
- int change = 0,
- int start = 0,
- int count = 20,
- String? scriptType,
- String? format,
})
Implementation
List<Map<String, Object?>> deriveAddresses(
{required Map<String, Object?> source,
String chain = 'bitcoin',
int account = 0,
int change = 0,
int start = 0,
int count = 20,
String? scriptType,
String? format}) {
_index(start, 'start');
if (count < 1 || count > 10000 || start + count > hardenedOffset) {
throw const WalletHDDerivationException(
'count must be between 1 and 10000 and stay within the index range');
}
return List.generate(
count,
(offset) => deriveAddress(
source: source,
chain: chain,
account: account,
change: change,
index: start + offset,
scriptType: scriptType,
format: format));
}