getMerkleProofsBatch method

Future<Map<String, MerkleProof>> getMerkleProofsBatch(
  1. List<String> txids
)

Batch get the current proofs by txid list (see getMerkleProof).

Returns a map of txid → proof for all txids that have a current proof. Orphaned and rejected proofs are never returned, so BEEFs are never built from them. Default implementation loops over single-item getMerkleProof.

Implementation

Future<Map<String, MerkleProof>> getMerkleProofsBatch(List<String> txids) async {
  final result = <String, MerkleProof>{};
  for (final txid in txids) {
    final proof = await getMerkleProof(txid);
    if (proof != null) result[txid] = proof;
  }
  return result;
}