Documentation ¶
Index ¶
- Constants
- Variables
- func OptionArgs(args *BitcoinOptions)
- type BitcoinClient
- func (p *BitcoinClient) GetAddressInfo(ctx context.Context, address string) (common.AddressInfo, error)
- func (p *BitcoinClient) GetBlockCount(ctx context.Context) (int64, error)
- func (p *BitcoinClient) GetNewAddress(ctx context.Context, account string) (string, error)
- func (p *BitcoinClient) GetTransaction(ctx context.Context, txID string) (common.TransactionInfo, error)
- func (p *BitcoinClient) ImportAddress(ctx context.Context, account, address, pubkey, blindingkey string) error
- func (p *BitcoinClient) ListLockUnspent(ctx context.Context) ([]common.TransactionInfo, error)
- func (p *BitcoinClient) ListUnspent(ctx context.Context, minConf, maxConf int, addresses ...string) ([]common.TransactionInfo, error)
- func (p *BitcoinClient) ListUnspentByAsset(ctx context.Context, minConf, maxConf int, asset string) ([]common.TransactionInfo, error)
- func (p *BitcoinClient) LockUnspent(ctx context.Context, unlock bool, transactions ...common.TransactionInfo) error
- func (p *BitcoinClient) SpendFunds(ctx context.Context, changeAddress string, inputs []common.UTXOInfo, ...) (common.SpendTx, error)
- type BitcoinOptions
Constants ¶
View Source
const (
AddressTypeBech32 = "bech32"
)
Variables ¶
View Source
var ( ErrInternalError = errors.New("Internal Error") ErrRPCError = errors.New("RPC Error") ErrInvalidAccount = errors.New("Invalid Account") ErrInvalidAddress = errors.New("Invalid Address format") ErrInvalidPubKey = errors.New("Invalid PubKey") ErrLockUnspentFails = errors.New("LockUnpent Failed") )
Functions ¶
func OptionArgs ¶
func OptionArgs(args *BitcoinOptions)
Types ¶
type BitcoinClient ¶
type BitcoinClient struct { sync.Mutex // mutex to change params while RPC // contains filtered or unexported fields }
func New ¶
func New(ctx context.Context, options BitcoinOptions) *BitcoinClient
func (*BitcoinClient) GetAddressInfo ¶
func (p *BitcoinClient) GetAddressInfo(ctx context.Context, address string) (common.AddressInfo, error)
func (*BitcoinClient) GetBlockCount ¶
func (p *BitcoinClient) GetBlockCount(ctx context.Context) (int64, error)
func (*BitcoinClient) GetNewAddress ¶
func (*BitcoinClient) GetTransaction ¶
func (p *BitcoinClient) GetTransaction(ctx context.Context, txID string) (common.TransactionInfo, error)
func (*BitcoinClient) ImportAddress ¶ added in v0.0.5
func (p *BitcoinClient) ImportAddress(ctx context.Context, account, address, pubkey, blindingkey string) error
func (*BitcoinClient) ListLockUnspent ¶
func (p *BitcoinClient) ListLockUnspent(ctx context.Context) ([]common.TransactionInfo, error)
func (*BitcoinClient) ListUnspent ¶
func (p *BitcoinClient) ListUnspent(ctx context.Context, minConf, maxConf int, addresses ...string) ([]common.TransactionInfo, error)
func (*BitcoinClient) ListUnspentByAsset ¶ added in v0.0.5
func (p *BitcoinClient) ListUnspentByAsset(ctx context.Context, minConf, maxConf int, asset string) ([]common.TransactionInfo, error)
func (*BitcoinClient) LockUnspent ¶
func (p *BitcoinClient) LockUnspent(ctx context.Context, unlock bool, transactions ...common.TransactionInfo) error
type BitcoinOptions ¶
Click to show internal directories.
Click to hide internal directories.