A WordPress plugin providing Cardano Web3 wallet connections and wallet detection features via short codes and Gutenberg blocks, supporting all CIP-30 compliant wallets.
The root folder contains a .wp-env.json configuration for the development environment and the plugin folder.
We assume you have already installed wp-env using your preferred method or using a global install such as npm -g install @wordpress/env.
- node v20.13.1
- wp-env v10.2.0
- wp-scripts v27.9.0
You can zip the plugin from the root directory using creating cardano-connect.zip
npm run package
We use wp-env for the WordPress environment when working locally.
# Start your wp-env environment.
wp-env start
# Cron jobs may not run in local instalations, and can be invoked manually:
wp-env run cli wp cron event run --due-now
We use wp-scripts for the WordPress block development. Use these commands to work on the blocks.
# Enter the blocks directory.
cd cardano-connect/blocks
# Install dependencies.
npm install
# Start the wp-scripts enviromnent.
npm run start-connector
npm run start-assets
npm run start-balance
npm run start-pools
# Build blocks.
npm run build-connector
npm run build-assets
npm run build-balance
npm run build-pools
React is used for the frontend Web3 components and development environment. React scripts and css is then included in the plugin using wp_register_scrtips and wp_register_styles as necessary.
- typescript v5.5.3
- react v18.2.0
- react-app-rewired v2.2.1
- mesh.js v1.5.2
React nodes target block and shortcode HTML outputs defined in WordPress allowing us to bind various React nodes to user defined locations across their WordPress website.
# Enter react env
cd cardano-connect/react
# Install dependencies
npm install
# Build output for WordPress to consume
npm run build
# Start the react dev server (no WordPress using mockData).
npm run start
Deployments are handled via the WordPress plugin repository. PRs accepted in this repository will be submitted to the WordPress repo by the contributor team.
# Zip files ready for a WordPress instalation
npm run package
Distributed under the GPL-3.0 License. See LICENSE.txt for more information.
- Upstream SPO - @upstream_ada
- Devhalls - @devhalls
- Pendulum - @pendulumlondon
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this plugin better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request