Documentation
¶
Index ¶
- type ErrorCode
- type ErrorResponse
- type FeeAddressRequest
- type FeeAddressResponse
- type PayFeeRequest
- type PayFeeResponse
- type SetAltSignAddrRequest
- type SetAltSignAddrResponse
- type SetVoteChoicesRequest
- type SetVoteChoicesResponse
- type TicketStatusRequest
- type TicketStatusResponse
- type VspInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorCode ¶
type ErrorCode int64
ErrorCode is an integer which represents a kind of error which may be encountered by vspd.
const ( ErrBadRequest ErrorCode = iota ErrInternalError ErrVspClosed ErrFeeAlreadyReceived ErrInvalidFeeTx ErrFeeTooSmall ErrUnknownTicket ErrTicketCannotVote ErrFeeExpired ErrInvalidVoteChoices ErrBadSignature ErrInvalidPrivKey ErrFeeNotReceived ErrInvalidTicket ErrCannotBroadcastTicket ErrCannotBroadcastFee ErrCannotBroadcastFeeUnknownOutputs ErrInvalidTimestamp )
func (ErrorCode) DefaultMessage ¶
DefaultMessage returns a descriptive error string for a given error code.
func (ErrorCode) HTTPStatus ¶
HTTPStatus returns a corresponding HTTP status code for a given error code.
type ErrorResponse ¶
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type FeeAddressRequest ¶
type FeeAddressResponse ¶
type PayFeeRequest ¶
type PayFeeRequest struct {
Timestamp int64 `json:"timestamp" binding:"required"`
TicketHash string `json:"tickethash" binding:"required"`
FeeTx string `json:"feetx" binding:"required"`
VotingKey string `json:"votingkey" binding:"required"`
VoteChoices map[string]string `json:"votechoices" binding:"required"`
TSpendPolicy map[string]string `json:"tspendpolicy" binding:"max=3"`
TreasuryPolicy map[string]string `json:"treasurypolicy" binding:"max=3"`
}
type PayFeeResponse ¶
type SetAltSignAddrRequest ¶
type SetAltSignAddrRequest struct {
Timestamp int64 `json:"timestamp" binding:"required"`
TicketHash string `json:"tickethash" binding:"required"`
TicketHex string `json:"tickethex" binding:"required"`
ParentHex string `json:"parenthex" binding:"required"`
AltSignAddress string `json:"altsignaddress" binding:"required"`
}
type SetAltSignAddrResponse ¶
type SetVoteChoicesRequest ¶
type SetVoteChoicesRequest struct {
Timestamp int64 `json:"timestamp" binding:"required"`
TicketHash string `json:"tickethash" binding:"required"`
VoteChoices map[string]string `json:"votechoices" binding:"required"`
TSpendPolicy map[string]string `json:"tspendpolicy" binding:"max=3"`
TreasuryPolicy map[string]string `json:"treasurypolicy" binding:"max=3"`
}
type SetVoteChoicesResponse ¶
type TicketStatusRequest ¶
type TicketStatusRequest struct {
TicketHash string `json:"tickethash" binding:"required"`
}
type TicketStatusResponse ¶
type TicketStatusResponse struct {
Timestamp int64 `json:"timestamp"`
TicketConfirmed bool `json:"ticketconfirmed"`
FeeTxStatus string `json:"feetxstatus"`
FeeTxHash string `json:"feetxhash"`
AltSignAddress string `json:"altsignaddress"`
VoteChoices map[string]string `json:"votechoices"`
TSpendPolicy map[string]string `json:"tspendpolicy"`
TreasuryPolicy map[string]string `json:"treasurypolicy"`
Request []byte `json:"request"`
}
type VspInfoResponse ¶
type VspInfoResponse struct {
APIVersions []int64 `json:"apiversions"`
Timestamp int64 `json:"timestamp"`
PubKey []byte `json:"pubkey"`
FeePercentage float64 `json:"feepercentage"`
VspClosed bool `json:"vspclosed"`
VspClosedMsg string `json:"vspclosedmsg"`
Network string `json:"network"`
VspdVersion string `json:"vspdversion"`
Voting int64 `json:"voting"`
Voted int64 `json:"voted"`
TotalVotingWallets int64 `json:"totalvotingwallets"`
VotingWalletsOnline int64 `json:"votingwalletsonline"`
Expired int64 `json:"expired"`
Missed int64 `json:"missed"`
BlockHeight uint32 `json:"blockheight"`
NetworkProportion float32 `json:"estimatednetworkproportion"`
}
Click to show internal directories.
Click to hide internal directories.