scoin / multichain-node

A simple wrapper for Multichain's JSON RPC api that parses your input.
MIT License
73 stars 54 forks source link

issueFrom - function is not working #12

Closed smalaichami closed 7 years ago

smalaichami commented 7 years ago

Hi, The issueFrom function returns the following message always.. { code: -1, message: 'value is type null, expected str' },

I have provided all the required values in the function that are not null.. Could you please check what is missing here..

  1. Both the addresses are having issue permission

  2. Getting the same response from Windows as well as in Ubuntu that running multichain alpha29 and beta versions respectively.

  3. Command line issuefrom command works fine with these values.

// code start

address1 = "1UEH7p5WpsF8AQSCXnsJs7Jn578Ki71dyHjRTP"; address2 = "1Gh82xnL9L3udKJmHtPzjydorKCPXHNSRv8vEM"; asset_name = "gold";
asset_qty = 1000; asset_units = 1.0;

multichain.issueFrom({from_address: address1, to_address: address2, asset: asset_name, qty: asset_qty, units: asset_units }, (err, res) => { if(err){
console.log(err); }
});

returns:- { code: -1, message: 'value is type null, expected str' },

Thanks, Saravana

smalaichami commented 7 years ago

Found the issue and fixed, the parameter variables has to be "from": and "to": not "from_address": and "to_address":

Thanks.