Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Classes | Functions | Variables
bitcoin-tx.cpp File Reference
#include <chainparams.h>
#include <clientversion.h>
#include <coins.h>
#include <common/args.h>
#include <common/system.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <core_io.h>
#include <currencyunit.h>
#include <key_io.h>
#include <primitives/transaction.h>
#include <rpc/util.h>
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <util/exception.h>
#include <util/fs.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/translation.h>
#include <univalue.h>
#include <cstdio>
#include <functional>
#include <memory>
Include dependency graph for bitcoin-tx.cpp:

Go to the source code of this file.

Classes

class  Secp256k1Init
 

Functions

static void SetupBitcoinTxArgs (ArgsManager &argsman)
 
static int AppInitRawTx (int argc, char *argv[])
 
static void RegisterSetJson (const std::string &key, const std::string &rawJson)
 
static void RegisterSet (const std::string &strInput)
 
static void RegisterLoad (const std::string &strInput)
 
static Amount ExtractAndValidateValue (const std::string &strValue)
 
static void MutateTxVersion (CMutableTransaction &tx, const std::string &cmdVal)
 
static void MutateTxLocktime (CMutableTransaction &tx, const std::string &cmdVal)
 
static void MutateTxAddInput (CMutableTransaction &tx, const std::string &strInput)
 
static void MutateTxAddOutAddr (CMutableTransaction &tx, const std::string &strInput, const CChainParams &chainParams)
 
static void MutateTxAddOutPubKey (CMutableTransaction &tx, const std::string &strInput)
 
static void MutateTxAddOutMultiSig (CMutableTransaction &tx, const std::string &strInput)
 
static void MutateTxAddOutData (CMutableTransaction &tx, const std::string &strInput)
 
static void MutateTxAddOutScript (CMutableTransaction &tx, const std::string &strInput)
 
static void MutateTxDelInput (CMutableTransaction &tx, const std::string &strInIdx)
 
static void MutateTxDelOutput (CMutableTransaction &tx, const std::string &strOutIdx)
 
static bool findSigHashFlags (SigHashType &sigHashType, const std::string &flagStr)
 
static void MutateTxSign (CMutableTransaction &tx, const std::string &flagStr)
 
static void MutateTx (CMutableTransaction &tx, const std::string &command, const std::string &commandVal, const CChainParams &chainParams)
 
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 std::string readStdin ()
 
static int CommandLineRawTx (int argc, char *argv[], const CChainParams &chainParams)
 
int main (int argc, char *argv[])
 

Variables

static bool fCreateBlank
 
static std::map< std::string, UniValueregisters
 
static const int CONTINUE_EXECUTION = -1
 
const std::function< std::string(const char *)> G_TRANSLATION_FUN = nullptr
 Translate string to current locale using Qt.
 
static const unsigned int N_SIGHASH_OPTS = 12
 
static const struct { ... }  sigHashOptions [N_SIGHASH_OPTS]
 

Function Documentation

◆ AppInitRawTx()

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

Definition at line 111 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineRawTx()

static int CommandLineRawTx ( int  argc,
char argv[],
const CChainParams chainParams 
)
static

Definition at line 805 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExtractAndValidateValue()

static Amount ExtractAndValidateValue ( const std::string &  strValue)
static

Definition at line 231 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findSigHashFlags()

static bool findSigHashFlags ( SigHashType sigHashType,
const std::string &  flagStr 
)
static

Definition at line 560 of file bitcoin-tx.cpp.

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 876 of file bitcoin-tx.cpp.

Here is the call graph for this function:

◆ MutateTx()

static void MutateTx ( CMutableTransaction tx,
const std::string &  command,
const std::string &  commandVal,
const CChainParams chainParams 
)
static

Definition at line 716 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddInput()

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

Definition at line 265 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddOutAddr()

static void MutateTxAddOutAddr ( CMutableTransaction tx,
const std::string &  strInput,
const CChainParams chainParams 
)
static

Definition at line 304 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddOutData()

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

Definition at line 438 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddOutMultiSig()

static void MutateTxAddOutMultiSig ( CMutableTransaction tx,
const std::string &  strInput 
)
static

Definition at line 368 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddOutPubKey()

static void MutateTxAddOutPubKey ( CMutableTransaction tx,
const std::string &  strInput 
)
static

Definition at line 330 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxAddOutScript()

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

Definition at line 470 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxDelInput()

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

Definition at line 512 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxDelOutput()

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

Definition at line 525 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxLocktime()

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

Definition at line 253 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxSign()

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

Definition at line 574 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MutateTxVersion()

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

Definition at line 240 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputTx()

static void OutputTx ( const CTransaction tx)
static

Definition at line 776 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputTxHash()

static void OutputTxHash ( const CTransaction tx)
static

Definition at line 763 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputTxHex()

static void OutputTxHex ( const CTransaction tx)
static

Definition at line 770 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputTxJSON()

static void OutputTxJSON ( const CTransaction tx)
static

Definition at line 755 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readStdin()

static std::string readStdin ( )
static

Definition at line 786 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterLoad()

static void RegisterLoad ( const std::string &  strInput)
static

Definition at line 190 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterSet()

static void RegisterSet ( const std::string &  strInput)
static

Definition at line 176 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterSetJson()

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

Definition at line 165 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupBitcoinTxArgs()

static void SetupBitcoinTxArgs ( ArgsManager argsman)
static

Definition at line 43 of file bitcoin-tx.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CONTINUE_EXECUTION

const int CONTINUE_EXECUTION = -1
static

Definition at line 39 of file bitcoin-tx.cpp.

◆ fCreateBlank

bool fCreateBlank
static

Definition at line 37 of file bitcoin-tx.cpp.

◆ flags

int flags

Definition at line 541 of file bitcoin-tx.cpp.

◆ flagStr

const char* flagStr

Definition at line 540 of file bitcoin-tx.cpp.

◆ G_TRANSLATION_FUN

const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr

Translate string to current locale using Qt.

Translate a message to the native language of the user.

Definition at line 41 of file bitcoin-tx.cpp.

◆ N_SIGHASH_OPTS

const unsigned int N_SIGHASH_OPTS = 12
static

Definition at line 538 of file bitcoin-tx.cpp.

◆ registers

std::map<std::string, UniValue> registers
static

Definition at line 38 of file bitcoin-tx.cpp.

◆ []

const struct { ... } 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},
{"ALL|FORKID", SIGHASH_ALL | SIGHASH_FORKID},
{"NONE|FORKID", SIGHASH_NONE | SIGHASH_FORKID},
{"SINGLE|FORKID", SIGHASH_SINGLE | SIGHASH_FORKID},
{"ALL|FORKID|ANYONECANPAY",
{"NONE|FORKID|ANYONECANPAY",
{"SINGLE|FORKID|ANYONECANPAY",
}
@ SIGHASH_FORKID
Definition sighashtype.h:18
@ SIGHASH_ANYONECANPAY
Definition sighashtype.h:19
@ SIGHASH_ALL
Definition sighashtype.h:15
@ SIGHASH_NONE
Definition sighashtype.h:16
@ SIGHASH_SINGLE
Definition sighashtype.h:17