Remove libcryptoconditions dependency #381
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include <cc/eval.h>
|
||||
#include <script/cc.h>
|
||||
#include <script/script.h>
|
||||
#include <cryptoconditions.h>
|
||||
#include "../script/standard.h"
|
||||
#include "../base58.h"
|
||||
#include "../key.h"
|
||||
@@ -477,24 +476,6 @@ bool getCCopret(const CScript &scriptPubKey, CScript &opret);
|
||||
/// @private
|
||||
bool makeCCopret(CScript &opret, std::vector<std::vector<unsigned char>> &vData);
|
||||
|
||||
/// MakeCCcond1 creates a cryptocondition that allows to spend it by one key
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk pubkey to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeCCcond1(uint8_t evalcode,CPubKey pk);
|
||||
|
||||
/// MakeCCcond1of2 creates new 1of2 cryptocondition that allows to spend it by either of two keys
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk1 one of two pubkeys to spend the cc
|
||||
/// @param pk2 second of two pubkeys to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeCCcond1of2(uint8_t evalcode,CPubKey pk1,CPubKey pk2);
|
||||
|
||||
/// GetCryptoCondition retrieves the cryptocondition from a scriptSig object
|
||||
/// @param scriptSig scriptSig object with a cryptocondition
|
||||
/// @returns cc object, must be disposed with cc_free when not used
|
||||
CC* GetCryptoCondition(CScript const& scriptSig);
|
||||
|
||||
/// CCaddr2set sets private key for additional eval code global address.
|
||||
/// This allows to spend from two cc global addresses in one transaction (the first one is set in cp object by @see CCinit function).
|
||||
/// @param cp contract info structure (@see CCcontract_info) where the private key is set
|
||||
@@ -531,38 +512,6 @@ void CCaddr3set(struct CCcontract_info *cp,uint8_t evalcode,CPubKey pk,uint8_t *
|
||||
/// @see GetCCaddress1of2
|
||||
void CCaddr1of2set(struct CCcontract_info *cp, CPubKey pk1, CPubKey pk2,uint8_t *priv,char *coinaddr);
|
||||
|
||||
/// Creates a token cryptocondition that allows to spend it by one key
|
||||
/// The resulting cc will have two eval codes (EVAL_TOKENS and evalcode parameter value).
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk pubkey to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeTokensCCcond1(uint8_t evalcode, CPubKey pk);
|
||||
|
||||
/// Overloaded function that creates a token cryptocondition that allows to spend it by one key
|
||||
/// The resulting cc will have two eval codes (EVAL_TOKENS and evalcode parameter value).
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param evalcode2 yet another cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk pubkey to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeTokensCCcond1(uint8_t evalcode, uint8_t evalcode2, CPubKey pk);
|
||||
|
||||
/// Creates new 1of2 token cryptocondition that allows to spend it by either of two keys
|
||||
/// Resulting vout will have three eval codes (EVAL_TOKENS, evalcode and evalcode2 parameter values).
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk1 one of two pubkeys to spend the cc
|
||||
/// @param pk2 second of two pubkeys to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeTokensCCcond1of2(uint8_t evalcode, CPubKey pk1, CPubKey pk2);
|
||||
|
||||
/// Creates new 1of2 token cryptocondition that allows to spend it by either of two keys
|
||||
/// The resulting cc will have two eval codes (EVAL_TOKENS and evalcode parameter value).
|
||||
/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param evalcode2 yet another cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code)
|
||||
/// @param pk1 one of two pubkeys to spend the cc
|
||||
/// @param pk2 second of two pubkeys to spend the cc
|
||||
/// @returns cryptocondition object. Must be disposed with cc_free function when not used any more
|
||||
CC *MakeTokensCCcond1of2(uint8_t evalcode, uint8_t evalcode2, CPubKey pk1, CPubKey pk2);
|
||||
|
||||
/// Creates a token transaction output with a cryptocondition that allows to spend it by one key.
|
||||
/// The resulting vout will have two eval codes (EVAL_TOKENS and evalcode parameter value).
|
||||
/// The returned output should be added to a transaction vout array.
|
||||
|
||||
Reference in New Issue
Block a user