Documentation
¶
Overview ¶
Package client builds the Cosmos SDK client.Context from the akt context system.
It bridges our context (network, keyring, defaults) to the SDK's client.Context that all tx/query commands expect. This allows chain-sdk CLI commands to work unmodified with our context-based configuration.
Index ¶
- func BuildClientContext(rc *aktctx.Context, kr sdkkeyring.Keyring, enc sdkutil.EncodingConfig) sdkclient.Context
- func InitClientContext(cmd *cobra.Command, rc *aktctx.Context, kr sdkkeyring.Keyring, ...) error
- func MustResolveAndInit(cmd *cobra.Command, mgr *aktctx.Manager, krMgr *aktkeyring.Manager, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClientContext ¶
func BuildClientContext( rc *aktctx.Context, kr sdkkeyring.Keyring, enc sdkutil.EncodingConfig, ) sdkclient.Context
BuildClientContext constructs a fully populated Cosmos SDK client.Context from the akt context. This bridges our context system to the SDK.
func InitClientContext ¶
func InitClientContext( cmd *cobra.Command, rc *aktctx.Context, kr sdkkeyring.Keyring, enc sdkutil.EncodingConfig, ) error
InitClientContext initializes the Cosmos SDK client context on a cobra command. This must be called in the root PersistentPreRunE before any chain-sdk CLI commands execute. It stores the client.Context in the cobra context the same way the SDK's SetCmdClientContextHandler does.
func MustResolveAndInit ¶
func MustResolveAndInit( cmd *cobra.Command, mgr *aktctx.Manager, krMgr *aktkeyring.Manager, enc sdkutil.EncodingConfig, contextOverride string, ) (bool, error)
MustResolveAndInit is a convenience that resolves the context, gets the keyring, and initializes the SDK client context on the command. Used in the root PersistentPreRunE. Returns true if a context was resolved.
Types ¶
This section is empty.