api

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcement added in v0.7.0

type Announcement struct {
	Text    string `json:"text"`
	Expires uint64 `json:"expires"`
}

Announcement contains the information about a portal announcement.

type ConsensusTipResponse added in v0.11.3

type ConsensusTipResponse struct {
	Height  uint64        `json:"height"`
	BlockID types.BlockID `json:"id"`
	Synced  bool          `json:"synced"`
}

ConsensusTipResponse is the response type for /consensus/tip.

type DaemonVersion

type DaemonVersion struct {
	Version     string `json:"version"`
	GitRevision string `json:"gitRevision"`
	BuildTime   string `json:"buildTime"`
}

DaemonVersion holds the version information for satd.

type EmailPreferences

type EmailPreferences struct {
	Email         string         `json:"email"`
	WarnThreshold types.Currency `json:"threshold"`
}

EmailPreferences contains the email preferences.

type ExchangeRate

type ExchangeRate struct {
	Currency string  `json:"currency"`
	Rate     float64 `json:"rate"`
}

ExchangeRate contains the exchange rate of a given currency.

type ExtendedHostDBEntry

type ExtendedHostDBEntry struct {
	modules.HostDBEntry
	PublicKeyString string `json:"publickeystring"`
}

ExtendedHostDBEntry is an extension to modules.HostDBEntry that includes the string representation of the public key.

type HostAverages

type HostAverages struct {
	modules.HostAverages
	Rate float64 `json:"rate"`
}

HostAverages contains the host network averages.

type HostdbFilterModeGET

type HostdbFilterModeGET struct {
	FilterMode   string   `json:"filtermode"`
	Hosts        []string `json:"hosts"`
	NetAddresses []string `json:"netaddresses"`
}

HostdbFilterModeGET contains the information about the HostDB's filtermode.

type HostdbFilterModePOST

type HostdbFilterModePOST struct {
	FilterMode   string            `json:"filtermode"`
	Hosts        []types.PublicKey `json:"hosts"`
	NetAddresses []string          `json:"netaddresses"`
}

HostdbFilterModePOST contains the information needed to set the the FilterMode of the hostDB.

type HostdbGET added in v0.11.3

type HostdbGET struct {
	BlockHeight         uint64 `json:"blockheight"`
	InitialScanComplete bool   `json:"initialscancomplete"`
}

HostdbGET holds information about the hostdb.

type HostdbHostGET added in v0.11.3

type HostdbHostGET struct {
	Entry          ExtendedHostDBEntry        `json:"entry"`
	ScoreBreakdown modules.HostScoreBreakdown `json:"scorebreakdown"`
}

HostdbHostGET lists detailed statistics for a particular host, selected by pubkey.

type HostdbHostsGET

type HostdbHostsGET struct {
	Hosts []ExtendedHostDBEntry `json:"hosts"`
}

HostdbHostsGET lists active hosts on the network.

type Renter

type Renter struct {
	Email     string          `json:"email"`
	PublicKey types.PublicKey `json:"publickey"`
}

Renter contains information about the renter.

type RenterContract

