Documentation
¶
Index ¶
- type ABCI
- func (app *ABCI) BeginBlock(request RequestBeginBlock) ResponseBeginBlock
- func (app *ABCI) CheckTx(tx []byte) ResponseCheckTx
- func (app *ABCI) Commit() ResponseCommit
- func (app *ABCI) DeliverTx(tx []byte) ResponseDeliverTx
- func (app *ABCI) EndBlock(request RequestEndBlock) ResponseEndBlock
- func (app *ABCI) Info(request RequestInfo) ResponseInfo
- func (app *ABCI) InitChain(request RequestInitChain) ResponseInitChain
- func (app *ABCI) Query(request RequestQuery) ResponseQuery
- func (app *ABCI) SetOption(request RequestSetOption) ResponseSetOption
- type ABCIApp
- type App
- type Code
- type Handler
- type Header
- type NodeContext
- type RPCServerContext
- func (h *RPCServerContext) AddAccount(acc accounts.Account, resp *data.Response) error
- func (h *RPCServerContext) Balance(key []byte, resp *data.Response) error
- func (h *RPCServerContext) DeleteAccount(acc accounts.Account, resp *data.Response) error
- func (h *RPCServerContext) ListAccounts(req data.Request, resp *data.Response) error
- func (h *RPCServerContext) NodeAddress(req data.Request, resp *data.Response) error
- func (h *RPCServerContext) NodeID(req data.Request, resp *data.Response) error
- func (h *RPCServerContext) NodeName(req data.Request, resp *data.Response) error
- func (h *RPCServerContext) SendTx(args client.SendArguments, resp *data.Response) error
- type RequestBeginBlock
- type RequestCheckTx
- type RequestDeliverTx
- type RequestEndBlock
- type RequestInfo
- type RequestInitChain
- type RequestQuery
- type RequestSetOption
- type ResponseBeginBlock
- type ResponseCheckTx
- type ResponseCommit
- type ResponseDeliverTx
- type ResponseEndBlock
- type ResponseInfo
- type ResponseInitChain
- type ResponseQuery
- type ResponseSetOption
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCI ¶
type ABCI struct {
// contains filtered or unexported fields
}
ABCI is used as an input for creating a new node
func (*ABCI) BeginBlock ¶
func (app *ABCI) BeginBlock(request RequestBeginBlock) ResponseBeginBlock
func (*ABCI) CheckTx ¶
func (app *ABCI) CheckTx(tx []byte) ResponseCheckTx
func (*ABCI) Commit ¶
func (app *ABCI) Commit() ResponseCommit
func (*ABCI) DeliverTx ¶
func (app *ABCI) DeliverTx(tx []byte) ResponseDeliverTx
func (*ABCI) EndBlock ¶
func (app *ABCI) EndBlock(request RequestEndBlock) ResponseEndBlock
func (*ABCI) Info ¶
func (app *ABCI) Info(request RequestInfo) ResponseInfo
func (*ABCI) InitChain ¶
func (app *ABCI) InitChain(request RequestInitChain) ResponseInitChain
func (*ABCI) Query ¶
func (app *ABCI) Query(request RequestQuery) ResponseQuery
func (*ABCI) SetOption ¶
func (app *ABCI) SetOption(request RequestSetOption) ResponseSetOption
type ABCIApp ¶
type ABCIApp = abci.Application
type App ¶
type App struct {
Context context
// contains filtered or unexported fields
}
func NewApp ¶
func NewApp(cfg *config.Server, nodeContext *NodeContext) (*App, error)
New returns new app fresh and ready to start
type NodeContext ¶
type NodeContext struct {
NodeName string
// contains filtered or unexported fields
}
NodeContext holds key information about the running node. This is generally used to to access its address and perform signing functions
func NewNodeContext ¶
func NewNodeContext(cfg *config.Server) (*NodeContext, error)
NewNodeContext returns a NodeContext by reading from the specified configuration files. This function WILL exit if the private validator key files (priv_validator_state, and priv_validator_key) don't exist in the configured location
func (NodeContext) Address ¶
func (n NodeContext) Address() keys.Address
Address returns the address of the node's public key (the key's hash)
func (NodeContext) PrivKey ¶
func (n NodeContext) PrivKey() keys.PrivateKey
func (NodeContext) PrivVal ¶
func (n NodeContext) PrivVal() *privval.FilePV
PrivVal returns the private validator file
func (NodeContext) PubKey ¶
func (n NodeContext) PubKey() keys.PublicKey
PubKey returns the public key of the node's NodeKey
func (NodeContext) ValidatorAddress ¶
func (n NodeContext) ValidatorAddress() keys.Address
type RPCServerContext ¶
type RPCServerContext struct {
// contains filtered or unexported fields
}
func NewClientHandler ¶
func NewClientHandler(nodeName string, balances *balance.Store, accounts accounts.Wallet, currencies *balance.CurrencyList, cfg config.Server, nodeContext NodeContext) *RPCServerContext
func (*RPCServerContext) AddAccount ¶
AddAccount adds an account to accounts store of the node
func (*RPCServerContext) Balance ¶
func (h *RPCServerContext) Balance(key []byte, resp *data.Response) error
GetBalance gets the balance of an address TODO make it more generic to handle account name and identity
func (*RPCServerContext) DeleteAccount ¶
DeleteAccount deletes an account from the accounts store of node
func (*RPCServerContext) ListAccounts ¶
ListAccounts returns a list of all accounts in the accounts store of node
func (*RPCServerContext) NodeAddress ¶
func (*RPCServerContext) NodeName ¶
NodeName returns the name of a node. This is useful for displaying it at cmdline.
func (*RPCServerContext) SendTx ¶
func (h *RPCServerContext) SendTx(args client.SendArguments, resp *data.Response) error
type RequestBeginBlock ¶
type RequestBeginBlock = abci.RequestBeginBlock
type RequestCheckTx ¶
type RequestCheckTx = abci.RequestCheckTx
type RequestDeliverTx ¶
type RequestDeliverTx = abci.RequestDeliverTx
type RequestEndBlock ¶
type RequestEndBlock = abci.RequestEndBlock
type RequestInfo ¶
type RequestInfo = abci.RequestInfo
type RequestInitChain ¶
type RequestInitChain = abci.RequestInitChain
type RequestQuery ¶
type RequestQuery = abci.RequestQuery
type RequestSetOption ¶
type RequestSetOption = abci.RequestSetOption
type ResponseBeginBlock ¶
type ResponseBeginBlock = abci.ResponseBeginBlock
type ResponseCheckTx ¶
type ResponseCheckTx = abci.ResponseCheckTx
type ResponseCommit ¶
type ResponseCommit = abci.ResponseCommit
type ResponseDeliverTx ¶
type ResponseDeliverTx = abci.ResponseDeliverTx
type ResponseEndBlock ¶
type ResponseEndBlock = abci.ResponseEndBlock
type ResponseInfo ¶
type ResponseInfo = abci.ResponseInfo
type ResponseInitChain ¶
type ResponseInitChain = abci.ResponseInitChain
type ResponseQuery ¶
type ResponseQuery = abci.ResponseQuery
type ResponseSetOption ¶
type ResponseSetOption = abci.ResponseSetOption