Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DataRequestManager

Implemented by

Index

Methods

decryptMessage

  • decryptMessage(senderPk: string, encrypted: string): Promise<any>
  • Decodes a message that was encrypted by the owner of the private key that matches the provided public key.

    Parameters

    • senderPk: string

      public key of the user that issued data access request.

    • encrypted: string

      encrypted data from {@link DataRequest#requestData} (ECIES).

    Returns Promise<any>

    object with data or null if was error.

getGrantedPermissions

  • getGrantedPermissions(clientPk: string): Promise<Array<string>>
  • Returns list of fields that authorized to access

    Parameters

    • clientPk: string

      id (baseID) of the client that granted me permission.

    Returns Promise<Array<string>>

    Array of field names that were authorized for access

getGrantedPermissionsToMe

  • getGrantedPermissionsToMe(clientPk: string): Promise<Array<string>>
  • Returns list of fields that authorized to access

    Parameters

    • clientPk: string

      id (baseID) of the client that received access permission from

    Returns Promise<Array<string>>

    Array of field names that were authorized for access

getRequestedPermissions

  • getRequestedPermissions(requestedFromPk: string): Promise<Array<string>>
  • Returns list of fields requested for access by from the client

    Parameters

    • requestedFromPk: string

      id (baseID) of the client whose permissions were requested

    Returns Promise<Array<string>>

    Array of field names that were requested for access

getRequestedPermissionsToMe

  • getRequestedPermissionsToMe(whoRequestedPk: string): Promise<Array<string>>
  • Returns list of fields requested for access by the client from

    Parameters

    • whoRequestedPk: string

      id (baseID) of the client that asked for permission from

    Returns Promise<Array<string>>

    Array of field names that were requested for access

getRequests

  • getRequests(fromPk: string, toPk: string): Promise<Array<DataRequest>>
  • Returns a list of outstanding data access requests, where data access requests meet the provided search criteria.

    Parameters

    • fromPk: string

      (Optional if toPk exist.) public key of the user that issued data access request.

    • toPk: string

      (Optional if fromPk exist.) public key of the user that is expected to.

    Returns Promise<Array<DataRequest>>

    List of DataRequest, or empty list

grantAccessForClient

  • grantAccessForClient(clientPk: string, acceptedFields: Map<string, AccessRight>): Promise<number>
  • Grants access to specific fields of my data to a client.

    Parameters

    • clientPk: string

      id (baseID) of the client that is authorized for data access.

    • acceptedFields: Map<string, AccessRight>

    Returns Promise<number>

grantAccessForOffer

  • grantAccessForOffer(offerSearchId: number, offerOwner: string, acceptedFields: Map<string, AccessRight>, priceId: number): Promise<void>

requestPermissions

  • requestPermissions(recipientPk: string, fields: Array<string>): Promise<number>
  • Creates data access request to a specific user for a specific personal data.

    Parameters

    • recipientPk: string

      Public Key of the user that the personal data is requested from.

    • fields: Array<string>

      Array of name identifiers for the requested data fields (e.g. this is keys in {Map<string, string>}).

    Returns Promise<number>

    Returns requestID upon successful request record creation.

Generated using TypeDoc