Documentation
¶
Index ¶
- type Client
- func (c *Client) Client() *jape.Client
- func (c *Client) ConsensusNetwork() (resp *consensus.Network, err error)
- func (c *Client) ConsensusTip() (resp api.ConsensusTipResponse, err error)
- func (c *Client) ConsensusTipState() (resp consensus.State, err error)
- func (c *Client) DaemonVersion() (resp api.DaemonVersion, err error)
- func (c *Client) HostDb() (hdg api.HostdbGET, err error)
- func (c *Client) HostDbActiveHosts() (hdag api.HostdbHostsGET, err error)
- func (c *Client) HostDbAllHosts() (hdag api.HostdbHostsGET, err error)
- func (c *Client) HostDbFilterMode() (hdfmg api.HostdbFilterModeGET, err error)
- func (c *Client) HostDbHost(pk types.PublicKey) (hhg api.HostdbHostGET, err error)
- func (c *Client) HostDbSetFilterMode(fm modules.FilterMode, hosts []types.PublicKey, netAddresses []string) (err error)
- func (c *Client) ManagerAverages(currency string) (ha api.HostAverages, err error)
- func (c *Client) ManagerBalance(key string) (ub modules.UserBalance, err error)
- func (c *Client) ManagerContracts(key string) (rc api.RenterContracts, err error)
- func (c *Client) ManagerMaintenance() (maintenance bool, err error)
- func (c *Client) ManagerPreferences() (ep api.EmailPreferences, err error)
- func (c *Client) ManagerPrices() (prices modules.Pricing, err error)
- func (c *Client) ManagerRenter(key string) (r modules.Renter, err error)
- func (c *Client) ManagerRenters() (rg api.RentersGET, err error)
- func (c *Client) ManagerSetMaintenance(start bool) error
- func (c *Client) ManagerUpdatePreferences(ep api.EmailPreferences) error
- func (c *Client) ManagerUpdatePrices(prices modules.Pricing) error
- func (c *Client) PortalAnnouncement() (string, uint64, error)
- func (c *Client) PortalCredits() (credits modules.CreditData, err error)
- func (c *Client) PortalSetAnnouncement(text string, expires uint64) (err error)
- func (c *Client) PortalSetCredits(credits modules.CreditData) (err error)
- func (c *Client) SyncerBroadcastBlock(b types.Block) (err error)
- func (c *Client) SyncerConnect(addr string) (err error)
- func (c *Client) SyncerPeers() (resp []api.SyncerPeer, err error)
- func (c *Client) TxpoolFee() (resp types.Currency, err error)
- func (c *Client) TxpoolTransactions() (txns []types.Transaction, v2txns []types.V2Transaction, err error)
- func (c *Client) WalletAddWatch(addr types.Address) (err error)
- func (c *Client) WalletAddress() (addr types.Address, err error)
- func (c *Client) WalletAddresses() (addrs []types.Address, err error)
- func (c *Client) WalletBalance() (resp api.WalletBalanceResponse, err error)
- func (c *Client) WalletOutputs() (sc []types.SiacoinElement, sf []types.SiafundElement, err error)
- func (c *Client) WalletPoolTransactions() (resp []modules.PoolTransaction, err error)
- func (c *Client) WalletRemoveWatch(addr types.Address) (err error)
- func (c *Client) WalletSendSiacoins(amount types.Currency, dest types.Address) (err error)
- func (c *Client) WalletWatchedAddresses() (addrs []types.Address, err 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
}
A Client provides methods for interacting with the API server.
func NewClient ¶ added in v0.11.0
func NewClient() *Client
NewClient returns a client that communicates with the API server listening on the specified address.
func (*Client) ConsensusNetwork ¶ added in v0.11.0
ConsensusNetwork returns the node's network metadata.
func (*Client) ConsensusTip ¶ added in v0.11.0
func (c *Client) ConsensusTip() (resp api.ConsensusTipResponse, err error)
ConsensusTip returns the current tip index.
func (*Client) ConsensusTipState ¶ added in v0.11.0
ConsensusTipState returns the current tip state.
func (*Client) DaemonVersion ¶ added in v0.11.0
func (c *Client) DaemonVersion() (resp api.DaemonVersion, err error)
DaemonVersion returns the current version of satd.
func (*Client) HostDbActiveHosts ¶ added in v0.11.0
func (c *Client) HostDbActiveHosts() (hdag api.HostdbHostsGET, err error)
HostDbActiveHosts requests the /hostdb/active endpoint's resources.
func (*Client) HostDbAllHosts ¶ added in v0.11.0
func (c *Client) HostDbAllHosts() (hdag api.HostdbHostsGET, err error)
HostDbAllHosts requests the /hostdb/all endpoint's resources.
func (*Client) HostDbFilterMode ¶ added in v0.11.0
func (c *Client) HostDbFilterMode() (hdfmg api.HostdbFilterModeGET, err error)
HostDbFilterMode requests the /hostdb/filtermode GET endpoint.
func (*Client) HostDbHost ¶ added in v0.11.0
HostDbHost request the /hostdb/host/:publickey endpoint's resources.
func (*Client) HostDbSetFilterMode ¶ added in v0.11.0
func (c *Client) HostDbSetFilterMode(fm modules.FilterMode, hosts []types.PublicKey, netAddresses []string) (err error)
HostDbSetFilterMode requests the /hostdb/filtermode POST endpoint.
func (*Client) ManagerAverages ¶ added in v0.11.0
func (c *Client) ManagerAverages(currency string) (ha api.HostAverages, err error)
ManagerAverages requests the /manager/averages resource.
func (*Client) ManagerBalance ¶ added in v0.11.0
func (c *Client) ManagerBalance(key string) (ub modules.UserBalance, err error)
ManagerBalance requests the /manager/balance resource.
func (*Client) ManagerContracts ¶ added in v0.11.0
func (c *Client) ManagerContracts(key string) (rc api.RenterContracts, err error)
ManagerContracts requests the /manager/contracts resource.
func (*Client) ManagerMaintenance ¶ added in v0.11.0
ManagerMaintenance requests the /manager/maintenance resource.
func (*Client) ManagerPreferences ¶ added in v0.11.0
func (c *Client) ManagerPreferences() (ep api.EmailPreferences, err error)
ManagerPreferences requests the /manager/preferences resource.
func (*Client) ManagerPrices ¶ added in v0.11.0
ManagerPrices requests the /manager/prices resource.
func (*Client) ManagerRenter ¶ added in v0.11.0
ManagerRenter requests the /manager/renter resource.
func (*Client) ManagerRenters ¶ added in v0.11.0
func (c *Client) ManagerRenters() (rg api.RentersGET, err error)
ManagerRenters requests the /manager/renters resource.
func (*Client) ManagerSetMaintenance ¶ added in v0.11.0
ManagerSetMaintenance uses the /manager/maintenance resource to set or clear the maintenance flag.
func (*Client) ManagerUpdatePreferences ¶ added in v0.11.0
func (c *Client) ManagerUpdatePreferences(ep api.EmailPreferences) error
ManagerUpdatePreferences uses the /manager/preferences resource to change the email preferences.
func (*Client) ManagerUpdatePrices ¶ added in v0.11.0
ManagerUpdatePrices uses the /manager/prices resource to change the current prices.
func (*Client) PortalAnnouncement ¶ added in v0.11.0
PortalAnnouncement requests the /portal/announcement resource.
func (*Client) PortalCredits ¶ added in v0.11.0
func (c *Client) PortalCredits() (credits modules.CreditData, err error)
PortalCredits requests the /portal/credits resource.
func (*Client) PortalSetAnnouncement ¶ added in v0.11.0
PortalSetAnnouncement requests the /portal/announcement resource.
func (*Client) PortalSetCredits ¶ added in v0.11.0
func (c *Client) PortalSetCredits(credits modules.CreditData) (err error)
PortalSetCredits requests the /portal/credits resource.
func (*Client) SyncerBroadcastBlock ¶ added in v0.11.0
SyncerBroadcastBlock broadcasts a block to all peers.
func (*Client) SyncerConnect ¶ added in v0.11.0
SyncerConnect adds the address as a peer of the syncer.
func (*Client) SyncerPeers ¶ added in v0.11.0
func (c *Client) SyncerPeers() (resp []api.SyncerPeer, err error)
SyncerPeers returns the current peers of the syncer.
func (*Client) TxpoolFee ¶ added in v0.11.0
TxpoolFee returns the recommended fee (per weight unit) to ensure a high probability of inclusion in the next block.
func (*Client) TxpoolTransactions ¶ added in v0.11.0
func (c *Client) TxpoolTransactions() (txns []types.Transaction, v2txns []types.V2Transaction, err error)
TxpoolTransactions returns all transactions in the transaction pool.
func (*Client) WalletAddWatch ¶ added in v0.11.0
WalletAddWatch adds the specified watch address.
func (*Client) WalletAddress ¶ added in v0.11.0
WalletAddress returns a newly-generated address.
func (*Client) WalletAddresses ¶ added in v0.11.0
WalletAddresses returns the addresses controlled by the wallet.
func (*Client) WalletBalance ¶ added in v0.11.0
func (c *Client) WalletBalance() (resp api.WalletBalanceResponse, err error)
WalletBalance returns the current wallet balance.
func (*Client) WalletOutputs ¶ added in v0.11.0
func (c *Client) WalletOutputs() (sc []types.SiacoinElement, sf []types.SiafundElement, err error)
WalletOutputs returns the set of unspent outputs controlled by the wallet.
func (*Client) WalletPoolTransactions ¶ added in v0.11.0
func (c *Client) WalletPoolTransactions() (resp []modules.PoolTransaction, err error)
WalletPoolTransactions returns all txpool transactions relevant to the wallet.
func (*Client) WalletRemoveWatch ¶ added in v0.11.0
WalletRemoveWatch removes the specified watch address.
func (*Client) WalletSendSiacoins ¶ added in v0.11.0
WalletSendSiacoins sends a specified amount of SC to the specified address.