RawCardContent
@objc(VSSRawCardContent)
public final class RawCardContent : NSObject, Codable
Represents content of Virgil Card
-
Card identity
Declaration
Swift
@objc public let identity: String
-
VirgilPublicKey data
Declaration
Swift
@objc public let publicKey: Data?
-
Identifier of outdated previous Virgil Card with same identity.
Declaration
Swift
@objc public let previousCardId: String?
-
Version of Virgil Card
Declaration
Swift
@objc public let version: String
-
UTC timestamp of creation date
Declaration
Swift
@objc public let createdAt: Int64
-
Initializes a new
RawCardContent
with the provided contentDeclaration
Swift
@objc public convenience init(identity: String, publicKey: Data, previousCardId: String? = nil, version: String = "5.0", createdAt: Date)
Parameters
identity
Card identity
publicKey
VirgilPublicKey data
previousCardId
Identifier of previous Virgil Card with same identity
version
Virgil Card version
createdAt
Date of creation
-
Initializes a new
RawCardContent
with the provided contentDeclaration
Swift
@objc public init(identity: String, publicKey: Data?, previousCardId: String? = nil, version: String = "5.0", createdAtTimestamp: Int64)
Parameters
identity
Card identity
publicKey
VirgilPublicKey data
previousCardId
Identifier of previous Virgil Card with same identity
version
Virgil Card version
createdAtTimestamp
Timestamp of creation
-
Initializes
RawCardContent
from binary content snapshotThrows
Rethrows fromJSONDecoder
Declaration
Swift
@objc public convenience init(snapshot: Data) throws
Parameters
snapshot
Binary snapshot of
RawCardContent
-
Takes binary snapshot of
RawCardContent
Throws
Rethrows fromJSONEncoder
Declaration
Swift
@objc public func snapshot() throws -> Data
Return Value
Binary snapshot of
RawCardContent