client

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package client contains Bitcore Wallet Client

Index

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

func (c *Client) BroadcastRawTx(rawTx, network string) (*string, error)

BroadcastRawTx sends raw transaction

func (*Client) BroadcastTxProposal

func (c *Client) BroadcastTxProposal(txID string) (*models.TxProposal, error)

BroadcastTxProposal signs transaction proposal

func (*Client) CreateAddress

func (c *Client) CreateAddress(ignoreMaxGap bool) (*models.Address, error)

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

func (c *Client) GetBalance(twoStep bool) (*models.Balance, error)

GetBalance returns wallet balance

func (*Client) GetFeeLevels

func (c *Client) GetFeeLevels() ([]*models.FeeLevel, error)

GetFeeLevels returns current network fee levels

func (*Client) GetFiatRate

func (c *Client) GetFiatRate(code, provider string, ts time.Time) (*models.FiatRate, error)

GetFiatRate returns exchange rate for the specified currency & timestamp.

func (*Client) GetMainAddresses

func (c *Client) GetMainAddresses(limit int, reverse bool) ([]*models.Address, error)

GetMainAddresses returns generated addresses

func (*Client) GetMaxInfo

func (c *Client) GetMaxInfo(feeLevel string, feePerKb uint64) (*models.MaxInfo, error)

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) GetUtxos

func (c *Client) GetUtxos(addresses []string) ([]*models.TxInput, error)

GetUtxos returns unspent transaction outputs

func (*Client) GetVersion

func (c *Client) GetVersion() (*models.Version, error)

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

func (c *Client) PushNotificationsSubscribe(platform, token string) error

PushNotificationsSubscribe returns notifications

func (*Client) PushNotificationsUnsubscribe

func (c *Client) PushNotificationsUnsubscribe(token string) error

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

func (c *Client) SavePreferences(payload map[string]interface{}) error

SavePreferences updates copayer preferences

func (*Client) SignTxProposal

func (c *Client) SignTxProposal(txp *models.TxProposal) (*models.TxProposal, error)

SignTxProposal signs transaction proposal

func (*Client) StartScan

func (c *Client) StartScan(includeCopayerBranches bool) (*models.AddressScan, error)

StartScan starts an address scanning process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL