simple-whisper
(A demo will be released when metamask upgrades to Web3 1.0)
install
npm install simple-whisper#or yarn add simple-whisper
Or include in your html dist/simple-whisper.min.js
This library requiere a Web3 implementation. If the client is not Web3 1.0 ready, you can provide an implementation
npm install web3-1beta#or yarn add web3-1beta
You can easily test your code on a private node with docker:
npm run run-local-nodenpm run stop-local-node#or yarn run-local-nodeyarn stop-local-node
use
simple symetric key channel
const u1 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u1 u1; u1; const u2 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u2 u2; u2;
answer an offer
const u1 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u1 u1 u1; u1; u1; const u2 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u2 u2 u2; u2;
asymetric key
const u1 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u1 u1; const u2 = Web3givenProvider || 'ws://localhost:8546';await Promiseall u2 u2; u2;u1; u1; u2; u1;u2;
API
contribute
- Open an issue to discuss about your ideas
- Be sure the code 100% tested
- Be sure the api's docs are up to date
- Make a PR !
If you have created something awesome using simple-whisper, tell me! I'd love to share it!