Documentation ¶
Index ¶
- Constants
- func CheckError(err error) errors.Status
- type BitcoinClient
- type BtcClient
- type TxBuilder
- func (txBuilder TxBuilder) NewNativeTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewTokenTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) NewTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) Transfer(args xcbuilder.TransferArgs, input xc.TxInput) (xc.Tx, error)
- func (txBuilder TxBuilder) WithAddressDecoder(decoder address.AddressDecoder) TxBuilder
Constants ¶
View Source
const TxVersion int32 = 2
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
Types ¶
type BitcoinClient ¶
type BitcoinClient string
var Blockbook BitcoinClient = "blockbook"
var Blockchair BitcoinClient = "blockchair"
var Native BitcoinClient = "native"
type BtcClient ¶
type BtcClient interface { client.FullClient address.WithAddressDecoder }
type TxBuilder ¶
type TxBuilder struct { Asset xc.ITask Params *chaincfg.Params AddressDecoder address.AddressDecoder }
TxBuilder for Bitcoin
func NewTxBuilder ¶
NewTxBuilder creates a new Bitcoin TxBuilder
func (TxBuilder) NewNativeTransfer ¶
func (txBuilder TxBuilder) NewNativeTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
NewNativeTransfer creates a new transfer for a native asset
func (TxBuilder) NewTokenTransfer ¶
func (txBuilder TxBuilder) NewTokenTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
NewTokenTransfer creates a new transfer for a token asset
func (TxBuilder) NewTransfer ¶
func (txBuilder TxBuilder) NewTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)
Old transfer interface
func (TxBuilder) WithAddressDecoder ¶
func (txBuilder TxBuilder) WithAddressDecoder(decoder address.AddressDecoder) TxBuilder
Click to show internal directories.
Click to hide internal directories.