Documentation ¶
Overview ¶
Package helpers provides convenience functions to simplify wallet code. This package is intended for internal wallet use only.
Copyright (c) 2016 The btcsuite developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.
Index ¶
- Constants
- Variables
- func Base58Decode(bitcoin_net int, input []byte) []byte
- func Btc_createTransaction(msgprex string, dcrmaddr string, toAddr string, changeAddress string, ...) string
- func CalcKgKey(msgprex string, encXShare *big.Int, kgx0 *big.Int, kgy0 *big.Int, id int) bool
- func CheckCmt(msgprex string, id int) bool
- func CheckCmt2(msgprex string, id int) bool
- func CheckCmt3(msgprex string, id int) bool
- func ChooseDcrmAddrForLockoutByValue(dcrmaddr string, lockoutto string, value float64) bool
- func ChooseRealFusionAccountForLockout(amount string, lockoutto string, cointype string) (string, string, error)
- func Coinbase() (eb common.Address, err error)
- func Dcrm_ConfirmAddr(wr WorkReq) (string, error)
- func Dcrm_GetAccountList(pubkey string) (string, error)
- func Dcrm_LiLoReqAddress(wr WorkReq) (string, error)
- func Dcrm_LockIn(tx string, txhashs []string) (string, error)
- func Dcrm_NodeInfo() (string, error)
- func Dcrm_ReqAddress(wr WorkReq) (string, error)
- func Dcrm_Sign(wr WorkReq) (string, error)
- func DecryptSplitPrivKey(cDPrivKey string, enodeID string) (dPrivKey *big.Int, err error)
- func DefaultDataDir() string
- func DisMsg(msg string)
- func DispenseSplitPrivKey(enode interface{})
- func EncryptSplitPrivKey(dPrivKey *big.Int, pub *ecies.PublicKey) (cDPrivKey string, err error)
- func Erc20_newUnsignedTransaction(client *ethclient.Client, dcrmAddress string, toAddressHex string, ...) (*types.Transaction, *common.Hash, error)
- func Erc20_sendTx(client *ethclient.Client, signedTx *types.Transaction) (string, error)
- func EstimateSerializeSize(inputCount int, txOuts []*wire.TxOut, addChangeOutput bool) int
- func EstimateVirtualSize(numP2PKHIns, numP2WPKHIns, numNestedP2WPKHIns int, txOuts []*wire.TxOut, ...) int
- func GenerateBTC() (string, string, error)
- func GenerateBTCTest(pubkey []byte) (string, string, error)
- func GetBTCTxFee(dcrmaddr string, lockoutto string, value float64) (float64, error)
- func GetChannelValue(obj interface{}) (string, error)
- func GetDbDir() string
- func GetDbDirForLockin() string
- func GetDbDirForLockoutInfo() string
- func GetDbDirForNodeInfoSave() string
- func GetDbDirForWriteDcrmAddr() string
- func GetDcrmAddr(hash string, cointype string) string
- func GetEnodePrivKey(enodeID string) (prv *ecies.PrivateKey, err error)
- func GetEnodesInfo()
- func GetFee(cointype string) float64
- func GetLockoutInfoFromLocalDB(hashkey string) (string, error)
- func GetPaillierKey(rnd io.Reader, bitlen int, paillier_dprivkey *big.Int, tmp string)
- func GetPublicParams(BitCurve *secp256k1.BitCurve, primeCertainty int32, kPrime int32, ...)
- func GetRawTransactionHash(decode string) string
- func GetSignString(r *big.Int, s *big.Int, v int32, i int) string
- func GetTxHashForLockout(realfusionfrom string, realdcrmfrom string, to string, value string, ...) (string, string, error)
- func HashPubKey(pubKey []byte) []byte
- func Init(tmp string, paillier_dprivkey *big.Int, nodecnt int)
- func InitChan()
- func InitDcrmData()
- func InitNonDcrmChan()
- func IsDcrmAddr(addr string) bool
- func IsExsitDcrmValidateData(data string) bool
- func IsFusionAccountExsitDcrmAddr(fusion string, cointype string, dcrmaddr string) (bool, string, error)
- func IsHashkeyExsitInLocalDB(hashkey string) (bool, error)
- func IsInGroup() bool
- func IsNodeInfoExsitInLocalDB(nodeinfo string) (bool, error)
- func IsValidDcrmAddr(s string, cointype string) bool
- func IsValidFusionAddr(s string) bool
- func KeyGenerate(msgprex string, ch chan interface{}, id int) bool
- func MakeSignedTransaction(client *ethclient.Client, tx *types.Transaction, rsv string) (*types.Transaction, error)
- func ManuallySplitPrivKey(privKey *big.Int, userCnt int) (dPrivKeyList []*big.Int)
- func NewClient(host string, port int, user, passwd string, useSSL bool) (c *rpcClient, err error)
- func PathExists(path string) (bool, error)
- func ReadDcrmAddrFromLocalDBByIndex(fusion string, cointype string, index int) (string, error)
- func ReadNodeInfoFromLocalDB(nodeinfo string) (string, error)
- func RestoreNodeInfo()
- func SendMsgToDcrmGroup(msg string)
- func SendReqToGroup(msg string, rpctype string) (string, error)
- func SendTxForLockout(realfusionfrom string, realdcrmfrom string, to string, value string, ...) (string, error)
- func SetBackend(e Backend)
- func SetDatadir(data string)
- func SetPaillierThresholdIndex(d int)
- func SetUpMsgList(msg string)
- func Sign(msgprex string, encX *big.Int, message string, tokenType string, pkx *big.Int, ...)
- func SumOutputSerializeSizes(outputs []*wire.TxOut) (serializeSize int)
- func SumOutputValues(outputs []*wire.TxOut) (totalOutput btcutil.Amount)
- func ToWIF(priv []byte) (wif string)
- func Tool_DecimalByteSlice2HexString(DecimalSlice []byte) string
- func ValidBTCTx(returnJson string, txhash string, realdcrmfrom string, realdcrmto string, ...)
- func ValidateAddress(bitcoin_net int, address string) bool
- func ValidateDcrm(txhash string) bool
- func Validate_Lockout(wr WorkReq) (string, error)
- func Validate_Txhash(wr WorkReq) (string, error)
- func Verify(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool
- func WriteDcrmAddrToLocalDB(fusion string, cointype string, dcrmaddr string) (bool, error)
- func WriteHashkeyToLocalDB(hashkey string, value string) (bool, error)
- func WriteLockoutInfoToLocalDB(hashkey string, value string) (bool, error)
- func WriteNodeInfoToLocalDB(nodeinfo string, value string) (bool, error)
- func ZkpSignOneVerify(msgprex string, encX *big.Int, id int) bool
- func ZkpSignTwoVerify(msgprex string, u *big.Int, id int) bool
- func ZkpVerify(msgprex string, id int) bool
- type AccountListInfo
- type AccountListJson
- type AddrApiResult
- type AuthoredTx
- type Backend
- type BtcTxResInfo
- type BtcTxResInfoNoInputs
- type CheckHashkeySendMsgToDcrm
- type CmtMasterPublicKey
- type Commitment
- type ConfirmAddrSendMsgToDcrm
- type DcrmConfirmAddr
- type DcrmData
- type DcrmLiLoReqAddress
- type DcrmLockin
- type DcrmLockout
- type DcrmReqAddress
- type DcrmSign
- type DcrmValidateRes
- type ECDSASignature
- func (this *ECDSASignature) GetR() *big.Int
- func (this *ECDSASignature) GetRecoveryParam() int32
- func (this *ECDSASignature) GetS() *big.Int
- func (this *ECDSASignature) New()
- func (this *ECDSASignature) New2(r *big.Int, s *big.Int)
- func (this *ECDSASignature) New3(r *big.Int, s *big.Int, recoveryParam int32)
- type Err
- type GetTransactionResult
- type GetTransactionResultNoInputs
- type LockInSendMsgToDcrm
- type LockoutSendMsgToDcrm
- type MTDCommitment
- type NodeInfo
- type NodeJson
- type NodeWorkId
- type Open
- type Output
- type PublicParameters
- type RPCTransaction
- type RecvMsg
- type ReqAddrSendMsgToDcrm
- type ReqDispatcher
- type ReqNonDcrmDispatcher
- type RpcDcrmRes
- type RpcReq
- type RpcReqNonDcrmWorker
- type RpcReqWorker
- type SafeMap
- type ScriptSigParam
- type Scriptparm
- type SendRawTxRes
- type TxApiResult
- type Txref
- type User
- type UtxoLsRes
- type UtxoRes
- type Vinparm
- type VinparmNoInputs
- type Voutparm
- type Wallet
- type WorkReq
- type ZkpKG
- type ZkpSignOne
- type ZkpSignTwo
Constants ¶
const ( // RedeemP2PKHSigScriptSize is the worst case (largest) serialize size // of a transaction input script that redeems a compressed P2PKH output. // It is calculated as: // // - OP_DATA_73 // - 72 bytes DER signature + 1 byte sighash // - OP_DATA_33 // - 33 bytes serialized compressed pubkey RedeemP2PKHSigScriptSize = 1 + 73 + 1 + 33 // P2PKHPkScriptSize is the size of a transaction output script that // pays to a compressed pubkey hash. It is calculated as: // // - OP_DUP // - OP_HASH160 // - OP_DATA_20 // - 20 bytes pubkey hash // - OP_EQUALVERIFY // - OP_CHECKSIG P2PKHPkScriptSize = 1 + 1 + 1 + 20 + 1 + 1 // RedeemP2PKHInputSize is the worst case (largest) serialize size of a // transaction input redeeming a compressed P2PKH output. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte compact int encoding value 107 // - 107 bytes signature script // - 4 bytes sequence RedeemP2PKHInputSize = 32 + 4 + 1 + RedeemP2PKHSigScriptSize + 4 // P2PKHOutputSize is the serialize size of a transaction output with a // P2PKH output script. It is calculated as: // // - 8 bytes output value // - 1 byte compact int encoding value 25 // - 25 bytes P2PKH output script P2PKHOutputSize = 8 + 1 + P2PKHPkScriptSize // P2WPKHPkScriptSize is the size of a transaction output script that // pays to a witness pubkey hash. It is calculated as: // // - OP_0 // - OP_DATA_20 // - 20 bytes pubkey hash P2WPKHPkScriptSize = 1 + 1 + 20 // P2WPKHOutputSize is the serialize size of a transaction output with a // P2WPKH output script. It is calculated as: // // - 8 bytes output value // - 1 byte compact int encoding value 22 // - 22 bytes P2PKH output script P2WPKHOutputSize = 8 + 1 + P2WPKHPkScriptSize // RedeemP2WPKHScriptSize is the size of a transaction input script // that spends a pay-to-witness-public-key hash (P2WPKH). The redeem // script for P2WPKH spends MUST be empty. RedeemP2WPKHScriptSize = 0 // RedeemP2WPKHInputSize is the worst case size of a transaction // input redeeming a P2WPKH output. It is calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte encoding empty redeem script // - 0 bytes redeem script // - 4 bytes sequence RedeemP2WPKHInputSize = 32 + 4 + 1 + RedeemP2WPKHScriptSize + 4 // RedeemNestedP2WPKHScriptSize is the worst case size of a transaction // input script that redeems a pay-to-witness-key hash nested in P2SH // (P2SH-P2WPKH). It is calculated as: // // - 1 byte compact int encoding value 22 // - OP_0 // - 1 byte compact int encoding value 20 // - 20 byte key hash RedeemNestedP2WPKHScriptSize = 1 + 1 + 1 + 20 // RedeemNestedP2WPKHInputSize is the worst case size of a // transaction input redeeming a P2SH-P2WPKH output. It is // calculated as: // // - 32 bytes previous tx // - 4 bytes output index // - 1 byte compact int encoding value 23 // - 23 bytes redeem script (scriptSig) // - 4 bytes sequence RedeemNestedP2WPKHInputSize = 32 + 4 + 1 + RedeemNestedP2WPKHScriptSize + 4 // RedeemP2WPKHInputWitnessWeight is the worst case weight of // a witness for spending P2WPKH and nested P2WPKH outputs. It // is calculated as: // // - 1 wu compact int encoding value 2 (number of items) // - 1 wu compact int encoding value 73 // - 72 wu DER signature + 1 wu sighash // - 1 wu compact int encoding value 33 // - 33 wu serialized compressed pubkey RedeemP2WPKHInputWitnessWeight = 1 + 1 + 73 + 1 + 33 )
Worst case script and input/output size estimates.
const ( VERSION = 0.1 RPCCLIENT_TIMEOUT = 30 SERVER_HOST = "47.107.50.83" //"localhost" SERVER_PORT = 8000 //18443 USER = "xxmm" PASSWD = "123456" USESSL = false WALLET_PASSPHRASE = "WalletPassphrase" )
const BITCOIN_BASE58_TABLE = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
Variables ¶
var ( FSN Backend SecureRnd = rand.New(rand.NewSource(rnd_num)) //caihaijun NodeCnt = 4 //commitment MPK = generateMasterPK() ZKParams *PublicParameters CHAIN_ID = 4 //ethereum mainnet=1 rinkeby testnet=4 //rpc-req //dcrm node RpcMaxWorker = 20000 RpcMaxQueue = 20000 DcrmDataMaxQueue = 10 //1000 RpcReqQueue chan RpcReq DcrmDataQueue chan DcrmData RpcMaxNonDcrmWorker = 20000 RpcMaxNonDcrmQueue = 20000 RpcReqNonDcrmQueue chan RpcReq ETH_SERVER = "http://54.183.185.30:8018" BTC_BLOCK_CONFIRMS int64 )
Functions ¶
func Base58Decode ¶
func Btc_createTransaction ¶
func Btc_createTransaction(msgprex string, dcrmaddr string, toAddr string, changeAddress string, value float64, requiredConfirmations uint32, feeRateBtc float64, ch chan interface{}) string
构建和发送一笔比特币交易 dcrmaddr: dcrm地址, toAddr: 接收转账的地址 changeAddress: 找零地址 requiredConfirmations 需要的确认区块数, 默认是6 feeRateBtc: 费用率, 单位是比特币
func Dcrm_ConfirmAddr ¶
func Dcrm_LiLoReqAddress ¶
func Dcrm_NodeInfo ¶
func Dcrm_ReqAddress ¶
func Dcrm_ReqAddress(pubkey string,cointype string) (string, error) {
func DecryptSplitPrivKey ¶
func DefaultDataDir ¶
func DefaultDataDir() string
func DispenseSplitPrivKey ¶
func DispenseSplitPrivKey(enode interface{})
func EncryptSplitPrivKey ¶
func Erc20_sendTx ¶
func EstimateSerializeSize ¶
EstimateSerializeSize returns a worst case serialize size estimate for a signed transaction that spends inputCount number of compressed P2PKH outputs and contains each transaction output from txOuts. The estimated size is incremented for an additional P2PKH change output if addChangeOutput is true.
func EstimateVirtualSize ¶
func EstimateVirtualSize(numP2PKHIns, numP2WPKHIns, numNestedP2WPKHIns int, txOuts []*wire.TxOut, addChangeOutput bool) int
EstimateVirtualSize returns a worst case virtual size estimate for a signed transaction that spends the given number of P2PKH, P2WPKH and (nested) P2SH-P2WPKH outputs, and contains each transaction output from txOuts. The estimate is incremented for an additional P2PKH change output if addChangeOutput is true.
func GenerateBTC ¶
func GetBTCTxFee ¶
func GetChannelValue ¶
func GetDcrmAddr ¶
func GetEnodePrivKey ¶
func GetEnodePrivKey(enodeID string) (prv *ecies.PrivateKey, err error)
func GetEnodesInfo ¶
func GetEnodesInfo()
func GetFee ¶
func GetFee(dcrmaddr string,lockoutto string,value float64,cointype string) (float64,error) {
func GetPaillierKey ¶
func GetPublicParams ¶
func GetRawTransactionHash ¶
func GetTxHashForLockout ¶
func InitChan ¶
func InitChan()
workers,RpcMaxWorker,RpcReqWorker,RpcReqQueue,RpcMaxQueue,DcrmDataQueue,DcrmData,DcrmDataMaxQueue,makedata,ReqDispatcher
func InitDcrmData ¶
func InitDcrmData()
func InitNonDcrmChan ¶
func InitNonDcrmChan()
func IsHashkeyExsitInLocalDB ¶
func IsValidDcrmAddr ¶
func IsValidFusionAddr ¶
func KeyGenerate ¶
func MakeSignedTransaction ¶
func MakeSignedTransaction(client *ethclient.Client, tx *types.Transaction, rsv string) (*types.Transaction, error)
func ManuallySplitPrivKey ¶
func PathExists ¶
func ReadDcrmAddrFromLocalDBByIndex ¶
========
func ReadNodeInfoFromLocalDB ¶
func RestoreNodeInfo ¶
func RestoreNodeInfo()
func SendMsgToDcrmGroup ¶
func SendMsgToDcrmGroup(msg string)
func SendTxForLockout ¶
func SetBackend ¶
func SetBackend(e Backend)
func SetDatadir ¶
func SetDatadir(data string)
func SetUpMsgList ¶
func SetUpMsgList(msg string)
func SumOutputSerializeSizes ¶
SumOutputSerializeSizes sums up the serialized size of the supplied outputs.
func SumOutputValues ¶
SumOutputValues sums up the list of TxOuts and returns an Amount.
func ValidBTCTx ¶
func ValidateAddress ¶
func Validate_Lockout ¶
func Validate_Txhash ¶
func WriteDcrmAddrToLocalDB ¶
func WriteNodeInfoToLocalDB ¶
Types ¶
type AccountListInfo ¶
type AccountListJson ¶
type AccountListJson struct {
ACCOUNTLIST []AccountListInfo
}
type AddrApiResult ¶
type AuthoredTx ¶
type BtcTxResInfo ¶
type BtcTxResInfo struct { Result GetTransactionResult Error error Id int }
for btc main chain noinputs
type BtcTxResInfoNoInputs ¶
type BtcTxResInfoNoInputs struct { Result GetTransactionResultNoInputs Error error Id int }
for btc main chain noinputs
type CheckHashkeySendMsgToDcrm ¶
checkhashkey
func (*CheckHashkeySendMsgToDcrm) Run ¶
func (self *CheckHashkeySendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type CmtMasterPublicKey ¶
type CmtMasterPublicKey struct {
// contains filtered or unexported fields
}
type Commitment ¶
type Commitment struct {
// contains filtered or unexported fields
}
type ConfirmAddrSendMsgToDcrm ¶
type ConfirmAddrSendMsgToDcrm struct { Txhash string Tx string FusionAddr string DcrmAddr string Hashkey string Cointype string }
non dcrm,
func (*ConfirmAddrSendMsgToDcrm) Run ¶
func (self *ConfirmAddrSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type DcrmConfirmAddr ¶
type DcrmConfirmAddr struct { Txhash string Tx string FusionAddr string DcrmAddr string Hashkey string Cointype string }
DcrmConfirmAddr
func (*DcrmConfirmAddr) Run ¶
func (self *DcrmConfirmAddr) Run(workid int, ch chan interface{}) bool
type DcrmLiLoReqAddress ¶
DcrmLiLoReqAddress
func (*DcrmLiLoReqAddress) Run ¶
func (self *DcrmLiLoReqAddress) Run(workid int, ch chan interface{}) bool
type DcrmLockin ¶
DcrmLockin
func (*DcrmLockin) Run ¶
func (self *DcrmLockin) Run(workid int, ch chan interface{}) bool
type DcrmLockout ¶
type DcrmLockout struct { Txhash string Tx string FusionFrom string DcrmFrom string RealFusionFrom string RealDcrmFrom string Lockoutto string Value string Cointype string }
DcrmLockout
func (*DcrmLockout) Run ¶
func (self *DcrmLockout) Run(workid int, ch chan interface{}) bool
type DcrmReqAddress ¶
DcrmReqAddress
func (*DcrmReqAddress) Run ¶
func (self *DcrmReqAddress) Run(workid int, ch chan interface{}) bool
type DcrmValidateRes ¶
type ECDSASignature ¶
type ECDSASignature struct {
// contains filtered or unexported fields
}
func (*ECDSASignature) GetR ¶
func (this *ECDSASignature) GetR() *big.Int
func (*ECDSASignature) GetRecoveryParam ¶
func (this *ECDSASignature) GetRecoveryParam() int32
func (*ECDSASignature) GetS ¶
func (this *ECDSASignature) GetS() *big.Int
func (*ECDSASignature) New ¶
func (this *ECDSASignature) New()
type GetTransactionResult ¶
type LockInSendMsgToDcrm ¶
type LockInSendMsgToDcrm struct { Txhash string Tx string Fusionaddr string Hashkey string Value string Cointype string LockinAddr string RealDcrmFrom string }
lockin
func (*LockInSendMsgToDcrm) Run ¶
func (self *LockInSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type LockoutSendMsgToDcrm ¶
type LockoutSendMsgToDcrm struct { Txhash string Tx string FusionFrom string DcrmFrom string RealFusionFrom string RealDcrmFrom string Lockoutto string Value string Cointype string }
lockout
func (*LockoutSendMsgToDcrm) Run ¶
func (self *LockoutSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type MTDCommitment ¶
type MTDCommitment struct {
// contains filtered or unexported fields
}
func (*MTDCommitment) New ¶
func (mtdct *MTDCommitment) New(commitment *Commitment, open *Open)
type NodeWorkId ¶
type NodeWorkId struct {
// contains filtered or unexported fields
}
type PublicParameters ¶
type PublicParameters struct {
// contains filtered or unexported fields
}
type RPCTransaction ¶
type RPCTransaction struct { BlockHash common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` Gas hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Hash common.Hash `json:"hash"` Input hexutil.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` To *common.Address `json:"to"` TransactionIndex hexutil.Uint `json:"transactionIndex"` Value *hexutil.Big `json:"value"` V *hexutil.Big `json:"v"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` }
for eth
type ReqAddrSendMsgToDcrm ¶
func (*ReqAddrSendMsgToDcrm) Run ¶
func (self *ReqAddrSendMsgToDcrm) Run(workid int, ch chan interface{}) bool
type ReqDispatcher ¶
type ReqDispatcher struct { // A pool of workers channels that are registered with the dispatcher WorkerPool chan chan RpcReq }
rpc-req
func NewReqDispatcher ¶
func NewReqDispatcher(maxWorkers int) *ReqDispatcher
func (*ReqDispatcher) Run ¶
func (d *ReqDispatcher) Run()
type ReqNonDcrmDispatcher ¶
type ReqNonDcrmDispatcher struct { // A pool of workers channels that are registered with the dispatcher WorkerPool chan chan RpcReq }
func NewReqNonDcrmDispatcher ¶
func NewReqNonDcrmDispatcher(maxWorkers int) *ReqNonDcrmDispatcher
func (*ReqNonDcrmDispatcher) Run ¶
func (d *ReqNonDcrmDispatcher) Run()
type RpcDcrmRes ¶
type RpcDcrmRes struct {
// contains filtered or unexported fields
}
type RpcReqNonDcrmWorker ¶
type RpcReqNonDcrmWorker struct { RpcReqWorkerPool chan chan RpcReq RpcReqChannel chan RpcReq // contains filtered or unexported fields }
func NewRpcReqNonDcrmWorker ¶
func NewRpcReqNonDcrmWorker(workerPool chan chan RpcReq) RpcReqNonDcrmWorker
func (RpcReqNonDcrmWorker) Start ¶
func (w RpcReqNonDcrmWorker) Start()
func (RpcReqNonDcrmWorker) Stop ¶
func (w RpcReqNonDcrmWorker) Stop()
type RpcReqWorker ¶
type RpcReqWorker struct { RpcReqWorkerPool chan chan RpcReq RpcReqChannel chan RpcReq // contains filtered or unexported fields }
func NewRpcReqWorker ¶
func NewRpcReqWorker(workerPool chan chan RpcReq) RpcReqWorker
func (RpcReqWorker) Start ¶
func (w RpcReqWorker) Start()
func (RpcReqWorker) Stop ¶
func (w RpcReqWorker) Stop()
type ScriptSigParam ¶
type Scriptparm ¶
///////////////////for btc main chain
type SendRawTxRes ¶
type TxApiResult ¶
type Txref ¶
type Txref struct { Tx_hash string Block_height int64 Tx_input_n int32 Tx_output_n int32 Value float64 Ref_balance float64 Spent bool Confirmations int64 Confirmed string Double_spend bool }
Txref 表示一次交易中的第 Tx_input_n 个输入, 或第 Tx_output_n 个输出 如果是一个输入, Tx_input_n = -1 如果是一个输出, Tx_output_n = -1 如果表示交易输出,spent表示是否花出
type Vinparm ¶
type Vinparm struct { Txid string Vout int64 ScriptSig ScriptSigParam Sequence int64 }
type VinparmNoInputs ¶
type Voutparm ¶
type Voutparm struct { Value float64 N int64 ScriptPubKey Scriptparm }
type Wallet ¶
Wallet stores private and public keys
func (Wallet) GetAddress ¶
GetAddress returns wallet address
type ZkpSignOne ¶
type ZkpSignOne struct {
// contains filtered or unexported fields
}
Source Files ¶
- btc_address.go
- btc_tx.go
- btc_tx_helpers.go
- btc_tx_size.go
- cmt_master_publickey.go
- commitment.go
- ecdsa_signature.go
- erc20_tx.go
- fusion_dcrm.go
- key_paillier.go
- listunspent_blockchaininfo.go
- mtdcommitment.go
- open.go
- other_util.go
- public_parameters.go
- random_util.go
- rpcclient.go
- split_util.go
- user.go
- zkp_sign_one.go
- zkp_sign_two.go
- zkpkg.go