Documentation
¶
Index ¶
- Constants
- func ResultToError(result interface{}) error
- func Upgrader() *ws.Upgrader
- func XOR(bytes []byte, items ...string) []byte
- type Account
- type AccountGetter
- type AccountGetterSetter
- type AccountSetter
- type Action
- func (a Action) ID(chainID string) []byte
- func (a Action) Prepare(pubKey crypto.PubKey, seq int)
- func (a Action) Sign(privKey crypto.PrivKey, chainID string)
- func (a Action) SignBytes(chainID string) []byte
- func (a Action) String() string
- func (a Action) StringIndented(indent string) string
- func (a Action) Tx() tndr.Tx
- type ActionInput
- type Cache
- type Form
- type Idpair
- type Info
- type KVList
- type KVMap
- type KVNode
- type Keypair
- type Logger
- type MemStore
- type Message
- func MessageChainID(err error) *Message
- func MessageCreateAccount(data *Keypair, err error) *Message
- func MessageFindForm(data *Form, err error) *Message
- func MessageIssues(data []string, err error) *Message
- func MessageLogin(err error) *Message
- func MessageRemoveAccount(err error) *Message
- func MessageSubmitForm(data *Idpair, err error) *Message
- type PrivAccount
- type Proxy
- func (p *Proxy) BroadcastTx(mode string, tx tndr.Tx) (*ctypes.ResultBroadcastTx, error)
- func (p *Proxy) GetBlock(height int) (*ctypes.ResultBlock, error)
- func (p *Proxy) GetChain(min, max int) (*ctypes.ResultBlockchainInfo, error)
- func (p *Proxy) GetStatus() (*ctypes.ResultStatus, error)
- func (p *Proxy) GetValidators() (*ctypes.ResultValidators, error)
- func (p *Proxy) ReadResult(event string, evData tndr.TMEventData) (tndr.TMEventData, error)
- func (p *Proxy) StartWS() (err error)
- func (p *Proxy) StopWS() error
- func (p *Proxy) SubscribeNewBlock() error
- func (p *Proxy) TMSPQuery(query []byte) (*ctypes.ResultTMSPQuery, error)
- func (p *Proxy) UnsubscribeNewBlock() error
- func (p *Proxy) WriteWS(mode string, v interface{}) error
- type Receipt
- type Search
- type Store
- type Update
Constants ¶
View Source
const ( ActionCreateAccount = 0x01 ActionRemoveAccount = 0x02 ActionSubmitForm = 0x03 )
View Source
const FORM_ID_LENGTH = 16
View Source
const MaxBlocks = 50
View Source
const MinTxLength = 20
Variables ¶
This section is empty.
Functions ¶
func ResultToError ¶
func ResultToError(result interface{}) error
Types ¶
type Account ¶
type AccountGetter ¶
type AccountGetterSetter ¶
type AccountSetter ¶
type Action ¶
type Action struct {
Type byte `json: "type"`
Input *ActionInput `json: "input"`
Data []byte `json: "data"`
}
func (Action) StringIndented ¶
type ActionInput ¶
type ActionInput struct {
Address []byte `json: "address"`
Sequence int `json: "sequence"`
Signature crypto.Signature `json: "signature"`
PubKey crypto.PubKey `json: "public-key"`
}
func (ActionInput) String ¶
func (in ActionInput) String() string
func (ActionInput) StringIndented ¶
func (in ActionInput) StringIndented(indent string) string
func (ActionInput) ValidateBasic ¶
func (in ActionInput) ValidateBasic() tmsp.Result
type Form ¶
type Form struct {
ContentType string `json:"content_type, omitempty"`
Data []byte `json:"data, omitempty"`
Description string `json:"description"`
Issue string `json:"issue"`
Location string `json:"location"`
SubmittedAt string `json:"submitted_at"`
Submitter string `json:"submitter"`
}
func (Form) StringIndented ¶
type Info ¶
type MemStore ¶
type MemStore struct {
// contains filtered or unexported fields
}
func NewMemStore ¶
func NewMemStore() *MemStore
type Message ¶
type Message struct {
Action string `json:"action"`
Data interface{} `json:"data, omitempty"`
Error error `json:"error, omitempty"`
}
func MessageChainID ¶
func MessageCreateAccount ¶
func MessageFindForm ¶
func MessageIssues ¶
func MessageLogin ¶
func MessageRemoveAccount ¶
func MessageSubmitForm ¶
type PrivAccount ¶
func NewPrivAccount ¶
func NewPrivAccount(acc *Account, privKey crypto.PrivKey) *PrivAccount
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) BroadcastTx ¶
func (*Proxy) GetChain ¶
func (p *Proxy) GetChain(min, max int) (*ctypes.ResultBlockchainInfo, error)
func (*Proxy) GetValidators ¶
func (p *Proxy) GetValidators() (*ctypes.ResultValidators, error)
func (*Proxy) ReadResult ¶
func (p *Proxy) ReadResult(event string, evData tndr.TMEventData) (tndr.TMEventData, error)
func (*Proxy) SubscribeNewBlock ¶
func (*Proxy) UnsubscribeNewBlock ¶
type Receipt ¶
type Receipt struct {
AppHash []byte `json:"app_hash"`
BlockHeight int `json:"block_height"`
FormID string `json:"form_id"`
}
func NewReceipt ¶
Click to show internal directories.
Click to hide internal directories.