tx

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2021 License: ISC Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type PrivateTxAPI

type PrivateTxAPI struct {
	// contains filtered or unexported fields
}

func NewPrivateTxAPI

func NewPrivateTxAPI(tm *TxManager) *PrivateTxAPI

func (*PrivateTxAPI) TxSign

func (api *PrivateTxAPI) TxSign(privkeyStr string, rawTxStr string, tokenPrivkeyStr *string) (interface{}, error)

type PublicTxAPI

type PublicTxAPI struct {
	// contains filtered or unexported fields
}

func NewPublicTxAPI

func NewPublicTxAPI(tm *TxManager) *PublicTxAPI

func (*PublicTxAPI) CreateRawTransaction

func (api *PublicTxAPI) CreateRawTransaction(inputs []json.TransactionInput, amounts json.Amounts, lockTime *int64) (interface{}, error)

func (*PublicTxAPI) CreateRawTransactionV2 added in v0.10.1

func (api *PublicTxAPI) CreateRawTransactionV2(inputs []json.TransactionInput,
	amounts json.AdreesAmount, lockTime *int64) (interface{}, error)

func (*PublicTxAPI) CreateTokenRawTransaction added in v0.10.1

func (api *PublicTxAPI) CreateTokenRawTransaction(txtype string, coinId uint16, coinName *string, owners *string, uplimit *uint64, inputs []json.TransactionInput, amounts json.Amounts, feeType uint16, feeValue int64) (interface{}, error)

func (*PublicTxAPI) DecodeRawTransaction

func (api *PublicTxAPI) DecodeRawTransaction(hexTx string) (interface{}, error)

func (*PublicTxAPI) GetRawTransaction

func (api *PublicTxAPI) GetRawTransaction(txHash hash.Hash, verbose bool) (interface{}, error)

func (*PublicTxAPI) GetRawTransactionByHash

func (api *PublicTxAPI) GetRawTransactionByHash(txHash hash.Hash, verbose bool) (interface{}, error)

func (*PublicTxAPI) GetRawTransactions

func (api *PublicTxAPI) GetRawTransactions(addre string, vinext *bool, count *uint, skip *uint, revers *bool, verbose *bool, filterAddrs *[]string) (interface{}, error)

handleSearchRawTransactions implements the searchrawtransactions command.

func (*PublicTxAPI) GetUtxo

func (api *PublicTxAPI) GetUtxo(txHash hash.Hash, vout uint32, includeMempool *bool) (interface{}, error)

Returns information about an unspent transaction output 1. txid (string, required) The hash of the transaction 2. vout (numeric, required) The index of the output 3. includemempool (boolean, optional, default=true) Include the mempool when true

Result: { "bestblock": "value", (string) The block hash that contains the transaction output "confirmations": n, (numeric) The number of confirmations "amount": n.nnn, (numeric) The transaction amount "scriptPubKey": { (object) The public key script used to pay coins as a JSON object

 "asm": "value",             (string)          Disassembly of the script
 "hex": "value",             (string)          Hex-encoded bytes of the script
 "reqSigs": n,               (numeric)         The number of required signatures
 "type": "value",            (string)          The type of the script (e.g. 'pubkeyhash')
 "addresses": ["value",...], (array of string) The qitmeer addresses associated with this script
},

"coinbase": true|false, (boolean) Whether or not the transaction is a coinbase }

func (*PublicTxAPI) SendRawTransaction

func (api *PublicTxAPI) SendRawTransaction(hexTx string, allowHighFees *bool) (interface{}, error)

type TxManager

type TxManager struct {
	// contains filtered or unexported fields
}

func NewTxManager

func NewTxManager(bm *blkmgr.BlockManager, txIndex *index.TxIndex,
	addrIndex *index.AddrIndex, cfg *config.Config, ntmgr notify.Notify,
	sigCache *txscript.SigCache, db database.DB) (*TxManager, error)

func (*TxManager) APIs

func (tm *TxManager) APIs() []rpc.API

func (*TxManager) MemPool

func (tm *TxManager) MemPool() blkmgr.TxPool

func (*TxManager) Start

func (tm *TxManager) Start() error

func (*TxManager) Stop

func (tm *TxManager) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL