CardClientProtocol
@objc(VSSCardClientProtocol)
public protocol CardClientProtocol
Protocol for CardClient
See: CardClient for default implementation
-
Returns
GetCardResponsewithRawSignedModelof card from the Virgil Cards Service with given ID, if existsThrows
Depends on implementationDeclaration
Swift
@objc func getCard(withId cardId: String) throws -> GetCardResponseParameters
cardIdString with unique Virgil Card identifier
Return Value
GetCardResponseif card found -
Creates Virgil Card instance on the Virgil Cards Service Also makes the Card accessible for search/get queries from other users
RawSignedModelshould contain appropriate signaturesThrows
Depends on implementationDeclaration
Swift
@objc func publishCard(model: RawSignedModel) throws -> RawSignedModelParameters
modelSigned
RawSignedModelReturn Value
RawSignedModelof created card -
Performs search of Virgil Cards using given identities on the Virgil Cards Service
Throws
Depends on implementationDeclaration
Swift
@objc func searchCards(identities: [String]) throws -> [RawSignedModel]Parameters
identitiesIdentities of cards to search
Return Value
Array with
RawSignedModels of matched Virgil Cards -
Returns list of cards that were replaced with newer ones
Throws
Depends on implementationDeclaration
Swift
@objc func getOutdated(cardIds: [String]) throws -> [String]Parameters
cardIdscard ids to check
Return Value
List of old card ids
-
Revokes card. Revoked card gets isOutdated flag to be set to true. Also, such cards could be obtained using get query, but will be absent in search query result.
Throws
Depends on implementationDeclaration
Swift
@objc func revokeCard(withId cardId: String) throwsParameters
cardIdidentifier of card to revoke
CardClientProtocol Protocol Reference