PCSDKModule Documentation

Structure PCRenew​Request

public struct PCRenewRequest  

Holds user's renew data

Methods

create(user​ToRenew:​challenge:​password:​new​Public​Key:​signer:​completion:​)

public static func create(
        userToRenew: PCUser,
        challenge: RenewKeyChallenge,
        password: String,
        newPublicKey: String,
        signer: @escaping (_ data: Data) -> Result<String, Error>,
        completion: @escaping (_ result: Result<PCRenewRequest, Error>) -> Void
    )  

Creates PCRenewRequest instance

Parameters

user

The user to be renewed

challenge Renew​Key​Challenge

An additional data to renew operation

password String

The user's password

new​Public​Key String

The new public key to register

signer @escaping (_ data:​ Data) -> Result<String, Error>

The function to sign data

completion @escaping (_ result:​ Result<PCRenew​Request, Error>) -> Void

A closure to be invoked after finishing

result

Returns PCRenewRequest instance when success. Otherwise, returns error