philips-software/cogito

View on GitHub
workspaces/cogito-attestations-ios/Attestations/Identity.swift

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import JavaScriptCore

public class Identity {
    let javascriptValue: JSValue

    public init() {
        let identity = Javascript.cogitoAttestations.forProperty("Identity")!
        javascriptValue = identity.construct(withArguments: [])!
    }

    public var address: String {
        return javascriptValue.forProperty("address").toString()!
    }
}