Documentation ¶
Index ¶
- Constants
- func NewChainAdaptor(conf *config.Config) (chain.IChainAdaptor, error)
- type BcClient
- func (c *BcClient) GetAccountBalance(address string) (string, error)
- func (c *BcClient) GetAccountUtxo(address string) ([]types.UnspentOutput, error)
- func (c *BcClient) GetTransactionsByAddress(address, pageSize, page string) (*types.Transaction, error)
- func (c *BcClient) GetTransactionsByHash(txHash string) (*types.TxsItem, error)
- type ChainAdaptor
- func (c *ChainAdaptor) BuildSignedTransaction(req *utxo.SignedTransactionRequest) (*utxo.SignedTransactionResponse, error)
- func (c *ChainAdaptor) CalcSignHashes(Vins []*utxo.Vin, Vouts []*utxo.Vout) ([][]byte, []byte, error)
- func (c *ChainAdaptor) ConvertAddress(req *utxo.ConvertAddressRequest) (*utxo.ConvertAddressResponse, error)
- func (c *ChainAdaptor) CreateUnSignTransaction(req *utxo.UnSignTransactionRequest) (*utxo.UnSignTransactionResponse, error)
- func (c *ChainAdaptor) DecodeTransaction(req *utxo.DecodeTransactionRequest) (*utxo.DecodeTransactionResponse, error)
- func (c *ChainAdaptor) DecodeTx(txData []byte, vins []*utxo.Vin, sign bool) (*DecodeTxRes, error)
- func (c *ChainAdaptor) DecodeVins(msgTx wire.MsgTx, offline bool, vins []*utxo.Vin, sign bool) ([]*utxo.Vin, *big.Int, error)
- func (c *ChainAdaptor) DecodeVouts(msgTx wire.MsgTx) ([]*utxo.Vout, *big.Int, error)
- func (c *ChainAdaptor) GetAccount(req *utxo.AccountRequest) (*utxo.AccountResponse, error)
- func (c *ChainAdaptor) GetBlockByHash(req *utxo.BlockHashRequest) (*utxo.BlockResponse, error)
- func (c *ChainAdaptor) GetBlockByNumber(req *utxo.BlockNumberRequest) (*utxo.BlockResponse, error)
- func (c *ChainAdaptor) GetBlockHeaderByHash(req *utxo.BlockHeaderHashRequest) (*utxo.BlockHeaderResponse, error)
- func (c *ChainAdaptor) GetBlockHeaderByNumber(req *utxo.BlockHeaderNumberRequest) (*utxo.BlockHeaderResponse, error)
- func (c *ChainAdaptor) GetFee(req *utxo.FeeRequest) (*utxo.FeeResponse, error)
- func (c *ChainAdaptor) GetSupportChains(req *utxo.SupportChainsRequest) (*utxo.SupportChainsResponse, error)
- func (c *ChainAdaptor) GetTxByAddress(req *utxo.TxAddressRequest) (*utxo.TxAddressResponse, error)
- func (c *ChainAdaptor) GetTxByHash(req *utxo.TxHashRequest) (*utxo.TxHashResponse, error)
- func (c *ChainAdaptor) GetUnspentOutputs(req *utxo.UnspentOutputsRequest) (*utxo.UnspentOutputsResponse, error)
- func (c *ChainAdaptor) GetVin(offline bool, vins []*utxo.Vin, index int, in *wire.TxIn) (*utxo.Vin, error)
- func (c *ChainAdaptor) SendTx(req *utxo.SendTxRequest) (*utxo.SendTxResponse, error)
- func (c *ChainAdaptor) ValidAddress(req *utxo.ValidAddressRequest) (*utxo.ValidAddressResponse, error)
- func (c *ChainAdaptor) VerifySign(vin *utxo.Vin, msgTx wire.MsgTx, index int) error
- func (c *ChainAdaptor) VerifySignedTransaction(req *utxo.VerifyTransactionRequest) (*utxo.VerifyTransactionResponse, error)
- type DecodeTxRes
Constants ¶
View Source
const ChainName = "Bitcoin"
Variables ¶
This section is empty.
Functions ¶
func NewChainAdaptor ¶
func NewChainAdaptor(conf *config.Config) (chain.IChainAdaptor, error)
Types ¶
type BcClient ¶
type BcClient struct {
// contains filtered or unexported fields
}
func NewBlockChainClient ¶
func (*BcClient) GetAccountBalance ¶
func (*BcClient) GetAccountUtxo ¶
func (c *BcClient) GetAccountUtxo(address string) ([]types.UnspentOutput, error)
func (*BcClient) GetTransactionsByAddress ¶
func (c *BcClient) GetTransactionsByAddress(address, pageSize, page string) (*types.Transaction, error)
type ChainAdaptor ¶
type ChainAdaptor struct {
// contains filtered or unexported fields
}
func (*ChainAdaptor) BuildSignedTransaction ¶
func (c *ChainAdaptor) BuildSignedTransaction(req *utxo.SignedTransactionRequest) (*utxo.SignedTransactionResponse, error)
func (*ChainAdaptor) CalcSignHashes ¶
func (*ChainAdaptor) ConvertAddress ¶
func (c *ChainAdaptor) ConvertAddress(req *utxo.ConvertAddressRequest) (*utxo.ConvertAddressResponse, error)
func (*ChainAdaptor) CreateUnSignTransaction ¶
func (c *ChainAdaptor) CreateUnSignTransaction(req *utxo.UnSignTransactionRequest) (*utxo.UnSignTransactionResponse, error)
func (*ChainAdaptor) DecodeTransaction ¶
func (c *ChainAdaptor) DecodeTransaction(req *utxo.DecodeTransactionRequest) (*utxo.DecodeTransactionResponse, error)
func (*ChainAdaptor) DecodeTx ¶
func (c *ChainAdaptor) DecodeTx(txData []byte, vins []*utxo.Vin, sign bool) (*DecodeTxRes, error)
func (*ChainAdaptor) DecodeVins ¶
func (*ChainAdaptor) DecodeVouts ¶
func (*ChainAdaptor) GetAccount ¶
func (c *ChainAdaptor) GetAccount(req *utxo.AccountRequest) (*utxo.AccountResponse, error)
func (*ChainAdaptor) GetBlockByHash ¶
func (c *ChainAdaptor) GetBlockByHash(req *utxo.BlockHashRequest) (*utxo.BlockResponse, error)
func (*ChainAdaptor) GetBlockByNumber ¶
func (c *ChainAdaptor) GetBlockByNumber(req *utxo.BlockNumberRequest) (*utxo.BlockResponse, error)
func (*ChainAdaptor) GetBlockHeaderByHash ¶
func (c *ChainAdaptor) GetBlockHeaderByHash(req *utxo.BlockHeaderHashRequest) (*utxo.BlockHeaderResponse, error)
func (*ChainAdaptor) GetBlockHeaderByNumber ¶
func (c *ChainAdaptor) GetBlockHeaderByNumber(req *utxo.BlockHeaderNumberRequest) (*utxo.BlockHeaderResponse, error)
func (*ChainAdaptor) GetFee ¶
func (c *ChainAdaptor) GetFee(req *utxo.FeeRequest) (*utxo.FeeResponse, error)
func (*ChainAdaptor) GetSupportChains ¶
func (c *ChainAdaptor) GetSupportChains(req *utxo.SupportChainsRequest) (*utxo.SupportChainsResponse, error)
func (*ChainAdaptor) GetTxByAddress ¶
func (c *ChainAdaptor) GetTxByAddress(req *utxo.TxAddressRequest) (*utxo.TxAddressResponse, error)
func (*ChainAdaptor) GetTxByHash ¶
func (c *ChainAdaptor) GetTxByHash(req *utxo.TxHashRequest) (*utxo.TxHashResponse, error)
func (*ChainAdaptor) GetUnspentOutputs ¶
func (c *ChainAdaptor) GetUnspentOutputs(req *utxo.UnspentOutputsRequest) (*utxo.UnspentOutputsResponse, error)
func (*ChainAdaptor) SendTx ¶
func (c *ChainAdaptor) SendTx(req *utxo.SendTxRequest) (*utxo.SendTxResponse, error)
func (*ChainAdaptor) ValidAddress ¶
func (c *ChainAdaptor) ValidAddress(req *utxo.ValidAddressRequest) (*utxo.ValidAddressResponse, error)
func (*ChainAdaptor) VerifySign ¶
func (*ChainAdaptor) VerifySignedTransaction ¶
func (c *ChainAdaptor) VerifySignedTransaction(req *utxo.VerifyTransactionRequest) (*utxo.VerifyTransactionResponse, error)
Click to show internal directories.
Click to hide internal directories.