dogecoin/src/qt/test/rpcnestedtests.h
Jonas Schnelli 15860448d3
[Qt] RPC-Console: support nested commands and simple value queries
Commands can be executed with bracket syntax, example: `getwalletinfo()`.
Commands can be nested, example: `sendtoaddress(getnewaddress(), 10)`.
Simple queries are possible: `listunspent()[0][txid]`
Object values are accessed with a non-quoted string, example: [txid].

Fully backward compatible.
`generate 101` is identical to `generate(101)`
Result value queries indicated with `[]` require the new brackets syntax.
Comma as argument separator is now also possible: `sendtoaddress,<address>,<amount>`
Space as argument separator works also with the bracket syntax, example: `sendtoaddress(getnewaddress() 10)

No dept limitation, complex commands are possible:
`decoderawtransaction(getrawtransaction(getblock(getbestblockhash())[tx][0]))[vout][0][value]`
2016-08-23 15:32:39 +02:00

26 lines
549 B
C++

// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_TEST_RPC_NESTED_TESTS_H
#define BITCOIN_QT_TEST_RPC_NESTED_TESTS_H
#include <QObject>
#include <QTest>
#include "txdb.h"
#include "txmempool.h"
class RPCNestedTests : public QObject
{
Q_OBJECT
private Q_SLOTS:
void rpcNestedTests();
private:
CCoinsViewDB *pcoinsdbview;
};
#endif // BITCOIN_QT_TEST_RPC_NESTED_TESTS_H