Hello,
Please check:
import KeyPair from './keyPair';
import convert from '../utils/convert';
import Address from '../model/address';
import nacl from '../external/nacl-fast';
import Network from '../model/network';
import CryptoJS from 'crypto-js';
import Helpers from '../utils/helpers';
/**
* Encrypt a private key for mobile apps (AES_PBKF2)
*
* @param {string} password - A wallet password
* @param {string} privateKey - An account private key
*
* @return {object} - The encrypted data
*/
let toMobileKey = function(password, privateKey) {
// Errors
if (!password || !privateKey) throw new Error('Missing argument !');
if (!Helpers.isPrivateKeyValid(privateKey)) throw new Error('Private key is not valid !');
This file has been truncated. show original
Function: let decode = function(private, public, _payload)
I guess when you are sender you should pass your private key (sender private key) and recipient public key.