www/MiniSodium.js
function(ed25519Sk, callback){
		if (typeof callback != 'function') throw new TypeError('callback must be a function');

		try {
			isValidInput(ed25519Sk, 'ed25519Sk', MiniSodium.crypto_sign_SECRETKEYBYTES);
		} catch (e){
			callback(e);
			return;
		}

		ed25519Sk = to_hex(ed25519Sk);
		var params = [ed25519Sk];
		cordova.exec(resultHandlerFactory(callback), callback, 'MiniSodium', 'crypto_sign_ed25519_sk_to_curve25519', params);
	}
function(ed25519Sk, callback){
		if (typeof callback != 'function') throw new TypeError('callback must be a function');

		try {
			isValidInput(ed25519Sk, 'ed25519Sk', MiniSodium.crypto_sign_SECRETKEYBYTES);
		} catch (e){
			callback(e);
			return;
		}

		ed25519Sk = to_hex(ed25519Sk);
		var params = [ed25519Sk];
		cordova.exec(resultHandlerFactory(callback), callback, 'MiniSodium', 'crypto_sign_ed25519_sk_to_curve25519', params);
	}
function ( ed25519Sk , callback ) { if ( typeof callback != 'function' ) throw new TypeError ( 'callback must be a function' ) ; try { isValidInput ( ed25519Sk , 'ed25519Sk' , MiniSodium . crypto_sign_SECRETKEYBYTES ) ; } catch ( e ) { callback ( e ) ; return ; } ed25519Sk = to_hex ( ed25519Sk ) ; var params = [ ed25519Sk ] ; cordova . exec ( resultHandlerFactory ( callback ) , callback , 'MiniSodium' , 'crypto_sign_ed25519_sk_to_curve25519' , params ) ; }
Ed25519 -> Curve25519 keypair conversion
Ed25519 - > Curve25519 keypair conversion