Documentation ¶
Overview ¶
Package client contains Bitcore Wallet Client
Index ¶
- type Client
- func (c *Client) BroadcastRawTx(rawTx, network string) (*string, error)
- func (c *Client) BroadcastTxProposal(txID string) (*models.TxProposal, error)
- func (c *Client) CreateAddress(ignoreMaxGap bool) (*models.Address, error)
- func (c *Client) CreateTxProposal(outputs []*models.TxOutput, feeLevel string, dryRun bool) (*models.TxProposal, error)
- func (c *Client) CreateWallet(name string, m, n uint, singleAddress bool) (*models.WalletCreate, error)
- func (c *Client) GetBalance(twoStep bool) (*models.Balance, error)
- func (c *Client) GetFeeLevels() ([]*models.FeeLevel, error)
- func (c *Client) GetFiatRate(code, provider string, ts time.Time) (*models.FiatRate, error)
- func (c *Client) GetMainAddresses(limit int, reverse bool) ([]*models.Address, error)
- func (c *Client) GetMaxInfo(feeLevel string, feePerKb uint64) (*models.MaxInfo, error)
- func (c *Client) GetNotifications(lastNotificationID string, timeSpan uint64, includeOwn bool) ([]*models.Notification, error)
- func (c *Client) GetPreferences() (*models.Preferences, error)
- func (c *Client) GetStatus(includeExtendedInfo, twoStep bool) (*models.WalletStatus, error)
- func (c *Client) GetTx(txID string) (*models.TxProposal, error)
- func (c *Client) GetTxHistory(skip, limit uint64, includeExtendedInfo bool) ([]*models.Transaction, error)
- func (c *Client) GetTxProposals() ([]*models.TxProposal, error)
- func (c *Client) GetUtxos(addresses []string) ([]*models.TxInput, error)
- func (c *Client) GetVersion() (*models.Version, error)
- func (c *Client) JoinWallet(name, secret string) (*models.WalletJoin, error)
- func (c *Client) PublishTxProposal(txp *models.TxProposal) (*models.TxProposal, error)
- func (c *Client) PushNotificationsSubscribe(platform, token string) error
- func (c *Client) PushNotificationsUnsubscribe(token string) error
- func (c *Client) RejectTxProposal(txID, reason string) (*models.TxProposal, error)
- func (c *Client) RemoveTxProposal(txID string) (*models.TxProposal, error)
- func (c *Client) SavePreferences(payload map[string]interface{}) error
- func (c *Client) SignTxProposal(txp *models.TxProposal) (*models.TxProposal, error)
- func (c *Client) StartScan(includeCopayerBranches bool) (*models.AddressScan, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is responsible for HTTP requests and signatures
func New ¶
func New(cfg *config.Config, chain *credentials.Credentials) (*Client, error)
New creates new client instance based on Config, HttpClient and Credentials
func (*Client) BroadcastRawTx ¶
BroadcastRawTx sends raw transaction
func (*Client) BroadcastTxProposal ¶
func (c *Client) BroadcastTxProposal(txID string) (*models.TxProposal, error)
BroadcastTxProposal signs transaction proposal
func (*Client) CreateAddress ¶
CreateAddress creates new receiving address
func (*Client) CreateTxProposal ¶
func (c *Client) CreateTxProposal(outputs []*models.TxOutput, feeLevel string, dryRun bool) (*models.TxProposal, error)
CreateTxProposal creates transaction proposal
func (*Client) CreateWallet ¶
func (c *Client) CreateWallet(name string, m, n uint, singleAddress bool) (*models.WalletCreate, error)
CreateWallet creates wallet with provided name and required number of signatures
func (*Client) GetBalance ¶
GetBalance returns wallet balance
func (*Client) GetFeeLevels ¶
GetFeeLevels returns current network fee levels
func (*Client) GetFiatRate ¶
GetFiatRate returns exchange rate for the specified currency & timestamp.
func (*Client) GetMainAddresses ¶
GetMainAddresses returns generated addresses
func (*Client) GetMaxInfo ¶
GetMaxInfo returns send max information
func (*Client) GetNotifications ¶
func (c *Client) GetNotifications(lastNotificationID string, timeSpan uint64, includeOwn bool) ([]*models.Notification, error)
GetNotifications returns notifications
func (*Client) GetPreferences ¶
func (c *Client) GetPreferences() (*models.Preferences, error)
GetPreferences returns copayer preferences
func (*Client) GetStatus ¶
func (c *Client) GetStatus(includeExtendedInfo, twoStep bool) (*models.WalletStatus, error)
GetStatus returns wallet status
func (*Client) GetTx ¶
func (c *Client) GetTx(txID string) (*models.TxProposal, error)
GetTx returns transaction proposal
func (*Client) GetTxHistory ¶
func (c *Client) GetTxHistory(skip, limit uint64, includeExtendedInfo bool) ([]*models.Transaction, error)
GetTxHistory returns completed transactions
func (*Client) GetTxProposals ¶
func (c *Client) GetTxProposals() ([]*models.TxProposal, error)
GetTxProposals returns pending transaction proposals
func (*Client) GetVersion ¶
GetVersion returns BWS service version
func (*Client) JoinWallet ¶
func (c *Client) JoinWallet(name, secret string) (*models.WalletJoin, error)
JoinWallet joins existing wallet
func (*Client) PublishTxProposal ¶
func (c *Client) PublishTxProposal(txp *models.TxProposal) (*models.TxProposal, error)
PublishTxProposal publishes transaction proposal
func (*Client) PushNotificationsSubscribe ¶
PushNotificationsSubscribe returns notifications
func (*Client) PushNotificationsUnsubscribe ¶
PushNotificationsUnsubscribe returns notifications
func (*Client) RejectTxProposal ¶
func (c *Client) RejectTxProposal(txID, reason string) (*models.TxProposal, error)
RejectTxProposal signs transaction proposal
func (*Client) RemoveTxProposal ¶
func (c *Client) RemoveTxProposal(txID string) (*models.TxProposal, error)
RemoveTxProposal signs transaction proposal
func (*Client) SavePreferences ¶
SavePreferences updates copayer preferences
func (*Client) SignTxProposal ¶
func (c *Client) SignTxProposal(txp *models.TxProposal) (*models.TxProposal, error)
SignTxProposal signs transaction proposal