pubKeyToProgram static method

Future<String?> pubKeyToProgram(
  1. Uint8List pubkey
)

pubKeyToProgram converts a public key to its NKN program hash

Implementation

static Future<String?> pubKeyToProgram(Uint8List pubkey) async {
  try {
    final String program = await _methodChannel.invokeMethod('pubKeyToProgram', {
      'pubKey': pubkey,
    });
    return program;
  } catch (e) {
    return null;
  }
}