-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2716 from kadena-community/feat/wallet-sdk-interface
Feat: Wallet sdk and example wallet
- Loading branch information
Showing
130 changed files
with
16,867 additions
and
572 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,9 @@ | ||
--- | ||
'@kadena/wallet-sdk': minor | ||
--- | ||
|
||
The Kadena Wallet SDK provides a simple and unified interface to integrate | ||
Kadena blockchain functionalities into your wallet applications. It abstracts | ||
the complexities of interacting with the Kadena network, allowing you to focus | ||
on building feature-rich wallet experiences without re-implementing common | ||
integrations. |
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,5 @@ | ||
--- | ||
'@kadena/hd-wallet': patch | ||
--- | ||
|
||
Improved documentation in readme |
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
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
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
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
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,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,148 @@ | ||
# Wallet SDK Example App | ||
|
||
The Wallet SDK Example App is a comprehensive showcase of the features and | ||
capabilities of the | ||
[Kadena Wallet SDK](https://github.com/kadena-community/kadena.js/blob/main/packages/libs/wallet-sdk). | ||
This app is designed to provide developers with an interactive platform to | ||
explore, understand, and experiment with every function of the SDK. | ||
|
||
## **Features** | ||
|
||
- **Function Demonstrations**: Every function of the Wallet SDK is demonstrated, | ||
including examples of: | ||
|
||
- Transaction creation. | ||
- Account querying. | ||
- Transfers | ||
- Cross-chain transfers. | ||
- Gas estimation. | ||
- Human Readible Name Resolving | ||
|
||
- **Live Code Execution**: Each function displays: | ||
- The code being executed. | ||
- The real-time response from the Kadena network. | ||
- The real-time response from the Kadena Graph | ||
- **Code Highlighter**: Interactive code snippets are highlighted for better | ||
understanding. | ||
- **Step-by-Step Guidance**: Navigate the app to learn how to implement each | ||
feature of the Wallet SDK. | ||
|
||
--- | ||
|
||
## **Getting Started** | ||
|
||
### **Prerequisites** | ||
|
||
Ensure you have the following installed: | ||
|
||
- **Node.js** (v16 or later) | ||
- **Yarn** or **npm** | ||
- A modern browser (Chrome, Firefox, etc.) | ||
|
||
### **Installation** | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/kadena-community/kadena.js.git | ||
cd kadena.js/packages/apps/wallet-sdk-example | ||
``` | ||
|
||
2. Install dependencies: | ||
|
||
```bash | ||
npm install | ||
# or | ||
yarn install | ||
# or | ||
pnpm install | ||
``` | ||
|
||
3. Start the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm run dev | ||
``` | ||
|
||
4. Open the app in your browser: | ||
```bash | ||
http://localhost:3000 | ||
``` | ||
|
||
--- | ||
|
||
## **Usage** | ||
|
||
1. Launch the app in your browser. | ||
2. Explore the features: | ||
- Select a option from the navigation menu. | ||
- View the code example and corresponding response. | ||
- Modify inputs (where applicable) to test custom scenarios. | ||
3. Use the app as a guide to integrate Wallet SDK functions into your own | ||
projects. | ||
|
||
--- | ||
|
||
## **Technical Details** | ||
|
||
This app is built using: | ||
|
||
- **React** for the UI. | ||
- **TypeScript** for type safety. | ||
- **Vite** for fast builds and development. | ||
- **Kadena Wallet SDK** for blockchain interactions. | ||
|
||
--- | ||
|
||
## **Development** | ||
|
||
To extend or modify or play with the app: | ||
|
||
1. Open the project in your favorite IDE. | ||
2. Navigate to the `src` folder to explore the codebase: | ||
- `components/`: Reusable React components. | ||
- `pages/`: Main pages showcasing the SDK functions. | ||
- `utils/`: Utility functions for interacting with the SDK. | ||
3. Add new features or update existing examples as needed. | ||
|
||
--- | ||
|
||
## **Contributing** | ||
|
||
Contributions are welcome! If you'd like to improve the app or add new features, | ||
please: | ||
|
||
1. Fork the repository. | ||
2. Create a new branch: | ||
```bash | ||
git checkout -b feature/your-feature-name | ||
``` | ||
3. Commit your changes: | ||
```bash | ||
git commit -m "Add your feature" | ||
``` | ||
4. Push your changes and create a pull request. | ||
|
||
--- | ||
|
||
## **License** | ||
|
||
This project is licensed under the BSD 3-Clause License. See the | ||
[LICENSE](https://github.com/kadena-community/kadena.js/LICENSE) file for | ||
details. | ||
|
||
--- | ||
|
||
## **Resources** | ||
|
||
- [Kadena Wallet SDK Documentation](https://github.com/kadena-community/kadena.js/tree/feat/wallet-sdk-interface/packages/libs/wallet-sdk/README.md) | ||
- [Kadena Official Documentation](https://docs.kadena.io/) | ||
- [Kadena GitHub Repository](https://github.com/kadena-io/) | ||
|
||
--- | ||
|
||
Happy coding! 🎉 |
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,29 @@ | ||
import js from '@eslint/js'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import globals from 'globals'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
{ ignores: ['dist'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
}, | ||
}, | ||
); |
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,23 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Kode+Mono:wght@400;500;600;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,54 @@ | ||
{ | ||
"name": "wallet-sdk-example-app", | ||
"version": "0.0.1", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc -b && vite build", | ||
"dev": "vite", | ||
"lint": "eslint .", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@kadena/client": "workspace:*", | ||
"@kadena/hd-wallet": "workspace:*", | ||
"@kadena/kode-icons": "workspace:*", | ||
"@kadena/kode-ui": "workspace:*", | ||
"@kadena/wallet-sdk": "workspace:*", | ||
"@popperjs/core": "^2.11.8", | ||
"@tanstack/react-query": "^5.32.0", | ||
"@vanilla-extract/css": "1.14.2", | ||
"@vanilla-extract/vite-plugin": "4.0.17", | ||
"clsx": "^2.1.1", | ||
"dompurify": "^3.2.1", | ||
"highlight.js": "^11.10.0", | ||
"html-react-parser": "^5.1.18", | ||
"jotai": "^2.10.1", | ||
"markdown-it": "^14.1.0", | ||
"next-themes": "^0.2.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.26.2" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@kadena-dev/shared-config": "workspace:*", | ||
"@types/markdown-it": "^14.1.2", | ||
"@types/react": "^18.2.79", | ||
"@types/react-dom": "^18.2.25", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@types/react-syntax-highlighter": "^15.5.13", | ||
"@vitejs/plugin-react-swc": "^3.2.2", | ||
"autoprefixer": "^10.4.20", | ||
"eslint": "^8.45.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.3", | ||
"globals": "^15.9.0", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "5.4.5", | ||
"typescript-eslint": "^8.7.0", | ||
"vite": "^5.4.8", | ||
"vite-plugin-node-polyfills": "^0.22.0" | ||
} | ||
} |
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,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.