deriveAddresses function

List<Map<String, Object?>> deriveAddresses({
  1. required Map<String, Object?> source,
  2. String chain = 'bitcoin',
  3. int account = 0,
  4. int change = 0,
  5. int start = 0,
  6. int count = 20,
  7. String? scriptType,
  8. 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));
}