Signing Client (Recommended)

The BitBadgesSigningClient provides a streamlined, wallet-agnostic interface for signing and broadcasting transactions. It handles account info fetching, gas estimation, signing, and broadcasting in a single call.

When to Use

Use BitBadgesSigningClient when:

  • You want a simple, all-in-one signing solution

  • You don't need fine-grained control over the signing process

  • You want automatic gas estimation and sequence management

  • You want automatic retry on sequence mismatch errors

Use manual signing (Cosmos / Ethereum) when:

  • You need full control over the transaction lifecycle

  • You need to customize the signing flow (e.g., custom fee logic)

  • You need to handle simulation separately from signing

  • You're integrating with existing transaction management infrastructure

Installation

The signing client is included in the main SDK:

npm install bitbadgesjs-sdk

Quick Start

Cosmos Wallet (Keplr, Leap, etc.)

EVM Wallet (MetaMask, etc.)

Server-Side Signing

Building an AI agent or bot? See the AI Agents & Bots section for end-to-end examples, testnet faucet, and MCP tool reference.

Client Options

Network Presets

The SDK provides built-in network configurations via NETWORK_CONFIGS:

Use network presets with optional overrides:

Sign and Broadcast Options

Broadcast Result

Wallet Adapters

GenericCosmosAdapter

Factory methods for Cosmos wallets:

GenericEvmAdapter

Factory methods for EVM wallets:

EVM Chain ID Validation

You can validate that the wallet is connected to the correct EVM network:

Network Selection

Gas Estimation

By default, the client simulates transactions to estimate gas:

Sequence Management

The client automatically handles account sequence (nonce) management:

Account Info

Multiple Messages

Error Handling

Comparison with Manual Signing

Feature
BitBadgesSigningClient
Manual Signing

Complexity

Simple, all-in-one

More setup required

Control

Abstracted

Full control

Account Info

Auto-fetched & cached

Manual fetch

Gas Estimation

Built-in simulation

Manual simulation

Sequence Retry

Automatic

Manual handling

Broadcasting

Built-in

Separate step

Custom Flow

Limited

Fully customizable

See Also

Last updated