type RenterContract struct {
	// Amount of contract funds that have been spent on downloads.
	DownloadSpending types.Currency `json:"downloadspending"`
	// Block height that the file contract ends on.
	EndHeight uint64 `json:"endheight"`
	// Fees paid in order to form the file contract.
	Fees types.Currency `json:"fees"`
	// Amount of contract funds that have been spent on funding an ephemeral
	// account on the host.
	FundAccountSpending types.Currency `json:"fundaccountspending"`
	// Public key of the renter that formed the contract.
	RenterPublicKey types.PublicKey `json:"renterpublickey"`
	// Public key of the host the contract was formed with.
	HostPublicKey types.PublicKey `json:"hostpublickey"`
	// HostVersion is the version of Sia that the host is running.
	HostVersion string `json:"hostversion"`
	// ID of the file contract.
	ID types.FileContractID `json:"id"`
	// A signed transaction containing the most recent contract revision.
	LastTransaction types.Transaction `json:"lasttransaction"`
	// Amount of contract funds that have been spent on maintenance tasks
	// such as updating the price table or syncing the ephemeral account
	// balance.
	MaintenanceSpending modules.MaintenanceSpending `json:"maintenancespending"`
	// Address of the host the file contract was formed with.
	NetAddress string `json:"netaddress"`
	// Remaining funds left to spend on uploads & downloads.
	RenterFunds types.Currency `json:"renterfunds"`
	// Size of the file contract, which is typically equal to the number of
	// bytes that have been uploaded to the host.
	Size uint64 `json:"size"`
	// Block height that the file contract began on.
	StartHeight uint64 `json:"startheight"`
	// Amount of contract funds that have been spent on storage.
	StorageSpending types.Currency `json:"storagespending"`
	// Total cost to the wallet of forming the file contract.
	TotalCost types.Currency `json:"totalcost"`
	// Amount of contract funds that have been spent on uploads.
	UploadSpending types.Currency `json:"uploadspending"`
	// Signals if contract is good for uploading data.
	GoodForUpload bool `json:"goodforupload"`
	// Signals if contract is good for a renewal.
	GoodForRenew bool `json:"goodforrenew"`
	// Signals if a contract has been marked as bad.
	BadContract bool `json:"badcontract"`
}

RenterContract represents a contract formed by the renter.

type RenterContracts

type RenterContracts struct {
	ActiveContracts           []RenterContract `json:"activecontracts"`
	PassiveContracts          []RenterContract `json:"passivecontracts"`
	RefreshedContracts        []RenterContract `json:"refreshedcontracts"`
	DisabledContracts         []RenterContract `json:"disabledcontracts"`
	ExpiredContracts          []RenterContract `json:"expiredcontracts"`
	ExpiredRefreshedContracts []RenterContract `json:"expiredrefreshedcontracts"`
}

RenterContracts contains the renter's contracts.

type RentersGET

type RentersGET struct {
	Renters []Renter `json:"renters"`
}

RentersGET contains the list of the renters.

type SyncerPeer added in v0.11.3

type SyncerPeer struct {
	Address string `json:"address"`
	Version string `json:"version"`
	Inbound bool   `json:"inbound"`
}

SyncerPeer contains the information about a peer.

type TxpoolBroadcastRequest added in v0.11.3

type TxpoolBroadcastRequest struct {
	Transactions   []types.Transaction   `json:"transactions"`
	V2Transactions []types.V2Transaction `json:"v2transactions"`
}

TxpoolBroadcastRequest is the request type for /txpool/broadcast.

type TxpoolTransactionsResponse added in v0.11.3

type TxpoolTransactionsResponse struct {
	Transactions   []types.Transaction   `json:"transactions"`
	V2Transactions []types.V2Transaction `json:"v2transactions"`
}

TxpoolTransactionsResponse is the response type for /txpool/transactions.

type WalletBalanceResponse added in v0.11.3

type WalletBalanceResponse struct {
	Height           uint64         `json:"height"`
	Siacoins         types.Currency `json:"siacoins"`
	ImmatureSiacoins types.Currency `json:"immatureSiacoins"`
	IncomingSiacoins types.Currency `json:"incomingSiacoins"`
	OutgoingSiacoins types.Currency `json:"outgoingSiacoins"`
	Siafunds         uint64         `json:"siafunds"`
	RecommendedFee   types.Currency `json:"recommendedFee"`
}

WalletBalanceResponse is the response type for /wallet/balance.

type WalletOutputsResponse added in v0.11.3

type WalletOutputsResponse struct {
	SiacoinOutputs []types.SiacoinElement `json:"siacoinOutputs"`
	SiafundOutputs []types.SiafundElement `json:"siafundOutputs"`
}

WalletOutputsResponse is the response type for /wallet/outputs.

type WalletSendRequest added in v0.11.3

type WalletSendRequest struct {
	Amount      types.Currency `json:"amount"`
	Destination types.Address  `json:"destination"`
}

WalletSendRequest is the request type for /wallet/send.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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