Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflicts - main-v2 #320

Merged
merged 17 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc.js

This file was deleted.

11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,5 @@ yarn-error.log*
.vscode
.parcel-cache

veworld-dist
.reports

packages/**/dist
packages/**/.turbo
packages/**/node_modules
apps/**/dist
apps/**/.turbo
apps/**/node_modules
docs/**/dist

coverageUnit
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Vechain
Copyright (c) 2023 VeChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
62 changes: 35 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# vechain-dapp-kit

The Vechain DAppKit is a TypeScript library that facilitates seamless interaction between vechain wallets (veworld, sync2)
and dApps, enhancing user experience and developer convenience. Please refer to [Vechain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers/dapp-kit) for full documentation and usage.
<div align="center">
<h1><code>vechain-dapp-kit</code></h1>
<p>
<strong>A TypeScript library that facilitates seamless interaction between VeChain wallets.</strong>
</p>
<p>
<a href="https://sonarcloud.io/project/overview?id=vechain_vechain-dapp-kit"><img src="https://sonarcloud.io/api/project_badges/measure?project=vechain_vechain-dapp-kit&metric=alert_status&token=69ceb851539382455c3eba073d1690bb58147af5" alt="Quality Gate Status"></a>
<a href="https://sonarcloud.io/project/overview?id=vechain_vechain-dapp-kit"><img src="https://sonarcloud.io/api/project_badges/measure?project=vechain_vechain-dapp-kit&metric=security_rating&token=69ceb851539382455c3eba073d1690bb58147af5" alt="Security Rating"></a>
<a href="https://sonarcloud.io/project/overview?id=vechain_vechain-dapp-kit"><img src="https://sonarcloud.io/api/project_badges/measure?project=vechain_vechain-dapp-kit&metric=sqale_rating&token=69ceb851539382455c3eba073d1690bb58147af5" alt="Maintainability Rating"></a>
<a href="https://github.com/vechain/vechain-dapp-kit/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
</p>
</div>

## Introduction

The VeChain DAppKit is a TypeScript library that facilitates seamless interaction between VeChain wallets (VeWorld, sync2)
and dApps, enhancing user experience and developer convenience. Please refer to [VeChain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers/dapp-kit) for full documentation and usage.

## Table of Contents

Expand All @@ -19,34 +32,24 @@ and dApps, enhancing user experience and developer convenience. Please refer to
## Why ?

- Allow easy interaction with all wallets.
- Currently, connex only plays nice with Sync / Sync2
- Currently, Connex only plays nice with Sync / Sync2
- Enable a better UX for users

## Key features

Key Features a.k.a scope

1. wallet connectivity

key components that handle interaction with veworld and sync 2

2. customizable UI

ability to totally customize the UI of components

3. User Experience
1. **Wallet Connectivity**: Key components that handle interaction with VeWorld and Sync 2.

Consistent experience with Ethereum and other chains
2. **Customizable UI**: Ability to totally customize the UI of components.

4. Developer friendly
3. **User Experience**: Consistent experience with Ethereum and other chains.

Easy to adopt with proper documentation.
4. **Developer friendly**: Easy to adopt with proper documentation.

---

## Contributing

- Please refer to the [Contributing Guide](./CONTRIBUTING.md) for more information on how to contribute to the project.
Please refer to the [Contributing Guide](./CONTRIBUTING.md) for more information on how to contribute to the project.

---

Expand Down Expand Up @@ -163,18 +166,23 @@ yarn test:e2e:headless

## Further Documentation & Usage

- Please refer to [Vechain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers) for more information
- Please refer to [VeChain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers) for more information
on how to use the library.

---

## Publishing

```bash
git clone [email protected]:vechainfoundation/vechain-dapp-kit.git
cd vechain-dapp-kit
git checkout X.Y.Z
yarn install:all
yarn build:release X.Y.Z
yarn changeset publish
# prepare the release, this will check out the release branch, install dependencies, build packages, test and update the package versions
yarn prepare:release X.Y.Z
```

Create the PR for the release branch `vX.Y.Z`.

When the PR is merged, create the release on github called `X.Y.Z`, it will automatically tag the commit with the version `X.Y.Z`.

```bash
# publish the release
yarn publish:release X.Y.Z
```
17 changes: 17 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import tseslint from 'typescript-eslint';

