Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DataRequestManager

Implemented by

Index

Methods

decryptMessage

  • decryptMessage(senderPk: string, encrypted: string): Promise<object | string>
  • 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<object | string>

    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>>
  • deprecated

    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 | undefined): Promise<Array<FieldData>>
  • Returns list of fields requested for access by from the client

    Parameters

    • Optional requestedFromPk: string | undefined

      id (baseID) of the client whose permissions were requested. is optional.

    Returns Promise<Array<FieldData>>

    Array of field names that were requested for access

getRequestedPermissionsToMe

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

    Parameters

    • Optional whoRequestedPk: string | undefined

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

    Returns Promise<Array<FieldData>>

    Array of field names that were requested for access

getRequests

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

    Parameters

    • fromPk: string | null

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

    • toPk: string | null

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

    Returns Promise<Array<DataRequest>>

    List of DataRequest, or empty list

getRequestsGraph

grantAccessForClient

  • grantAccessForClient(clientPk: string, acceptedFields: Map<string, AccessRight>, rootPk?: string): Promise<void>
  • 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>
    • Optional rootPk: string

      ID (baseID) of the client that is the data owner. by default it's your id.

    Returns Promise<void>

grantAccessForOffer

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

requestPermissions

  • requestPermissions(recipientPk: string, fields: Array<string>): Promise<void>
  • 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<void>

revokeAccessForClient

  • revokeAccessForClient(clientPk: string, revokeFields: Array<string>): Promise<void>
  • revoke access to specific fields of my data to a client.

    Parameters

    • clientPk: string

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

    • revokeFields: Array<string>

    Returns Promise<void>

Generated using TypeDoc