src/index.js
/**
   * Decrypt payload from transaction
   * @async
   * @param {String} senderDID Sender DID
   * @param {String} encryptedPayload encrypted payload from transaction
   * @return {Object} decrypted payload
   */
Decrypt payload from transaction
@async
@param {String} senderDID Sender DID
@param {String} encryptedPayload encrypted payload from transaction
@return {Object} decrypted payload
Decrypt payload from transaction @async @param { String } senderDID Sender DID @param { String } encryptedPayload encrypted payload from transaction @return { Object } decrypted payload
decryptTransactionPayload(senderDID, encryptedPayload) {
    const self = this;
    const { signKey } = this.identity.secret;
    const userKeyPair = sovrinDID.getKeyPairFromSignKey(signKey);
    return this.fetchIdentityFor(senderDID).then((response) => {
      const sharedSecret = sovrinDID.getSharedSecret(
        response.data.publicKey,
        userKeyPair.secretKey,
      );
      return sovrinDID.decryptMessage(encryptedPayload, self.nonce, sharedSecret);
    });
  }
decryptTransactionPayload ( senderDID , encryptedPayload ) { const self = this ; const { signKey } = this . identity . secret ; const userKeyPair = sovrinDID . getKeyPairFromSignKey ( signKey ) ; return this . fetchIdentityFor ( senderDID ) . then ( ( response ) => { const sharedSecret = sovrinDID . getSharedSecret ( response . data . publicKey , userKeyPair . secretKey , ) ; return sovrinDID . decryptMessage ( encryptedPayload , self . nonce , sharedSecret ) ; } ) ; }
Decrypt payload from transaction
 @async
 @param {String} senderDID Sender DID
 @param {String} encryptedPayload encrypted payload from transaction
 @return {Object} decrypted payload
Decrypt payload from transaction @async @param { String } senderDID Sender DID @param { String } encryptedPayload encrypted payload from transaction @return { Object } decrypted payload