signTransactions method

Future<List<Uint8List>> signTransactions(
  1. List<Uint8List> transactions, {
  2. Map<String, dynamic> params = const {},
})

Signs unsigned transactions by sending a request to the wallet. Returns the signed transactions bytes. Throws WalletConnectException if unable to sign the transactions.

Implementation

Future<List<Uint8List>> signTransactions(
  List<Uint8List> transactions, {
  Map<String, dynamic> params = const {},
}) async {
  final txsToSign = transactions
      .map((tx) => {
            'txn': base64Encode(tx),
            ...params,
          })
      .toList();

  return _signTransactions(requestParams: txsToSign);
}