Reorganize CC assets code
This commit is contained in:
59
src/cc/CCinclude.h
Normal file
59
src/cc/CCinclude.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/******************************************************************************
|
||||
* Copyright © 2014-2018 The SuperNET Developers. *
|
||||
* *
|
||||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
|
||||
* the top-level directory of this distribution for the individual copyright *
|
||||
* holder information and the developer policies on copyright and licensing. *
|
||||
* *
|
||||
* Unless otherwise agreed in a custom licensing agreement, no part of the *
|
||||
* SuperNET software, including this file may be copied, modified, propagated *
|
||||
* or distributed except according to the terms contained in the LICENSE file *
|
||||
* *
|
||||
* Removal or modification of this copyright notice is prohibited. *
|
||||
* *
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef CC_INCLUDE_H
|
||||
#define CC_INCLUDE_H
|
||||
|
||||
#include <cc/eval.h>
|
||||
#include <script/cc.h>
|
||||
#include <script/script.h>
|
||||
#include <cryptoconditions.h>
|
||||
#include "../script/standard.h"
|
||||
#include "../base58.h"
|
||||
#include "../core_io.h"
|
||||
#include "../script/sign.h"
|
||||
#include "../wallet/wallet.h"
|
||||
#include <univalue.h>
|
||||
#include <exception>
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
extern CWallet* pwalletMain;
|
||||
#endif
|
||||
bool GetAddressUnspent(uint160 addressHash, int type,std::vector<std::pair<CAddressUnspentKey,CAddressUnspentValue> > &unspentOutputs);
|
||||
|
||||
static uint256 zeroid;
|
||||
|
||||
// CCcustom
|
||||
CPubKey GetUnspendable(uint8_t evalcode,uint8_t *unspendablepriv);
|
||||
CC *MakeCC(uint8_t evalcode,CPubKey pk);
|
||||
bool GetCCaddress(uint8_t evalcode,char *destaddr,CPubKey pk);
|
||||
|
||||
// CCutils
|
||||
CC* GetCryptoCondition(CScript const& scriptSig);
|
||||
bool IsCCInput(CScript const& scriptSig);
|
||||
bool IsEvalInput(uint8_t evalcode,CScript const& scriptSig);
|
||||
uint256 revuint256(uint256 txid);
|
||||
char *uint256_str(char *dest,uint256 txid);
|
||||
uint256 Parseuint256(char *hexstr);
|
||||
bool Getscriptaddress(char *destaddr,const CScript &scriptPubKey);
|
||||
std::vector<uint8_t> Mypubkey();
|
||||
bool Myprivkey(uint8_t myprivkey[]);
|
||||
|
||||
// CCtx
|
||||
std::string FinalizeCCTx(uint8_t evalcode,CMutableTransaction &mtx,CPubKey mypk,uint64_t txfee,CScript opret);
|
||||
void SetCCunspents(std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > &unspentOutputs,char *coinaddr);
|
||||
uint64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,uint64_t total,int32_t maxinputs);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user