export default tseslint.config({
ignores: ['**/*.config.ts', 'dist/**'],
extends: [...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-console': ['error', { allow: ['error'] }],
'eslint-comments/no-unused-disable': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
});
9 changes: 0 additions & 9 deletions examples/sample-angular-app/.eslintrc.js

This file was deleted.

6 changes: 2 additions & 4 deletions examples/sample-angular-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"clean": "rm -rf dist .turbo .angular",
"dev": "ng serve --port 5004",
"gh-pages-build": "ng build --configuration development --base-href '/vechain-dapp-kit/angular/'",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"preview": "ng serve --port 5004",
"purge": "yarn clean; rm -rf node_modules",
"watch": "ng build --watch --configuration development"
Expand Down Expand Up @@ -50,14 +49,13 @@
"@angular/cli": "^18.2.2",
"@angular/compiler-cli": "^18.2.2",
"@types/jasmine": "~3.10.0",
"@types/node": "^22.9.0",
"@vechain/repo-config": "https://github.com/vechain/repo-config#v0.0.1",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "5.5.4"
"typescript": "5.4.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable @typescript-eslint/no-unsafe-assignment
// eslint-disable @typescript-eslint/no-unsafe-member-access
// Packages
import packageInfo from '../../package.json';

Expand All @@ -12,7 +11,6 @@ const baseUrl = scheme + host + port + path;

export const environment = {
production: true,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
version: packageInfo.version,
appName: 'EasyAngular',
envName: 'prod',
Expand Down
2 changes: 0 additions & 2 deletions examples/sample-angular-app/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable @typescript-eslint/no-unsafe-assignment
// eslint-disable @typescript-eslint/no-unsafe-member-access
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
Expand All @@ -18,7 +17,6 @@ const baseUrl = scheme + host + port + path;

export const environment = {
production: false,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
version: packageInfo.version,
appName: 'EasyAngular',
envName: 'local',
Expand Down
1 change: 0 additions & 1 deletion examples/sample-angular-app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent, {
providers: [],
// eslint-disable-next-line no-console
}).catch((err) => console.error(err));
3 changes: 1 addition & 2 deletions examples/sample-angular-app/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
Expand Down Expand Up @@ -55,6 +53,7 @@ import 'zone.js'; // Included with Angular CLI.

import '@angular/localize/init';
(window as any).global = window;
// eslint-disable-next-line @typescript-eslint/no-require-imports
global.Buffer = global.Buffer || require('buffer').Buffer;
(window as any).process = {
env: { DEBUG: undefined },
Expand Down
10 changes: 0 additions & 10 deletions examples/sample-angular-app/tsconfig.spec.json

This file was deleted.

2 changes: 0 additions & 2 deletions examples/sample-next-app/.eslintignore

This file was deleted.

10 changes: 5 additions & 5 deletions examples/sample-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"purge": "yarn clean; rm -rf node_modules"
},
"dependencies": {
"@vechain/dapp-kit": "workspace:^",
"@vechain/dapp-kit-react": "workspace:^",
"@vechain/dapp-kit-ui": "workspace:^",
"next": "15.0.3",
"@vechain/dapp-kit": "*",
"@vechain/dapp-kit-react": "*",
"@vechain/dapp-kit-ui": "*",
"next": "14.2.10",
"react": "^18",
"react-dom": "^18"
},
Expand All @@ -23,7 +23,7 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint": "^9.12.0",
"eslint-config-next": "14.1.4",
"typescript": "5.3.3"
}
Expand Down
8 changes: 7 additions & 1 deletion examples/sample-next-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
},
"typeRoots": ["node_modules/@types"]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"dist/types/**/*.ts"
],
"exclude": ["node_modules"]
}
18 changes: 0 additions & 18 deletions examples/sample-react-app/.eslintrc.cjs

This file was deleted.

17 changes: 17 additions & 0 deletions examples/sample-react-app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import tseslint from 'typescript-eslint';

export default tseslint.config({
ignores: ['**/*.config.ts', 'dist/**'],
extends: [...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'no-console': ['error', { allow: ['error'] }],
'eslint-comments/no-unused-disable': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
});
6 changes: 3 additions & 3 deletions examples/sample-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf dist .turbo",
"dev": "vite",
"gh-pages-build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint",
"preview": "vite preview --mode=development",
"purge": "yarn clean; rm -rf node_modules",
"test": "vitest"
Expand All @@ -23,7 +23,7 @@
"ethers": "6.13.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vite": "^5.0.12"
"vite": "^5.3.6"
},
"devDependencies": {
"@originjs/vite-plugin-commonjs": "^1.0.3",
Expand All @@ -32,7 +32,7 @@
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.53.0",
"eslint": "^9.12.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"react-test-renderer": "^18.2.0",
Expand Down
Loading
Loading