RawSignedModel
@objc(VSSRawSignedModel)
public final class RawSignedModel : NSObject, Codable
Represents some model in binary form that can have signatures and corresponds to Virgil Cards Service model
-
Snapshot of
RawCardContentDeclaration
Swift
@objc public let contentSnapshot: Data -
Array with RawSignatures of card
Declaration
Swift
@objc public private(set) var signatures: [RawSignature] { get } -
Initializes a new
RawSignedModelwith the provided contentSnapshotDeclaration
Swift
@objc public init(contentSnapshot: Data)Parameters
contentSnapshotdata with snapshot of content
-
Initializes
RawSignedModelfrom json dictionaryThrows
Rethrows fromJSONDecoderandNSJSONSerializationDeclaration
Swift
@objc public static func `import`(fromJson json: Any) throws -> RawSignedModelParameters
jsonJson-compatible dictionary
Return Value
RawSignedModel instance
-
Initializes
RawSignedModelfrom base64 encoded stringThrows
RawSignedModelError.invalidBase64Stringif passed string is not base64 encoded data.- Rethrows from JSONDecoder
Declaration
Swift
@objc public static func `import`(fromBase64Encoded base64EncodedString: String) throws -> RawSignedModelParameters
base64EncodedStringBase64 encoded string with
RawSignedModelReturn Value
RawSignedModel instance
-
Initializes
RawSignedModelfrom DataThrows
- Rethrows from JSONDecoder
Declaration
Swift
@objc public static func `import`(fromData data: Data) throws -> RawSignedModelParameters
dataData with
RawSignedModelReturn Value
RawSignedModel instance
-
Exports
RawSignedModelas base64 encoded stringThrows
Rethrows fromJSONEncoderDeclaration
Swift
@objc public func exportAsBase64EncodedString() throws -> StringReturn Value
Base64 encoded string with
RawSignedModel -
Exports
RawSignedModelas DataThrows
Rethrows fromJSONEncoderDeclaration
Swift
@objc public func exportAsData() throws -> DataReturn Value
Data with
RawSignedModel -
Exports
RawSignedModelas json dictionaryThrows
Rethrows fromJSONEncoderandJSONSerializationDeclaration
Swift
@objc public func exportAsJson() throws -> AnyReturn Value
Json-compatible dictionary with
RawSignedModel -
Adds new signature
Throws
RawSignedModelError.duplicateSignature if signature with same signer already existsDeclaration
Swift
@objc public func addSignature(_ signature: RawSignature) throwsParameters
signaturesignature to add
RawSignedModel Class Reference