getTaprootAddress static method

String getTaprootAddress(
  1. Uint8List publicKey,
  2. String prefix
)

Implementation

static String getTaprootAddress(Uint8List publicKey, String prefix) {
  final info = getTaprootOutputKey(publicKey);
  final words = convertBits(info, 8, 5);
  final addr =
      bech32.encode(Bech32(prefix, [1] + words), encoding: 'bech32m');
  return addr;
}