client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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