-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7b0c29
commit 026f3b3
Showing
11 changed files
with
720 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
The Clear BSD License | ||
|
||
Copyright (c) 2024 Cosmos Kit Contributors | ||
Copyright (c) 2024 Interweb, Inc. <developers@cosmology.zone> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted (subject to the limitations in the disclaimer | ||
below) provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY | ||
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | ||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
# cosmos-kit | ||
|
||
<p align="center" width="100%"> | ||
<img height="90" src="https://user-images.githubusercontent.com/545047/190171432-5526db8f-9952-45ce-a745-bea4302f912b.svg" /> | ||
</p> | ||
|
||
<p align="center" width="100%"> | ||
<a href="https://github.com/cosmology-tech/cosmos-kit/actions/workflows/run-tests.yml"> | ||
<img height="20" src="https://github.com/cosmology-tech/cosmos-kit/actions/workflows/run-tests.yml/badge.svg" /> | ||
</a> | ||
<a href="https://github.com/cosmology-tech/lib-count"> | ||
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcosmology-tech%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Fcosmos-kit%2Ftotal.json"/> | ||
</a> | ||
<a href="https://github.com/cosmology-tech/lib-count"> | ||
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcosmology-tech%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Fcosmos-kit%2Fmonthly.json"/> | ||
</a> | ||
<br /> | ||
<a href="https://github.com/cosmology-tech/cosmos-kit/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-BSD%203--Clause%20Clear-blue.svg"></a> | ||
<a href="https://www.npmjs.com/package/@cosmos-kit/core"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/cosmos-kit?filename=packages%2Fcore%2Fpackage.json"></a> | ||
</p> | ||
|
||
Cosmos Kit is a univeral wallet adapter for developers to build apps that quickly and easily interact with Cosmos blockchains and wallets. | ||
|
||
## 🏁 Quickstart | ||
|
||
Get started quickly by using [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) to help you build high-quality Cosmos apps fast! | ||
|
||
## ⚙️ Configuration | ||
|
||
Check out [our docs here](https://docs.cosmology.zone/cosmos-kit/get-started) to configure CosmosKit. | ||
|
||
## ⚛️ CosmJS Signers | ||
|
||
If you want to get a cosmjs stargate or cosmwasm signer, [here are docs for our hooks](https://docs.cosmology.zone/cosmos-kit/hooks) | ||
|
||
## 📦 Packages | ||
|
||
| Name | Description | | ||
| --- | --- | | ||
| [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/cosmos-kit) | Single package for React developers to install Cosmos Kit | | ||
| [@cosmos-kit/core](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/core) | Core Cosmos Kit functionality | | ||
| [@cosmos-kit/walletconnect](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/walletconnect) | Mobile WalletConnect support for the Cosmos ecosystem | | ||
| [@cosmos-kit/react](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/react) | React integration with Interchain UI Modal for simple usage | | ||
| [@cosmos-kit/react-lite](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/react-lite) | A lightweight version of React integration without UI for customization | | ||
|
||
## 📦 Wallets | ||
|
||
Explore the range of wallet adapters available in our [wallets directory](https://github.com/cosmology-tech/cosmos-kit/tree/main/wallets). | ||
|
||
<p align="center" width="100%"> | ||
<a href="https://www.keplr.app/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/keplr.svg" /> | ||
</a> | ||
<a href="https://www.ledger.com/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/ledger.png" /> | ||
</a> | ||
<a href="https://www.leapwallet.io/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/leap.png" /> | ||
</a> | ||
<a href="https://wallet.cosmostation.io/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/cosmostation.png" /> | ||
</a> | ||
<a href="https://www.xdefi.io/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/xdefi.svg" /> | ||
</a> | ||
<a href="https://www.exodus.com/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/exodus.png" /> | ||
</a> | ||
<br /> | ||
<a href="https://crypto.com/defi-wallet"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/cdcwallet.png" /> | ||
</a> | ||
<a href="https://www.okx.com/web3"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/okxwallet.svg" /> | ||
</a> | ||
<a href="https://walletconnect.com/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/wallet-connect.svg" /> | ||
</a> | ||
<a href="https://chromewebstore.google.com/detail/station-wallet/aiifbnbfobpmeekipheeijimdpnlpgpp?hl=en"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/station.svg" /> | ||
</a> | ||
<a href="https://trustwallet.com/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/trust.png" /> | ||
</a> | ||
<a href="https://omni.app/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/omni.png" /> | ||
</a> | ||
<br /> | ||
<a href="https://compasswallet.io/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/compass.png" /> | ||
</a> | ||
<a href="https://coin98.com/wallet"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/coin98.png" /> | ||
</a> | ||
<a href="https://chromewebstore.google.com/detail/galaxy-station-wallet/akckefnapafjbpphkefbpkpcamkoaoai?hl=en"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/galaxystation.svg" /> | ||
</a> | ||
<a href="https://vectis.space/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/vectis.png" /> | ||
</a> | ||
<a href="https://www.frontier.xyz/"> | ||
<img width="30px" src="https://raw.githubusercontent.com/cosmology-tech/cosmos-kit/main/public/images/logos/wallets/frontier.png" /> | ||
</a> | ||
</p> | ||
|
||
|
||
## 🔌 Integrating Wallets | ||
|
||
See our docs on [integrating your wallet](https://docs.cosmology.zone/cosmos-kit/integrating-wallets) | ||
|
||
### 🚀 Running Example | ||
|
||
For high-level examples suitable for most developers, explore our [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-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 Next.js Example](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/example) | ||
|
||
This example demonstrates a Next.js project that integrates the `@cosmos-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/cosmology-tech/cosmos-kit/tree/main/packages/example/pages/wallet-manager) | ||
|
||
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. | ||
|
||
- `/wallet-manager` - Index page for wallet functionality | ||
- `/wallet-manager/wallet-operate` - Operate Wallet Directly | ||
- `/wallet-manager/main-wallets` - Show All Main Wallets | ||
- `/wallet-manager/wallet-manager` - Wallet Manager Without Hook | ||
- `/wallet-manager/wallet-repos` - Show All Wallet Repos | ||
- `/wallet-manager/wallet-repo` - Show One Wallet Repo | ||
|
||
## 🛠 Developing | ||
|
||
Checkout the repository and bootstrap the yarn workspace: | ||
|
||
```sh | ||
# Clone the repo. | ||
git clone https://github.com/cosmology-tech/cosmos-kit | ||
cd cosmos-kit | ||
yarn | ||
``` | ||
|
||
### Building | ||
|
||
```sh | ||
yarn build | ||
``` | ||
|
||
### Publishing | ||
|
||
``` | ||
lerna publish | ||
# lerna publish minor | ||
# lerna publish major | ||
``` | ||
|
||
## Related | ||
|
||
Checkout these related projects: | ||
|
||
- [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. | ||
- [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. | ||
- [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. | ||
- [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. | ||
- [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command. | ||
- [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. | ||
- [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain. | ||
|
||
## Credits | ||
|
||
🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator) | ||
|
||
## 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { wallets } from './wallets'; | ||
import { ChainName, ChainWalletBase, SignerOptions, WalletModalProps, WalletStatus } from '@cosmos-kit/core'; | ||
export { WalletStatus, ChainWalletBase }; | ||
export type { ChainName, SignerOptions, WalletModalProps, }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChainWalletBase = exports.WalletStatus = exports.wallets = void 0; | ||
var wallets_1 = require("./wallets"); | ||
Object.defineProperty(exports, "wallets", { enumerable: true, get: function () { return wallets_1.wallets; } }); | ||
const core_1 = require("@cosmos-kit/core"); | ||
Object.defineProperty(exports, "ChainWalletBase", { enumerable: true, get: function () { return core_1.ChainWalletBase; } }); | ||
Object.defineProperty(exports, "WalletStatus", { enumerable: true, get: function () { return core_1.WalletStatus; } }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { MainWalletBase } from '@cosmos-kit/core'; | ||
export declare type WalletName = 'keplr' | 'cosmostation' | 'ledger' | 'okxwallet' | 'station' | 'leap' | 'trust' | 'xdefi' | 'vectis' | 'frontier' | 'fin' | 'omni' | 'coin98' | 'shell' | 'compass' | 'tailwind' | 'owallet' | 'exodus' | 'galaxystation' | 'cdcwallet'; | ||
export declare type WalletList<E extends MainWalletBase | null, M extends MainWalletBase | null> = (E extends MainWalletBase ? M extends MainWalletBase ? [E, M] : [E] : M extends MainWalletBase ? [M] : []) & { | ||
mobile: M | null; | ||
extension: E | null; | ||
}; | ||
export declare function createWalletList<ExtensionWallet extends MainWalletBase | null, MobileWallet extends MainWalletBase | null, MetaMaskSnap extends MainWalletBase | null>(extension: ExtensionWallet | null, mobile: MobileWallet | null, snap?: MetaMaskSnap): WalletList<ExtensionWallet, MobileWallet>; | ||
export declare const keplr: WalletList<import("@cosmos-kit/keplr-extension").KeplrExtensionWallet, import("@cosmos-kit/keplr-mobile").KeplrMobileWallet>; | ||
export declare const cosmostation: WalletList<import("@cosmos-kit/cosmostation-extension").CosmostationExtensionWallet, import("@cosmos-kit/cosmostation-mobile").CosmostationMobileWallet>; | ||
export declare const ledger: import("@cosmos-kit/ledger/cjs/web-usb-hid").LedgerMainWallet[]; | ||
export declare const leap: WalletList<import("@cosmos-kit/leap-extension").LeapExtensionWallet, import("@cosmos-kit/leap-mobile").LeapMobileWallet>; | ||
export declare const station: WalletList<import("@cosmos-kit/station-extension").StationExtensionWallet, any>; | ||
export declare const okxwallet: WalletList<import("@cosmos-kit/okxwallet-extension").OkxwalletExtensionWallet, any>; | ||
export declare const trust: WalletList<import("@cosmos-kit/trust-extension").TrustExtensionWallet, import("@cosmos-kit/trust-mobile").TrustMobileWallet>; | ||
export declare const xdefi: WalletList<import("@cosmos-kit/xdefi-extension").XDEFIExtensionWallet, any>; | ||
export declare const vectis: WalletList<import("@cosmos-kit/vectis-extension").VectisExtensionWallet, any>; | ||
export declare const frontier: WalletList<import("@cosmos-kit/frontier-extension").FrontierExtensionWallet, any>; | ||
export declare const fin: WalletList<import("@cosmos-kit/fin-extension").FinExtensionWallet, any>; | ||
export declare const omni: WalletList<any, import("@cosmos-kit/omni-mobile").OmniMobileWallet>; | ||
export declare const shell: WalletList<import("@cosmos-kit/shell-extension").ShellExtensionWallet, any>; | ||
export declare const coin98: WalletList<import("@cosmos-kit/coin98-extension").Coin98ExtensionWallet, any>; | ||
export declare const compass: WalletList<import("@cosmos-kit/compass-extension").CompassExtensionWallet, any>; | ||
export declare const exodus: WalletList<import("@cosmos-kit/exodus-extension").ExodusExtensionWallet, any>; | ||
export declare const tailwind: WalletList<MainWalletBase, any>; | ||
export declare const owallet: WalletList<import("@cosmos-kit/owallet-extension").OwalletExtensionWallet, any>; | ||
export declare const galaxystation: WalletList<import("@cosmos-kit/galaxy-station-extension").GalaxyStationExtensionWallet, any>; | ||
export declare const cdcwallet: WalletList<import("@cosmos-kit/cdcwallet-extension").CdcwalletExtensionWallet, any>; | ||
export declare type SubWalletList = MainWalletBase[] & { | ||
get mobile(): MainWalletBase[]; | ||
get extension(): MainWalletBase[]; | ||
}; | ||
export declare type AllWalletList = SubWalletList & { | ||
keplr: typeof keplr; | ||
cosmostation: typeof cosmostation; | ||
ledger: typeof ledger; | ||
okxwallet: typeof okxwallet; | ||
station: typeof station; | ||
leap: typeof leap; | ||
trust: typeof trust; | ||
xdefi: typeof xdefi; | ||
vectis: typeof vectis; | ||
frontier: typeof frontier; | ||
fin: typeof fin; | ||
omni: typeof omni; | ||
coin98: typeof coin98; | ||
compass: typeof compass; | ||
exodus: typeof exodus; | ||
tailwind: typeof tailwind; | ||
owallet: typeof owallet; | ||
galaxystation: typeof owallet; | ||
cdcwallet: typeof cdcwallet; | ||
for: (...names: WalletName[]) => SubWalletList; | ||
not: (...names: WalletName[]) => SubWalletList; | ||
}; | ||
export declare function defineGetters(wallets: MainWalletBase[]): SubWalletList; | ||
export declare function createAllWalletList(ws: MainWalletBase[]): AllWalletList; | ||
export declare const wallets: AllWalletList; |
Oops, something went wrong.