Skip to content

Commit

Permalink
chore: renaming packages (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain authored Nov 13, 2023
1 parent dbe61c2 commit 9d95160
Show file tree
Hide file tree
Showing 101 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-wallet-kit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
packages: write
strategy:
matrix:
package: [ wallet-kit,react-wallet-kit,vanilla-wallet-kit ]
package: [ dapp-kit, dapp-kit-ui, dapp-kit-react ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
6 changes: 3 additions & 3 deletions apps/sample-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@vechain/connex": "2.1.0",
"@vechain/picasso": "^2.1.1",
"@vechain/web3-providers-connex": "^1.1.2",
"@vechainfoundation/react-wallet-kit": "*",
"@vechainfoundation/vanilla-wallet-kit": "*",
"@vechainfoundation/wallet-kit": "*",
"@vechainfoundation/dapp-kit": "*",
"@vechainfoundation/dapp-kit-react": "*",
"@vechainfoundation/dapp-kit-ui": "*",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"framer-motion": "3.10.6",
Expand Down
4 changes: 2 additions & 2 deletions apps/sample-react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { JSX } from 'react';
import React from 'react';
import type { Options } from '@vechain/connex';
import type { WalletConnectOptions } from '@vechainfoundation/wallet-kit';
import { ConnexProvider } from '@vechainfoundation/react-wallet-kit';
import type { WalletConnectOptions } from '@vechainfoundation/dapp-kit';
import { ConnexProvider } from '@vechainfoundation/dapp-kit-react';
import { ChakraProvider } from '@chakra-ui/react';
import { NavBar, StyledContainer } from './Components/layout';
import { Homepage } from './Screens/Homepage';
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Components/AccountDetailBody.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, HStack, Image, Text, VStack } from '@chakra-ui/react';
import React, { useMemo } from 'react';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';
import { WalletSources } from '../Constants';
import { AddressButton } from './AddressButton';

Expand Down
4 changes: 2 additions & 2 deletions apps/sample-react-app/src/Components/AccountDetailModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HStack, Text } from '@chakra-ui/react';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import { useWallet } from '@vechainfoundation/react-wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';
import { useWallet } from '@vechainfoundation/dapp-kit-react';
import React, { useCallback } from 'react';
import { getPicassoImgSrc } from '../Utils/AccountUtils';
import { Dialog } from './shared';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ConnectWalletModal,
useWallet,
useWalletModal,
} from '@vechainfoundation/react-wallet-kit';
} from '@vechainfoundation/dapp-kit-react';
import { WalletIcon } from '@heroicons/react/24/solid';
import { AccountDetailModal } from './AccountDetailModal';
import { AddressButton } from './AddressButton';
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Components/layout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import type { JSX } from 'react';
import React from 'react';
import { Bars3Icon } from '@heroicons/react/24/solid';
import { useWallet } from '@vechainfoundation/react-wallet-kit';
import { useWallet } from '@vechainfoundation/dapp-kit-react';
import { AccountDetailBody } from '../AccountDetailBody';
import { SwitchWalletButton } from '../SwitchWalletButton';

Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Constants/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';

export const NODE_URL = 'https://testnet.vechain.org/';
export const NODE_NETWORK = 'test';
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Hooks/useCounter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useConnex } from '@vechainfoundation/react-wallet-kit';
import { useConnex } from '@vechainfoundation/dapp-kit-react';
import type { abi } from 'thor-devkit';

