var config = require(__dirname+'/../../config/config.js');
var ripple = require(__dirname+'/../ripple');

/**
* @requires ripple
* Issue Currency from Cold Wallet to Hot Wallet
* - the cold wallet's secret must be provided
*
* @param {string} currency 
* @param {decimal} amount 
* @param {string} secret
* @param {function(err, deposit)} callback
* @returns [Withdrawals]
*/

function issueCurrency(amount, currency, secret, fn) {
  var opts = {
    to_account: config.get('HOT_WALLET').address,
    from_account: config.get('COLD_WALLET'),
    amount: amount,
    currency: currency,
    issuer: config.get('COLD_WALLET'),
    secret: secret
  };

  ripple.sendCurrency(opts, fn);
}

module.exports = issueCurrency;


@@ -56,22 +56,32 @@
 ');%0Avar 
-r
+R
 ipple
+RestClient
  = requi
@@ -87,29 +87,60 @@
 ire(
-__dirname+'/../ripple
+'ripple-rest-client');%0Avar uuid = require('node-uuid
 ');%0A
@@ -464,13 +464,113 @@
 et, 
-fn) %7B
+callback) %7B%0A  var rippleRestClient = new RippleRestClient(%7B%0A    account: config.get('COLD_WALLET')%0A  %7D);%0A
 %0A  v
@@ -575,16 +575,19 @@
  var opt
+ion
 s = %7B%0A  
@@ -588,18 +588,99 @@
 = %7B%0A    
-to
+secret: secret,%0A    client_resource_id: uuid.v4(),%0A    payment: %7B%0A      destination
 _account
@@ -719,20 +719,24 @@
 ss,%0A    
-from
+  source
 _account
@@ -772,28 +772,74 @@
     
-amount: amount,%0A
+  destination_amount: %7B%0A        value: amount.toString(),%0A   
     
+ 
 curr
@@ -854,16 +854,20 @@
 rrency,%0A
+    
     issu
@@ -899,28 +899,22 @@
 ET')
-,
 %0A    
-secret: secret
+  %7D%0A    %7D
 %0A  %7D
@@ -928,30 +928,58 @@
 pple
-.sendCurrency(opts, fn
+RestClient.sendAndConfirmPayment(options, callback
 );%0A%7D

use ripple rest client instead of ripple-lib