Documentation
¶
Overview ¶
Package blockcypher defines primitives to work with the BlockCypher API.
Index ¶
Constants ¶
View Source
const ( // DefaultLimiterInterval is the default BlockCypher API limiter // interval. DefaultLimiterInterval = time.Minute // DefaultLimiterSize is the default BlockCypher API limiter size. DefaultLimiterSize = 2 )
Variables ¶
This section is empty.
Functions ¶
func RegisterFlags ¶ added in v0.3.0
func RegisterFlags()
RegisterFlags registers the flags used by InitializeWithFlags.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a BlockCypher API client.
func RunWithFlags ¶ added in v0.3.0
RunWithFlags should be called after RegisterFlags and flag.Parse to initialize a blockcypher client using flag values.
func (*Client) Broadcast ¶
Broadcast implements github.com/stratumn/go-indigocore/blockchain/btc.Broadcaster.Broadcast.
func (*Client) FindUnspent ¶
func (c *Client) FindUnspent(address *types.ReversedBytes20, amount int64) ([]btc.Output, int64, error)
FindUnspent implements github.com/stratumn/go-indigocore/blockchain/btc.UnspentFinder.FindUnspent.
type Config ¶
type Config struct { // Network is the Bitcoin network. Network btc.Network // APIKey is an optional BlockCypher API key. APIKey string // LimiterInterval is the BlockCypher API limiter interval. LimiterInterval time.Duration // LimiterSize is the BlockCypher API limiter size. LimiterSize int }
Config contains configuration options for the client.
Click to show internal directories.
Click to hide internal directories.