mukan-ignite/docs/versioned_docs/version-v29/07-packages/cosmosaccount.md
Mukan Erkin Törük 26b204bd04
Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
feat: fork Ignite CLI v29 as Mukan Ignite — remove cosmos-sdk restrictions
2026-05-11 03:31:37 +03:00

1.5 KiB

sidebar_position title slug
2 Account Registry (cosmosaccount) /packages/cosmosaccount

Account Registry (cosmosaccount)

The cosmosaccount package manages Cosmos keyring accounts (create/import/export/list/delete) with configurable backend and Bech32 settings.

For full API details, see the cosmosaccount Go package documentation.

When to use

  • Manage CLI account keys in Ignite services and commands.
  • Switch between test, os, and memory keyring backends.
  • Resolve addresses/public keys from named keyring entries.

Key APIs

  • New(options ...Option) (Registry, error)
  • NewInMemory(options ...Option) (Registry, error)
  • WithKeyringBackend(backend KeyringBackend) Option
  • WithHome(path string) Option
  • (Registry) Create(name string) (Account, mnemonic string, err error)
  • (Registry) Import(name, secret, passphrase string) (Account, error)
  • (Registry) Export(name, passphrase string) (key string, err error)
  • (Registry) GetByName(name string) (Account, error)
  • (Registry) List() ([]Account, error)
  • (Account) Address(accPrefix string) (string, error)

Common Tasks

  • Instantiate one Registry with backend/home options and reuse it for all key operations.
  • Call EnsureDefaultAccount in setup paths that require a predictable signer account.
  • Resolve addresses with Account.Address(prefix) when your app uses non-default Bech32 prefixes.

Basic import

import "github.com/ignite/cli/v29/ignite/pkg/cosmosaccount"