2014-04-22 18:28:10 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2015-05-26 16:42:21 -05:00
|
|
|
"github.com/btcsuite/btcd/wire"
|
2014-04-22 18:28:10 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type Client struct {
|
2015-05-26 16:42:21 -05:00
|
|
|
btcnet wire.BitcoinNet // Bitcoin Network
|
|
|
|
pver uint32 // Protocl Version
|
|
|
|
userAgent string // User Agent
|
2014-04-22 18:28:10 -05:00
|
|
|
}
|
|
|
|
|
2014-04-23 18:03:34 -05:00
|
|
|
func NewClient(userAgent string) *Client {
|
2014-04-22 18:28:10 -05:00
|
|
|
return &Client{
|
2015-05-26 16:42:21 -05:00
|
|
|
btcnet: wire.MainNet,
|
|
|
|
pver: wire.ProtocolVersion,
|
2014-04-22 18:28:10 -05:00
|
|
|
userAgent: userAgent,
|
|
|
|
}
|
|
|
|
}
|