   RsaCryptoService        = require 'kryptnostic.rsa-crypto-service'
   CryptoServiceLoader     = require 'kryptnostic.crypto-service-loader'
   CryptoServiceMarshaller = require 'kryptnostic.crypto-service-marshaller'
-  ShareProcessingService  = require 'kryptnostic.share-processing-service'
 
   log     = Logger.get('SharingClient')
 

        log.info('revoked access', { id, uuids })

    processIncomingShares : ->
      Promise.resolve()
      .then =>
        @sharingApi.getIncomingShares()
      .then (shares) =>
        @shareProcessingService.processShares(shares)

    registerSearchKeys : (encryptedSearchObjectKeys) ->
      if _.isEmpty(encryptedSearchObjectKeys)
        return Promise.resolve()
      else
        return @sharingApi.registerSearchKeys(encryptedSearchObjectKeys)

  return SharingClient

  'kryptnostic.credential-loader'
  'kryptnostic.crypto-service-loader'
  'kryptnostic.crypto-service-marshaller'
], (require) ->
  _                       = require 'lodash'
  Promise                 = require 'bluebird'
