Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into bump-web3auth-9
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency committed Jan 10, 2025
2 parents 3ca753d + 4c801e6 commit 6ce7587
Show file tree
Hide file tree
Showing 177 changed files with 6,637 additions and 8,690 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</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>
<a href="https://www.npmjs.com/package/cosmos-kit"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/cosmos-kit?filename=packages%2Fcosmos-kit%2Fpackage.json"></a>
</p>

Cosmos Kit is a universal wallet adapter for developers to build apps that quickly and easily interact with Cosmos blockchains and wallets.
Expand Down
8 changes: 8 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.15.1](https://github.com/cosmology-tech/cosmos-kit/compare/@cosmos-kit/[email protected]...@cosmos-kit/[email protected]) (2025-01-07)

**Note:** Version bump only for package @cosmos-kit/core





# [2.15.0](https://github.com/cosmology-tech/cosmos-kit/compare/@cosmos-kit/[email protected]...@cosmos-kit/[email protected]) (2024-10-09)

**Note:** Version bump only for package @cosmos-kit/core
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmos-kit/core",
"version": "2.15.0",
"version": "2.15.1",
"description": "cosmos-kit wallet connector core package",
"author": "[email protected]",
"contributors": [
Expand Down Expand Up @@ -79,7 +79,7 @@
"@cosmjs/cosmwasm-stargate": "^0.32.3",
"@cosmjs/proto-signing": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
"@dao-dao/cosmiframe": "^0.1.0",
"@dao-dao/cosmiframe": "^1.0.0-rc.1",
"@walletconnect/types": "2.11.0",
"bowser": "2.11.0",
"cosmjs-types": "^0.9.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/cosmiframe/cosmiframe.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Origin } from '@dao-dao/cosmiframe';

import { cosmiframeExtensionInfo, CosmiframeWallet } from './extension';

export const makeCosmiframeWallet = (allowedParentOrigins: string[]) =>
export const makeCosmiframeWallet = (allowedParentOrigins: Origin[]) =>
new CosmiframeWallet({
...cosmiframeExtensionInfo,
allowedParentOrigins,
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/cosmiframe/extension/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Origin } from '@dao-dao/cosmiframe';

import { Wallet } from '../../types';

export type CosmiframeWalletInfo = Wallet & {
allowedParentOrigins: string[];
allowedParentOrigins: Origin[];
};
14 changes: 10 additions & 4 deletions packages/core/src/manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import type { AssetList, Chain } from '@chain-registry/types';
import { isInIframe } from '@dao-dao/cosmiframe';
import { isInIframe, Origin } from '@dao-dao/cosmiframe';
import Bowser from 'bowser';
import EventEmitter from 'events';

Expand Down Expand Up @@ -52,7 +52,13 @@ export class WalletManager extends StateBase {
logger: Logger,
throwErrors: boolean | 'connect_only',
subscribeConnectEvents = true,
allowedCosmiframeParentOrigins?: string[],
allowedCosmiframeParentOrigins: Origin[] = [
/^https?:\/\/localhost(:\d+)?/,
/^https:\/\/(.+\.)?osmosis\.zone/,
/^https:\/\/(.+\.)?daodao\.zone/,
/^https:\/\/.+-da0da0\.vercel\.app/,
/^https:\/\/(.+\.)?abstract\.money/,
],
assetLists?: AssetList[],
defaultNameService?: NameServiceName,
walletConnectOptions?: WalletConnectOptions,
Expand Down Expand Up @@ -87,8 +93,8 @@ export class WalletManager extends StateBase {
];
wallets.forEach(
({ walletName }) =>
(this._reconnectMap[walletName] = () =>
this._reconnect(walletName, true))
(this._reconnectMap[walletName] = () =>
this._reconnect(walletName, true))
);
this.init(
chains,
Expand Down
24 changes: 24 additions & 0 deletions packages/cosmos-kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.23.4](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.23.4) (2025-01-07)

**Note:** Version bump only for package cosmos-kit





## [2.23.3](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.23.3) (2025-01-07)

**Note:** Version bump only for package cosmos-kit





## [2.23.2](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.23.2) (2025-01-07)

**Note:** Version bump only for package cosmos-kit





## [2.23.1](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.23.1) (2024-12-16)

**Note:** Version bump only for package cosmos-kit
Expand Down
38 changes: 17 additions & 21 deletions packages/cosmos-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cosmos-kit",
"version": "2.23.1",
"version": "2.23.4",
"description": "cosmos-kit wallet connector",
"author": "[email protected]",
"contributors": [
Expand Down Expand Up @@ -71,25 +71,21 @@
"url": "https://github.com/cosmology-tech/cosmos-kit/issues"
},
"dependencies": {
"@cosmos-kit/cdcwallet": "^2.15.2",
"@cosmos-kit/coin98": "^2.13.2",
"@cosmos-kit/compass": "^2.13.2",
"@cosmos-kit/cosmostation": "^2.14.1",
"@cosmos-kit/ctrl": "^2.13.1",
"@cosmos-kit/exodus": "^2.12.1",
"@cosmos-kit/fin": "^2.13.2",
"@cosmos-kit/frontier": "^2.12.1",
"@cosmos-kit/galaxy-station": "^2.12.1",
"@cosmos-kit/keplr": "^2.14.2",
"@cosmos-kit/leap": "^2.14.2",
"@cosmos-kit/ledger": "^2.13.1",
"@cosmos-kit/okxwallet-extension": "^2.13.0",
"@cosmos-kit/omni": "^2.12.1",
"@cosmos-kit/owallet": "^2.14.1",
"@cosmos-kit/shell": "^2.13.2",
"@cosmos-kit/station": "^2.12.1",
"@cosmos-kit/tailwind": "^1.7.1",
"@cosmos-kit/trust": "^2.13.1",
"@cosmos-kit/vectis": "^2.13.2"
"@cosmos-kit/cdcwallet": "^2.15.3",
"@cosmos-kit/coin98": "^2.13.3",
"@cosmos-kit/compass": "^2.13.3",
"@cosmos-kit/cosmostation": "^2.14.2",
"@cosmos-kit/ctrl": "^2.13.2",
"@cosmos-kit/exodus": "^2.12.2",
"@cosmos-kit/fin": "^2.13.3",
"@cosmos-kit/keplr": "^2.14.3",
"@cosmos-kit/leap": "^2.14.3",
"@cosmos-kit/ledger": "^2.13.2",
"@cosmos-kit/okxwallet-extension": "^2.13.1",
"@cosmos-kit/omni": "^2.12.2",
"@cosmos-kit/owallet": "^2.14.2",
"@cosmos-kit/shell": "^2.13.3",
"@cosmos-kit/tailwind": "^1.7.2",
"@cosmos-kit/trust": "^2.13.2"
}
}
34 changes: 5 additions & 29 deletions packages/cosmos-kit/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { wallets as compassExtension } from '@cosmos-kit/compass-extension';
import { wallets as okxwalletExtension } from '@cosmos-kit/okxwallet-extension';
import { wallets as cosmostationExtension } from '@cosmos-kit/cosmostation-extension';
import { wallets as cosmostationMobile } from '@cosmos-kit/cosmostation-mobile';
import { wallets as frontierExtension } from '@cosmos-kit/frontier-extension';
import { wallets as keplrExtension } from '@cosmos-kit/keplr-extension';
import { wallets as keplrMobile } from '@cosmos-kit/keplr-mobile';
import { wallets as owalletExtension } from '@cosmos-kit/owallet-extension';
Expand All @@ -15,28 +14,22 @@ import { wallets as leapMetamaskCosmosSnap } from '@cosmos-kit/leap-metamask-cos
import { wallets as ledgerUSB } from '@cosmos-kit/ledger';
import { wallets as omniMobile } from '@cosmos-kit/omni-mobile';
import { wallets as finExtension } from '@cosmos-kit/fin-extension';
import { wallets as stationExtension } from '@cosmos-kit/station-extension';
import { wallets as trustExtension } from '@cosmos-kit/trust-extension';
import { wallets as trustMobile } from '@cosmos-kit/trust-mobile';
import { wallets as shellExtension } from '@cosmos-kit/shell-extension';
import { wallets as vectisExtension } from '@cosmos-kit/vectis-extension';
import { wallets as ctrlExtension } from '@cosmos-kit/ctrl-extension';
import { wallets as exodusExtension } from '@cosmos-kit/exodus-extension';
import { wallets as tailwindWallet } from '@cosmos-kit/tailwind';
import { wallets as galaxyStationExtension } from '@cosmos-kit/galaxy-station-extension';
import { wallets as cdcwalletExtension } from '@cosmos-kit/cdcwallet-extension';

export type WalletName =
| 'keplr'
| 'cosmostation'
| 'ledger'
| 'okxwallet'
| 'station'
| 'leap'
| 'trust'
| 'ctrl'
| 'vectis'
| 'frontier'
| 'fin'
| 'omni'
| 'coin98'
Expand All @@ -45,22 +38,21 @@ export type WalletName =
| 'tailwind'
| 'owallet'
| 'exodus'
| 'galaxystation'
| 'cdcwallet';

export type WalletList<
E extends MainWalletBase | null,
M extends MainWalletBase | null
> = (E extends MainWalletBase
? M extends MainWalletBase
? [E, M]
: [E]
? [E, M]
: [E]
: M extends MainWalletBase
? [M]
: []) & {
mobile: M | null;
extension: E | null;
};
mobile: M | null;
extension: E | null;
};

export function createWalletList<
ExtensionWallet extends MainWalletBase | null,
Expand Down Expand Up @@ -90,12 +82,9 @@ export const leap = createWalletList(
leapMobile[0],
leapMetamaskCosmosSnap[0]
);
export const station = createWalletList(stationExtension[0], null);
export const okxwallet = createWalletList(okxwalletExtension[0], null);
export const trust = createWalletList(trustExtension[0], trustMobile[0]);
export const ctrl = createWalletList(ctrlExtension[0], null);
export const vectis = createWalletList(vectisExtension[0], null);
export const frontier = createWalletList(frontierExtension[0], null);
export const fin = createWalletList(finExtension[0], null);
export const omni = createWalletList(null, omniMobile[0]);
export const shell = createWalletList(shellExtension[0], null);
Expand All @@ -104,7 +93,6 @@ export const compass = createWalletList(compassExtension[0], null);
export const exodus = createWalletList(exodusExtension[0], null);
export const tailwind = createWalletList(tailwindWallet[0], null);
export const owallet = createWalletList(owalletExtension[0], owalletMobile[0]);
export const galaxystation = createWalletList(galaxyStationExtension[0], null);
export const cdcwallet = createWalletList(cdcwalletExtension[0], null);

export type SubWalletList = MainWalletBase[] & {
Expand All @@ -117,20 +105,16 @@ export type AllWalletList = SubWalletList & {
cosmostation: typeof cosmostation;
ledger: typeof ledger;
okxwallet: typeof okxwallet;
station: typeof station;
leap: typeof leap;
trust: typeof trust;
ctrl: typeof ctrl;
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 galaxystation;
cdcwallet: typeof cdcwallet;
for: (...names: WalletName[]) => SubWalletList;
not: (...names: WalletName[]) => SubWalletList;
Expand Down Expand Up @@ -160,20 +144,16 @@ export function createAllWalletList(ws: MainWalletBase[]) {
wallets.cosmostation = cosmostation;
wallets.ledger = ledger;
wallets.okxwallet = okxwallet;
wallets.station = station;
wallets.leap = leap;
wallets.trust = trust;
wallets.ctrl = ctrl;
wallets.vectis = vectis;
wallets.frontier = frontier;
wallets.fin = fin;
wallets.omni = omni;
wallets.coin98 = coin98;
wallets.compass = compass;
wallets.exodus = exodus;
wallets.tailwind = tailwind;
wallets.owallet = owallet;
wallets.galaxystation = galaxystation;
wallets.cdcwallet = cdcwallet;

defineGetters(wallets);
Expand Down Expand Up @@ -211,19 +191,15 @@ export const wallets = createAllWalletList([
...leap,
...ledger,
...okxwallet,
...station,
...trust,
...cosmostation,
...ctrl,
...vectis,
...frontier,
...fin,
...omni,
...coin98,
...compass,
...exodus,
...tailwind,
...owallet,
...galaxystation,
...cdcwallet,
]);
24 changes: 24 additions & 0 deletions packages/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.28.4](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.28.4) (2025-01-07)

**Note:** Version bump only for package docs





## [2.28.3](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.28.3) (2025-01-07)

**Note:** Version bump only for package docs





## [2.28.2](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.28.2) (2025-01-07)

**Note:** Version bump only for package docs





## [2.28.1](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@2.28.1) (2024-12-16)

**Note:** Version bump only for package docs
Expand Down
8 changes: 4 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "2.28.1",
"version": "2.28.4",
"private": true,
"main": "index.js",
"license": "MIT",
Expand All @@ -19,11 +19,11 @@
"deploy:all": "npm run export && npm run deploy && ./seo/prepare.sh"
},
"dependencies": {
"@cosmos-kit/core": "^2.15.0",
"@cosmos-kit/react": "^2.21.1",
"@cosmos-kit/core": "^2.15.1",
"@cosmos-kit/react": "^2.21.2",
"@interchain-ui/react": "^1.23.13",
"chain-registry": "^1.64.13",
"cosmos-kit": "^2.23.1",
"cosmos-kit": "^2.23.4",
"fast-fuzzy": "^1.12.0",
"flexsearch": "^0.7.43",
"framer-motion": "^9.0.7",
Expand Down
1 change: 0 additions & 1 deletion packages/docs/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function MyApp({ Component, pageProps }: AppProps) {
"fin",
"tailwind",
"owallet",
"galaxystation",
"cdcwallet"
),
// ...web3AuthWallets,
Expand Down
8 changes: 8 additions & 0 deletions packages/example-lite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.14.2](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@1.14.2) (2025-01-07)

**Note:** Version bump only for package example-lite





## [1.14.1](https://github.com/cosmology-tech/cosmos-kit/compare/[email protected]@1.14.1) (2024-12-16)

**Note:** Version bump only for package example-lite
Expand Down
Loading

0 comments on commit 6ce7587

Please sign in to comment.