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 *

getId :(NSError **) error

Get the facade ID

NSString *

getName :(NSError **) error

Get the contact name

NSString *

getSubName :(NSError **) error

Get the contact sub name

NSString *

getUri :(NSError **) error

Get the blockchain URI for the Facade

NSNumber *

getStatus :(NSError **) error

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

NSNumber *

isMature :(NSError **) error

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 *

isNil :(NSError **) error

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