Skip to content

Module BSV::Auth::GetVerifiableCertificates

Utility module for retrieving verifiable certificates from a wallet.

Used during the certificate exchange phase of the BSV Auth peer protocol. Lists certificates matching the requested certifiers and types, then calls prove_certificate for each to obtain a verifier-specific keyring for selective field revelation.

Public Class Methods

get_verifiable_certificates(wallet, requested_certificates, verifier_identity_key)

Retrieve verifiable certificates from a wallet for presentation to a verifier. - @param wallet [#list_certificates, #prove_certificate] the subject's wallet. Duck-typed — if the wallet does not respond to both methods, returns +[]+. - @param requested_certificates [Hash] with keys: - +:certifiers+ [Array] list of certifier public key hexes - +:types+ [Hash] type (Base64 string) → array of field names to reveal - @param verifier_identity_key [String] the verifier's compressed public key hex - @return [Array] list of verifiable certificates ready for presentation, or +[]+ on any failure