Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simplito/privmx-webendpoint-sdk-example
Example usage of PrivMX Endpoint methods in JavaScript/TypeScript.
https://github.com/simplito/privmx-webendpoint-sdk-example
encryption javascript privacy privmx sdk typescript
Last synced: about 12 hours ago
JSON representation
Example usage of PrivMX Endpoint methods in JavaScript/TypeScript.
- Host: GitHub
- URL: https://github.com/simplito/privmx-webendpoint-sdk-example
- Owner: simplito
- License: other
- Created: 2024-11-05T08:41:26.000Z (10 days ago)
- Default Branch: main
- Last Pushed: 2024-11-06T10:03:01.000Z (9 days ago)
- Last Synced: 2024-11-06T11:18:26.369Z (9 days ago)
- Topics: encryption, javascript, privacy, privmx, sdk, typescript
- Language: TypeScript
- Homepage:
- Size: 1.11 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Endpoint Example
Example usage of PrivMX Endpoint methods in JavaScript/TypeScript.
## Getting Started
1. Clone Bridge CLI:
```shell
git clone https://github.com/simplito/privmx-bridge-docker
```
2. Run setup script:
```shell
./setup.sh
```
This will fetch the necessary Docker images, create Access Keys and your first Context. After a successful setup, CLI
will
display all the API keys necessary for connection.3. Generate keys.
In your terminal, generate private-public key pair for your user. The keys must be in WIF format:
```shell
./genKeyPair.sh
```
4. Register user.With the keys ready, register `userId` - public key pair in your Context. Don't forget to replace placeholder values
with the ones created earlier:
```shell
./cli.sh context/addUserToContext '{"contextId": "CONTEXT_ID", "userId":"USER_ID", "userPubKey":"USER_PUBLIC_KEY" }'
```### Setup app
1. Fill your env constants in `./lib.ts` file with variables created during the Bridge setup.
2. Run
```sh
npm install
npm run dev
```
3. Open app on path displayed in your console.## Usage
This is an example app. To see the **result of functions open web browser console.**
Code snippets are located inside `./src/threads.ts` and `./src/stores.ts` files.## Documentation
Full overview of this package's functions, types and example usage can be
found in our [documentation](https://docs.privmx.dev/js/server-configuration).## License
MIT [LICENSE](./LICENSE)