Rename Eth-DM to Eth-PM

"Direct Message" can lead to confusion with "Direct Connection" that
refers to low latency network connections.
This commit is contained in:
Franck Royer 2021-08-17 16:01:27 +10:00
parent 43f57aeb3e
commit 9692b4af72
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
37 changed files with 32 additions and 32 deletions

View File

@ -49,20 +49,20 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/web-chat/build
- name: "[eth-dm] install using npm i"
- name: "[eth-pm] install using npm i"
run: npm install
working-directory: examples/eth-dm
working-directory: examples/eth-pm
- name: "[eth-dm] build"
- name: "[eth-pm] build"
run: npm run build
working-directory: examples/eth-dm
working-directory: examples/eth-pm
- name: "[eth-dm] Deploy on gh pages to /eth-dm"
- name: "[eth-pm] Deploy on gh pages to /eth-pm"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./examples/eth-dm/build
destination_dir: eth-dm
publish_dir: ./examples/eth-pm/build
destination_dir: eth-pm
- name: "[eth-pm-wallet] install using npm i"
run: npm install

View File

@ -12,7 +12,7 @@ jobs:
examples_build_and_test:
strategy:
matrix:
example: [ web-chat, eth-dm, eth-pm-wallet-encryption, min-react-js-chat, store-reactjs-chat ]
example: [ web-chat, eth-pm, eth-pm-wallet-encryption, min-react-js-chat, store-reactjs-chat ]
runs-on: ubuntu-latest
steps:

View File

@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Renamed `discover.getStatusFleetNodes` to `discovery.getBootstrapNodes`;
Changed the API to allow retrieval of bootstrap nodes from other sources.
- Examples: Renamed `eth-dm` to `eth-pm`: "Direct Message" can lead to confusion with "Direct Connection" that
refers to low latency network connections.
### Removed
- Examples (cli-chat): The focus of this library is Web environment;

View File

