deriveArchethicKeypair function
Implementation
KeyPair deriveArchethicKeypair(
dynamic seed,
String derivationPath,
int index, {
String curve = 'ed25519',
String pathSuffix = '',
}) {
final extendedSeed = deriveServiceSeed(
seed,
derivationPath,
index,
pathSuffix: pathSuffix,
);
return isPathWithIndex(derivationPath)
? crypto.generateDeterministicKeyPair(
extendedSeed,
curve,
keychainOriginId,
)
: crypto.deriveKeyPair(uint8ListToHex(extendedSeed), index, curve: curve);
}