Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Silvestr Predko 007e30cb6e Update a Docker file for new integration tests 2 gadus atpakaļ
.github/workflows Add auto PR linkage 2 gadus atpakaļ
.vscode Add initial source code 2 gadus atpakaļ
common-api Add tests 2 gadus atpakaļ
example Improved example HTML 2 gadus atpakaļ
near-client Add new API `create_account` and `delete_account` 2 gadus atpakaļ
web-client Fixed duplication at the end of url origin 2 gadus atpakaļ
.dockerignore Add /pkg to docker ignore 2 gadus atpakaļ
.gitignore Rename js-client to example 2 gadus atpakaļ
Cargo.toml Rename crate from wasm-client to web-client 2 gadus atpakaļ
Dockerfile Update a Docker file for new integration tests 2 gadus atpakaļ
README.md Update test section for web-client 2 gadus atpakaļ
docker-compose.yml Update a Docker file for new integration tests 2 gadus atpakaļ

README.md

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

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