@ -6,8 +6,8 @@ import { hexToBuf, equalByteArrays, bufToHex } from 'js-waku/lib/utils';
import * as sigUtil from 'eth-sig-util';
/**
* Sign the Eth-DM public key with Web3. This can then be published to let other
* users know to use this Eth-DM public key to encrypt messages for the
* Sign the encryption public key with Web3. This can then be published to let other
* users know to use this encryption public key to encrypt messages for the
* Ethereum Address holder.
*/
export async function createPublicKeyMessage(

View File

@ -11,7 +11,7 @@ const Root = protobuf.Root,
Field = protobuf.Field;
/**
* Message used to communicate the Eth-Dm public key linked to a given Ethereum account
* Message used to communicate the encryption public key linked to a given Ethereum account
*/
export class PublicKeyMessage {
private static Type = new Type('PublicKeyMessage')

View File

@ -1,4 +1,4 @@
# Ethereum Direct Message Web App
# Ethereum Private Message Web App
**Demonstrates**:
@ -10,13 +10,13 @@
A PoC implementation of [20/ETH-DM](https://rfc.vac.dev/spec/20/).
Ethereum Direct Message, or Eth-DM, is a protocol that allows sending encrypted message to a recipient,
Ethereum Private Message, or Eth-PM, is a protocol that allows sending encrypted message to a recipient,
only knowing their Ethereum Address.
This is protocol has been created to demonstrated how encryption and signature could be added to messages
This protocol has been created to demonstrated how encryption and signature could be added to message
sent over the Waku v2 network.
The `main` branch's HEAD is deployed on GitHub Pages at https://status-im.github.io/js-waku/eth-dm/.
The `main` branch's HEAD is deployed on GitHub Pages at https://status-im.github.io/js-waku/eth-pm/.
To run a development version locally, do:
@ -24,7 +24,7 @@ To run a development version locally, do:
git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install # Install dependencies for js-waku
npm run build # Build js-waku
cd examples/eth-dm
cd examples/eth-pm
npm install # Install dependencies for the web app
npm run start # Start development server to serve the web app on http://localhost:3000/js-waku/eth-dm
npm run start # Start development server to serve the web app on http://localhost:3000/js-waku/eth-pm
```

View File

@ -1,5 +1,5 @@
{
"name": "eth-dm",
"name": "eth-pm",
"version": "0.1.0",
"lockfileVersion": 2,
"requires": true,

View File

@ -1,8 +1,8 @@
{
"name": "eth-dm",
"name": "eth-pm",
"version": "0.1.0",
"private": true,
"homepage": "/js-waku/eth-dm",
"homepage": "/js-waku/eth-pm",
"dependencies": {
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -12,9 +12,7 @@ export interface KeyPair {
}
/**
* Use the signature of the Salt ("Salt for eth-dm...") as
* the entropy for the EthCrypto keypair. Note that the entropy is hashed with keccak256
* to make the private key.
* Generate new encryption keypair.
*/
export async function generateEncryptionKeyPair(): Promise<KeyPair> {
const privateKey = generatePrivateKey();
@ -23,8 +21,8 @@ export async function generateEncryptionKeyPair(): Promise<KeyPair> {
}
/**
* Sign the Eth-DM public key with Web3. This can then be published to let other
* users know to use this Eth-DM public key to encrypt messages for the
* Sign the encryption public key with Web3. This can then be published to let other
* users know to use this public key to encrypt messages for the
* Ethereum Address holder.
*/
export async function createPublicKeyMessage(
@ -62,10 +60,10 @@ export function validatePublicKeyMessage(msg: PublicKeyMessage): boolean {
}
/**
* Prepare Eth-Dm Public key to be signed for publication.
* Prepare encryption public key to be signed for publication.
* The public key is set in on Object `{ encryptionPublicKey: string; }`, converted
* to JSON and then hashed with Keccak256.
* The usage of the object helps ensure the signature is only used in an Eth-DM
* The usage of the object helps ensure the signature is only used in an Eth-PM
* context.
*/
function formatPublicKeyForSignature(encryptionPublicKey: Uint8Array): string {

View File

@ -69,7 +69,7 @@ function getWrapKey(keyMaterial: CryptoKey, salt: Uint8Array) {
}
/**
* Encrypt Eth-DM KeyPair using provided password
* Encrypt encryption KeyPair using provided password.
*/
async function encryptKey(encryptionKeyPair: KeyPair, password: string) {
const keyMaterial = await getKeyMaterial(password);

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -11,7 +11,7 @@ const Root = protobuf.Root,
Field = protobuf.Field;
/**
* Message used to communicate the Eth-Dm public key linked to a given Ethereum account
* Message used to communicate the encryption public key linked to a given Ethereum account
*/
export class PublicKeyMessage {
private static Type = new Type('PublicKeyMessage')

View File

@ -5,8 +5,8 @@ import { validatePublicKeyMessage } from './crypto';
import { Message } from './messaging/Messages';
import { bufToHex, equalByteArrays } from 'js-waku/lib/utils';
export const PublicKeyContentTopic = '/eth-dm/1/public-key/proto';
export const DirectMessageContentTopic = '/eth-dm/1/direct-message/proto';
export const PublicKeyContentTopic = '/eth-pm/1/public-key/proto';
export const DirectMessageContentTopic = '/eth-pm/1/direct-message/proto';
export async function initWaku(): Promise<Waku> {
const waku = await Waku.create({ bootstrap: true });

View File

@ -3,5 +3,5 @@
Here is the list of the code examples and the features they demonstrate:
- [Web Chat App](web-chat): Group chat, React/TypeScript, Relay, Store.
- [Ethereum Direct Message Web App](eth-dm): Private Messaging, React/TypeScript, Light Push, Signature with Web3, Asymmetric Encryption.
- [Ethereum Private Message Web App](eth-pm): Private Messaging, React/TypeScript, Light Push, Signature with Web3, Asymmetric Encryption.
- [Minimal ReactJS Chat App](min-react-js-chat): Group chat, React/JavaScript, Relay, Protobuf using `protons`.