#import <Foundation/Foundation.h>

@class ZSMError;

NS_ASSUME_NONNULL_BEGIN

@interface RelyingParty : NSObject

@property (nonatomic, strong, nullable) NSString *customerDefinedIdentifier;
@property (nonatomic, strong, nullable) NSString *credentialID;
@property (nonatomic, strong) NSDictionary *publicKey;
@property (nonatomic, strong, nullable) NSString *identityID;

- (instancetype)initWithHost:(NSURL *)host apiKey:(NSUUID *)apiKey applicationId:(NSUUID *)applicationId;

// **Authentication Start**
- (void)authenticationStart:(NSString *)userId credentialId:(NSString *)credentialId
                 completion:(void (^)(NSDictionary * _Nullable, ZSMError * _Nullable))completion;

// **Create Identity & Start Registration**
- (void)createIdentityThenRegistrationStart:(NSString *)userId
                                 completion:(void (^)(NSDictionary * _Nullable, ZSMError * _Nullable))completion;

// **Complete Registration & Start Authentication**
- (void)registrationFinishAuthenticationStart:(NSString *)userId
                                   credential:(NSDictionary *)credential
                                   completion:(void (^)(NSDictionary * _Nullable, ZSMError * _Nullable))completion;

// **Unbind current credential
- (void)unbind;

// **Get and Set Identity ID**
- (NSString * _Nullable)getIdentityID;
- (void)setIdentityID:(NSString * _Nullable)identityID;

@end

NS_ASSUME_NONNULL_END
