bitcoin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainName = "btc"
	Symbol    = "btc"
)

Variables

This section is empty.

Functions

func NewChainAdaptor

func NewChainAdaptor(conf *config.Config) (wallet.WalletAdaptor, error)

func NewLocalChainAdaptor

func NewLocalChainAdaptor(network config.NetWorkType) wallet.WalletAdaptor

Types

type DecodeTxRes

type DecodeTxRes struct {
	Hash       string
	SignHashes [][]byte
	Vins       []*wallet2.Vin
	Vouts      []*wallet2.Vout
	CostFee    *big.Int
}

type EstimateSmartFeeResult

type EstimateSmartFeeResult struct {
	Feerate float64  `json:"feerate"`
	Errors  []string `json:"errors"`
	Blocks  int      `json:"blocks"`
}

type GetBlockVerboseResult

type GetBlockVerboseResult struct {
	Hash          string                 `json:"hash"`
	Confirmations int64                  `json:"confirmations"`
	StrippedSize  int32                  `json:"strippedsize"`
	Size          int32                  `json:"size"`
	Weight        int32                  `json:"weight"`
	Height        int64                  `json:"height"`
	Version       int32                  `json:"version"`
	VersionHex    string                 `json:"versionHex"`
	MerkleRoot    string                 `json:"merkleroot"`
	Tx            []*btcjson.TxRawResult `json:"tx,omitempty"`
	Time          int64                  `json:"time"`
	Nonce         uint32                 `json:"nonce"`
	Bits          string                 `json:"bits"`
	Difficulty    float64                `json:"difficulty"`
	PreviousHash  string                 `json:"previousblockhash"`
	NextHash      string                 `json:"nextblockhash,omitempty"`
}

type GetNetworkInfoResult

type GetNetworkInfoResult struct {
	Version         int32                          `json:"version"`
	SubVersion      string                         `json:"subversion"`
	ProtocolVersion int32                          `json:"protocolversion"`
	LocalServices   string                         `json:"localservices"`
	LocalRelay      bool                           `json:"localrelay"`
	TimeOffset      int64                          `json:"timeoffset"`
	Connections     int32                          `json:"connections"`
	NetworkActive   bool                           `json:"networkactive"`
	Networks        []btcjson.NetworksResult       `json:"networks"`
	RelayFee        float64                        `json:"relayfee"`
	IncrementalFee  float64                        `json:"incrementalfee"`
	LocalAddresses  []btcjson.LocalAddressesResult `json:"localaddresses"`
	Warnings        string                         `json:"warnings"`
}

type WalletAdaptor

type WalletAdaptor struct {
	fallback.WalletAdaptor
	// contains filtered or unexported fields
}

func (*WalletAdaptor) ConvertAddress

func (*WalletAdaptor) CreateAccountSignedTx

func (*WalletAdaptor) CreateAccountTx

func (*WalletAdaptor) CreateUtxoSignedTx

func (*WalletAdaptor) CreateUtxoTx

func (*WalletAdaptor) GetAccount

func (*WalletAdaptor) GetAccountTxFromData

func (a *WalletAdaptor) GetAccountTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.AccountTxResponse, error)

func (*WalletAdaptor) GetAccountTxFromSignedData

func (a *WalletAdaptor) GetAccountTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.AccountTxResponse, error)

func (*WalletAdaptor) GetBalance

func (*WalletAdaptor) GetGasPrice

func (*WalletAdaptor) GetMinRent

func (*WalletAdaptor) GetNonce

func (*WalletAdaptor) GetSupportCoins

func (*WalletAdaptor) GetTxByAddress

func (*WalletAdaptor) GetTxByHash

func (*WalletAdaptor) GetUtxo

func (*WalletAdaptor) GetUtxoInsFromData

func (a *WalletAdaptor) GetUtxoInsFromData(req *wallet2.UtxoInsFromDataRequest) (*wallet2.UtxoInsResponse, error)

func (*WalletAdaptor) GetUtxoTxFromData

func (a *WalletAdaptor) GetUtxoTxFromData(req *wallet2.TxFromDataRequest) (*wallet2.UtxoTxResponse, error)

func (*WalletAdaptor) GetUtxoTxFromSignedData

func (a *WalletAdaptor) GetUtxoTxFromSignedData(req *wallet2.TxFromSignedDataRequest) (*wallet2.UtxoTxResponse, error)

func (*WalletAdaptor) SendTx

func (*WalletAdaptor) ValidAddress

func (*WalletAdaptor) VerifyAccountSignedTx

func (*WalletAdaptor) VerifyUtxoSignedTx

Jump to

Keyboard shortcuts

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