core

package
v0.0.0-...-7c12c5a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0, GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = map[string]*rpc.RPCFunc{
	"status":                  rpc.NewRPCFunc(Status, []string{}),
	"net_info":                rpc.NewRPCFunc(NetInfo, []string{}),
	"blockchain":              rpc.NewRPCFunc(BlockchainInfo, []string{"minHeight", "maxHeight"}),
	"genesis":                 rpc.NewRPCFunc(Genesis, []string{}),
	"get_block":               rpc.NewRPCFunc(GetBlock, []string{"height"}),
	"get_account":             rpc.NewRPCFunc(GetAccount, []string{"address"}),
	"get_storage":             rpc.NewRPCFunc(GetStorage, []string{"address", "key"}),
	"call":                    rpc.NewRPCFunc(Call, []string{"fromAddress", "toAddress", "data"}),
	"call_code":               rpc.NewRPCFunc(CallCode, []string{"fromAddress", "code", "data"}),
	"list_validators":         rpc.NewRPCFunc(ListValidators, []string{}),
	"dump_consensus_state":    rpc.NewRPCFunc(DumpConsensusState, []string{}),
	"dump_storage":            rpc.NewRPCFunc(DumpStorage, []string{"address"}),
	"broadcast_tx":            rpc.NewRPCFunc(BroadcastTx, []string{"tx"}),
	"list_unconfirmed_txs":    rpc.NewRPCFunc(ListUnconfirmedTxs, []string{}),
	"list_accounts":           rpc.NewRPCFunc(ListAccounts, []string{}),
	"get_name":                rpc.NewRPCFunc(GetName, []string{"name"}),
	"list_names":              rpc.NewRPCFunc(ListNames, []string{}),
	"unsafe/gen_priv_account": rpc.NewRPCFunc(GenPrivAccount, []string{}),
	"unsafe/sign_tx":          rpc.NewRPCFunc(SignTx, []string{"tx", "privAccounts"}),
}

TODO: eliminate redundancy between here and reading code from core/

Functions

func BlockchainInfo

func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)

func BroadcastTx

func BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error)

Note: tx must be signed

func Call

func Call(fromAddress, toAddress, data []byte) (*ctypes.ResultCall, error)

Run a contract's code on an isolated and unpersisted state Cannot be used to create new contracts

func CallCode

func CallCode(fromAddress, code, data []byte) (*ctypes.ResultCall, error)

Run the given code on an isolated and unpersisted state Cannot be used to create new contracts

func DumpConsensusState

func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)

func DumpStorage

func DumpStorage(address []byte) (*ctypes.ResultDumpStorage, error)

func GenPrivAccount

func GenPrivAccount() (*ctypes.ResultGenPrivAccount, error)

func Genesis

func Genesis() (*ctypes.ResultGenesis, error)

func GetAccount

func GetAccount(address []byte) (*ctypes.ResultGetAccount, error)

If the account is not known, returns nil, nil.

func GetBlock

func GetBlock(height int) (*ctypes.ResultGetBlock, error)

func GetName

func GetName(name string) (*ctypes.ResultGetName, error)

func GetStorage

func GetStorage(address, key []byte) (*ctypes.ResultGetStorage, error)

func ListAccounts

func ListAccounts() (*ctypes.ResultListAccounts, error)

func ListNames

func ListNames() (*ctypes.ResultListNames, error)

func ListUnconfirmedTxs

func ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error)

func ListValidators

func ListValidators() (*ctypes.ResultListValidators, error)

func NetInfo

func NetInfo() (*ctypes.ResultNetInfo, error)

func SetBlockStore

func SetBlockStore(bs *bc.BlockStore)

func SetConsensusReactor

func SetConsensusReactor(cr *consensus.ConsensusReactor)

func SetConsensusState

func SetConsensusState(cs *consensus.ConsensusState)

func SetGenDoc

func SetGenDoc(doc *stypes.GenesisDoc)

func SetMempoolReactor

func SetMempoolReactor(mr *mempl.MempoolReactor)

func SetPrivValidator

func SetPrivValidator(pv *types.PrivValidator)

func SetSwitch

func SetSwitch(sw *p2p.Switch)

func SignTx

func SignTx(tx types.Tx, privAccounts []*acm.PrivAccount) (*ctypes.ResultSignTx, error)

func Status

func Status() (*ctypes.ResultStatus, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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