WDK logoWDK documentation

Cosmos wallet

Use the Base58 Cosmos wallet module for Cosmos-compatible chains.

@base58-io/wdk-wallet-cosmos is a WDK wallet module for Cosmos-compatible blockchains. It provides Bech32 accounts, Cosmos transaction signing, balance reads, token transfers, chain-registry configuration, and RPC fallback.

Powered by @base58-io/wdk-wallet-cosmos.

This module is developed and maintained independently by a third-party contributor. Tether and the WDK team do not endorse or assume responsibility for its code, security, or maintenance. Review the package and use your own judgment before using it with real funds.

When to use it

Use this module when your application needs wallet support for Cosmos-compatible chains.

Use caseModule
Cosmos-compatible wallets using chain-registry or custom RPC config@base58-io/wdk-wallet-cosmos
Bitcoin wallets@tetherto/wdk-wallet-btc
EVM wallets@tetherto/wdk-wallet-evm

Requirements

The module requires:

  • a BIP-39 seed phrase or seed bytes;
  • either a chainName from chain-registry or custom chain config;
  • RPC endpoints for balance reads, fee quotes, transfers, and receipts;
  • gas price and denomination config when defaults from chain-registry are not enough.

Install

npm install @base58-io/wdk-wallet-cosmos

Minimal setup

import WalletManagerCosmos from '@base58-io/wdk-wallet-cosmos'

const manager = new WalletManagerCosmos(seedPhrase, {
  chainName: 'cosmoshub'
})

const account = await manager.getAccount(0)
const address = await account.getAddress()

console.log(address)

Use custom RPC configuration for local or unsupported chains:

const manager = new WalletManagerCosmos(seedPhrase, {
  rpcEndpoints: ['http://localhost:26657'],
  addressPrefix: 'cosmos',
  nativeDenom: 'uatom',
  gasPrice: '0.025uatom'
})

Reference

On this page