hexCredentialsDerivation method

  1. @SquadronMethod()
  2. @stringListMarshaler
Future<List<String>> hexCredentialsDerivation(
  1. @bip32PublicKeyKeyMarshaler Bip32PublicKey pubKey,
  2. int startIndexInclusive,
  3. int endIndexExclusive
)

Implementation

@SquadronMethod()
@stringListMarshaler
Future<List<String>> hexCredentialsDerivation(
  // verify key is the public key
  @bip32PublicKeyKeyMarshaler Bip32PublicKey pubKey,
  int startIndexInclusive,
  int endIndexExclusive,
) async =>
    List.generate(
      endIndexExclusive - startIndexInclusive,
      (index) => blake2bHash224(
        Bip32Ed25519KeyDerivation.instance.ckdPub(pubKey, startIndexInclusive + index).rawKey,
      ).hexEncode(),
    );