Skip to content

Conversation

@Zetazzz
Copy link
Contributor

@Zetazzz Zetazzz commented Aug 3, 2025

Pull Request Summary: Major Refactor - Universal Signer Architecture

Overview

This PR introduces a comprehensive architectural refactor that implements a universal signer system with workflow builders, modular adapters, and unified client interfaces across Cosmos, Ethereum, and Injective networks. The changes represent a fundamental shift from network-specific implementations to a unified, extensible architecture.

Key Changes

🏗️ New Universal Architecture

  • Workflow Builder System: Introduced a plugin-based workflow builder architecture (packages/types/src/builders/) that enables modular transaction construction and signing processes
  • Network Adapters: Created standardized adapters for different blockchain protocols (Tendermint34, Tendermint37, Comet38, Ethereum) to handle protocol-specific differences
  • Unified Client Interfaces: Implemented consistent query and event client interfaces across all supported networks

🔧 Signer System Overhaul

  • Configurable Signers: Replaced rigid signer implementations with configurable signer classes that support multiple signature formats and algorithms
  • Signature Format Handling: Added comprehensive signature format support (COMPACT, FULL, RAW) with configurable processors
  • Cross-Network Compatibility: Unified signer interfaces that work seamlessly across Cosmos, Ethereum, and Injective networks

📦 Package Restructuring

  • Auth Package Refactor: Complete rewrite of the auth package with new key management, address derivation, and wallet abstractions
  • Type System Enhancement: Expanded type definitions with better error handling, protocol interfaces, and builder patterns
  • Utility Improvements: Enhanced utility functions for cryptographic operations, HTTP/WebSocket clients, and case conversion

🌐 Network-Specific Improvements

Cosmos Network

  • Query Client Refactor: New CosmosQueryClient with comprehensive RPC endpoint support and adapter-based protocol handling
  • Workflow Plugins: Modular plugins for amino/direct signing, fee calculation, message encoding, and transaction assembly
  • Enhanced Testing: Comprehensive test suites for RPC endpoints, signers, and starship integration

Ethereum Network

  • EIP-1559 Support: Full implementation of EIP-1559 transactions with legacy transaction fallback
  • Signer Modernization: New base signer architecture with configurable transaction types and signature formats
  • Query Client: Standardized Ethereum query client with comprehensive JSON-RPC support

Injective Network

  • Signature Processing: Advanced signature processing with configurable formats and Ethereum compatibility
  • Wallet Integration: Enhanced EthSecp256k1HD wallet with proper Injective-specific address derivation
  • Testing Improvements: Updated test suites with proper queryClientWrapper patterns

📚 Documentation & Testing

  • Comprehensive Guides: New network implementation guide and workflow builder documentation
  • API Documentation: Updated documentation for all packages with examples and migration guides
  • Test Infrastructure: Enhanced test configurations with separate jest configs for different test types (RPC, Starship, unit tests)

Migration Impact

  • Breaking Changes: This is a major version change that requires migration from the old signer/builder patterns to the new workflow-based architecture
  • Backward Compatibility: Legacy interfaces are deprecated but maintained where possible
  • Migration Guide: Updated migration documentation to help users transition from CosmJS and older InterchainJS versions

Files Changed

  • 509 files changed: 31,760 additions, 11,667 deletions
  • Major additions: New workflow builders, adapters, query clients, and comprehensive type definitions
  • Significant deletions: Removed legacy signer implementations, old query clients, and deprecated utilities
  • Reorganization: Moved Starship tests from libs to network-specific directories for better organization

This refactor establishes InterchainJS as a truly universal blockchain interaction library with consistent APIs, extensible architecture, and comprehensive multi-network support.

@Zetazzz Zetazzz merged commit a26aa9b into main Aug 3, 2025
3 checks passed
sdqede pushed a commit that referenced this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants