npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cosmdev/nuxt-cosmos-offlinesigners

v1.0.5

Published

Nuxt module for integrating Cosmos offline signers (Keplr and Leap)

Readme

🌌 Nuxt Cosmos Offline Signers

A powerful and modern Nuxt 3 module for seamless integration of Cosmos ecosystem wallets (Keplr and Leap) into your decentralized applications.

MainApp

✨ Features

  • 🔗 Multiple Wallet Support: Built-in support for Keplr and Leap wallets
  • 🎯 TypeScript First: Full TypeScript support with comprehensive type definitions
  • 🚀 Nuxt 3 Composables: Reactive composables for wallet management and blockchain interactions
  • 🎨 Beautiful Components: Pre-built Vue components with modern UI/UX design
  • ⚙️ Highly Configurable: Customize chain settings, endpoints, and wallet behavior
  • 🔐 Secure: Built with security best practices and offline signing capabilities
  • 🌐 Multi-Chain: Support for any Cosmos-based blockchain
  • Performance Optimized: Lightweight and fast with minimal bundle size
  • 🛠️ Developer Friendly: Comprehensive documentation and examples

🚀 Quick Setup

Nuxt install

npx nuxi module add @cosmdev/nuxt-cosmos-offlinesigners

That's it! You can now use Nuxt offlinesigners Module in your Nuxt app ✨

Manual install

# npm
npm install @cosmdev/nuxt-cosmos-offlinesigners

# yarn
yarn add @cosmdev/nuxt-cosmos-offlinesigners

# pnpm
pnpm add @cosmdev/nuxt-cosmos-offlinesigners

Basic Configuration

Add the module to your nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    '@cosmdev/nuxt-cosmos-offlinesigners'
  ],
  cosmosOfflineSigners: {
    chainId: 'cosmoshub-4',
    rpcEndpoint: 'https://cosmos-rpc.cosmdev.com/lcd/atom',
    restEndpoint: 'https://cosmos-api.cosmdev.com/lcd/atom',
    bech32Prefix: 'cosmos',
    coinDenom: 'ATOM',
    coinMinimalDenom: 'uatom',
    coinDecimals: 6
  }
})

📖 Usage

Basic Wallet Connection

<template>
  <div>
    <!-- Pre-built wallet connection component -->
    <CosmosWalletConnect />
    
    <!-- Display wallet information when connected -->
    <CosmosWalletInfo v-if="isConnected" />
  </div>
</template>

<script setup>
const { isConnected } = useCosmosWallet()
</script>

Advanced Usage with Composables

<template>
  <div>
    <div v-if="!isConnected">
      <button @click="connectKeplr">Connect Keplr</button>
      <button @click="connectLeap">Connect Leap</button>
    </div>
    
    <div v-else>
      <p>Connected: {{ walletInfo?.address }}</p>
      <p>Balance: {{ balance }} {{ coinDenom }}</p>
      <button @click="sendTokens">Send Tokens</button>
      <button @click="delegate">Delegate</button>
      <button @click="disconnect">Disconnect</button>
    </div>
  </div>
</template>

<script setup>
// Wallet management
const { 
  isConnected, 
  walletInfo, 
  connectWallet, 
  disconnectWallet 
} = useCosmosWallet()

// Keplr specific features
const { 
  isInstalled: keplrInstalled, 
  wallet: keplrWallet 
} = useKeplr()

// Leap specific features
const { 
  isInstalled: leapInstalled, 
  wallet: leapWallet 
} = useLeap()

// Blockchain transactions
const {
  getBalance,
  sendTokens,
  delegate,
  getValidators,
  getProposals
} = useCosmosTransactions()

// Local state
const balance = ref('0')
const coinDenom = ref('ATOM')

// Methods
const connectKeplr = () => connectWallet(keplrWallet.value)
const connectLeap = () => connectWallet(leapWallet.value)
const disconnect = () => disconnectWallet()

// Load balance when connected
watchEffect(async () => {
  if (isConnected.value && walletInfo.value) {
    balance.value = await getBalance(walletInfo.value.address)
  }
})
</script>

Transaction Examples

// Send tokens
const txResult = await sendTokens({
  recipient: 'cosmos1...',
  amount: '1000000', // 1 ATOM in uatom
  memo: 'Hello Cosmos!'
})

