Documentation ¶
Index ¶
- Constants
- Variables
- func BuildMultisig(fromAddr, jsonMessage, passphrase, chainID string, pk crypto.PublicKeyMultiSig, ...) ([]byte, error)
- func Codec() *codec.Codec
- func Confirmation() bool
- func Credentials(pwd string) string
- func DeleteHostedChains()
- func GenerateAAT(appPubKey, clientPubKey string, key crypto.PrivateKey) (aatjson []byte, err error)
- func GenerateHostedChains() (chains []types.HostedBlockchain)
- func GenesisFileToGenDoc(genFile string) *tmtypes.GenesisDoc
- func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage)
- func GetAuthTokenFromFile() sdk.AuthToken
- func GetDefaultConfig(datadir string) string
- func GetKeybase() (kb.Keybase, error)
- func GetPrivValFile() (file privval.FilePVKey)
- func InitApp(datadir, tmNode, persistentPeers, seeds, remoteCLIURL string, keybase bool, ...) *node.Node
- func InitAuthToken()
- func InitConfig(datadir, tmNode, persistentPeers, seeds, remoteCLIURL string)
- func InitGenesis(genesisType GenesisType)
- func InitKeyfiles()
- func InitLogger() (logger log.Logger)
- func InitPocketCoreConfig(chains *types.HostedBlockchains, logger log.Logger)
- func InitTendermint(keybase bool, chains *types.HostedBlockchains, logger log.Logger) *node.Node
- func MakeCodec()
- func MustGetKeybase() kb.Keybase
- func NewHostedChains(generate bool) *types.HostedBlockchains
- func NewInvalidChainsError(err error) error
- func OpenApplicationDB(config sdk.Config) (dbm.DB, error)
- func OpenTxIndexerDB(config sdk.Config) (dbm.DB, error)
- func ResetAll(dbDir, addrBookFile, privValKeyFile, privValStateFile string, ...)
- func ResetWorldState(cmd *cobra.Command, args []string)
- func SetValidator(address sdk.Address, passphrase string)
- func ShutdownPocketCore()
- func SignMultisigNext(fromAddr, txHex, passphrase, chainID string, legacyCodec bool) ([]byte, error)
- func SignMultisigOutOfOrder(fromAddr, txHex, passphrase, chainID string, keys []crypto.PublicKey, ...) ([]byte, error)
- func SortJSON(toSortJSON []byte) string
- func UnmarshalTx(txBytes []byte, height int64) types.StdTx
- func UnmarshalTxStr(txStr string, height int64) types.StdTx
- func UnsafeRollbackData(config *cfg.Config, modifyStateFile bool, height int64) error
- func UpdateConfig(datadir string)
- type AllParamsReturn
- type AppCreator
- type Config
- type GenesisState
- type GenesisType
- type Page
- type PocketCoreApp
- func (app *PocketCoreApp) BeginBlocker(ctx sdk.Ctx, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *PocketCoreApp) EndBlocker(ctx sdk.Ctx, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *PocketCoreApp) ExportAppState(height int64, forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, err error)
- func (app *PocketCoreApp) ExportState(height int64, chainID string) (string, error)
- func (app *PocketCoreApp) GetClient() client.Client
- func (app PocketCoreApp) HandleChallenge(c pocketTypes.ChallengeProofInvalidData) (res *pocketTypes.ChallengeResponse, err error)
- func (app PocketCoreApp) HandleDispatch(header pocketTypes.SessionHeader) (res *pocketTypes.DispatchResponse, err error)
- func (app PocketCoreApp) HandleRelay(r pocketTypes.Relay) (res *pocketTypes.RelayResponse, dispatch *pocketTypes.DispatchResponse, ...)
- func (app *PocketCoreApp) InitChainer(ctx sdk.Ctx, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *PocketCoreApp) InitChainerWithGenesis(ctx sdk.Ctx, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *PocketCoreApp) ModuleAccountAddrs() map[string]bool
- func (app *PocketCoreApp) NewContext(height int64) (sdk.Ctx, error)
- func (app PocketCoreApp) QueryACL(height int64) (res types.ACL, err error)
- func (app PocketCoreApp) QueryAccount(addr string, height int64) (res *exported.Account, err error)
- func (app PocketCoreApp) QueryAccountTxs(addr string, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
- func (app PocketCoreApp) QueryAllParams(height int64) (r AllParamsReturn, err error)
- func (app PocketCoreApp) QueryApp(addr string, height int64) (res appsTypes.Application, err error)
- func (app PocketCoreApp) QueryAppParams(height int64) (res appsTypes.Params, err error)
- func (app PocketCoreApp) QueryApps(height int64, opts appsTypes.QueryApplicationsWithOpts) (res Page, err error)
- func (app PocketCoreApp) QueryBalance(addr string, height int64) (res sdk.BigInt, err error)
- func (app PocketCoreApp) QueryBlock(height *int64) (blockJSON []byte, err error)
- func (app PocketCoreApp) QueryBlockTxs(height int64, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
- func (app PocketCoreApp) QueryClaim(address, appPubkey, chain, evidenceType string, sessionBlockHeight int64, ...) (res *pocketTypes.MsgClaim, err error)
- func (app PocketCoreApp) QueryClaims(address string, height int64, page, perPage int) (res Page, err error)
- func (app PocketCoreApp) QueryDaoBalance(height int64) (res sdk.BigInt, err error)
- func (app PocketCoreApp) QueryDaoOwner(height int64) (res sdk.Address, err error)
- func (app PocketCoreApp) QueryHeight() (res int64, err error)
- func (app PocketCoreApp) QueryNode(addr string, height int64) (res nodesTypes.Validator, err error)
- func (app PocketCoreApp) QueryNodeParams(height int64) (res nodesTypes.Params, err error)
- func (app PocketCoreApp) QueryNodeStatus() (res *core_types.ResultStatus, err error)
- func (app PocketCoreApp) QueryNodes(height int64, opts nodesTypes.QueryValidatorsParams) (res Page, err error)
- func (app PocketCoreApp) QueryParam(height int64, paramkey string) (r SingleParamReturn, err error)
- func (app PocketCoreApp) QueryPocketParams(height int64) (res pocketTypes.Params, err error)
- func (app PocketCoreApp) QueryPocketSupportedBlockchains(height int64) (res []string, err error)
- func (app PocketCoreApp) QueryRecipientTxs(addr string, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
- func (app PocketCoreApp) QuerySigningInfo(height int64, addr string) (res nodesTypes.ValidatorSigningInfo, err error)
- func (app PocketCoreApp) QueryTotalAppCoins(height int64) (staked sdk.BigInt, err error)
- func (app PocketCoreApp) QueryTotalNodeCoins(height int64) (stakedTokens sdk.BigInt, totalTokens sdk.BigInt, err error)
- func (app PocketCoreApp) QueryTx(hash string, prove bool) (res *core_types.ResultTx, err error)
- func (app PocketCoreApp) QueryUpgrade(height int64) (res types.Upgrade, err error)
- func (app PocketCoreApp) SendRawTx(fromAddr string, txBytes []byte) (sdk.TxResponse, error)
- type SingleParamReturn
Constants ¶
View Source
const (
AppVersion = "RC-0.6.3"
)
View Source
const (
ReadInError = `An error occurred reading in the information: `
)
Variables ¶
View Source
var ( // the default fileseparator based on OS FS = string(fp.Separator) // app instance currently running PCA *PocketCoreApp // config GlobalConfig sdk.Config // global genesis type GlobalGenesisType GenesisType // current authToken for secured rpc calls AuthToken sdk.AuthToken )
View Source
var ( UninitializedKeybaseError = errors.New(`no Keys stored in keybase, create a key pair by using "./main accounts create"`) InvalidChainsError = errors.New("invalid chains.json") )
Functions ¶
func BuildMultisig ¶
func Confirmation ¶
func Confirmation() bool
func Credentials ¶
func DeleteHostedChains ¶
func DeleteHostedChains()
func GenerateAAT ¶
func GenerateAAT(appPubKey, clientPubKey string, key crypto.PrivateKey) (aatjson []byte, err error)
func GenerateHostedChains ¶
func GenerateHostedChains() (chains []types.HostedBlockchain)
func GenesisFileToGenDoc ¶
func GenesisFileToGenDoc(genFile string) *tmtypes.GenesisDoc
func GenesisStateFromGenDoc ¶
func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage)
func GetAuthTokenFromFile ¶
func GetDefaultConfig ¶
func GetPrivValFile ¶
func InitApp ¶
func InitApp(datadir, tmNode, persistentPeers, seeds, remoteCLIURL string, keybase bool, genesisType GenesisType) *node.Node
func InitAuthToken ¶
func InitAuthToken()
func InitConfig ¶
func InitConfig(datadir, tmNode, persistentPeers, seeds, remoteCLIURL string)
func InitGenesis ¶
func InitGenesis(genesisType GenesisType)
func InitKeyfiles ¶
func InitKeyfiles()
func InitLogger ¶
func InitPocketCoreConfig ¶
func InitPocketCoreConfig(chains *types.HostedBlockchains, logger log.Logger)
func InitTendermint ¶
func NewHostedChains ¶
func NewHostedChains(generate bool) *types.HostedBlockchains
get the hosted chains variable
func NewInvalidChainsError ¶
func ResetAll ¶
ResetAll removes address book files plus all data, and resets the privValidator data. Exported so other CLI tools can use it.
func ResetWorldState ¶
XXX: this is totally unsafe. it's only suitable for testnets.
func SetValidator ¶
func ShutdownPocketCore ¶
func ShutdownPocketCore()
func SignMultisigNext ¶
func SignMultisigOutOfOrder ¶
func UnsafeRollbackData ¶
func UpdateConfig ¶
func UpdateConfig(datadir string)
Types ¶
type AllParamsReturn ¶
type AllParamsReturn struct { AppParams []SingleParamReturn `json:"app_params"` NodeParams []SingleParamReturn `json:"node_params"` PocketParams []SingleParamReturn `json:"pocket_params"` GovParams []SingleParamReturn `json:"gov_params"` AuthParams []SingleParamReturn `json:"auth_params"` }
type AppCreator ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
var GenState GenesisState
func GenesisStateFromFile ¶
func GenesisStateFromFile(cdc *codec.Codec, genFile string) GenesisState
func GenesisStateFromJson ¶
func GenesisStateFromJson(json string) GenesisState
type GenesisType ¶
type GenesisType int
const ( MainnetGenesisType GenesisType = iota + 1 TestnetGenesisType DefaultGenesisType )
type Page ¶
type PocketCoreApp ¶
type PocketCoreApp struct { // extends baseapp *bam.BaseApp // Keys to access the substores Keys map[string]*sdk.KVStoreKey Tkeys map[string]*sdk.TransientStoreKey // contains filtered or unexported fields }
pocket core is an extension of baseapp
func NewClient ¶
func NewClient(c config, creator AppCreator) (*node.Node, *PocketCoreApp, error)
func NewPocketBaseApp ¶
new pocket core base
func NewPocketCoreApp ¶
func NewPocketCoreApp(genState GenesisState, keybase keys.Keybase, tmClient client.Client, hostedChains *pocketTypes.HostedBlockchains, logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.BaseApp)) *PocketCoreApp
NewPocketCoreApp is a constructor function for PocketCoreApp
func (*PocketCoreApp) BeginBlocker ¶
func (app *PocketCoreApp) BeginBlocker(ctx sdk.Ctx, req abci.RequestBeginBlock) abci.ResponseBeginBlock
setups all of the begin blockers for each module
func (*PocketCoreApp) EndBlocker ¶
func (app *PocketCoreApp) EndBlocker(ctx sdk.Ctx, req abci.RequestEndBlock) abci.ResponseEndBlock
setups all of the end blockers for each module
func (*PocketCoreApp) ExportAppState ¶
func (app *PocketCoreApp) ExportAppState(height int64, forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, err error)
exports the app state to json
func (*PocketCoreApp) ExportState ¶
func (app *PocketCoreApp) ExportState(height int64, chainID string) (string, error)
func (*PocketCoreApp) GetClient ¶
func (app *PocketCoreApp) GetClient() client.Client
func (PocketCoreApp) HandleChallenge ¶
func (app PocketCoreApp) HandleChallenge(c pocketTypes.ChallengeProofInvalidData) (res *pocketTypes.ChallengeResponse, err error)
func (PocketCoreApp) HandleDispatch ¶
func (app PocketCoreApp) HandleDispatch(header pocketTypes.SessionHeader) (res *pocketTypes.DispatchResponse, err error)
func (PocketCoreApp) HandleRelay ¶
func (app PocketCoreApp) HandleRelay(r pocketTypes.Relay) (res *pocketTypes.RelayResponse, dispatch *pocketTypes.DispatchResponse, err error)
func (*PocketCoreApp) InitChainer ¶
func (app *PocketCoreApp) InitChainer(ctx sdk.Ctx, req abci.RequestInitChain) abci.ResponseInitChain
inits from genesis
func (*PocketCoreApp) InitChainerWithGenesis ¶
func (app *PocketCoreApp) InitChainerWithGenesis(ctx sdk.Ctx, req abci.RequestInitChain) abci.ResponseInitChain
inits from genesis
func (*PocketCoreApp) ModuleAccountAddrs ¶
func (app *PocketCoreApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the pcInstance's module account addresses.
func (*PocketCoreApp) NewContext ¶
func (app *PocketCoreApp) NewContext(height int64) (sdk.Ctx, error)
func (PocketCoreApp) QueryACL ¶
func (app PocketCoreApp) QueryACL(height int64) (res types.ACL, err error)
func (PocketCoreApp) QueryAccount ¶
func (PocketCoreApp) QueryAccountTxs ¶
func (app PocketCoreApp) QueryAccountTxs(addr string, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
func (PocketCoreApp) QueryAllParams ¶
func (app PocketCoreApp) QueryAllParams(height int64) (r AllParamsReturn, err error)
func (PocketCoreApp) QueryApp ¶
func (app PocketCoreApp) QueryApp(addr string, height int64) (res appsTypes.Application, err error)
func (PocketCoreApp) QueryAppParams ¶
func (app PocketCoreApp) QueryAppParams(height int64) (res appsTypes.Params, err error)
func (PocketCoreApp) QueryApps ¶
func (app PocketCoreApp) QueryApps(height int64, opts appsTypes.QueryApplicationsWithOpts) (res Page, err error)
func (PocketCoreApp) QueryBalance ¶
func (PocketCoreApp) QueryBlock ¶
func (app PocketCoreApp) QueryBlock(height *int64) (blockJSON []byte, err error)
zero for height = latest
func (PocketCoreApp) QueryBlockTxs ¶
func (app PocketCoreApp) QueryBlockTxs(height int64, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
func (PocketCoreApp) QueryClaim ¶
func (app PocketCoreApp) QueryClaim(address, appPubkey, chain, evidenceType string, sessionBlockHeight int64, height int64) (res *pocketTypes.MsgClaim, err error)
func (PocketCoreApp) QueryClaims ¶
func (PocketCoreApp) QueryDaoBalance ¶
func (app PocketCoreApp) QueryDaoBalance(height int64) (res sdk.BigInt, err error)
func (PocketCoreApp) QueryDaoOwner ¶
func (app PocketCoreApp) QueryDaoOwner(height int64) (res sdk.Address, err error)
func (PocketCoreApp) QueryHeight ¶
func (app PocketCoreApp) QueryHeight() (res int64, err error)
func (PocketCoreApp) QueryNode ¶
func (app PocketCoreApp) QueryNode(addr string, height int64) (res nodesTypes.Validator, err error)
func (PocketCoreApp) QueryNodeParams ¶
func (app PocketCoreApp) QueryNodeParams(height int64) (res nodesTypes.Params, err error)
func (PocketCoreApp) QueryNodeStatus ¶
func (app PocketCoreApp) QueryNodeStatus() (res *core_types.ResultStatus, err error)
func (PocketCoreApp) QueryNodes ¶
func (app PocketCoreApp) QueryNodes(height int64, opts nodesTypes.QueryValidatorsParams) (res Page, err error)
func (PocketCoreApp) QueryParam ¶
func (app PocketCoreApp) QueryParam(height int64, paramkey string) (r SingleParamReturn, err error)
func (PocketCoreApp) QueryPocketParams ¶
func (app PocketCoreApp) QueryPocketParams(height int64) (res pocketTypes.Params, err error)
func (PocketCoreApp) QueryPocketSupportedBlockchains ¶
func (app PocketCoreApp) QueryPocketSupportedBlockchains(height int64) (res []string, err error)
func (PocketCoreApp) QueryRecipientTxs ¶
func (app PocketCoreApp) QueryRecipientTxs(addr string, page, perPage int, prove bool, sort string) (res *core_types.ResultTxSearch, err error)
func (PocketCoreApp) QuerySigningInfo ¶
func (app PocketCoreApp) QuerySigningInfo(height int64, addr string) (res nodesTypes.ValidatorSigningInfo, err error)
func (PocketCoreApp) QueryTotalAppCoins ¶
func (app PocketCoreApp) QueryTotalAppCoins(height int64) (staked sdk.BigInt, err error)
func (PocketCoreApp) QueryTotalNodeCoins ¶
func (PocketCoreApp) QueryTx ¶
func (app PocketCoreApp) QueryTx(hash string, prove bool) (res *core_types.ResultTx, err error)
func (PocketCoreApp) QueryUpgrade ¶
func (app PocketCoreApp) QueryUpgrade(height int64) (res types.Upgrade, err error)
func (PocketCoreApp) SendRawTx ¶
func (app PocketCoreApp) SendRawTx(fromAddr string, txBytes []byte) (sdk.TxResponse, error)
SendRawTx - Deliver tx bytes to node
type SingleParamReturn ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.