Browse Source

revised apidefs.h

release/v0.1
jl777 9 years ago
parent
commit
889e316301
  1. 3
      iguana/iguana_json.c
  2. 8
      iguana/iguana_tx.c
  3. 12
      iguana/iguana_wallet.c
  4. 21
      includes/iguana_apideclares.h
  5. 8
      includes/iguana_apidefs.h
  6. 4
      includes/iguana_apiundefs.h

3
iguana/iguana_json.c

@ -667,7 +667,7 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
return(clonestr("{\"error\":\"ramchain_coinparser needs coin\"}"));
if ( strcmp(method,"status") == 0 || strcmp(method,"getinfo") == 0 )
return(iguana_getinfo(myinfo,coin));
else if ( strcmp(method,"getbestblockhash") == 0 )
/* else if ( strcmp(method,"getbestblockhash") == 0 )
return(iguana_getbestblockhash(myinfo,coin));
else if ( strcmp(method,"getblockcount") == 0 )
return(iguana_getblockcount(myinfo,coin));
@ -763,6 +763,7 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
return(iguana_sendrawtransaction(myinfo,coin,jstr(json,"rawtx")));
else if ( strcmp(method,"getrawchangeaddress") == 0 )
return(iguana_getrawchangeaddress(myinfo,coin,jstr(json,"account")));
*/
return(clonestr("{\"error\":\"illegal ramchain method or missing coin\"}"));
}

8
iguana/iguana_tx.c

@ -16,7 +16,7 @@
#include "iguana777.h"
#include "SuperNET.h"
char *iguana_getrawchangeaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *account)
char *iguana_getrawchangeaddress(struct supernet_info *myinfo,struct iguana_info *coin)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
@ -27,13 +27,13 @@ char *iguana_settxfee(struct supernet_info *myinfo,struct iguana_info *coin,doub
}
char *iguana_listtransactions(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t count,int32_t from)
char *iguana_listtransactions(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t count,int32_t skip,int32_t watchonly)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
char *iguana_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,int32_t minconf,int32_t maxconf)
char *iguana_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,int32_t minconf,int32_t maxconf,cJSON *array)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
@ -93,7 +93,7 @@ char *iguana_signrawtransaction(struct supernet_info *myinfo,struct iguana_info
}
char *iguana_sendrawtransaction(struct supernet_info *myinfo,struct iguana_info *coin,char *rawtx)
char *iguana_sendrawtransaction(struct supernet_info *myinfo,struct iguana_info *coin,char *rawtx,int32_t allowhighfees)
{
return(clonestr("{\"error\":\"notyet\"}"));
}

12
iguana/iguana_wallet.c

@ -171,10 +171,10 @@ char *iguana_getreceivedbyaccount(struct supernet_info *myinfo,struct iguana_inf
}
char *iguana_listreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t includeempty)
/*char *iguana_listreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t includeempty)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
}*/
@ -208,7 +208,7 @@ char *iguana_listaddressgroupings(struct supernet_info *myinfo,struct iguana_inf
}
char *iguana_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t minconf)
/*char *iguana_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t minconf)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
@ -217,7 +217,7 @@ char *iguana_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,ch
char *iguana_listaccounts(struct supernet_info *myinfo,struct iguana_info *coin,int32_t minconf)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
}*/
@ -246,7 +246,7 @@ char *iguana_dumpprivkey(struct supernet_info *myinfo,struct iguana_info *coin,c
}
char *iguana_importprivkey(struct supernet_info *myinfo,struct iguana_info *coin,char *wip)
/*char *iguana_importprivkey(struct supernet_info *myinfo,struct iguana_info *coin,char *wip)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
@ -255,7 +255,7 @@ char *iguana_importprivkey(struct supernet_info *myinfo,struct iguana_info *coin
char *iguana_dumpwallet(struct supernet_info *myinfo,struct iguana_info *coin)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
}*/
char *iguana_importwallet(struct supernet_info *myinfo,struct iguana_info *coin,char *wallet)

21
includes/iguana_apideclares.h

