https://github.com/hyperweb-io/interchain-kit
The next-gen Cosmos Kit for InterchainJS (aka CosmJS 2)
https://github.com/hyperweb-io/interchain-kit
Last synced: about 1 year ago
JSON representation
The next-gen Cosmos Kit for InterchainJS (aka CosmJS 2)
- Host: GitHub
- URL: https://github.com/hyperweb-io/interchain-kit
- Owner: hyperweb-io
- License: mit
- Created: 2024-06-07T07:53:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T12:40:16.000Z (about 1 year ago)
- Last Synced: 2025-04-18T23:04:08.554Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://hyperweb.io/stack/interchain-kit
- Size: 46.2 MB
- Stars: 5
- Watchers: 6
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Interchain Kit
Interchain Kit is a universal wallet adapter for developers to build apps that quickly and easily interact with blockchains and wallets.
**Interchain Kit is Cosmos Kit 3.0**! This is the new and improved version of Cosmos Kit.
## π Quickstart
Get started quickly by using [create-interchain-app](https://github.com/hyperweb-io/create-interchain-app) to help you build high-quality web3 apps fast!
## βοΈ Configuration
Check out [our docs here](https://docs.hyperweb.io/interchain-kit#get-started) to configure Interchain Kit.
## βοΈ InterchainJS Signers
If you want to get a interchainjs signer, [here are docs for our hooks](https://docs.hyperweb.io/interchain-kit/hooks)
## πΌοΈ Supported Frameworks
Whether you're developing with React or Vue, Interchain Kit offers tools and components to accelerate your development process and ensure compatibility with multiple blockchains:
## π¦ Packages
| Name | Description |
| ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [@interchain-kit/core](https://github.com/hyperweb-io/interchain-kit/tree/main/packages/core) | Core Interchain Kit functionality
| [@interchain-kit/react](https://github.com/hyperweb-io/interchain-kit/tree/main/packages/react) | React integration with Interchain UI Modal for simple usage |
| [@interchain-kit/vue](https://github.com/hyperweb-io/interchain-kit/tree/main/packages/vue) | Vue integration with Interchain UI Modal for simple usage |
## π¦ Wallets
Explore the range of wallet adapters available in our [wallets directory](https://github.com/hyperweb-io/interchain-kit/tree/main/wallets).
## π Integrating Wallets
See our docs on [integrating your wallet](https://docs.cosmology.zone/interchain-kit/integrating-wallets)
### π Running Example
For high-level examples suitable for most developers, explore our [create-interchain-app](https://github.com/hyperweb-io/create-interchain-app). For a deeper, more technical understanding, this repository contains an example, which is also useful when integrating new wallets.
```sh
yarn build
cd packages/example
yarn dev
```
#### [Basic Vanilla Example](https://github.com/hyperweb-io/interchain-kit/tree/main/examples)
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.
#### ["vanilla" example showing how `WalletManager` works](https://github.com/hyperweb-io/interchain-kit/blob/main/examples/vanilla/src/)
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
- `/balance.html` = show how to query (get balance)
- `/signing.html` = show how to sign (send token)
## Overview
```mermaid
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)
```
## UML
```mermaid
classDiagram
class BaseWallet{
<>
+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
+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 {
}
```
## π Developing
Checkout the repository and bootstrap the yarn workspace:
```sh
# Clone the repo.
git clone https://github.com/hyperweb-io/interchain-kit
cd interchain-kit
yarn
yarn dev:watch
```
### Building
```sh
yarn build
```
### Publishing
```
lerna publish
# lerna publish minor
# lerna publish major
```
## Interchain JavaScript Stack
A unified toolkit for building applications and smart contracts in the Interchain ecosystem βοΈ
| Category | Tools | Description |
|----------------------|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| **Chain Information** | [**Chain Registry**](https://github.com/hyperweb-io/chain-registry), [**Utils**](https://www.npmjs.com/package/@chain-registry/utils), [**Client**](https://www.npmjs.com/package/@chain-registry/client) | Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. |
| **Wallet Connectors**| [**Interchain Kit**](https://github.com/hyperweb-io/interchain-kit)beta, [**Cosmos Kit**](https://github.com/hyperweb-io/cosmos-kit) | Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. |
| **Signing Clients** | [**InterchainJS**](https://github.com/hyperweb-io/interchainjs)beta, [**CosmJS**](https://github.com/cosmos/cosmjs) | A single, universal signing interface for any network |
| **SDK Clients** | [**Telescope**](https://github.com/hyperweb-io/telescope) | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
| **Starter Kits** | [**Create Interchain App**](https://github.com/hyperweb-io/create-interchain-app)beta, [**Create Cosmos App**](https://github.com/hyperweb-io/create-cosmos-app) | Set up a modern Interchain app by running one command. |
| **UI Kits** | [**Interchain UI**](https://github.com/hyperweb-io/interchain-ui) | The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. |
| **Testing Frameworks** | [**Starship**](https://github.com/hyperweb-io/starship) | Unified Testing and Development for the Interchain. |
| **TypeScript Smart Contracts** | [**Create Hyperweb App**](https://github.com/hyperweb-io/create-hyperweb-app) | Build and deploy full-stack blockchain applications with TypeScript |
| **CosmWasm Contracts** | [**CosmWasm TS Codegen**](https://github.com/CosmWasm/ts-codegen) | Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. |
## Credits
π Built by Hyperweb (formerly Cosmology) βΒ if you like our tools, please checkout and contribute to [our github βοΈ](https://github.com/hyperweb-io)
## 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.