import { Crypto , CryptoBuilder , Requestor , IRequestorAttestation , IRequestor } from '../index' ; /**
 * Defines the presentation protcol
 */ export enum PresentationProtocol { /**
     * The presentation exchange protocol
     */ presentationExchange , /**
     * The attestation presentation protocol
     */ attestation } /**
 * Class to build an OIDC requestor
 */ export default class RequestorBuilder { private oidRequestExpirty : number = 5 * 60 ; private _state : string | undefined ; private _nonce : string | undefined ; private _issuance : boolean = false ; private _crypto : Crypto = new CryptoBuilder ( ) . build ( ) ; param requestor constructor ( public requestor , crypto ? ) { if ( crypto ) { this . _crypto = crypto ; } } /**
     * Gets the crypto object
     */ public get crypto ( ) { return this . _crypto ; } /**
     * Gets the presentation protocol
     */ public get presentationProtocol ( ) { return ( < IRequestorAttestation > this . requestor ) . attestations ? PresentationProtocol . attestation : PresentationProtocol . presentationExchange ; } /**
     * Get the name of the requestor (Relying Party)
     */ public get clientName ( ) { return this . requestor . clientName ; } /**
     * Get the requestor's purpose for the request
     */ public get clientPurpose ( ) { return this . requestor . clientPurpose ; } /**
     * Get the url where the request came from
     */ public get clientId ( ) { return this . requestor . clientId ; } /**
     * Get the url to send response to
     */ public get redirectUri ( ) { return this . requestor . redirectUri ; } /**
     * Gets the url pointing to terms and service user can open in a webview
     */ public get tosUri ( ) { return this . requestor . tosUri ; } /**
     * Gets the url pointing to logo of the requestor (Relying Party)
     */ public get logoUri ( ) { return this . requestor . logoUri ; } param expiry returns public useOidcRequestExpiry ( expiry ) { this . oidRequestExpirty = expiry ; return this ; } /**
      * Gets the OIDC request expiry
      */ public get OidcRequestExpiry ( ) : number { return this . oidRequestExpirty ; } param state returns public useState ( state ) { this . _state = state ; return this ; } /**
     * Get the state for the request
     */ public get state ( ) { return this . _state ; } returns public allowIssuance ( ) { this . _issuance = true ; return this ; } /**
     * Gets true if issuance is allowed
     */ public get issuance ( ) { return this . _issuance ; } param nonce returns public useNonce ( nonce ) { this . _nonce = nonce ; return this ; } /**
     * Get the nonce for the request
     */ public get nonce ( ) { return this . _nonce ; } /**
     * Build the requestor
     */ public build ( ) { return new Requestor ( this ) ; } }