<<  >> (p.3)
    Author Topic: Command Line and JSON-RPC  (Read 34401 times)
    galaxyAbstractor
    Full Member
    ***
    Offline Offline

    Activity: 147
    Merit: 100



    View Profile WWW
    June 27, 2011, 12:16:26 PM
     #41

    Look at rpc.cpp for the list of commands.

    Seriously?  So, everyone knows C++ but me?  I don't understand where this list of commands is in this file.  *sigh* I have tried to understand C++ for years, things just are not clicking in my head for some reason.  Do you mean this stuff?
    Code:
           /
           / Special case non-string parameter types
           /
            if (strMethod == "setgenerate"            && n > 0) ConvertTo<bool>(params[0]);
            if (strMethod == "setgenerate"            && n > 1) ConvertTo<boost::int64_t>(params[1]);
            if (strMethod == "sendtoaddress"          && n > 1) ConvertTo<double>(params[1]);
            if (strMethod == "settxfee"               && n > 0) ConvertTo<double>(params[0]);
            if (strMethod == "getamountreceived"      && n > 1) ConvertTo<boost::int64_t>(params[1]);/ deprecated
            if (strMethod == "getreceivedbyaddress"   && n > 1) ConvertTo<boost::int64_t>(params[1]);
            if (strMethod == "getreceivedbyaccount"   && n > 1) ConvertTo<boost::int64_t>(params[1]);
            if (strMethod == "getreceivedbylabel"     && n > 1) ConvertTo<boost::int64_t>(params[1]);/ deprecated
            if (strMethod == "getallreceived"         && n > 0) ConvertTo<boost::int64_t>(params[0]);/ deprecated
            if (strMethod == "getallreceived"         && n > 1) ConvertTo<bool>(params[1]);
            if (strMethod == "listreceivedbyaddress"  && n > 0) ConvertTo<boost::int64_t>(params[0]);
            if (strMethod == "listreceivedbyaddress"  && n > 1) ConvertTo<bool>(params[1]);
            if (strMethod == "listreceivedbyaccount"  && n > 0) ConvertTo<boost::int64_t>(params[0]);
            if (strMethod == "listreceivedbyaccount"  && n > 1) ConvertTo<bool>(params[1]);
            if (strMethod == "listreceivedbylabel"    && n > 0) ConvertTo<boost::int64_t>(params[0]);/ deprecated
            if (strMethod == "listreceivedbylabel"    && n > 1) ConvertTo<bool>(params[1]);/ deprecated
            if (strMethod == "getbalance"             && n > 1) ConvertTo<boost::int64_t>(params[1]);
            if (strMethod == "move"                   && n > 2) ConvertTo<double>(params[2]);
            if (strMethod == "move"                   && n > 3) ConvertTo<boost::int64_t>(params[3]);
            if (strMethod == "sendfrom"               && n > 2) ConvertTo<double>(params[2]);
            if (strMethod == "sendfrom"               && n > 3) ConvertTo<boost::int64_t>(params[3]);
            if (strMethod == "listtransactions"       && n > 1) ConvertTo<boost::int64_t>(params[1]);
            if (strMethod == "listtransactions"       && n > 2) ConvertTo<boost::int64_t>(params[2]);
            if (strMethod == "listaccounts"           && n > 0) ConvertTo<boost::int64_t>(params[0]);
            if (strMethod == "sendmany"               && n > 1)
            {
                string s = params[1].get_str();
                Value v;
                if (!read_string(s, v) || v.type() != obj_type)
                    throw runtime_error("type mismatch");
                params[1] = v.get_obj();
            }
            if (strMethod == "sendmany"                && n > 2) ConvertTo<boost::int64_t>(params[2]);

    Well, there are comments throughout, so that's good, I really get annoyed by spaghetti code.

    Are you looking for this list? https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

    1gaLaxy9csuBTvNLJYoUy6sengQbh1TpV
    Pyramining - Invest in mining!
Page 2
Viewing Page: 3