client

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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,
	fromOverride string,
) 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,
	fromOverride string,
) 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,
	fromOverride string,
	identityMode LocalIdentityMode,
) (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.

identityMode is the caller's explicit decision about when this invocation may open the local signing identity (SPEC §1.7). The client layer does not infer that policy from command names.

func ResolveAccountAddress added in v0.0.4

func ResolveAccountAddress(cctx sdkclient.Context) (sdk.AccAddress, error)

ResolveAccountAddress resolves the account carried by cctx. Address-valued accounts are parsed without consulting the keyring; named accounts trigger the first key operation on an on-demand keyring.

Types

type LocalIdentityMode added in v0.0.4

type LocalIdentityMode uint8

LocalIdentityMode controls when command startup may open the selected context's keyring (SPEC §1.7).

const (
	LocalIdentityNone LocalIdentityMode = iota
	LocalIdentityOnDemand
	LocalIdentityRequired
)

Jump to

Keyboard shortcuts

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