@ -118,34 +118,29 @@ ZERO_ARGS(getinfo);
ZERO_ARGS(getbestblockhash);
ZERO_ARGS(getblockcount);
ZERO_ARGS(listaddressgroupings);
ZERO_ARGS(getinfo);
ZERO_ARGS(walletlock);
ZERO_ARGS(checkwallet);
ZERO_ARGS(repairwallet);
ZERO_ARGS(makekeypair);
ZERO_ARGS(gettxoutsetinfo);
ZERO_ARGS(dumpwallet);
ZERO_ARGS(listlockunspent);
ZERO_ARGS(getrawchangeaddress);
INT_ARG(listaccounts,minconf);
TWO_INTS(listunspent,minconf,maxconf);
TWO_INTS(listaccounts,minconf,includewatchonly);
TWO_INTS(listreceivedbyaddress,minconf,includeempty);
TWOINTS_AND_ARRAY(listunspent,minconf,maxconf,array);
STRING_ARG(dumpwallet,filename);
STRING_ARG(backupwallet,filename);
STRING_ARG(encryptwallet,passphrase);
STRING_ARG(validatepubkey,pubkey);
STRING_ARG(getnewaddress,account);
STRING_ARG(vanitygen,vanity);
STRING_ARG(getrawchangeaddress,account);
STRING_ARG(sendrawtransaction,rawtx);
STRING_ARG(getaddressesbyaccount,account);
STRING_ARG(getaccountaddress,account);
STRING_ARG(getaccount,address);
STRING_ARG(getaccountaddress,account);
STRING_ARG(dumpprivkey,address);
STRING_ARG(importprivkey,wif);
STRING_ARG(importwallet,filename);
STRING_ARG(decoderawtransaction,rawtx);
STRING_ARG(decodescript,script);
@ -155,17 +150,19 @@ TWO_STRINGS(walletpassphrasechange,oldpassphrase,newpassphrase);
TWO_STRINGS(signmessage,address,message);
THREE_STRINGS(verifymessage,address,sig,message);
THREE_INTS(listreceivedbyaccount,confirmations,includeempty,watchonly);
THREE_INTS(getbalance,confirmations,includeempty,watchonly);
TWOSTRINGS_AND_INT(importprivkey,wif,account,rescan);
STRING_AND_INT(getreceivedbyaccount,account,includeempty);
STRING_AND_INT(listreceivedbyaccount,account,includeempty);
STRING_AND_INT(getbalance,account,minconf);
STRING_AND_INT(walletpassphrase,passphrase,timeout);
STRING_AND_INT(getreceivedbyaddress,address,minconf);
STRING_AND_INT(sendrawtransaction,rawtx,allowhighfees);
HASH_AND_INT(listsinceblock,blockhash,target);
HASH_AND_INT(getrawtransaction,txid,verbose);
STRING_AND_TWOINTS(listtransactions,account,count,from);
STRING_AND_THREEINTS(listtransactions,account,count,skip,includewatchonly);
HASH_AND_TWOINTS(gettxout,txid,vout,mempool);

8
includes/iguana_apidefs.h

@ -9,7 +9,11 @@
#define IGUANA_CFUNC_IA(name,val,array) char *iguana_ ## name(IGUANA_ARGS,int32_t val,cJSON *array)
#define IGUANA_CFUNC_IAS(name,val,array,str) char *iguana_ ## name(IGUANA_ARGS,int32_t val,cJSON *array,char *str)
#define IGUANA_CFUNC_II(name,val,val2) char *iguana_ ## name(IGUANA_ARGS,int32_t val,int32_t val2)
#define IGUANA_CFUNC_III(name,val,val2,val3) char *iguana_ ## name(IGUANA_ARGS,int32_t val,int32_t val2,int32_t val3)
#define IGUANA_CFUNC_SIII(name,str,val,val2,val3) char *iguana_ ## name(IGUANA_ARGS,char *str,int32_t val,int32_t val2,int32_t val3)
#define IGUANA_CFUNC_IIA(name,val,val2,array) char *iguana_ ## name(IGUANA_ARGS,int32_t val,int32_t val2,cJSON *array)
#define IGUANA_CFUNC_SS(name,str,str2) char *iguana_ ## name(IGUANA_ARGS,char *str,char *str2)
#define IGUANA_CFUNC_SSI(name,str,str2,val) char *iguana_ ## name(IGUANA_ARGS,char *str,char *str2,int32_t val)
#define IGUANA_CFUNC_SSS(name,str,str2,str3) char *iguana_ ## name(IGUANA_ARGS,char *str,char *str2,char *str3)
#define IGUANA_CFUNC_SI(name,str,val) char *iguana_ ## name(IGUANA_ARGS,char *str,int32_t val)
#define IGUANA_CFUNC_SII(name,str,val,val2) char *iguana_ ## name(IGUANA_ARGS,char *str,int32_t val,int32_t val2)
@ -42,3 +46,7 @@
#define SS_D_I_SS IGUANA_CFUNC_SSDISS
#define S_A_I_S IGUANA_CFUNC_SAIS
#define S_D_SS IGUANA_CFUNC_SDSS
#define TWOINTS_AND_ARRAY IGUANA_CFUNC_IIA
#define STRING_AND_THREEINTS IGUANA_CFUNC_SIII
#define TWOSTRINGS_AND_INT IGUANA_CFUNC_SSI
#define THREE_INTS IGUANA_CFUNC_III

4
includes/iguana_apiundefs.h

@ -19,3 +19,7 @@
#undef INT_ARRAY_STRING
#undef TWO_ARRAYS
#undef STRING_AND_TWOARRAYS
#undef TWOINTS_AND_ARRAY
#undef STRING_AND_THREEINTS
#undef TWOSTRINGS_AND_INT
#undef THREE_INTS

Loading…
Cancel
Save