You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

338 lines
8.0 KiB

9 years ago
/******************************************************************************
* Copyright © 2014-2015 The SuperNET Developers. *
* *
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
* the top-level directory of this distribution for the individual copyright *
* holder information and the developer policies on copyright and licensing. *
* *
* Unless otherwise agreed in a custom licensing agreement, no part of the *
* SuperNET software, including this file may be copied, modified, propagated *
* or distributed except according to the terms contained in the LICENSE file *
* *
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#include "iguana777.h"
#include "../includes/iguana_apidefs.h"
ZERO_ARGS(ramchain,getinfo)
{
cJSON *retjson = cJSON_CreateObject();
9 years ago
jaddstr(retjson,"result",coin->statusstr);
9 years ago
return(jprint(retjson,1));
}
ZERO_ARGS(ramchain,getbestblockhash)
{
cJSON *retjson = cJSON_CreateObject();
9 years ago
char str[65]; jaddstr(retjson,"result",bits256_str(str,coin->blocks.hwmchain.RO.hash2));
9 years ago
return(jprint(retjson,1));
}
ZERO_ARGS(ramchain,getblockcount)
{
cJSON *retjson = cJSON_CreateObject();
9 years ago
jaddnum(retjson,"result",coin->blocks.hwmchain.height);
9 years ago
return(jprint(retjson,1));
}
9 years ago
HASH_AND_INT(ramchain,listsinceblock,blockhash,target)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// pubkeys
ZERO_ARGS(ramchain,makekeypair)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,validatepubkey,pubkey)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
INT_ARRAY_STRING(ramchain,createmultisig,M,array,account)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,decodescript,script)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,vanitygen,vanity)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
TWO_STRINGS(ramchain,signmessage,address,message)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
THREE_STRINGS(ramchain,verifymessage,address,sig,message)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// tx
TWO_ARRAYS(ramchain,createrawtransaction,vins,vouts)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
HASH_AND_INT(ramchain,getrawtransaction,txid,verbose)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,decoderawtransaction,rawtx)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_TWOARRAYS(ramchain,signrawtransaction,rawtx,vins,privkeys)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_INT(ramchain,sendrawtransaction,rawtx,allowhighfees)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// unspents
ZERO_ARGS(ramchain,gettxoutsetinfo)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
INT_AND_ARRAY(ramchain,lockunspent,flag,array)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
ZERO_ARGS(ramchain,listlockunspent)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
HASH_AND_TWOINTS(ramchain,gettxout,txid,vout,mempool)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
TWOINTS_AND_ARRAY(ramchain,listunspent,minconf,maxconf,array)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_INT(ramchain,getreceivedbyaddress,address,minconf)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
TWO_INTS(ramchain,listreceivedbyaddress,minconf,includeempty)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// single address/account funcs
ZERO_ARGS(ramchain,getrawchangeaddress)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,getnewaddress,account)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
TWOSTRINGS_AND_INT(ramchain,importprivkey,wif,account,rescan)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,dumpprivkey,address)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
TWO_STRINGS(ramchain,setaccount,address,account)
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,getaccount,address)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,getaccountaddress,account)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// multiple address
THREE_INTS(ramchain,getbalance,confirmations,includeempty,watchonly)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,getaddressesbyaccount,account)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_INT(ramchain,getreceivedbyaccount,account,includeempty)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
THREE_INTS(ramchain,listreceivedbyaccount,confirmations,includeempty,watchonly)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_THREEINTS(ramchain,listtransactions,account,count,skip,includewatchonly)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// spend funcs
DOUBLE_ARG(ramchain,settxfee,amount)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
SS_D_I_S(ramchain,move,fromaccount,toaccount,amount,minconf,comment)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
SS_D_I_SS(ramchain,sendfrom,fromaccount,toaddress,amount,minconf,comment,comment2)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
S_A_I_S(ramchain,sendmany,fromaccount,array,minconf,comment)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
S_D_SS(ramchain,sendtoaddress,address,amount,comment,comment2)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
// entire wallet funcs
TWO_INTS(ramchain,listaccounts,minconf,includewatchonly)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
ZERO_ARGS(ramchain,listaddressgroupings)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
ZERO_ARGS(ramchain,walletlock)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
ZERO_ARGS(ramchain,checkwallet)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
ZERO_ARGS(ramchain,repairwallet)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,dumpwallet,filename)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,backupwallet,filename)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,importwallet,filename)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_AND_INT(ramchain,walletpassphrase,passphrase,timeout)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
TWO_STRINGS(ramchain,walletpassphrasechange,oldpassphrase,newpassphrase)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
STRING_ARG(ramchain,encryptwallet,passphrase)
9 years ago
{
cJSON *retjson = cJSON_CreateObject();
return(jprint(retjson,1));
}
9 years ago
9 years ago
#undef IGUANA_ARGS
#include "../includes/iguana_apiundefs.h"