run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() {
  try {
    final privateKey = Felt.fromHexString(
      globalResults?['private-key'] as String,
    );
    final publicKey = StarkSigner(privateKey: privateKey).publicKey;
    stdout.writeln('Public Key: ${publicKey.toHexString()}');
  } catch (e) {
    stdout.writeln('Error: $e');
  }
}