Documentation ¶
Index ¶
Constants ¶
View Source
const (
// BipID is the Bip 44 coin ID for Bitcoin Cash.
BipID = 145
)
Variables ¶
View Source
var ( // WalletInfo defines some general information about a Bitcoin Cash wallet. WalletInfo = &asset.WalletInfo{ Name: "Bitcoin Cash", Version: version, UnitInfo: dexbch.UnitInfo, AvailableWallets: []*asset.WalletDefinition{{ Type: walletTypeRPC, Tab: "External", Description: "Connect to bitcoind", DefaultConfigPath: dexbtc.SystemConfigPath("bitcoin"), ConfigOpts: configOpts, }}, } )
Functions ¶
Types ¶
type BCHWallet ¶
type BCHWallet struct {
*btc.ExchangeWallet
}
BCHWallet embeds btc.ExchangeWallet, but re-implements a couple of methods to perform on-the-fly address translation.
func (*BCHWallet) Address ¶
Address converts the Bitcoin base58-encoded address returned by the embedded ExchangeWallet into a Cash Address.
func (*BCHWallet) AuditContract ¶
func (bch *BCHWallet) AuditContract(coinID, contract, txData dex.Bytes, rebroadcast bool) (*asset.AuditInfo, error)
AuditContract modifies the *asset.Contract returned by the ExchangeWallet AuditContract method by converting the Recipient to the Cash Address encoding.
type Driver ¶
type Driver struct{}
Driver implements asset.Driver.
func (*Driver) DecodeCoinID ¶
DecodeCoinID creates a human-readable representation of a coin ID for Bitcoin Cash.
func (*Driver) Info ¶
func (d *Driver) Info() *asset.WalletInfo
Info returns basic information about the wallet and asset.
Click to show internal directories.
Click to hide internal directories.