Skip to content

Commit

Permalink
chore: release 0.1.0-rc.1 (#22)
Browse files Browse the repository at this point in the history
* chore: update links after repo rename
* chore: release 0.1.0-rc.1
* chore: after release improvements
  • Loading branch information
krzysu authored Nov 4, 2024
1 parent 4ab50e5 commit 51cca21
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 18 deletions.
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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).

<!-- EXAMPLE
## [1.0.0]
### Added
- I've added feature XY (#1000)
### Changed
- I've cleaned up XY (#1000)
### Deprecated
- I've deprecated XY (#1000)
### Removed
- I've removed XY (#1000)
### Fixed
- I've fixed XY (#1000)
### Security
- I've improved the security in XY (#1000)
-->

## [0.1.0-rc.1]

### 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`

## [Unreleased]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -62,15 +62,15 @@ 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).

```typescript
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).

Expand All @@ -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).

Expand All @@ -94,15 +94,15 @@ 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).

```typescript
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/).

Expand All @@ -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
Expand Down
73 changes: 73 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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
yarn
```

### 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
yarn 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
cd packages/web3-plugin-wallet-rpc

npm login
npm publish --dry-run # check what will be published
npm publish
npm logout
```

### 11. Merge Back the PR

- Merge the PR created in step 8 back into the `main` branch.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"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 <[email protected]>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "[email protected]:web3/web3-wallet-rpc-utils.git"
"url": "git+ssh://git@github.com/web3/web3-plugin-wallet-rpc.git"
},
"workspaces": [
"packages/example-react-app",
Expand Down
2 changes: 1 addition & 1 deletion packages/example-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/web3-plugin-wallet-rpc/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
.prettierignore
*.log

node_modules/
docs/
coverage/
benchmark/
.coverage/
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-plugin-wallet-rpc/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Web3.js Plugin for Wallet RPC methods

Refer to the [README](../../README.md) file located in the root of this repository.
Refer to the [README](https://github.com/web3/web3-plugin-wallet-rpc/blob/main/README.md) file located in the root of this repository.
8 changes: 4 additions & 4 deletions packages/web3-plugin-wallet-rpc/package.json
Original file line number Diff line number Diff line change
@@ -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'",
Expand All @@ -20,7 +20,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "[email protected]:web3/web3-wallet-rpc-utils.git"
"url": "git+ssh://git@github.com/web3/web3-plugin-wallet-rpc.git"
},
"devDependencies": {
"@chainsafe/eslint-config": "^2.0.0",
Expand Down

0 comments on commit 51cca21

Please sign in to comment.