signTransactionNotification method

Future<Uint8List> signTransactionNotification({
  1. required String notificationRecipientAddress,
  2. required String listenAddress,
  3. required KeyPair senderKeyPair,
})

Implementation

Future<Uint8List> signTransactionNotification({
  required String notificationRecipientAddress,
  required String listenAddress,
  required KeyPair senderKeyPair,
}) async {
  final payload = concatUint8List(
    <Uint8List>[
      Uint8List.fromList(
        hexToUint8List(notificationRecipientAddress),
      ),
      Uint8List.fromList(
        hexToUint8List(listenAddress),
      ),
    ],
  );

  return crypto.sign(payload, senderKeyPair.privateKey);
}