From fd6c08f4f78f26aeaa792559d48e1b4f48415491 Mon Sep 17 00:00:00 2001 From: Kris Urbas <605420+krzysu@users.noreply.github.com> Date: Sun, 3 Nov 2024 13:43:05 +0100 Subject: [PATCH] chore: update links after repo rename --- CHANGELOG.md | 48 ++++++++++++++ README.md | 14 ++-- RELEASE.md | 70 ++++++++++++++++++++ package.json | 10 +-- packages/example-react-app/package.json | 2 +- packages/web3-plugin-wallet-rpc/.npmignore | 2 + packages/web3-plugin-wallet-rpc/package.json | 8 +-- 7 files changed, 137 insertions(+), 17 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 RELEASE.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..2868921 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,48 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + + +## [Unreleased] + +### Added + +- **Initial Release**: This version includes support for the following wallet RPC methods: + - `wallet_addEthereumChain` + - `wallet_switchEthereumChain` + - `wallet_watchAsset` + - `wallet_requestPermissions` + - `wallet_getPermissions` + - `wallet_revokePermissions` diff --git a/README.md b/README.md index d6e75b8..b5ddab8 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ web3.registerPlugin(new WalletRpcPlugin()); Click on the method name for detailed documentation. -#### [addEthereumChain](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#addEthereumChain) +#### [addEthereumChain](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#addEthereumChain) Invokes the `wallet_addEthereumChain` method as defined in [EIP-3085](https://eips.ethereum.org/EIPS/eip-3085#wallet_addethereumchain). @@ -62,7 +62,7 @@ await web3.walletRpc.addEthereumChain({ }); ``` -#### [switchEthereumChain](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#switchEthereumChain) +#### [switchEthereumChain](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#switchEthereumChain) Invokes the `wallet_switchEthereumChain` method as defined in [EIP-3326](https://eips.ethereum.org/EIPS/eip-3326#wallet_switchethereumchain). @@ -70,7 +70,7 @@ Invokes the `wallet_switchEthereumChain` method as defined in [EIP-3326](https:/ await web3.walletRpc.switchEthereumChain(5000); ``` -#### [watchAsset](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#watchAsset) +#### [watchAsset](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#watchAsset) Invokes the `wallet_watchAsset` method as defined in [EIP-747](https://eips.ethereum.org/EIPS/eip-747#specification). @@ -84,7 +84,7 @@ await web3.walletRpc.watchAsset({ }); ``` -#### [requestPermissions](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#requestPermissions) +#### [requestPermissions](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#requestPermissions) Invokes the `wallet_requestPermissions` method as defined in [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255#specification). @@ -94,7 +94,7 @@ const permissions = await web3.walletRpc.requestPermissions({ }); ``` -#### [getPermissions](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#getPermissions) +#### [getPermissions](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#getPermissions) Invokes the `wallet_getPermissions` method as defined in [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255#specification). @@ -102,7 +102,7 @@ Invokes the `wallet_getPermissions` method as defined in [EIP-2255](https://eips const permissions = await web3.walletRpc.getPermissions(); ``` -#### [revokePermissions](https://web3.github.io/web3-wallet-rpc-utils/classes/WalletRpcPlugin.html#revokePermissions) +#### [revokePermissions](https://web3.github.io/web3-plugin-wallet-rpc/classes/WalletRpcPlugin.html#revokePermissions) Invokes the `wallet_revokePermissions` method as defined in [MetaMask docs](https://docs.metamask.io/wallet/reference/json-rpc-methods/wallet_revokepermissions/). @@ -114,7 +114,7 @@ const permissions = await web3.walletRpc.revokePermissions({ ## Contributing -We welcome pull requests! For major changes, please [open an issue](https://github.com/web3/web3-wallet-rpc-utils) first to discuss the proposed modifications. +We welcome pull requests! For major changes, please [open an issue](https://github.com/web3/web3-plugin-wallet-rpc) first to discuss the proposed modifications. Also, ensure that you update tests as needed to reflect the changes. ## License diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..f4d9cc0 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,70 @@ +# Release Process for Web3js Plugin + +### 1. Create a Release Branch + +```bash +git checkout -b release/bumped-version +``` + +### 2. Install Dependencies + +Ensure all dependencies are installed: + +```bash +npm i +``` + +### 3. Bump Version Number + +- **Note**: Skip this step for the first version. +- For subsequent releases, update the version number in `package.json`. + +### 4. Build the Project + +```bash +npm run build +``` + +### 5. Update the Changelog + +- Move items from under `## [Unreleased]` to the new release version (e.g., `## [0.1.0]`). +- Add a new `## [Unreleased]` section at the end of the file. + +### 6. Create a Tag + +```bash +git tag bumped-version +``` + +### 7. Push Branch and Tag to Repository + +```bash +git push origin release/bumped-version +git push origin --tags +``` + +### 8. Create a Pull Request + +- Create a PR to merge `release/bumped-version` into the `main` branch. +- Wait for all tests to pass. + +### 9. Publish on GitHub + +- Navigate to [GitHub Releases](https://github.com/web3/web3-plugin-wallet-rpc/releases/new). +- Select the recently pushed tag. +- Add a release title and notes. +- Check "pre-release" if it’s an alpha, beta, RC, or dev release. +- Check “Create discussion for this release”. +- Click the **Publish** button. + +### 10. Publish on npm + +```bash +npm login +npm publish +npm logout +``` + +### 11. Merge Back the PR + +- Merge the PR created in step 8 back into the `main` branch. diff --git a/package.json b/package.json index 81210e4..1cf4d04 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "web3-plugin-wallet-rpc", + "name": "web3-plugin-wallet-workspace", "private": true, - "version": "1.0.0", + "version": "0.1.0", "description": "Web3.js plugin to add support for wallet-related RPC methods", - "homepage": "https://github.com/web3/web3-wallet-rpc-utils#readme", + "homepage": "https://github.com/web3/web3-plugin-wallet-rpc#readme", "bugs": { - "url": "https://github.com/web3/web3-wallet-rpc-utils/issues" + "url": "https://github.com/web3/web3-plugin-wallet-rpc/issues" }, "contributors": [ "ChainSafe " @@ -13,7 +13,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git@github.com:web3/web3-wallet-rpc-utils.git" + "url": "git@github.com:web3/web3-plugin-wallet-rpc.git" }, "workspaces": [ "packages/example-react-app", diff --git a/packages/example-react-app/package.json b/packages/example-react-app/package.json index b10625f..f6200f1 100644 --- a/packages/example-react-app/package.json +++ b/packages/example-react-app/package.json @@ -12,7 +12,7 @@ "react-dom": "^18.3.1", "uuid": "^10.0.0", "web3": "^4.14.0", - "web3-plugin-wallet-rpc": "*" + "web3-plugin-wallet-rpc": "0.1.0-rc.1" }, "devDependencies": { "@chainsafe/eslint-config": "^2.0.0", diff --git a/packages/web3-plugin-wallet-rpc/.npmignore b/packages/web3-plugin-wallet-rpc/.npmignore index 44d5996..05e49d0 100644 --- a/packages/web3-plugin-wallet-rpc/.npmignore +++ b/packages/web3-plugin-wallet-rpc/.npmignore @@ -10,6 +10,8 @@ .prettierignore *.log +node_modules/ +docs/ coverage/ benchmark/ .coverage/ diff --git a/packages/web3-plugin-wallet-rpc/package.json b/packages/web3-plugin-wallet-rpc/package.json index 86d67a1..bedeb11 100644 --- a/packages/web3-plugin-wallet-rpc/package.json +++ b/packages/web3-plugin-wallet-rpc/package.json @@ -1,12 +1,12 @@ { "name": "web3-plugin-wallet-rpc", - "version": "1.0.0", + "version": "0.1.0-rc.1", "description": "Web3.js plugin to add support for wallet-related RPC methods", "main": "lib/index.js", "types": "lib/index.d.ts", - "homepage": "https://github.com/web3/web3-wallet-rpc-utils#readme", + "homepage": "https://github.com/web3/web3-plugin-wallet-rpc#readme", "bugs": { - "url": "https://github.com/web3/web3-wallet-rpc-utils/issues" + "url": "https://github.com/web3/web3-plugin-wallet-rpc/issues" }, "scripts": { "lint": "eslint '{src,test}/**/*.ts'", @@ -20,7 +20,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "git@github.com:web3/web3-wallet-rpc-utils.git" + "url": "git@github.com:web3/web3-plugin-wallet-rpc.git" }, "devDependencies": { "@chainsafe/eslint-config": "^2.0.0",