keyImport method
Returns a Future that resolves to the IPNS name of the key imported
under name.
privateKey must be the raw 32-byte Ed25519 seed, e.g. bytes previously
returned by keyExport. The keystore must be unlocked.
Throws ArgumentError if privateKey is not a valid seed.
Throws StateError if the keystore is locked or name already exists.
Implementation
Future<String> keyImport(String name, Uint8List privateKey) async {
final publicKey = await _container
.get<SecurityManager>()
.secureKeystore
.importSeed(name, privateKey);
return deriveIpnsName(publicKey);
}