Documentation
¶
Overview ¶
package types contains all json structs used by the proxy server for input and output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericResponse ¶
type GenericResponse struct {
Code int32 `json:"code"` // TODO: rethink this (0 = success)
Data []byte `json:"data"` // TODO: make sure this is hex encoded
Log string `json:"log"`
}
GenericResponse is returned for 4xx and 5xx errors And the following 2xx results: BroadcastResult
type PostTxRequest ¶
type PostTxRequest struct {
Name string `json:"name" validate:"required,min=4"`
Passphrase string `json:"passphrase" validate:"required,min=10"`
Data json.RawMessage `json:"data" validate:"required"` // this is handled by SignableReader
}
PostTxRequest is sent to sign and post a new transaction
type QueryResponse ¶
type QueryResponse struct {
Height uint64 `json:"height"`
Key data.Bytes `json:"key"` // TODO: make sure this is hex encoded
Value json.RawMessage `json:"value"` // this is from ValueReader
Proven bool `json:"proven"` // only true if we verified all headers
}
QueryResponse is returned on success (GenericResponse on failure) Also returned for proofs, with Proven = true
Click to show internal directories.
Click to hide internal directories.