app

package
v2.1.0-a6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 114 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "akash"
)

Variables

View Source
var (
	DefaultHome = os.ExpandEnv("$HOME/.akash")
)

Functions

func ModuleAccountAddrs

func ModuleAccountAddrs() map[string]bool

func ModuleAccountPerms

func ModuleAccountPerms() map[string][]string

func ModuleBasics

func ModuleBasics() module.BasicManager

ModuleBasics returns all app modules basics

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.

func RegisterSwaggerAPI

func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func TrimQuotes

func TrimQuotes(data string) string

Types

type AkashApp

type AkashApp struct {
	*baseapp.BaseApp
	*apptypes.App
	// contains filtered or unexported fields
}

AkashApp extends ABCI application

func InitAkashAppForTestnet

func InitAkashAppForTestnet(
	app *AkashApp,
	db dbm.DB,
	tcfg *TestnetConfig,
) *AkashApp

InitAkashAppForTestnet is broken down into two sections: Required Changes: Changes that, if not made, will cause the testnet to halt or panic Optional Changes: Changes to customize the testnet to one's liking (lower vote times, fund accounts, etc)

func NewApp

func NewApp(
	logger log.Logger,
	db dbm.DB,
	tio io.Writer,
	loadLatest bool,
	invCheckPeriod uint,
	skipUpgradeHeights map[int64]bool,
	encodingConfig sdkutil.EncodingConfig,
	appOpts servertypes.AppOptions,
	options ...func(*baseapp.BaseApp),
) *AkashApp

NewApp creates and returns a new Akash App.

func Setup

func Setup(opts ...SetupAppOption) *AkashApp

Setup initializes a new AkashApp. A Nop logger is set in AkashApp.

func (*AkashApp) AppCodec

func (app *AkashApp) AppCodec() codec.Codec

AppCodec returns AkashApp's app codec.

func (*AkashApp) BeginBlocker

func (app *AkashApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker is a function in which application updates every begin block

func (*AkashApp) BlockedAddrs

func (app *AkashApp) BlockedAddrs() map[string]bool

BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.

func (*AkashApp) EndBlocker

func (app *AkashApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker is a function in which application updates every end block

func (*AkashApp) ExportAppStateAndValidators

func (app *AkashApp) ExportAppStateAndValidators(
	forZeroHeight bool,
	jailAllowedAddrs []string,
	modulesToExport []string,
) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*AkashApp) GetSubspace

func (app *AkashApp) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

func (*AkashApp) InitChainer

func (app *AkashApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)

InitChainer application update at chain initialization

func (*AkashApp) InterfaceRegistry

func (app *AkashApp) InterfaceRegistry() codectypes.InterfaceRegistry

InterfaceRegistry returns AkashApp's InterfaceRegistry

func (*AkashApp) LegacyAmino

func (app *AkashApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns AkashApp's amino codec.

func (*AkashApp) LoadHeight

func (app *AkashApp) LoadHeight(height int64) error

LoadHeight method of AkashApp loads baseapp application version with given height

func (*AkashApp) ModuleAccountAddrs

func (app *AkashApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*AkashApp) Name

func (app *AkashApp) Name() string

Name returns the name of the App

func (*AkashApp) NewProposalContext

func (app *AkashApp) NewProposalContext(header tmproto.Header) sdk.Context

NewProposalContext returns a context with a branched version of the state that is safe to query during ProcessProposal.

func (*AkashApp) PreBlocker

func (app *AkashApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates before each begin block.

func (*AkashApp) Precommitter

func (app *AkashApp) Precommitter(ctx sdk.Context)

Precommitter application updates before the commital of a block after all transactions have been delivered.

func (*AkashApp) PrepareCheckStater

func (app *AkashApp) PrepareCheckStater(ctx sdk.Context)

func (*AkashApp) RegisterAPIRoutes

func (app *AkashApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*AkashApp) RegisterNodeService

func (app *AkashApp) RegisterNodeService(cctx client.Context, cfg config.Config)

RegisterNodeService registers the node gRPC Query service.

func (*AkashApp) RegisterTendermintService

func (app *AkashApp) RegisterTendermintService(cctx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*AkashApp) RegisterTxService

func (app *AkashApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*AkashApp) SimulationManager

func (app *AkashApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

func (*AkashApp) TxConfig

func (app *AkashApp) TxConfig() client.TxConfig

TxConfig returns SimApp's TxConfig

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState of the blockchain is represented here as a map of raw json messages key's by an identifier string. The identifier is used to determine which module genesis information belongs to, so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

func GenesisStateWithValSet

func GenesisStateWithValSet(cdc codec.Codec) GenesisState

func NewDefaultGenesisState

func NewDefaultGenesisState(cdc codec.Codec) GenesisState

NewDefaultGenesisState generates the default state for the application.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	CDC       codec.BinaryCodec
	GovKeeper *govkeeper.Keeper
}

HandlerOptions extends the SDK's AnteHandler options

type SetupAppOption

type SetupAppOption func(*setupAppOptions)

func WithChainID

func WithChainID(val string) SetupAppOption

WithChainID sets home dir for app

func WithCheckTx

func WithCheckTx(val bool) SetupAppOption

WithCheckTx sets home dir for app

func WithEncConfig

func WithEncConfig(val sdkutil.EncodingConfig) SetupAppOption

func WithGenesis

func WithGenesis(val SetupGenesisFn) SetupAppOption

func WithHome

func WithHome(val string) SetupAppOption

WithHome sets home dir for app

type SetupGenesisFn

type SetupGenesisFn func(cdc codec.Codec) GenesisState

type TestnetAccount

type TestnetAccount struct {
	Address  sdk.AccAddress `json:"address"`
	Balances []sdk.Coin     `json:"balances"`
}

type TestnetConfig

type TestnetConfig struct {
	Accounts   []TestnetAccount
	Validators []TestnetValidator
	Gov        TestnetGovConfig
	Upgrade    TestnetUpgrade
}

type TestnetDelegation

type TestnetDelegation struct {
	Address sdk.AccAddress `json:"address"`
	Amount  sdk.Coin       `json:"amount"`
}

type TestnetGovConfig

type TestnetGovConfig struct {
	VotingParams *struct {
		VotingPeriod        TestnetVotingPeriod `json:"voting_period,omitempty"`
		ExpeditedVotePeriod TestnetVotingPeriod `json:"expedited_vote_period"`
	} `json:"voting_params,omitempty"`
}

type TestnetUpgrade

type TestnetUpgrade struct {
	Name string
}

type TestnetValidator

type TestnetValidator struct {
	OperatorAddress   sdk.Address
	ConsensusAddress  sdk.ConsAddress
	ConsensusPubKey   *types.Any
	Status            stakingtypes.BondStatus
	Moniker           string
	Commission        stakingtypes.Commission
	MinSelfDelegation sdkmath.Int
	Delegations       []TestnetDelegation
}

type TestnetVotingPeriod

type TestnetVotingPeriod struct {
	time.Duration
}

func (*TestnetVotingPeriod) UnmarshalJSON

func (t *TestnetVotingPeriod) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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