const _counter: abi.Function.Definition = {
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Logos/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { HTMLChakraProps } from '@chakra-ui/react';
import { Image } from '@chakra-ui/react';
import React from 'react';
import { VeWorldLogo as VWLogo } from '@vechainfoundation/vanilla-wallet-kit';
import { VeWorldLogo as VWLogo } from '@vechainfoundation/dapp-kit-ui';

type IIMage = HTMLChakraProps<'img'>;

Expand Down
2 changes: 1 addition & 1 deletion apps/sample-react-app/src/Screens/components/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import type { JSX } from 'react';
import React, { useCallback, useMemo } from 'react';
import { ArrowUpIcon } from '@heroicons/react/24/solid';
import { useWallet } from '@vechainfoundation/react-wallet-kit';
import { useWallet } from '@vechainfoundation/dapp-kit-react';
import { StyledCard } from '../../Components/shared';
import { useCounter } from '../../Hooks/useCounter';
import { AddressButton } from '../../Components';
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-vanilla-app/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable no-undef */
import { DAppKit } from '@vechainfoundation/vanilla-wallet-kit';
import { DAppKit } from '@vechainfoundation/dapp-kit-ui';

const walletConnectOptions = {
projectId: 'a0b855ceaf109dbc8426479a4c3d38d8',
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-vanilla-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@vechainfoundation/vanilla-wallet-kit": "*"
"@vechainfoundation/dapp-kit-ui": "*"
},
"devDependencies": {
"parcel": "^2.10.2"
Expand Down
4 changes: 2 additions & 2 deletions apps/sample-vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"root": true
},
"dependencies": {
"@vechainfoundation/vanilla-wallet-kit": "*",
"@vechainfoundation/wallet-kit": "*",
"@vechainfoundation/dapp-kit": "*",
"@vechainfoundation/dapp-kit-ui": "*",
"core-js": "^3.8.3",
"node-polyfill-webpack-plugin": "^2.0.1",
"vue": "^3.2.13",
Expand Down
4 changes: 2 additions & 2 deletions apps/sample-vue-app/src/connex/ConnexProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import {
ConnectResponse,
WalletConnectOptions,
WalletSource,
} from '@vechainfoundation/wallet-kit';
} from '@vechainfoundation/dapp-kit';
import type Connex from '@vechain/connex';
import {
ConnexSymbol,
WalletActionsSymbol,
WalletStateSymbol,
} from '@/connex/keys';
import { WalletActions, WalletState } from '@/connex/types';
import { DAppKit } from '@vechainfoundation/vanilla-wallet-kit';
import { DAppKit } from '@vechainfoundation/dapp-kit-ui';
const initWallets = (hasWcOptions: boolean) => {
const wallets: WalletSource[] = ['sync2'];
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-vue-app/src/connex/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConnectResponse, WalletSource } from '@vechainfoundation/wallet-kit';
import { ConnectResponse, WalletSource } from '@vechainfoundation/dapp-kit';

type WalletState = {
availableWallets: WalletSource[];
Expand Down
2 changes: 1 addition & 1 deletion apps/sample-vue-app/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createApp } from 'vue';
import App from './App.vue';
import '@vechainfoundation/vanilla-wallet-kit';
import '@vechainfoundation/dapp-kit-ui';

createApp(App).mount('#app');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"scripts": {
"build": "turbo run build",
"build-react-kit": "turbo run build --filter='@vechainfoundation/react-wallet-kit'",
"build-react-kit": "turbo run build --filter='@vechainfoundation/dapp-kit-react'",
"build:deps": "turbo build --no-daemon --filter='@vechainfoundation/*'",
"clean": "rm -rf .turbo .parcel-cache build && npx turbo@latest run clean",
"cucumber": "yarn && cucumber-js",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@vechainfoundation/react-wallet-kit`
# `@vechainfoundation/dapp-kit-react`

## Why ?

Expand All @@ -20,7 +20,7 @@ yarn build
## Usage

```bash
yarn add @vechainfoundation/react-wallet-kit
yarn add @vechainfoundation/dapp-kit-react
```

```typescript
Expand All @@ -35,7 +35,7 @@ const nodeOptions: Omit<Options, 'signer'> = {
- Optional: Configure wallet connect options

```typescript
import type { WalletConnectOptions } from '@vechainfoundation/wallet-kit';
import type { WalletConnectOptions } from '@vechainfoundation/dapp-kit';

const walletConnectOptions: WalletConnectOptions = {
projectId: '<PROJECT_ID>', // Create your project here: https://cloud.walletconnect.com/sign-up
Expand All @@ -51,7 +51,7 @@ const walletConnectOptions: WalletConnectOptions = {
- Initialise the `ConnexVendor`

```typescript jsx
import { ConnexProvider } from '@vechainfoundation/react-wallet-kit';
import { ConnexProvider } from '@vechainfoundation/dapp-kit-react';

export const App = (): JSX.Element => {
return (
Expand All @@ -72,8 +72,8 @@ export const App = (): JSX.Element => {
- Use the hooks provided by the `ConnexProvider`

```typescript jsx
import { useWallet, useConnex } from '@vechainfoundation/react-wallet-kit';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import { useWallet, useConnex } from '@vechainfoundation/dapp-kit-react';
import type { WalletSource } from '@vechainfoundation/dapp-kit';

// type WalletSource = 'wallet-connect' | 'veworld-extension' | 'sync2' | 'sync';
const mySource: WalletSource = 'veworld-extension';
Expand All @@ -93,8 +93,8 @@ const { vendor, thor } = useConnex();
- Use the `ConnectWalletButton` component to display a modal with the available wallets

```typescript jsx
import { ConnectWalletButton } from '@vechainfoundation/react-wallet-kit';
import { useWallet } from '@vechainfoundation/react-wallet-kit';
import { ConnectWalletButton } from '@vechainfoundation/dapp-kit-react';
import { useWallet } from '@vechainfoundation/dapp-kit-react';

const MyComponent = (): JSX.Element => {
const { account } = useWallet();
Expand Down Expand Up @@ -122,7 +122,7 @@ import {
ConnectWalletModal,
useWallet,
useWalletModal,
} from '@vechainfoundation/react-wallet-kit';
} from '@vechainfoundation/dapp-kit-react';

export const MyComponent = (): JSX.Element => {
const { account } = useWallet();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vechainfoundation/react-wallet-kit",
"name": "@vechainfoundation/dapp-kit-react",
"version": "0.0.0",
"private": false,
"license": "MIT",
Expand All @@ -19,8 +19,8 @@
"@vechain/connex": "2.1.0",
"@vechain/connex-framework": "2.1.0",
"@vechain/picasso": "^2.1.1",
"@vechainfoundation/vanilla-wallet-kit": "*",
"@vechainfoundation/wallet-kit": "*",
"@vechainfoundation/dapp-kit": "*",
"@vechainfoundation/dapp-kit-ui": "*",
"react-icons": "^4.11.0",
"styled-components": "^6.1.0",
"thor-devkit": "^2.0.9"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useContext, useState } from 'react';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import type { SourceInfo } from '@vechainfoundation/vanilla-wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';
import type { SourceInfo } from '@vechainfoundation/dapp-kit-ui';
import { ThemeContext } from '../../../provider/ThemeProvider';
import { useWallet } from '../../../ConnexProvider';
import { ConnectModalWithButtonWrapped } from './Wrapped/ConnectModalWithButtonWrapped';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { createComponent } from '@lit/react';
import { ConnectButtonWithModal } from '@vechainfoundation/vanilla-wallet-kit';
import { ConnectButtonWithModal } from '@vechainfoundation/dapp-kit-ui';

export const ConnectModalWithButtonWrapped = createComponent({
tagName: 'vwk-connect-button-with-modal',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import type { SourceInfo } from '@vechainfoundation/vanilla-wallet-kit';
import { ConnectModal } from '@vechainfoundation/vanilla-wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';
import type { SourceInfo } from '@vechainfoundation/dapp-kit-ui';
import { ConnectModal } from '@vechainfoundation/dapp-kit-ui';
import { createComponent } from '@lit/react';
import GlobalFonts from '../../../assets/fonts/fonts';
import { ThemeProvider } from '../../provider/ThemeProvider';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import React, {
useMemo,
useState,
} from 'react';
import type { WalletSource } from '@vechainfoundation/wallet-kit';
import { DAppKit } from '@vechainfoundation/vanilla-wallet-kit';
import type { WalletSource } from '@vechainfoundation/dapp-kit';
import { DAppKit } from '@vechainfoundation/dapp-kit-ui';
import type { ConnexContext, ConnexProviderOptions } from './types';

const STORAGE_PREFIX = '@vechainfoundation/wallet-kit';
const STORAGE_PREFIX = '@vechainfoundation/dapp-kit';
const persist = (key: 'source' | 'account', value: string): void => {
localStorage.setItem(`${STORAGE_PREFIX}${key}`, value);
};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import type { ReactNode } from 'react';
import React, { createContext, useState } from 'react';
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
import type { ThemeMode } from '@vechainfoundation/vanilla-wallet-kit';
import type { ThemeMode } from '@vechainfoundation/dapp-kit-ui';

interface Theme {
mode: ThemeMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
ConnectResponse,
WalletConnectOptions,
WalletSource,
} from '@vechainfoundation/wallet-kit';
} from '@vechainfoundation/dapp-kit';

export interface AccountState {
address: string | null;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@vechainfoundation/vanilla-wallet-kit`
# `@vechainfoundation/dapp-kit-ui`

## Why ?

Expand All @@ -21,15 +21,15 @@ yarn build
## Usage

```bash
yarn add @vechainfoundation/vanilla-wallet-kit
yarn add @vechainfoundation/dapp-kit-ui
```

- In your root `index.ts`

```typescript
import type { WalletConnectOptions } from '@vechainfoundation/wallet-kit';
import type { WalletConnectOptions } from '@vechainfoundation/dapp-kit';
import type { Options } from '@vechain/connex';
import { configureThorModal } from '@vechainfoundation/vanilla-wallet-kit';
import { configureThorModal } from '@vechainfoundation/dapp-kit-ui';

const walletConnectOptions: WalletConnectOptions = {
projectId: '<PROJECT_ID>', // Create your project here: https://cloud.walletconnect.com/sign-up
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vechainfoundation/vanilla-wallet-kit",
"name": "@vechainfoundation/dapp-kit-ui",
"version": "0.0.0",
"private": false,
"description": "Vanilla js wallet kit",
Expand All @@ -24,7 +24,7 @@
"watch": "tsup --watch"
},
"dependencies": {
"@vechainfoundation/wallet-kit": "*",
"@vechainfoundation/dapp-kit": "*",
"@wagmi/core": "^1.4.5",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/html": "^2.7.1",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ConnexOptions } from '@vechainfoundation/wallet-kit';
import { MultiWalletConnex } from '@vechainfoundation/wallet-kit';
import type { ConnexOptions } from '@vechainfoundation/dapp-kit';
import { MultiWalletConnex } from '@vechainfoundation/dapp-kit';
import { CustomWalletConnectModal, DAppKitModal } from './modal';

let connex: MultiWalletConnex | null = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TemplateResult } from 'lit';
import { html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import type { WalletManager } from '@vechainfoundation/wallet-kit';
import type { WalletManager } from '@vechainfoundation/dapp-kit';
import type { SourceInfo, Theme, ThemeMode } from '../../constants';
import { DAppKit } from '../../client';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TemplateResult } from 'lit';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import type { OpenOptions } from '@vechainfoundation/wallet-kit';
import type { OpenOptions } from '@vechainfoundation/dapp-kit';
import type { SourceInfo } from '../../constants';
import { Colors, WalletSources } from '../../constants';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TemplateResult } from 'lit';
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import type { WalletManager } from '@vechainfoundation/wallet-kit';
import type { WalletManager } from '@vechainfoundation/dapp-kit';
import type { SourceInfo } from '../../constants';
import { Colors } from '../../constants';
import { DAppKit } from '../../client';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
OpenOptions,
SubscribeModalState,
WCModal,
} from '@vechainfoundation/wallet-kit';
} from '@vechainfoundation/dapp-kit';
import { dispatchCustomEvent, subscribeToCustomEvent } from './utils';

const MODAL_STATE_EVENT = 'vwk-modal-state-change';
Expand Down
Loading

0 comments on commit 9d95160

Please sign in to comment.