Skip to content

The next-gen Cosmos Kit for InterchainJS (aka CosmJS 2)

License

Notifications You must be signed in to change notification settings

hyperweb-io/interchain-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Interchain-kit


Interchain Kit is a universal wallet adapter for developers to build apps that quickly and easily interact with Cosmos blockchains and wallets.

🏁 Quickstart

Get started quickly by using create-interchain-app to help you build high-quality Cosmos apps fast!

βš™οΈ Configuration

Check out our docs here to configure InterchainKit.

βš›οΈ InterchainJS Signers

If you want to get a interchainjs signer, here are docs for our hooks

πŸ“¦ Packages

Name Description
@interchain-kit/core Core Interchain Kit functionality
@interchain-kit/react React integration with Interchain UI Modal for simple usage
@interchain-kit/vue Vue integration with Interchain UI Modal for simple usage

πŸ“¦ Wallets

Explore the range of wallet adapters available in our wallets directory.



πŸ”Œ Integrating Wallets

See our docs on integrating your wallet

πŸš€ Running Example

For high-level examples suitable for most developers, explore our create-interchain-app. For a deeper, more technical understanding, this repository contains an example, which is also useful when integrating new wallets.

yarn build
cd packages/example
yarn dev

This example demonstrates a Next.js project that integrates the @interchain-kit/react wallet adapter. Note that this example has historically been used by multiple teams to test PRs.

This example is ideal for developers looking to create integrations for Vue.js, Svelte, or other frameworks. It uses a basic Next.js setup without relying on React-specific hooks, providing a clear model for building custom integrations.

  • /connect.html - show how WalletManager connect to wallet
  • /account.html - show how WalletManager get account

πŸ›  Developing

Checkout the repository and bootstrap the yarn workspace:

# Clone the repo.
git clone https://github.com/hyperweb-io/interchain-kit
cd cosmos-kit
yarn
yarn dev:watch

Building

yarn build

Publishing

lerna publish
# lerna publish minor
# lerna publish major

Related

Checkout these related projects:

  • @cosmology/telescope Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules.
  • @cosmwasm/ts-codegen Convert your CosmWasm smart contracts into dev-friendly TypeScript classes.
  • chain-registry Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application.
  • cosmos-kit Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface.
  • create-cosmos-app Set up a modern Cosmos app by running one command.
  • interchain-ui The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit.
  • starship Unified Testing and Development for the Interchain.

Overview

flowchart TD

    D(Chain Registry - Chain) --- F(Wallet Manager)
    E(Chain Registry - Asset) --- F(Wallet Manager)

    A(Keplr Wallet Extension) --- AA(Keplr Wallet Class) --- F(Wallet Manager)
    B(Leap Wallet Extension) --- BB(Leap Wallet Class) --- F(Wallet Manager)
    C(Wallet Connect Extension) --- CC(Wallet Connect Class) --- F(Wallet Manager)


    F(Wallet Manager) --- G(Offline Signer)
    F(Wallet Manager) --- H(Chain Rpc Endpoint)
    F(Wallet Manager) --- J(Chain Bech Address)

Loading

UML

classDiagram
    class BaseWallet{
        <<abstract>>
        +init(meta?: unknown)

        +connect(chainId: string | string[])

        +disconnect(chainId: string | string[])

        +getAccount(chainId: string)

        +getAccounts(chainIds: string[])

        +getSimpleAccount(chainId: string) 

        +getOfflineSignerAmino(chainId: string)

        +getOfflineSignerDirect(chainId: string)

        +signAmino(chainId: string, signer: string, signDoc: StdSignDoc, signOptions?: SignOptions)

        +signArbitrary(chainId: string, signer: string, data: string | Uint8Array)

        +verifyArbitrary(chainId: string, signer: string, data: string | Uint8Array)

        +signDirect(chainId: string, signer: string, signDoc: DirectSignDoc, signOptions?: SignOptions)

        +sendTx(chainId: string, tx: Uint8Array, mode: BroadcastMode): Promise<Uint8Array>

        +addSuggestChain(chainInfo: ChainInfo)

        +bindingEvent()

        +unbindingEvent()
    }

    BaseWallet <|-- ExtensionWallet
    BaseWallet <|-- WalletConnect
    BaseWallet <|-- LegerWallet

    class ExtensionWallet {

    }
    class WalletConnect {
      +ISignClient singClient
    }
    class LegerWallet {

    }

    ExtensionWallet <|-- KeplrExtensionWallet
    ExtensionWallet <|-- LeapExtensionWallet

  
    class KeplrExtensionWallet {

    }
    class KeplrMobileWallet {
  
    }

Loading

Credits

πŸ›  Built by Hyperweb (formerly Cosmology) β€”Β if you like our tools, please checkout and contribute to our github βš›οΈ

Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED β€œAS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

About

The next-gen Cosmos Kit for InterchainJS (aka CosmJS 2)

Resources

License

Stars

Watchers

Forks

Packages

No packages published