Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Silvestr Predko 87b90f2511 Add a separate struct that holds a bandwidth information il y a 2 ans
.github/workflows Implement exchange protocol that is used by key-exchange-server * Split codebase to different source files * Modified integration test il y a 2 ans
common-api Add a separate struct that holds a bandwidth information il y a 2 ans
example Fixed a e2ee issues * Move application from Typescript to plain javascript * Change secret key creation mechanism il y a 2 ans
near-primitives-light Fix clippy lint issues il y a 2 ans
near-rpc Implement exchange protocol that is used by key-exchange-server * Split codebase to different source files * Modified integration test il y a 2 ans
web-client Implement exchange protocol that is used by key-exchange-server * Split codebase to different source files * Modified integration test il y a 2 ans
.dockerignore Add /pkg to docker ignore il y a 2 ans
.gitignore Rename js-client to example il y a 2 ans
Cargo.toml Add near-primitives-light instead of an near-primitives il y a 2 ans
Dockerfile Implement exchange protocol that is used by key-exchange-server * Split codebase to different source files * Modified integration test il y a 2 ans
README.md Add CI badge to README il y a 2 ans
docker-compose.yml Update a Docker file for new integration tests il y a 2 ans

README.md

CI

Client

Common-API 🦆

Library that is used among other repositories. Implements Borsh implementation for structures and enums. Also contain Diffie-Hellman and Ed25519 API

Near-Client 🗿

Client library for Near RPC

Web-Client 🦘

Client library for communication from browser and Near blockchain. It’s a high-level API. User doesn’t need to understand how blockchain works.

Build

wasm-pack build web-client --target bundler --out-dir ../pkg

Test

Pre requirements: Clone a key-exchange-server and near-smartcontracts. Deploy their docker instances:

⚠️ Please keep the order(near-smartcontracts depends on the key-exchange-server network)

  1. key-exchange-server: bash docker-compose up -d
  2. near-smartcontracts: bash docker-compose -f docker-compose.yml -f docker-compose.tests.yml up -d

Then:

docker-compose up

Diagrams

sequenceDiagram
    participant Initiator
    participant Alice
    participant Bob

    Initiator->>Blockchain: create meeting with id
    Initiator-->>Internet: share meeting Id
    loop
        Initiator->>Blockchain: wait for pub. key for Alice and Bob
        activate Blockchain
        Blockchain--)Initiator: receive pub key [Alice, Bob]
        deactivate Blockchain
    end
    par
        Bob->>Internet: get meeting id
        activate Internet
        Internet--)Bob: receive meeting id
        deactivate Internet
    and
        Alice->>Internet: get meeting id
        activate Internet
        Internet--)Alice: receive meeting id
        deactivate Internet
    end
    par
        Bob->>Blockchain: put temp public key for Bob
        activate Blockchain
        Blockchain--)Bob: Initiator public key
        deactivate Blockchain
    and
        Alice->>Blockchain: put temp public key for Alice
        activate Blockchain
        Blockchain--)Alice: Initiator public key
        deactivate Blockchain
    end
    Initiator-->>RelayServer: Olm message(symetric key) by Bob pub key
    RelayServer-->>Bob: Olm message(symetric key) by Bob pub key
    Initiator-->>RelayServer: Olm message(symetric key) by Alice pub key
    RelayServer-->>Alice: Olm message(symetric key) by Alice pub key