Extension function to store a credential in a wallet. Returns the credential itself as StoredCredential.