Dash Core  0.12.2.1
P2P Digital Currency
dash-tx.cpp File Reference
#include "base58.h"
#include "clientversion.h"
#include "coins.h"
#include "consensus/consensus.h"
#include "core_io.h"
#include "keystore.h"
#include "policy/policy.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sign.h"
#include <univalue.h>
#include "util.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
#include <stdio.h>
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>

Go to the source code of this file.

Classes

class  Secp256k1Init
 

Functions

static int AppInitRawTx (int argc, char *argv[])
 
static void RegisterSetJson (const string &key, const string &rawJson)
 
static void RegisterSet (const string &strInput)
 
static void RegisterLoad (const string &strInput)
 
static void MutateTxVersion (CMutableTransaction &tx, const string &cmdVal)
 
static void MutateTxLocktime (CMutableTransaction &tx, const string &cmdVal)
 
static void MutateTxAddInput (CMutableTransaction &tx, const string &strInput)
 
static void MutateTxAddOutAddr (CMutableTransaction &tx, const string &strInput)
 
static void MutateTxAddOutData (CMutableTransaction &tx, const string &strInput)
 
static void MutateTxAddOutScript (CMutableTransaction &tx, const string &strInput)
 
static void MutateTxDelInput (CMutableTransaction &tx, const string &strInIdx)
 
static void MutateTxDelOutput (CMutableTransaction &tx, const string &strOutIdx)
 
static bool findSighashFlags (int &flags, const string &flagStr)
 
uint256 ParseHashUO (map< string, UniValue > &o, string strKey)
 
vector< unsigned char > ParseHexUO (map< string, UniValue > &o, string strKey)
 
static void MutateTxSign (CMutableTransaction &tx, const string &flagStr)
 
static void MutateTx (CMutableTransaction &tx, const string &command, const string &commandVal)
 
static void OutputTxJSON (const CTransaction &tx)
 
static void OutputTxHash (const CTransaction &tx)
 
static void OutputTxHex (const CTransaction &tx)
 
static void OutputTx (const CTransaction &tx)
 
static string readStdin ()
 
static int CommandLineRawTx (int argc, char *argv[])
 
int main (int argc, char *argv[])
 

Variables

static bool fCreateBlank
 
static map< string, UniValueregisters
 
static const int CONTINUE_EXECUTION =-1
 
static const unsigned int N_SIGHASH_OPTS = 6
 
struct {
   const char *   flagStr
 
