publicKeyFromUri function

Future<List<int>> publicKeyFromUri(
  1. String uri
)

Converts a URI to a public key.

Takes a URI as input and returns the corresponding public key as a list of integers. The URI is used to generate a key pair using the ed25519 algorithm, and then the public key is extracted from the key pair.

Implementation

Future<List<int>> publicKeyFromUri(String uri) async {
  final keypair = await KeyPair.ed25519.fromUri(uri);
  return keypair.publicKey.bytes;
}