Documentation
¶
Overview ¶
Package heimdallutil implements the `polycli heimdall util` umbrella command and its local utility subcommands (addr, b64, version, completions). These helpers are deliberately offline — only `version --node` reaches the network.
Package directory is named `util` under cmd/heimdall/ and the Go package is `heimdallutil` to avoid colliding with the repo's top-level util/ package.
Index ¶
Constants ¶
const DefaultHRP = "cosmos"
DefaultHRP is the bech32 human-readable part used by Heimdall v2. Confirmed from heimdall-v2/API_REFERENCE.md ("Cosmos bech32 cosmos1…") and the absence of any sdk.Config.SetBech32PrefixForAccount override in heimdall-v2/cmd/heimdalld/cmd/commands.go — Heimdall v2 uses the default cosmos-sdk account prefix.
Variables ¶
var Cmd = &cobra.Command{ Use: "util", Short: "Local helpers: addr, b64, version, completions.", Long: usage, Args: cobra.NoArgs, }
Cmd is the `util` umbrella command. Subcommands are attached by Register so tests can wire their own parent for isolation.
Functions ¶
func ConvertAddress ¶
ConvertAddress returns both the canonical 0x-hex and bech32 encodings of value, given the target bech32 prefix hrp. Direction is inferred from the input: 0x-prefixed hex inputs are encoded; anything else is decoded as bech32.
func ConvertBase64 ¶
ConvertBase64 returns the converted representation of value according to direction. When direction is "auto" a 0x-prefixed input is converted to base64; anything else is converted from base64 to 0x-hex. When direction is explicit, the input must be in the opposite format.
Types ¶
This section is empty.