   int   flags
 
sighashOptions [N_SIGHASH_OPTS]
 

Function Documentation

◆ AppInitRawTx()

static int AppInitRawTx ( int  argc,
char *  argv[] 
)
static

Definition at line 35 of file dash-tx.cpp.

Referenced by main().

◆ CommandLineRawTx()

static int CommandLineRawTx ( int  argc,
char *  argv[] 
)
static

Definition at line 592 of file dash-tx.cpp.

Referenced by main().

◆ findSighashFlags()

static bool findSighashFlags ( int &  flags,
const string &  flagStr 
)
static

Definition at line 336 of file dash-tx.cpp.

Referenced by MutateTxSign().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 661 of file dash-tx.cpp.

◆ MutateTx()

static void MutateTx ( CMutableTransaction tx,
const string &  command,
const string &  commandVal 
)
static

Definition at line 500 of file dash-tx.cpp.

Referenced by CommandLineRawTx().

◆ MutateTxAddInput()

static void MutateTxAddInput ( CMutableTransaction tx,
const string &  strInput 
)
static

Definition at line 187 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxAddOutAddr()

static void MutateTxAddOutAddr ( CMutableTransaction tx,
const string &  strInput 
)
static

Definition at line 216 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxAddOutData()

static void MutateTxAddOutData ( CMutableTransaction tx,
const string &  strInput 
)
static

Definition at line 245 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxAddOutScript()

static void MutateTxAddOutScript ( CMutableTransaction tx,
const string &  strInput 
)
static

Definition at line 274 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxDelInput()

static void MutateTxDelInput ( CMutableTransaction tx,
const string &  strInIdx 
)
static

Definition at line 297 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxDelOutput()

static void MutateTxDelOutput ( CMutableTransaction tx,
const string &  strOutIdx 
)
static

Definition at line 310 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxLocktime()

static void MutateTxLocktime ( CMutableTransaction tx,
const string &  cmdVal 
)
static

Definition at line 178 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxSign()

static void MutateTxSign ( CMutableTransaction tx,
const string &  flagStr 
)
static

Definition at line 366 of file dash-tx.cpp.

Referenced by MutateTx().

◆ MutateTxVersion()

static void MutateTxVersion ( CMutableTransaction tx,
const string &  cmdVal 
)
static

Definition at line 169 of file dash-tx.cpp.

Referenced by MutateTx().

◆ OutputTx()

static void OutputTx ( const CTransaction tx)
static

Definition at line 562 of file dash-tx.cpp.

Referenced by CommandLineRawTx().

◆ OutputTxHash()

static void OutputTxHash ( const CTransaction tx)
static

Definition at line 548 of file dash-tx.cpp.

Referenced by OutputTx().

◆ OutputTxHex()

static void OutputTxHex ( const CTransaction tx)
static

Definition at line 555 of file dash-tx.cpp.

Referenced by OutputTx().

◆ OutputTxJSON()

static void OutputTxJSON ( const CTransaction tx)
static

Definition at line 539 of file dash-tx.cpp.

Referenced by OutputTx().

◆ ParseHashUO()

uint256 ParseHashUO ( map< string, UniValue > &  o,
string  strKey 
)

Definition at line 350 of file dash-tx.cpp.

◆ ParseHexUO()

vector<unsigned char> ParseHexUO ( map< string, UniValue > &  o,
string  strKey 
)

Definition at line 357 of file dash-tx.cpp.

◆ readStdin()

static string readStdin ( )
static

Definition at line 572 of file dash-tx.cpp.

Referenced by CommandLineRawTx().

◆ RegisterLoad()

static void RegisterLoad ( const string &  strInput)
static

Definition at line 128 of file dash-tx.cpp.

Referenced by MutateTx().

◆ RegisterSet()

static void RegisterSet ( const string &  strInput)
static

Definition at line 113 of file dash-tx.cpp.

Referenced by MutateTx().

◆ RegisterSetJson()

static void RegisterSetJson ( const string &  key,
const string &  rawJson 
)
static

Definition at line 102 of file dash-tx.cpp.

Referenced by RegisterLoad(), and RegisterSet().

Variable Documentation

◆ CONTINUE_EXECUTION

const int CONTINUE_EXECUTION =-1
static

Definition at line 29 of file dash-tx.cpp.

Referenced by AppInitRawTx(), and main().

◆ fCreateBlank

bool fCreateBlank
static

Definition at line 27 of file dash-tx.cpp.

Referenced by AppInitRawTx(), and CommandLineRawTx().

◆ flags

◆ flagStr

const char* flagStr

Definition at line 325 of file dash-tx.cpp.

Referenced by findSighashFlags(), and MutateTxSign().

◆ N_SIGHASH_OPTS

const unsigned int N_SIGHASH_OPTS = 6
static

Definition at line 323 of file dash-tx.cpp.

Referenced by findSighashFlags().

◆ registers

map<string,UniValue> registers
static

Definition at line 28 of file dash-tx.cpp.

Referenced by MutateTxSign(), and RegisterSetJson().

◆ sighashOptions

const { ... } sighashOptions[N_SIGHASH_OPTS]
Initial value:
= {
{"ALL", SIGHASH_ALL},
{"NONE", SIGHASH_NONE},
{"SINGLE", SIGHASH_SINGLE},
{"ALL|ANYONECANPAY", SIGHASH_ALL|SIGHASH_ANYONECANPAY},
{"NONE|ANYONECANPAY", SIGHASH_NONE|SIGHASH_ANYONECANPAY},
{"SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY},
}

Referenced by findSighashFlags().