Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) ConsensusBlocksHeightGet(height types.BlockHeight) (cbg api.ConsensusBlocksGet, err error)
- func (c *Client) ConsensusBlocksIDGet(id types.BlockID) (cbg api.ConsensusBlocksGet, err error)
- func (c *Client) ConsensusGet() (cg api.ConsensusGET, err error)
- func (c *Client) DaemonStopGet() (err error)
- func (c *Client) DaemonUpdateGet() (dig api.DaemonUpdateGet, err error)
- func (c *Client) DaemonUpdatePost() (err error)
- func (c *Client) DaemonVersionGet() (dvg api.DaemonVersionGet, err error)
- func (c *Client) GatewayConnectPost(address modules.NetAddress) (err error)
- func (c *Client) GatewayDisconnectPost(address modules.NetAddress) (err error)
- func (c *Client) GatewayGet() (gwg api.GatewayGET, err error)
- func (c *Client) HostAnnounceAddrPost(address modules.NetAddress) (err error)
- func (c *Client) HostAnnouncePost() (err error)
- func (c *Client) HostContractInfoGet() (cg api.ContractInfoGET, err error)
- func (c *Client) HostDbActiveGet() (hdag api.HostdbActiveGET, err error)
- func (c *Client) HostDbAllGet() (hdag api.HostdbAllGET, err error)
- func (c *Client) HostDbGet() (hdg api.HostdbGet, err error)
- func (c *Client) HostDbHostsGet(pk types.SiaPublicKey) (hhg api.HostdbHostsGET, err error)
- func (c *Client) HostEstimateScoreGet(param, value string) (eg api.HostEstimateScoreGET, err error)
- func (c *Client) HostGet() (hg api.HostGET, err error)
- func (c *Client) HostModifySettingPost(param HostParam, value interface{}) (err error)
- func (c *Client) HostStorageFoldersAddPost(path string, size uint64) (err error)
- func (c *Client) HostStorageFoldersRemovePost(path string) (err error)
- func (c *Client) HostStorageFoldersResizePost(path string, size uint64) (err error)
- func (c *Client) HostStorageGet() (sg api.StorageGET, err error)
- func (c *Client) HostStorageSectorsDeletePost(root crypto.Hash) (err error)
- func (c *Client) MinerGet() (mg api.MinerGET, err error)
- func (c *Client) MinerHeaderGet() (target types.Target, bh types.BlockHeader, err error)
- func (c *Client) MinerHeaderPost(bh types.BlockHeader) (err error)
- func (c *Client) MinerStartGet() (err error)
- func (c *Client) MinerStopGet() (err error)
- func (c *Client) MiningPoolClientsGet() (clientInfos api.MiningPoolClientsInfo, err error)
- func (c *Client) MiningPoolConfigGet() (config api.MiningPoolConfig, err error)
- func (c *Client) MiningPoolConfigPost(key string, val string) (err error)
- func (c *Client) MiningPoolGet() (mg api.MiningPoolGET, err error)
- func (c *Client) NewRequest(method, resource string, body io.Reader) (*http.Request, error)
- func (c *Client) RenterCancelAllowance() (err error)
- func (c *Client) RenterClearAllDownloadsPost() (err error)
- func (c *Client) RenterClearDownloadsAfterPost(after time.Time) (err error)
- func (c *Client) RenterClearDownloadsBeforePost(before time.Time) (err error)
- func (c *Client) RenterClearDownloadsRangePost(after, before time.Time) (err error)
- func (c *Client) RenterContractCancelPost(id types.FileContractID) error
- func (c *Client) RenterContractsGet() (rc api.RenterContracts, err error)
- func (c *Client) RenterDeletePost(siaPath string) (err error)
- func (c *Client) RenterDirCreatePost(siaPath string) (err error)
- func (c *Client) RenterDirDeletePost(siaPath string) (err error)
- func (c *Client) RenterDirRenamePost(siaPath, newHyperspacePath string) (err error)
- func (c *Client) RenterDownloadFullGet(siaPath, destination string, async bool) (err error)
- func (c *Client) RenterDownloadGet(siaPath, destination string, offset, length uint64, async bool) (err error)
- func (c *Client) RenterDownloadHTTPResponseGet(siaPath string, offset, length uint64) (resp []byte, err error)
- func (c *Client) RenterDownloadsGet() (rdq api.RenterDownloadQueue, err error)
- func (c *Client) RenterExpiredContractsGet() (rc api.RenterContracts, err error)
- func (c *Client) RenterFileGet(siaPath string) (rf api.RenterFile, err error)
- func (c *Client) RenterFilesFilteredGet(filter string) (rf api.RenterFiles, err error)
- func (c *Client) RenterFilesGet() (rf api.RenterFiles, err error)
- func (c *Client) RenterGet() (rg api.RenterGET, err error)
- func (c *Client) RenterInactiveContractsGet() (rc api.RenterContracts, err error)
- func (c *Client) RenterPostAllowance(allowance modules.Allowance) (err error)
- func (c *Client) RenterPostRateLimit(readBPS, writeBPS int64) (err error)
- func (c *Client) RenterPricesGet() (rpg api.RenterPricesGET, err error)
- func (c *Client) RenterRenamePost(siaPathOld, siaPathNew string) (err error)
- func (c *Client) RenterSetRepairPathPost(siaPath, newPath string) (err error)
- func (c *Client) RenterSetStreamCacheSizePost(cacheSize uint64) (err error)
- func (c *Client) RenterStreamGet(siaPath string) (resp []byte, err error)
- func (c *Client) RenterStreamPartialGet(siaPath string, start, end uint64) (resp []byte, err error)
- func (c *Client) RenterUploadDefaultPost(path, siaPath string) (err error)
- func (c *Client) RenterUploadPost(path, siaPath string, dataPieces, parityPieces uint64) (err error)
- func (c *Client) StratumMinerGet() (mg api.StratumMinerGET, err error)
- func (c *Client) StratumMinerStartPost(server, username string) (err error)
- func (c *Client) StratumMinerStopPost() (err error)
- func (c *Client) TransactionPoolFeeGet() (tfg api.TpoolFeeGET, err error)
- func (c *Client) TransactionPoolRawPost(txn types.Transaction, parents []types.Transaction) (err error)
- func (c *Client) WalletAddressGet() (wag api.WalletAddressGET, err error)
- func (c *Client) WalletAddressPost() (wap api.WalletAddressPOST, err error)
- func (c *Client) WalletAddressesGet() (wag api.WalletAddressesGET, err error)
- func (c *Client) WalletBuildTransactionGet(destination types.UnlockHash, amount types.Currency) (wbtg api.WalletBuildTransactionGET, err error)
- func (c *Client) WalletChangePasswordPost(currentPassword, newPassword string) (err error)
- func (c *Client) WalletGet() (wg api.WalletGET, err error)
- func (c *Client) WalletInitPost(password string, force bool) (wip api.WalletInitPOST, err error)
- func (c *Client) WalletInitSeedPost(seed, password string, force bool) (err error)
- func (c *Client) WalletLockPost() (err error)
- func (c *Client) WalletSeedPost(seed, password string) (err error)
- func (c *Client) WalletSeedsGet() (wsg api.WalletSeedsGET, err error)
- func (c *Client) WalletSiacoinsMultiPost(outputs []types.SiacoinOutput) (wsp api.WalletSiacoinsPOST, err error)
- func (c *Client) WalletSiacoinsPost(amount types.Currency, destination types.UnlockHash) (wsp api.WalletSiacoinsPOST, err error)
- func (c *Client) WalletSiagKeyPost(keyfiles, password string) (err error)
- func (c *Client) WalletSignPost(txn types.Transaction, toSign []crypto.Hash) (wspr api.WalletSignPOSTResp, err error)
- func (c *Client) WalletSweepPost(seed string) (wsp api.WalletSweepPOST, err error)
- func (c *Client) WalletTransactionGet(id types.TransactionID) (wtg api.WalletTransactionGETid, err error)
- func (c *Client) WalletTransactionsGet(startHeight types.BlockHeight, endHeight types.BlockHeight) (wtg api.WalletTransactionsGET, err error)
- func (c *Client) WalletUnlockConditionsGet(addr types.UnlockHash) (wucg api.WalletUnlockConditionsGET, err error)
- func (c *Client) WalletUnlockPost(password string) (err error)
- func (c *Client) WalletUnspentGet() (wug api.WalletUnspentGET, err error)
- func (c *Client) WalletWatchGet() (wwg api.WalletWatchGET, err error)
- func (c *Client) WalletWatchPost(addrs []types.UnlockHash, remove, unused bool) error
- type HostParam
Constants ¶
const ( // HostParamCollateralBudget is the collateral budget of the host in // hastings. HostParamCollateralBudget = HostParam("collateralbudget") // HostParamMaxCollateral is the max collateral of the host in hastings. HostParamMaxCollateral = HostParam("maxcollateral") // HostParamMinContractPrice is the min contract price in hastings. HostParamMinContractPrice = HostParam("mincontractprice") // HostParamMinDownloadBandwidthPrice is the min download bandwidth price // in hastings/byte. HostParamMinDownloadBandwidthPrice = HostParam("mindownloadbandwidthprice") // HostParamMinUploadBandwidthPrice is the min upload bandwidth price in // hastings/byte. HostParamMinUploadBandwidthPrice = HostParam("minuploadbandwidthprice") // HostParamCollateral is the host's collateral in hastings/byte/block. HostParamCollateral = HostParam("collateral") // HostParamMinStoragePrice is the minimum storage price in // hastings/byte/block. HostParamMinStoragePrice = HostParam("minstorageprice") // HostParamAcceptingContracts indicates if the host is accepting new // contracts. HostParamAcceptingContracts = HostParam("acceptingcontracts") // HostParamMaxDuration is the max duration of a contract in blocks. HostParamMaxDuration = HostParam("maxduration") // HostParamWindowSize is the size of the proof window in blocks. HostParamWindowSize = HostParam("windowsize") // HostParamMaxDownloadBatchSize is the maximum size of the download batch // size in bytes. HostParamMaxDownloadBatchSize = HostParam("maxdownloadbatchsize") // HostParamMaxReviseBatchSize is the maximum size of the revise batch size. HostParamMaxReviseBatchSize = HostParam("maxrevisebatchsize") // HostParamNetAddress is the announced netaddress of the host. HostParamNetAddress = HostParam("netaddress") )
Variables ¶
var ( // ErrPeerExists indicates that two peers are already connected. The string // of this error needs to be updated if the string of errPeerExists in the // gateway package is changed. ErrPeerExists = errors.New("already connected to this peer") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Address is the API address of the hsd server. Address string // Password must match the password of the hsd server. Password string // UserAgent must match the User-Agent required by the hsd server. If not // set, it defaults to "Hyperspace-Agent". UserAgent string }
A Client makes requests to the hsd HTTP API.
func (*Client) ConsensusBlocksHeightGet ¶
func (c *Client) ConsensusBlocksHeightGet(height types.BlockHeight) (cbg api.ConsensusBlocksGet, err error)
ConsensusBlocksHeightGet requests the /consensus/blocks api resource
func (*Client) ConsensusBlocksIDGet ¶
ConsensusBlocksIDGet requests the /consensus/blocks api resource
func (*Client) ConsensusGet ¶
func (c *Client) ConsensusGet() (cg api.ConsensusGET, err error)
ConsensusGet requests the /consensus api resource
func (*Client) DaemonStopGet ¶
DaemonStopGet stops the daemon using the /daemon/stop endpoint.
func (*Client) DaemonUpdateGet ¶
func (c *Client) DaemonUpdateGet() (dig api.DaemonUpdateGet, err error)
DaemonUpdateGet checks for an available daemon update.
func (*Client) DaemonUpdatePost ¶
DaemonUpdatePost updates the daemon.
func (*Client) DaemonVersionGet ¶
func (c *Client) DaemonVersionGet() (dvg api.DaemonVersionGet, err error)
DaemonVersionGet requests the /daemon/version resource
func (*Client) GatewayConnectPost ¶
func (c *Client) GatewayConnectPost(address modules.NetAddress) (err error)
GatewayConnectPost uses the /gateway/connect/:address endpoint to connect to the gateway at address
func (*Client) GatewayDisconnectPost ¶
func (c *Client) GatewayDisconnectPost(address modules.NetAddress) (err error)
GatewayDisconnectPost uses the /gateway/disconnect/:address endpoint to disconnect the gateway from a peer.
func (*Client) GatewayGet ¶
func (c *Client) GatewayGet() (gwg api.GatewayGET, err error)
GatewayGet requests the /gateway api resource
func (*Client) HostAnnounceAddrPost ¶
func (c *Client) HostAnnounceAddrPost(address modules.NetAddress) (err error)
HostAnnounceAddrPost uses the /host/anounce endpoint to announce the host to the network using the provided address.
func (*Client) HostAnnouncePost ¶
HostAnnouncePost uses the /host/announce endpoint to announce the host to the network
func (*Client) HostContractInfoGet ¶
func (c *Client) HostContractInfoGet() (cg api.ContractInfoGET, err error)
HostContractInfoGet uses the /host/contracts endpoint to get information about contracts on the host.
func (*Client) HostDbActiveGet ¶
func (c *Client) HostDbActiveGet() (hdag api.HostdbActiveGET, err error)
HostDbActiveGet requests the /hostdb/active endpoint's resources.
func (*Client) HostDbAllGet ¶
func (c *Client) HostDbAllGet() (hdag api.HostdbAllGET, err error)
HostDbAllGet requests the /hostdb/all endpoint's resources.
func (*Client) HostDbHostsGet ¶
func (c *Client) HostDbHostsGet(pk types.SiaPublicKey) (hhg api.HostdbHostsGET, err error)
HostDbHostsGet request the /hostdb/hosts/:pubkey endpoint's resources.
func (*Client) HostEstimateScoreGet ¶
func (c *Client) HostEstimateScoreGet(param, value string) (eg api.HostEstimateScoreGET, err error)
HostEstimateScoreGet requests the /host/estimatescore endpoint.
func (*Client) HostModifySettingPost ¶
HostModifySettingPost uses the /host endpoint to change a param of the host settings to a certain value.
func (*Client) HostStorageFoldersAddPost ¶
HostStorageFoldersAddPost uses the /host/storage/folders/add api endpoint to add a storage folder to a host
func (*Client) HostStorageFoldersRemovePost ¶
HostStorageFoldersRemovePost uses the /host/storage/folders/remove api endpoint to remove a storage folder from a host.
func (*Client) HostStorageFoldersResizePost ¶
HostStorageFoldersResizePost uses the /host/storage/folders/resize api endpoint to resize an existing storage folder.
func (*Client) HostStorageGet ¶
func (c *Client) HostStorageGet() (sg api.StorageGET, err error)
HostStorageGet requests the /host/storage endpoint.
func (*Client) HostStorageSectorsDeletePost ¶
HostStorageSectorsDeletePost uses the /host/storage/sectors/delete endpoint to delete a sector from the host.
func (*Client) MinerHeaderGet ¶
MinerHeaderGet uses the /miner/header endpoint to get a header for work.
func (*Client) MinerHeaderPost ¶
func (c *Client) MinerHeaderPost(bh types.BlockHeader) (err error)
MinerHeaderPost uses the /miner/header endpoint to submit a solved block header that was previously received from the same endpoint
func (*Client) MinerStartGet ¶
MinerStartGet uses the /miner/start endpoint to start the cpu miner.
func (*Client) MinerStopGet ¶
MinerStopGet uses the /miner/stop endpoint to stop the cpu miner.
func (*Client) MiningPoolClientsGet ¶
func (c *Client) MiningPoolClientsGet() (clientInfos api.MiningPoolClientsInfo, err error)
MiningPoolClientsGet requests the /pool/clients client info list.
func (*Client) MiningPoolConfigGet ¶
func (c *Client) MiningPoolConfigGet() (config api.MiningPoolConfig, err error)
MiningPoolConfigGet requests the /pool/config configuration info.
func (*Client) MiningPoolConfigPost ¶
MiningPoolConfigPost uses the /pool/config endpoint to tell mining pool to use a new configuration value
func (*Client) MiningPoolGet ¶
func (c *Client) MiningPoolGet() (mg api.MiningPoolGET, err error)
MiningPoolGet requests the /pool endpoint's resources.
func (*Client) NewRequest ¶
NewRequest constructs a request to the hsd HTTP API, setting the correct User-Agent and Basic Auth. The resource path must begin with /.
func (*Client) RenterCancelAllowance ¶
RenterCancelAllowance uses the /renter endpoint to cancel the allowance.
func (*Client) RenterClearAllDownloadsPost ¶
RenterClearAllDownloadsPost requests the /renter/downloads/clear resource with no parameters
func (*Client) RenterClearDownloadsAfterPost ¶
RenterClearDownloadsAfterPost requests the /renter/downloads/clear resource with only the after timestamp provided
func (*Client) RenterClearDownloadsBeforePost ¶
RenterClearDownloadsBeforePost requests the /renter/downloads/clear resource with only the before timestamp provided
func (*Client) RenterClearDownloadsRangePost ¶
RenterClearDownloadsRangePost requests the /renter/downloads/clear resource with both before and after timestamps provided
func (*Client) RenterContractCancelPost ¶
func (c *Client) RenterContractCancelPost(id types.FileContractID) error
RenterContractCancelPost uses the /renter/contract/cancel endpoint to cancel a contract
func (*Client) RenterContractsGet ¶
func (c *Client) RenterContractsGet() (rc api.RenterContracts, err error)
RenterContractsGet requests the /renter/contracts resource and returns Contracts and ActiveContracts
func (*Client) RenterDeletePost ¶
RenterDeletePost uses the /renter/delete endpoint to delete a file.
func (*Client) RenterDirCreatePost ¶
RenterDirCreatePost uses the /renter/dir/ endpoint to create a directory for the renter
func (*Client) RenterDirDeletePost ¶
RenterDirDeletePost uses the /renter/dir/ endpoint to delete a directory for the renter
func (*Client) RenterDirRenamePost ¶
RenterDirRenamePost uses the /renter/dir/ endpoint to rename a directory for the renter
func (*Client) RenterDownloadFullGet ¶
RenterDownloadFullGet uses the /renter/download endpoint to download a full file.
func (*Client) RenterDownloadGet ¶
func (c *Client) RenterDownloadGet(siaPath, destination string, offset, length uint64, async bool) (err error)
RenterDownloadGet uses the /renter/download endpoint to download a file to a destination on disk.
func (*Client) RenterDownloadHTTPResponseGet ¶
func (c *Client) RenterDownloadHTTPResponseGet(siaPath string, offset, length uint64) (resp []byte, err error)
RenterDownloadHTTPResponseGet uses the /renter/download endpoint to download a file and return its data.
func (*Client) RenterDownloadsGet ¶
func (c *Client) RenterDownloadsGet() (rdq api.RenterDownloadQueue, err error)
RenterDownloadsGet requests the /renter/downloads resource
func (*Client) RenterExpiredContractsGet ¶
func (c *Client) RenterExpiredContractsGet() (rc api.RenterContracts, err error)
RenterExpiredContractsGet requests the /renter/contracts resource with the expired flag set to true
func (*Client) RenterFileGet ¶
func (c *Client) RenterFileGet(siaPath string) (rf api.RenterFile, err error)
RenterFileGet uses the /renter/file/:hyperspacepath endpoint to query a file.
func (*Client) RenterFilesFilteredGet ¶
func (c *Client) RenterFilesFilteredGet(filter string) (rf api.RenterFiles, err error)
RenterFilesFilteredGet requests the /renter/files resource with a regex filter string.
func (*Client) RenterFilesGet ¶
func (c *Client) RenterFilesGet() (rf api.RenterFiles, err error)
RenterFilesGet requests the /renter/files resource.
func (*Client) RenterInactiveContractsGet ¶
func (c *Client) RenterInactiveContractsGet() (rc api.RenterContracts, err error)
RenterInactiveContractsGet requests the /renter/contracts resource with the inactive flag set to true
func (*Client) RenterPostAllowance ¶
RenterPostAllowance uses the /renter endpoint to change the renter's allowance
func (*Client) RenterPostRateLimit ¶
RenterPostRateLimit uses the /renter endpoint to change the renter's bandwidth rate limit.
func (*Client) RenterPricesGet ¶
func (c *Client) RenterPricesGet() (rpg api.RenterPricesGET, err error)
RenterPricesGet requests the /renter/prices endpoint's resources.
func (*Client) RenterRenamePost ¶
RenterRenamePost uses the /renter/rename/:hyperspacepath endpoint to rename a file.
func (*Client) RenterSetRepairPathPost ¶
RenterSetRepairPathPost uses the /renter/tracking endpoint to set the repair path of a file to a new location. The file at newPath must exists.
func (*Client) RenterSetStreamCacheSizePost ¶
RenterSetStreamCacheSizePost uses the /renter endpoint to change the renter's streamCacheSize for streaming
func (*Client) RenterStreamGet ¶
RenterStreamGet uses the /renter/stream endpoint to download data as a stream.
func (*Client) RenterStreamPartialGet ¶
RenterStreamPartialGet uses the /renter/stream endpoint to download a part of data as a stream.
func (*Client) RenterUploadDefaultPost ¶
RenterUploadDefaultPost uses the /renter/upload endpoint with default redundancy settings to upload a file.
func (*Client) RenterUploadPost ¶
func (c *Client) RenterUploadPost(path, siaPath string, dataPieces, parityPieces uint64) (err error)
RenterUploadPost uses the /renter/upload endpoint to upload a file
func (*Client) StratumMinerGet ¶
func (c *Client) StratumMinerGet() (mg api.StratumMinerGET, err error)
StratumMinerGet requests the /stratumminer endpoint's resources.
func (*Client) StratumMinerStartPost ¶
StratumMinerStartPost uses the /stratumminer/start endpoint to start the stratum miner.
func (*Client) StratumMinerStopPost ¶
StratumMinerStopGet uses the /stratumminer/stop endpoint to stop the stratum miner.
func (*Client) TransactionPoolFeeGet ¶
func (c *Client) TransactionPoolFeeGet() (tfg api.TpoolFeeGET, err error)
TransactionPoolFeeGet uses the /tpool/fee endpoint to get a fee estimation.
func (*Client) TransactionPoolRawPost ¶
func (c *Client) TransactionPoolRawPost(txn types.Transaction, parents []types.Transaction) (err error)
TransactionPoolRawPost uses the /tpool/raw endpoint to send a raw transaction to the transaction pool.
func (*Client) WalletAddressGet ¶
func (c *Client) WalletAddressGet() (wag api.WalletAddressGET, err error)
WalletAddressGet requests an unused address from the /wallet/address endpoint
func (*Client) WalletAddressPost ¶
func (c *Client) WalletAddressPost() (wap api.WalletAddressPOST, err error)
WalletAddressPost requests a new address from the /wallet/address endpoint
func (*Client) WalletAddressesGet ¶
func (c *Client) WalletAddressesGet() (wag api.WalletAddressesGET, err error)
WalletAddressesGet requests the wallets known addresses from the /wallet/addresses endpoint.
func (*Client) WalletBuildTransactionGet ¶
func (c *Client) WalletBuildTransactionGet(destination types.UnlockHash, amount types.Currency) (wbtg api.WalletBuildTransactionGET, err error)
WalletBuildTransactionGet requests the /wallet/transactions/build api resource for a certain destiniation and amount
func (*Client) WalletChangePasswordPost ¶
WalletChangePasswordPost uses the /wallet/changepassword endpoint to change the wallet's password.
func (*Client) WalletInitPost ¶
WalletInitPost uses the /wallet/init endpoint to initialize and encrypt a wallet
func (*Client) WalletInitSeedPost ¶
WalletInitSeedPost uses the /wallet/init/seed endpoint to initialize and encrypt a wallet using a given seed.
func (*Client) WalletLockPost ¶
WalletLockPost uses the /wallet/lock endpoint to lock the wallet.
func (*Client) WalletSeedPost ¶
WalletSeedPost uses the /wallet/seed endpoint to add a seed to the wallet's list of seeds.
func (*Client) WalletSeedsGet ¶
func (c *Client) WalletSeedsGet() (wsg api.WalletSeedsGET, err error)
WalletSeedsGet uses the /wallet/seeds endpoint to return the wallet's current seeds.
func (*Client) WalletSiacoinsMultiPost ¶
func (c *Client) WalletSiacoinsMultiPost(outputs []types.SiacoinOutput) (wsp api.WalletSiacoinsPOST, err error)
WalletSiacoinsMultiPost uses the /wallet/siacoin api endpoint to send money to multiple addresses at once
func (*Client) WalletSiacoinsPost ¶
func (c *Client) WalletSiacoinsPost(amount types.Currency, destination types.UnlockHash) (wsp api.WalletSiacoinsPOST, err error)
WalletSiacoinsPost uses the /wallet/spacecash api endpoint to send money to a single address
func (*Client) WalletSiagKeyPost ¶
WalletSiagKeyPost uses the /wallet/siagkey endpoint to load a siag key into the wallet.
func (*Client) WalletSignPost ¶
func (c *Client) WalletSignPost(txn types.Transaction, toSign []crypto.Hash) (wspr api.WalletSignPOSTResp, err error)
WalletSignPost uses the /wallet/sign api endpoint to sign a transaction.
func (*Client) WalletSweepPost ¶
func (c *Client) WalletSweepPost(seed string) (wsp api.WalletSweepPOST, err error)
WalletSweepPost uses the /wallet/sweep/seed endpoint to sweep a seed into the current wallet.
func (*Client) WalletTransactionGet ¶
func (c *Client) WalletTransactionGet(id types.TransactionID) (wtg api.WalletTransactionGETid, err error)
WalletTransactionGet requests the /wallet/transaction/:id api resource for a certain TransactionID.
func (*Client) WalletTransactionsGet ¶
func (c *Client) WalletTransactionsGet(startHeight types.BlockHeight, endHeight types.BlockHeight) (wtg api.WalletTransactionsGET, err error)
WalletTransactionsGet requests the/wallet/transactions api resource for a certain startheight and endheight
func (*Client) WalletUnlockConditionsGet ¶
func (c *Client) WalletUnlockConditionsGet(addr types.UnlockHash) (wucg api.WalletUnlockConditionsGET, err error)
WalletUnlockConditionsGet requests the /wallet/unlockconditions endpoint and returns the UnlockConditions of addr.
func (*Client) WalletUnlockPost ¶
WalletUnlockPost uses the /wallet/unlock endpoint to unlock the wallet with a given encryption key. Per default this key is the seed.
func (*Client) WalletUnspentGet ¶
func (c *Client) WalletUnspentGet() (wug api.WalletUnspentGET, err error)
WalletUnspentGet requests the /wallet/unspent endpoint and returns all of the unspent outputs related to the wallet.
func (*Client) WalletWatchGet ¶
func (c *Client) WalletWatchGet() (wwg api.WalletWatchGET, err error)
WalletWatchGet requests the /wallet/watch endpoint and returns the set of currently watched addresses.
func (*Client) WalletWatchPost ¶
func (c *Client) WalletWatchPost(addrs []types.UnlockHash, remove, unused bool) error
WalletWatchPost uses the /wallet/watch endpoint to add or remove a set of addresses from the watch set. The unused flag should be set to true if the addresses have never appeared in the blockchain.