// Delegate to validator
const delegateResult = await delegate({
  validatorAddress: 'cosmosvaloper1...',
  amount: '1000000' // 1 ATOM in uatom
})

// Query blockchain data
const validators = await getValidators()
const proposals = await getProposals()
const balance = await getBalance('cosmos1...')

� Components

CosmosWalletConnect

A beautiful, responsive wallet connection component with support for multiple wallets.

<CosmosWalletConnect 
  :show-balance="true"
  :auto-connect="false"
  theme="dark"
/>

CosmosWalletInfo

Display comprehensive wallet information and account details.

<CosmosWalletInfo 
  :show-demo="true"
  :show-transactions="true"
/>

CosmosAdvancedDemo

A complete demo component showcasing all module features.

<CosmosAdvancedDemo />

⚙️ Configuration

export interface ModuleOptions {
  // Blockchain Configuration
  chainId: string
  rpcEndpoint: string
  restEndpoint: string
  bech32Prefix: string
  
  // Token Configuration
  coinDenom: string
  coinMinimalDenom: string
  coinDecimals: number
  
  // Wallet Configuration
  autoConnect?: boolean
  preferredWallet?: 'keplr' | 'leap'
  
  // UI Configuration
  theme?: 'light' | 'dark' | 'auto'
  
  // Advanced Configuration
  gasPrice?: string
  defaultGas?: number
  memo?: string
}

Example Configurations

Cosmos Hub

cosmosOfflineSigners: {
  chainId: 'cosmoshub-4',
  rpcEndpoint: 'https://cosmos-rpc.cosmdev.com/lcd/atom',
  restEndpoint: 'https://cosmos-api.cosmdev.com/lcd/atom',
  bech32Prefix: 'cosmos',
  coinDenom: 'ATOM',
  coinMinimalDenom: 'uatom',
  coinDecimals: 6
}

Osmosis

cosmosOfflineSigners: {
  chainId: 'osmosis-1',
  rpcEndpoint: 'https://osmosis-rpc.polkachu.com',
  restEndpoint: 'https://osmosis-api.polkachu.com',
  bech32Prefix: 'osmo',
  coinDenom: 'OSMO',
  coinMinimalDenom: 'uosmo',
  coinDecimals: 6
}

Juno

cosmosOfflineSigners: {
  chainId: 'juno-1',
  rpcEndpoint: 'https://juno-rpc.polkachu.com',
  restEndpoint: 'https://juno-api.polkachu.com',
  bech32Prefix: 'juno',
  coinDenom: 'JUNO',
  coinMinimalDenom: 'ujuno',
  coinDecimals: 6
}

🔧 Composables API

useCosmosWallet()

Main wallet management composable.

const {
  // State
  isConnected: Ref<boolean>,
  walletInfo: Ref<WalletInfo | null>,
  isConnecting: Ref<boolean>,
  
  // Methods
  connectWallet: (wallet: any) => Promise<void>,
  disconnectWallet: () => Promise<void>,
  
  // Utils
  formatAddress: (address: string) => string,
  isValidCosmosAddress: (address: string) => boolean
} = useCosmosWallet()

useCosmosTransactions()

Blockchain interaction composable.

const {
  // Query Methods
  getBalance: (address: string) => Promise<string>,
  getDelegations: (address: string) => Promise<any[]>,
  getValidators: () => Promise<any[]>,
  getProposals: () => Promise<any[]>,
  
  // Transaction Methods
  sendTokens: (params: SendParams) => Promise<any>,
  delegate: (params: DelegateParams) => Promise<any>,
  undelegate: (params: UndelegateParams) => Promise<any>,
  vote: (params: VoteParams) => Promise<any>
} = useCosmosTransactions()

useKeplr() & useLeap()

Wallet-specific composables.

const {
  isInstalled: Ref<boolean>,
  wallet: Ref<any>,
  isSupported: Ref<boolean>
} = useKeplr()

🎯 Examples

Check out our comprehensive examples:

🛠️ Development

Local Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Start development server
npm run dev

# Build the playground
npm run dev:build

# Run tests
npm run test

# Run linting
npm run lint

Testing

# Run all tests
npm run test

# Watch mode
npm run test:watch

# Type checking
npm run test:types

📝 Requirements

  • Nuxt 3.x
  • Vue 3.x
  • Node.js 16+
  • TypeScript 4.x+ (recommended)

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License

🙏 Acknowledgments