Class Facade

  • NSObject

    • KeychainCore/Facade

Facade

Facade encapsulates the methods in common between Persona and Contacts for use in methods in other classes that can take either class. These classes provide basic information about the related Keychains such as the maturity (blockchain confirmation) level of the two Keychains and the base URI.

The distinction between a Persona and a Contact is that a Passport stores the public and private keys for each Persona whereas for Contacts it only stores (and knows) the public keys of the Contact as recorded on the blockchain. Methods for which this distinction is unimportant generally take Facade as a parameter.

The information from the methods is a static snapshot of the state of the Persona or Contact objects at the time the object was created.

Method Summary

Return type Method and Description

NSNumber!

open func id() -> NSNumber!

This is not the facade ID. It is a unique id that can ve used in SwiftUI Lists

NSNumber

open func getId() throws -> NSNumber

Get the facade ID

String

open func getName() throws -> String

Get the contact name

String

open func getSubName() throws -> String

Get the contact sub name

String

open func getUri() throws -> Uri

Get the blockchain URI for the Facade

NSNumber

open func getStatus() throws -> NSNumber

Get the Facade’s status (state). See PersonaStatus for a list of possible values returned by getStatus().intValue

NSNumber

open func isMature() throws -> NSNumber

Whether the Facade has been fully confirmed on the blockchain at least once in its lifetime if so, then isMature().boolValue will be true. The Facade should not be used until it is mature.

NSNumber

open func isNil() throws -> NSNumber

If the fasade was created or returned by a call to the Gateway, then isNil().boolValue` will return false.