|
|
|
@ -8,7 +8,9 @@
@@ -8,7 +8,9 @@
|
|
|
|
|
|
|
|
|
|
// main json rpc method. receives callbacks for success and error
|
|
|
|
|
function twisterRpc(method, params, resultFunc, resultArg, errorFunc, errorArg) { |
|
|
|
|
var foo = new $.JsonRpcClient({ ajaxUrl: '/', username: 'user', password: 'pwd'}); |
|
|
|
|
// removing hardcoded username from javascript: please use url http://user:pwd@localhost:28332 instead
|
|
|
|
|
//var foo = new $.JsonRpcClient({ ajaxUrl: '/', username: 'user', password: 'pwd'});
|
|
|
|
|
var foo = new $.JsonRpcClient({ ajaxUrl: '/' }); |
|
|
|
|
foo.call(method, params, |
|
|
|
|
function(ret) { resultFunc(resultArg, ret); }, |
|
|
|
|
function(ret) { if(ret != null) errorFunc(errorArg, ret); } |
|
|
|
|